#include "heraia_types.h"
Go to the source code of this file.
Functions | |
static heraia_plugin_t * | get_plugin_handle (heraia_window_t *main_window, heraia_plugin_t *plugin, const gchar *full_filename, const gchar *filename) |
static heraia_plugin_t * | get_plugin_init_symbol (heraia_window_t *main_window, heraia_plugin_t *plugin) |
static void | init_plugin (heraia_window_t *main_window, heraia_plugin_t *plugin, const gchar *filename, guint plugins_nb) |
static void | load_one_plugin (heraia_window_t *main_window, const gchar *filename, guint plugins_nb) |
gboolean | plugin_capable (void) |
heraia_plugin_t * | new_plugin (void) |
void | free_plugin (heraia_plugin_t *plugin) |
void | load_plugins (heraia_window_t *main_window) |
void | add_entry_to_plugins_menu (heraia_window_t *main_window, heraia_plugin_t *plugin) |
heraia_plugin_t * | find_plugin_by_name (GList *plugins_list, gchar *name) |
gboolean | load_plugin_glade_xml (heraia_window_t *main_window, heraia_plugin_t *plugin) |
void | show_hide_widget (GtkWidget *widget, gboolean show, window_prop_t *win_prop) |
void | refresh_all_plugins (heraia_window_t *main_window) |
void add_entry_to_plugins_menu | ( | heraia_window_t * | main_window, | |
heraia_plugin_t * | plugin | |||
) |
adds a menu entry to the plugin menu adds a signal handler when the menu is toggled
Definition at line 240 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_window_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
Definition at line 258 of file plugin.c.
References heraia_plugin_t::info, and plugin_info_t::name.
Referenced by init(), pn_treeview_selection_changed_cb(), and run().
void free_plugin | ( | heraia_plugin_t * | plugin | ) |
free an unused plugin
Definition at line 75 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().
static heraia_plugin_t * get_plugin_handle | ( | heraia_window_t * | main_window, | |
heraia_plugin_t * | plugin, | |||
const gchar * | full_filename, | |||
const gchar * | filename | |||
) | [static] |
Here we try to get a handle for the Gmodule referenced by full_filename
Definition at line 108 of file plugin.c.
References heraia_plugin_t::handle, and log_message().
Referenced by load_one_plugin().
static heraia_plugin_t * get_plugin_init_symbol | ( | heraia_window_t * | main_window, | |
heraia_plugin_t * | plugin | |||
) | [static] |
If the handle is ok, we want to have the heraia_plugin_init function (to call it) in order to init the plugin (by itself)
Definition at line 129 of file plugin.c.
References free_plugin(), heraia_plugin_t::handle, heraia_plugin_init(), and log_message().
Referenced by load_one_plugin().
static void init_plugin | ( | heraia_window_t * | main_window, | |
heraia_plugin_t * | plugin, | |||
const gchar * | filename, | |||
guint | plugins_nb | |||
) | [static] |
finalising initialisation : if everything went fine, the plugin is added to the plugin list and a menu entry is created in the Plugins menu
Definition at line 162 of file plugin.c.
References add_entry_to_plugins_menu(), HERAIA_PLUGIN_ACTION, plugin_info_t::id, heraia_plugin_t::info, heraia_plugin_t::init_proc, log_message(), heraia_window_t::plugins_list, and plugin_info_t::type.
Referenced by load_one_plugin().
static void load_one_plugin | ( | heraia_window_t * | main_window, | |
const gchar * | filename, | |||
guint | plugins_nb | |||
) | [static] |
Here we manage to load one plugin at a time (and this is really enough !)
Definition at line 181 of file plugin.c.
References heraia_plugin_t::filename, get_plugin_handle(), get_plugin_init_symbol(), init_plugin(), new_plugin(), and heraia_plugin_t::path.
Referenced by load_plugins().
gboolean load_plugin_glade_xml | ( | heraia_window_t * | main_window, | |
heraia_plugin_t * | plugin | |||
) |
Loads the glade xml file that describes the plugin (.glade suffix) tries the paths found in the location_list
Definition at line 285 of file plugin.c.
References heraia_plugin_t::info, load_glade_xml_file(), heraia_window_t::location_list, plugin_info_t::name, and heraia_plugin_t::xml.
Referenced by init().
void load_plugins | ( | heraia_window_t * | main_window | ) |
looks at the plugins dir(s) and loads the needed plugins (all ;-) (one at a time !!)
Definition at line 210 of file plugin.c.
References load_one_plugin(), and log_message().
Referenced by init_heraia_plugin_system().
heraia_plugin_t* new_plugin | ( | void | ) |
Creates a new empty plugin it may be initialised by the plugin itself !
Definition at line 46 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 36 of file plugin.c.
Referenced by init_heraia_plugin_system().
void refresh_all_plugins | ( | heraia_window_t * | main_window | ) |
To help the main program to send events to the plugins
Definition at line 334 of file plugin.c.
References heraia_window_t::plugins_list, and heraia_plugin_t::refresh_proc.
Referenced by refresh_event_handler().
void show_hide_widget | ( | GtkWidget * | widget, | |
gboolean | show, | |||
window_prop_t * | win_prop | |||
) |
To help plugins to deal with widgets, shows or hide a specific widget
Definition at line 304 of file plugin.c.
References move_and_show_dialog_box(), and record_and_hide_dialog_box().
Referenced by run(), and statw_close_clicked().