Geany
0.20
|
Plugin utility functions. More...
Functions | |
void | plugin_add_toolbar_item (struct GeanyPlugin *plugin, GtkToolItem *item) |
Inserts a toolbar item before the Quit button, or after the previous plugin toolbar item. | |
void | plugin_module_make_resident (struct GeanyPlugin *plugin) |
Ensures that a plugin's module (*.so) will never be unloaded. | |
struct GeanyKeyGroup * | plugin_set_key_group (struct GeanyPlugin *plugin, const gchar *section_name, gsize count, GeanyKeyGroupCallback callback) |
Sets up or resizes a keybinding group for the plugin. | |
void | plugin_show_configure (struct GeanyPlugin *plugin) |
Shows the plugin's configure dialog. | |
void | plugin_signal_connect (struct GeanyPlugin *plugin, GObject *object, const gchar *signal_name, gboolean after, GCallback callback, gpointer user_data) |
Connects a signal which will be disconnected on unloading the plugin, to prevent a possible segfault. |
Plugin utility functions.
These functions all take the geany_plugin symbol as their first argument.
void plugin_add_toolbar_item | ( | GeanyPlugin * | plugin, |
GtkToolItem * | item | ||
) |
Inserts a toolbar item before the Quit button, or after the previous plugin toolbar item.
A separator is added on the first call to this function, and will be shown when item is shown; hidden when item is hidden.
plugin | Must be geany_plugin. |
item | The item to add. |
void plugin_module_make_resident | ( | GeanyPlugin * | plugin | ) |
Ensures that a plugin's module (*.so) will never be unloaded.
This is necessary if you register new GTypes in your plugin, e.g. when using own classes using the GObject system.
plugin | Must be geany_plugin. |
struct GeanyKeyGroup* plugin_set_key_group | ( | GeanyPlugin * | plugin, |
const gchar * | section_name, | ||
gsize | count, | ||
GeanyKeyGroupCallback | callback | ||
) | [read] |
Sets up or resizes a keybinding group for the plugin.
You should then call keybindings_set_item() for each keybinding in the group.
plugin | Must be geany_plugin. |
section_name | Name used in the configuration file, such as "html_chars" . |
count | Number of keybindings for the group. |
callback | Group callback, or NULL if you only want individual keybinding callbacks. |
void plugin_show_configure | ( | GeanyPlugin * | plugin | ) |
Shows the plugin's configure dialog.
The plugin must implement one of the plugin_configure() or plugin_configure_single() symbols.
plugin | Must be geany_plugin. |
void plugin_signal_connect | ( | GeanyPlugin * | plugin, |
GObject * | object, | ||
const gchar * | signal_name, | ||
gboolean | after, | ||
GCallback | callback, | ||
gpointer | user_data | ||
) |
Connects a signal which will be disconnected on unloading the plugin, to prevent a possible segfault.
plugin | Must be geany_plugin. |
object | Object to connect to, or NULL when using Geany signals . |
signal_name | The name of the signal. For a list of available signals, please see the Signal documentation . |
after | Set to TRUE to call your handler after the main signal handlers have been called (if supported by signal_name). |
callback | The function to call when the signal is emitted. |
user_data | The user data passed to the signal handler. |