Header file where plugin definitions are sat. More...
Go to the source code of this file.
Data Structures | |
struct | plugin_filter_t |
struct | plugin_info_t |
Detailed information about a plugin. More... | |
struct | heraia_plugin_t |
Complete plugin structure. More... | |
Defines | |
#define | HERAIA_PLUGIN_API_VERSION 1 |
API Version to use to verify within the plugin that the interface is what expected. | |
#define | HERAIA_PRIORITY_DEFAULT 0 |
Priorities . | |
#define | HERAIA_PRIORITY_HIGHEST 9999 |
highest priority | |
#define | HERAIA_PRIORITY_LOWEST -9999 |
lowest priority | |
Typedefs | |
typedef void(* | InitProc )(heraia_struct_t *) |
typedef void(* | QuitProc )(void) |
typedef void(* | RunProc )(GtkWidget *, gpointer) |
typedef void(* | RefreshProc )(heraia_struct_t *, void *) |
typedef int | PluginPriority |
typedef gboolean(* | ImportFunction )(const gchar *filename, void *user_data) |
import / export and filters functions this may change quickly | |
typedef gboolean(* | ExportFunction )(const gchar *filename, void *user_data) |
Enumerations | |
enum | PluginType { HERAIA_PLUGIN_UNKNOWN = -1, HERAIA_PLUGIN_FILTER = 0, HERAIA_PLUGIN_ACTION = 1 } |
Plugin types. More... | |
enum | PluginState { PLUGIN_STATE_RUNNING, PLUGIN_STATE_INITIALIZING, PLUGIN_STATE_LOADED, PLUGIN_STATE_NEW, PLUGIN_STATE_EXITING, PLUGIN_STATE_NONE } |
May indicate the plugin state. More... | |
Functions | |
gboolean | plugin_capable (void) |
Says whether the system can handle plugins (or not). | |
heraia_plugin_t * | new_plugin (void) |
Creates a new empty plugin it may be initialised by the plugin itself ! | |
void | free_plugin (heraia_plugin_t *plugin) |
free an unused plugin use with caution | |
void | load_plugins (heraia_struct_t *main_struct) |
looks at the plugins dir(s) and loads the needed plugins (all ;-) (one at a time !!) | |
void | add_entry_to_plugins_menu (heraia_struct_t *main_struct, heraia_plugin_t *plugin) |
adds a menu entry to the plugin menu adds a signal handler when the menu is toggled | |
heraia_plugin_t * | find_plugin_by_name (GList *plugins_list, gchar *name) |
Finds the desired plugin by its name and return the plugin structure or NULL. | |
gboolean | load_plugin_xml (heraia_struct_t *main_struct, heraia_plugin_t *plugin) |
Loads the xml's definition file that describes the plugin (.gtkbuilder suffix) tries the paths found in the location_list. | |
void | refresh_all_plugins (heraia_struct_t *main_struct) |
To help the main program to send events to the plugins. |
Header file where plugin definitions are sat.
Definition in file plugin.h.
#define HERAIA_PLUGIN_API_VERSION 1 |
#define HERAIA_PRIORITY_DEFAULT 0 |
Priorities .
..
Default priority
Definition at line 87 of file plugin.h.
Referenced by heraia_plugin_init().
#define HERAIA_PRIORITY_LOWEST -9999 |
typedef gboolean(* ExportFunction)(const gchar *filename, void *user_data) |
typedef gboolean(* ImportFunction)(const gchar *filename, void *user_data) |
typedef void(* InitProc)(heraia_struct_t *) |
typedef int PluginPriority |
typedef void(* RefreshProc)(heraia_struct_t *, void *) |
enum PluginState |
enum PluginType |
add_entry_to_plugins_menu | ( | heraia_struct_t * | main_struct, | |
heraia_plugin_t * | plugin | |||
) |
adds a menu entry to the plugin menu adds a signal handler when the menu is toggled
main_struct | : main structure | |
plugin | : a plugin to add to the plugin's menu |
Definition at line 293 of file plugin.c.
References heraia_plugin_t::cmi_entry, heraia_get_widget(), heraia_plugin_t::info, xml_t::main, plugin_info_t::name, heraia_plugin_t::run_proc, and heraia_struct_t::xmls.
Referenced by init_plugin().
heraia_plugin_t * find_plugin_by_name | ( | GList * | plugins_list, | |
gchar * | name | |||
) |
Finds the desired plugin by its name and return the plugin structure or NULL.
plugins_list | : list of all available plugins | |
name | : plugin's name we're looking for |
Definition at line 320 of file plugin.c.
References heraia_plugin_t::info, and plugin_info_t::name.
Referenced by init(), pn_treeview_double_click(), pn_treeview_selection_changed_cb(), and run().
free_plugin | ( | heraia_plugin_t * | plugin | ) |
free an unused plugin use with caution
plugin | : A created a malloc'ed plugin |
Definition at line 88 of file plugin.c.
References plugin_info_t::author, plugin_info_t::description, heraia_plugin_t::error, plugin_filter_t::extensions, heraia_plugin_t::extra, heraia_plugin_t::filename, heraia_plugin_t::filter, heraia_plugin_t::handle, plugin_info_t::homepage, heraia_plugin_t::info, plugin_info_t::name, heraia_plugin_t::path, plugin_info_t::summary, and plugin_info_t::version.
Referenced by get_plugin_init_symbol().
load_plugin_xml | ( | heraia_struct_t * | main_struct, | |
heraia_plugin_t * | plugin | |||
) |
Loads the xml's definition file that describes the plugin (.gtkbuilder suffix) tries the paths found in the location_list.
main_struct | : main structure | |
plugin | : plugin for whom we want to load it's GtkBuilder XML definition file |
Definition at line 353 of file plugin.c.
References heraia_plugin_t::info, load_xml_file(), heraia_struct_t::location_list, plugin_info_t::name, and heraia_plugin_t::xml.
Referenced by init().
load_plugins | ( | heraia_struct_t * | main_struct | ) |
looks at the plugins dir(s) and loads the needed plugins (all ;-) (one at a time !!)
main_struct | : main structure |
Definition at line 256 of file plugin.c.
References load_one_plugin(), and log_message().
Referenced by init_heraia_plugin_system().
new_plugin | ( | void | ) |
Creates a new empty plugin it may be initialised by the plugin itself !
Definition at line 56 of file plugin.c.
References PLUGIN_STATE_NEW, and heraia_plugin_t::state.
Referenced by load_one_plugin().
gboolean plugin_capable | ( | void | ) |
Says whether the system can handle plugins (or not).
Definition at line 43 of file plugin.c.
Referenced by init_heraia_plugin_system().
refresh_all_plugins | ( | heraia_struct_t * | main_struct | ) |
To help the main program to send events to the plugins.
main_struct | : main structure |
Definition at line 375 of file plugin.c.
References heraia_struct_t::plugins_list, and heraia_plugin_t::refresh_proc.
Referenced by refresh_event_handler().