Symbols declared from within plugins. More...
Functions | |
| void | plugin_cleanup () |
| Called before unloading the plugin. | |
| GtkWidget * | plugin_configure (GtkDialog *dialog) |
| Called before showing the plugin preferences dialog for multiple plugins. | |
| void | plugin_configure_single (GtkWidget *parent) |
| Called when a plugin should show a preferences dialog, if plugin_configure() has not been implemented. | |
| void | plugin_help () |
| Called whenever the plugin should show its documentation (if any). | |
| void | plugin_init (GeanyData *data) |
| Called after loading the plugin. | |
| void | plugin_set_info (PluginInfo *info) |
| Use the PLUGIN_SET_INFO() macro to define it. | |
| gint | plugin_version_check (gint) |
| Use the PLUGIN_VERSION_CHECK() macro instead. | |
Variables | |
| const GeanyData * | geany_data |
| Geany owned data pointers. | |
| const GeanyFunctions * | geany_functions |
| Geany owned function pointers, split into groups. | |
| const GeanyPlugin * | geany_plugin |
| Basic information for the plugin and identification. | |
| PluginCallback | plugin_callbacks [] |
An array for connecting GeanyObject events, which should be terminated with {NULL, NULL, FALSE, NULL}. | |
| PluginFields * | plugin_fields |
| const PluginInfo * | plugin_info |
| KeyBindingGroup * | plugin_key_group |
| Plugins must use the PLUGIN_KEY_GROUP() macro to define it. | |
Symbols declared from within plugins.
Geany looks for these symbols (arrays, pointers and functions) when initializing plugins. Some of them are optional, i.e. they can be omitted; others are required and must be defined. Some symbols should only be declared using specific macros in plugindata.h.
| void plugin_cleanup | ( | ) |
Called before unloading the plugin.
Required for normal plugins - it should undo everything done in plugin_init() - e.g. destroy menu items, free memory.
| GtkWidget* plugin_configure | ( | GtkDialog * | dialog | ) |
Called before showing the plugin preferences dialog for multiple plugins.
Can be omitted when not needed. The dialog will show all plugins that support this symbol together.
| dialog | The plugin preferences dialog widget - this should only be used to connect the "response" signal. If settings should be read from the dialog, the reponse will be either GTK_RESPONSE_OK or GTK_RESPONSE_APPLY. |
| void plugin_configure_single | ( | GtkWidget * | parent | ) |
Called when a plugin should show a preferences dialog, if plugin_configure() has not been implemented.
| parent | Pass this as the parent widget if showing a dialog. |
| void plugin_help | ( | ) |
Called whenever the plugin should show its documentation (if any).
This may open a dialog, a browser with a website or a local installed HTML help file(see utils_open_browser()) or something else. Can be omitted when not needed.
| void plugin_init | ( | GeanyData * | data | ) |
Called after loading the plugin.
| data | The same as geany_data. |
| void plugin_set_info | ( | PluginInfo * | info | ) |
Use the PLUGIN_SET_INFO() macro to define it.
Required by Geany. This function is called before the plugin is initialized, so Geany can read the plugin's name.
| info | The data struct which should be initialized by this function. |
| gint plugin_version_check | ( | gint | ) |
| const GeanyData* geany_data |
Geany owned data pointers.
Example: assert(geany_data->app->configdir != NULL);
| const GeanyFunctions* geany_functions |
Geany owned function pointers, split into groups.
Example:
#include "geanyfunctions.h"
...
document_new_file(NULL, NULL, NULL);
This is equivalent of geany_functions->p_document->document_new_file(NULL, NULL, NULL);
| const GeanyPlugin* geany_plugin |
Basic information for the plugin and identification.
An array for connecting GeanyObject events, which should be terminated with {NULL, NULL, FALSE, NULL}.
See Signal documentation .
Plugin owned fields, including flags.
| const PluginInfo* plugin_info |
Basic information about a plugin, which is set in plugin_set_info().
| KeyBindingGroup* plugin_key_group |
Plugins must use the PLUGIN_KEY_GROUP() macro to define it.
To setup a variable number of keybindings, e.g. based on the plugin's configuration file settings, use plugin_set_key_group() instead.
1.7.1