![]() |
![]() |
![]() |
Peas Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites |
#define PEAS_ACTIVATABLE_IFACE (obj) PeasActivatable; PeasActivatableInterface; void peas_activatable_activate (PeasActivatable *activatable
,GObject *object
); void peas_activatable_deactivate (PeasActivatable *activatable
,GObject *object
); void peas_activatable_update_state (PeasActivatable *activatable
,GObject *object
);
PeasActivatable is an interface which should be implemented by extensions that should be activated on an object of a certain type (depending on the application). For instance, in gedit, PeasActivatable extension instances are bound to individual windows.
It is typical to use PeasActivatable along with PeasExtensionSet in order to activate and deactivate extensions automatically when plugins are loaded or unloaded.
#define PEAS_ACTIVATABLE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), PEAS_TYPE_ACTIVATABLE, PeasActivatableInterface))
typedef struct { GTypeInterface g_iface; /* Virtual public methods */ void (*activate) (PeasActivatable *activatable, GObject *object); void (*deactivate) (PeasActivatable *activatable, GObject *object); void (*update_state) (PeasActivatable *activatable, GObject *object); } PeasActivatableInterface;
void peas_activatable_activate (PeasActivatable *activatable
,GObject *object
);
Activates the extension on the given object.
|
A PeasActivatable. |
|
The GObject on which the plugin should be activated. |
void peas_activatable_deactivate (PeasActivatable *activatable
,GObject *object
);
Deactivates the plugin on the given object.
|
A PeasActivatable. |
|
A GObject. |
void peas_activatable_update_state (PeasActivatable *activatable
,GObject *object
);
Triggers an update of the plugin insternal state to take into account state changes in the targetted object, due to a plugin or an user action.
|
A PeasActivatable. |
|
A GObject. |