Top | ![]() |
![]() |
![]() |
![]() |
void | peas_activatable_activate () |
void | peas_activatable_deactivate () |
void | peas_activatable_update_state () |
PeasActivatable is an interface which should be implemented by plugins that should be activated on an object of a certain type (depending on the application). For instance, in a typical windowed application, PeasActivatable plugin instances could be bound to individual toplevel windows.
It is typical to use PeasActivatable along with PeasExtensionSet in order to activate and deactivate extensions automatically when plugins are loaded or unloaded.
You can also use the code of this interface as a base for your own
extension types, as illustrated by gedit's GeditWindowActivatable
and
GeditDocumentActivatable
interfaces.
void
peas_activatable_activate (PeasActivatable *activatable
);
Activates the extension on the targetted object.
On activation, the extension should hook itself to the object where it makes sense.
void
peas_activatable_deactivate (PeasActivatable *activatable
);
Deactivates the extension on the targetted object.
On deactivation, an extension should remove itself from all the hooks it used and should perform any cleanup required, so it can be unreffed safely and without any more effect on the host application.
void
peas_activatable_update_state (PeasActivatable *activatable
);
Triggers an update of the extension internal state to take into account state changes in the targetted object, due to some event or user action.
struct PeasActivatableInterface { GTypeInterface g_iface; /* Virtual public methods */ void (*activate) (PeasActivatable *activatable); void (*deactivate) (PeasActivatable *activatable); void (*update_state) (PeasActivatable *activatable); };
Provides an interface for activatable plugins.
“object”
property “object” GObject *
The object property contains the targetted object for this PeasActivatable instance, for example a toplevel window in a typical windowed application. It is set at construction time and won't change.
Flags: Read / Write / Construct Only