Top | ![]() |
![]() |
![]() |
![]() |
void | gtd_activatable_activate () |
void | gtd_activatable_deactivate () |
GList * | gtd_activatable_get_header_widgets () |
GtkWidget * | gtd_activatable_get_preferences_panel () |
GList * | gtd_activatable_get_panels () |
GList * | gtd_activatable_get_providers () |
void | panel-added | Run Last |
void | panel-removed | Run Last |
void | provider-added | Run Last |
void | provider-changed | Run Last |
void | provider-removed | Run Last |
The GtdActivatable interface is the interface plugins must implement in order to be seen by GNOME To Do.
When plugins are loaded, the gtd_activatable_activate()
vfunc
is called. Use this vfunc to load anything that depends on GNOME
To Do.
When plugins are unloaded, the gtd_activatable_deactivate()
vfunc
if called. Ideally, the implementation should undo everything that
was done on gtd_activatable_activate()
.
A plugin implementation may expose one or more GtdProvider instances, which are the data sources of GNOME To Do. See the 'eds' plugin for a reference on how to expose one ('local') and multiple (Online Accounts) providers.
Plugins may also expose one or more GtdPanel implementations.
Optionally, a plugin may expose a preferences panel. See gtd_activatable_get_preferences_panel()
.
void
gtd_activatable_activate (GtdActivatable *activatable
);
Activates the extension. This is the starting point where the implementation does everything it needs to do. Avoid doing it earlier than this call.
This function is called after the extension is loaded and the signals are connected. If you want to do anything before that, the _init function should be used instead.
void
gtd_activatable_deactivate (GtdActivatable *activatable
);
Deactivates the extension. Here, the extension should remove all providers and panels it set.
This function is called before the extension is removed. At this point, the plugin manager already removed all providers and widgets this extension exported. If you want to do anything after the extension is removed, use GObject::finalize instead.
GList *
gtd_activatable_get_header_widgets (GtdActivatable *activatable
);
Retrieve the list header widgets of activatable
if any.
GtkWidget *
gtd_activatable_get_preferences_panel (GtdActivatable *activatable
);
Retrieve the preferences panel of activatable
if any.
GList *
gtd_activatable_get_panels (GtdActivatable *activatable
);
Retrieve the panel list of activatable
if any.
GList *
gtd_activatable_get_providers (GtdActivatable *activatable
);
Retrieve the providers of activatable
if any.
struct GtdActivatableInterface { GTypeInterface parent; void (*activate) (GtdActivatable *activatable); void (*deactivate) (GtdActivatable *activatable); GList* (*get_header_widgets) (GtdActivatable *activatable); GtkWidget* (*get_preferences_panel) (GtdActivatable *activatable); GList* (*get_panels) (GtdActivatable *activatable); GList* (*get_providers) (GtdActivatable *activatable); };
“panel-added”
signalvoid user_function (GtdActivatable *activatable, GtdPanel *panel, gpointer user_data)
The ::panel-added signal is emmited after a GtdPanel is connected.
activatable |
||
panel |
a GtdPanel |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“panel-removed”
signalvoid user_function (GtdActivatable *activatable, GtdPanel *panel, gpointer user_data)
The ::panel-removed signal is emmited after a GtdPanel is removed from the list.
activatable |
||
panel |
a GtdPanel |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“provider-added”
signalvoid user_function (GtdActivatable *activatable, GtdProvider *provider, gpointer user_data)
The ::provider-added signal is emmited after a GtdProvider is connected.
Flags: Run Last
“provider-changed”
signalvoid user_function (GtdActivatable *activatable, GtdProvider *provider, gpointer user_data)
The ::provider-changed signal is emmited after a GtdProvider has any of it's properties changed.
Flags: Run Last
“provider-removed”
signalvoid user_function (GtdActivatable *activatable, GtdProvider *provider, gpointer user_data)
The ::provider-removed signal is emmited after a GtdProvider is disconnected.
Flags: Run Last