Top | ![]() |
![]() |
![]() |
![]() |
IdeWorkspaceAddinIdeWorkspaceAddin — Extend the IdeWorkspace windows |
#define | IDE_TYPE_WORKSPACE_ADDIN |
struct | IdeWorkspaceAddinInterface |
IdeWorkspaceAddin |
The IdeWorkspaceAddin is created with each IdeWorkspace, allowing plugins a chance to modify each window that is created.
If you set X-Workspace-Kind=primary
in your .plugin
file, your
addin will only be loaded in the primary workspace. You may specify
multiple workspace kinds such as primary
or secondary
separated
by a comma such as primary,secondary;
.
void ide_workspace_addin_load (IdeWorkspaceAddin *self
,IdeWorkspace *workspace
);
Lods the IdeWorkspaceAddin.
This is a good place to modify the workspace from your addin.
Remember to unmodify the workspace in ide_workspace_addin_unload()
.
Since: 3.32
void ide_workspace_addin_unload (IdeWorkspaceAddin *self
,IdeWorkspace *workspace
);
Unloads the IdeWorkspaceAddin.
This is a good place to unmodify the workspace from anything you
did in ide_workspace_addin_load()
.
Since: 3.32
void ide_workspace_addin_surface_set (IdeWorkspaceAddin *self
,IdeSurface *surface
);
This function is called to notify the addin of the current surface.
It may be set to NULL
before unloading the addin to allow addins
to do surface change state handling and cleanup in one function.
Since: 3.32
gboolean
ide_workspace_addin_can_close (IdeWorkspaceAddin *self
);
This method is called to determine if the workspace can close. If the addin
needs to prevent the workspace closing, then return FALSE
; otherwise TRUE
.
Since: 3.34
IdeWorkspaceAddin * ide_workspace_addin_find_by_module_name (IdeWorkspace *workspace
,const gchar *module_name
);
Finds the addin (if any) matching the plugin's module_name
.
Since: 3.40
struct IdeWorkspaceAddinInterface { GTypeInterface parent_iface; void (*load) (IdeWorkspaceAddin *self, IdeWorkspace *workspace); void (*unload) (IdeWorkspaceAddin *self, IdeWorkspace *workspace); void (*surface_set) (IdeWorkspaceAddin *self, IdeSurface *surface); gboolean (*can_close) (IdeWorkspaceAddin *self); };