28 #ifndef _HERAIA_PLUGIN_H_
29 #define _HERAIA_PLUGIN_H_
38 #define HERAIA_PLUGIN_API_VERSION 1
68 typedef void (*
RunProc) (GtkWidget *, gpointer);
87 #define HERAIA_PRIORITY_DEFAULT 0
88 #define HERAIA_PRIORITY_HIGHEST 9999
89 #define HERAIA_PRIORITY_LOWEST -9999
96 typedef gboolean (*
ImportFunction) (
const gchar *filename,
void *user_data);
gboolean(* ExportFunction)(const gchar *filename, void *user_data)
This is the main structure.
RefreshProc refresh_proc
Called when the cursor changes it's position.
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 plugin_capable(void)
Says whether the system can handle plugins (or not)
GtkBuilder * xml
Eventually the plugin's GtkBuilder XML interface.
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 ...
InitProc init_proc
Called when the application initialy starts up.
PluginState
May indicate the plugin state.
gboolean(* ImportFunction)(const gchar *filename, void *user_data)
import / export and filters functions this may change quickly
plugin_info_t * info
The plugin information.
RunProc run_proc
Called to run an interface everytime the plugin is called.
void(* RunProc)(GtkWidget *, gpointer)
window_prop_t * win_prop
Stores the window's properties.
void load_plugins(heraia_struct_t *main_struct)
looks at the plugins dir(s) and loads the needed plugins (all ;-) (one at a time !!) ...
GModule * handle
The module handle.
void refresh_all_plugins(heraia_struct_t *main_struct)
To help the main program to send events to the plugins.
void * extra
Plugin-specific data.
heraia_plugin_t * new_plugin(void)
Creates a new empty plugin it may be initialised by the plugin itself !
void(* InitProc)(heraia_struct_t *)
void free_plugin(heraia_plugin_t *plugin)
free an unused plugin use with caution
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 ...
PluginState state
The state of the plugin.
Complete plugin structure.
Detailed information about a plugin.
QuitProc quit_proc
Called when the application exits.
void(* RefreshProc)(heraia_struct_t *, void *)
char * error
last error message
plugin_filter_t * filter
The plugin filter.
char * filename
Filename of the plugin.
char * path
The path to the plugin.
GtkCheckMenuItem * cmi_entry
The CheckMenuItem that may be created in the heraia interface.