Plugins

Plugins — Plugins management and activation

Synopsis




void        anjuta_plugins_init             (GList *plugin_dirs);
void        anjuta_plugins_finalize         (void);
GSList*     anjuta_plugins_query            (AnjutaShell *shell,
                                             const gchar *section_name,
                                             const gchar *attribute_name,
                                             const gchar *attribute_value,
                                             ...);
const AnjutaPluginDescription* anjuta_plugins_get_description
                                            (AnjutaShell *shell,
                                             GObject *plugin);
GObject*    anjuta_plugins_get_plugin       (AnjutaShell *shell,
                                             const gchar *iface_name);
#define     anjuta_plugins_get_interface    (shell, iface_type, error)
GtkWidget*  anjuta_plugins_get_installed_dialog
                                            (AnjutaShell *shell);
void        anjuta_plugins_unload_all       (AnjutaShell *shell);
AnjutaPluginDescription* anjuta_plugins_select
                                            (AnjutaShell *shell,
                                             gchar *title,
                                             gchar *description,
                                             GSList *plugin_descriptions);

Description

Details

anjuta_plugins_init ()

void        anjuta_plugins_init             (GList *plugin_dirs);

plugin_dirs :

anjuta_plugins_finalize ()

void        anjuta_plugins_finalize         (void);


anjuta_plugins_query ()

GSList*     anjuta_plugins_query            (AnjutaShell *shell,
                                             const gchar *section_name,
                                             const gchar *attribute_name,
                                             const gchar *attribute_value,
                                             ...);

shell :
section_name :
attribute_name :
attribute_value :
... :
Returns :

anjuta_plugins_get_description ()

const AnjutaPluginDescription* anjuta_plugins_get_description
                                            (AnjutaShell *shell,
                                             GObject *plugin);

shell :
plugin :
Returns :

anjuta_plugins_get_plugin ()

GObject*    anjuta_plugins_get_plugin       (AnjutaShell *shell,
                                             const gchar *iface_name);

Searches the currently available plugins to find the one which implements the given interface as primary interface and returns it. If the plugin is not yet loaded, it will be loaded and activated. The returned object is garanteed to be an implementor of the interface (as exported by the plugin metafile). It only searches from the pool of plugin objects loaded in this shell and can only search by primary interface. If there are more objects implementing this primary interface, user might be prompted to select one from them (and might give the option to use it as default for future queries). A typical usage of this function is:

GObject *docman =
    anjuta_plugins_get_plugin (shell, "IAnjutaDocumentManager", error);

Notice that this function takes the interface name string as string, unlike anjuta_plugins_get_interface() which takes the type directly.

shell : A AnjutaShell interface
iface_name : The interface implemented by the object to be found
Returns : The plugin object (subclass of AnjutaPlugin) which implements the given interface. See AnjutaPlugin for more detail on interfaces implemented by plugins.

anjuta_plugins_get_interface()

#define     anjuta_plugins_get_interface(shell, iface_type, error)

Equivalent to anjuta_shell_get_object(), but additionally typecasts returned object to the interface type. It also takes interface type directly. A usage of this function is:

IAnjutaDocumentManager *docman =
    anjuta_shell_get_interface (shell, IAnjutaDocumentManager, error);

shell : A AnjutaShell object
iface_type : The interface type implemented by the object to be found
error : Error propagation object.

anjuta_plugins_get_installed_dialog ()

GtkWidget*  anjuta_plugins_get_installed_dialog
                                            (AnjutaShell *shell);

shell :
Returns :

anjuta_plugins_unload_all ()

void        anjuta_plugins_unload_all       (AnjutaShell *shell);

shell :

anjuta_plugins_select ()

AnjutaPluginDescription* anjuta_plugins_select
                                            (AnjutaShell *shell,
                                             gchar *title,
                                             gchar *description,
                                             GSList *plugin_descriptions);

shell :
title :
description :
plugin_descriptions :
Returns :