| Farsight Reference Manual | ||||
|---|---|---|---|---|
FarsightPluginInfo;
struct FarsightPlugin;
#define FARSIGHT_INIT_PLUGIN (initfunc, plugininfo)
FarsightPlugin* farsight_plugin_load (const gchar *name);
gboolean farsight_plugin_unload (FarsightPlugin *plugin);
const gchar* farsight_plugin_get_name (FarsightPlugin *plugin);
const gchar* farsight_plugin_get_description
(FarsightPlugin *plugin);
const gchar* farsight_plugin_get_version (FarsightPlugin *plugin);
const gchar* farsight_plugin_get_author (FarsightPlugin *plugin);
const gchar* farsight_plugin_get_homepage (FarsightPlugin *plugin);
typedef struct {
guint major_version; /* major version of core that plugin was compiled for */
guint minor_version; /* minor version of core that plugin was compiled for */
gchar *description; /* description of plugin */
gchar *version; /* version of the plugin */
gchar *author; /* author of the plugin */
gchar *homepage; /* homepage of the plugin */
/* callbacks */
/* This function is called when the first instance of the plugin is
* created. It can be useful to allocate resources common for all
* instances of the plugin. If all instances of the plugin are unloaded
* and then the plugin is loaded again, this function will be called. */
void (*load) (FarsightPlugin * plugin);
/* This function is called when the last instance of the plugin is
* unloaded. It can be useful to deallocate resources common for all
* instances of the plugin. */
void (*unload) (FarsightPlugin * plugin);
} FarsightPluginInfo;
struct FarsightPlugin {
FarsightPluginInfo *info;
GType type;
GModule *handle;
gchar *name;
guint ref_count;
};
gboolean farsight_plugin_unload (FarsightPlugin *plugin);
plugin : |
|
| Returns : |
const gchar* farsight_plugin_get_name (FarsightPlugin *plugin);
Returns the name of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's name |
| Returns : | a string to the name of the plugin, NULL if invalid. |
const gchar* farsight_plugin_get_description
(FarsightPlugin *plugin);
Returns the description of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's description |
| Returns : | a string containing the description, NULL if invalid. |
const gchar* farsight_plugin_get_version (FarsightPlugin *plugin);
Returns the version of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's version |
| Returns : | a string containing the version, NULL if invalid. |
const gchar* farsight_plugin_get_author (FarsightPlugin *plugin);
Returns the author of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's author |
| Returns : | a string containing the author, NULL if invalid. |
const gchar* farsight_plugin_get_homepage (FarsightPlugin *plugin);
Returns the homepage of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's homepage |
| Returns : | a string containing the homepage, NULL if invalid. |