heraia/trunk/libheraia/include/plugin.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  plugin_filter_t
struct  plugin_info_t
struct  heraia_plugin_t

Defines

#define HERAIA_PLUGIN_API_VERSION   1
#define HERAIA_PRIORITY_DEFAULT   0
#define HERAIA_PRIORITY_HIGHEST   9999
#define HERAIA_PRIORITY_LOWEST   -9999

Typedefs

typedef void(* InitProc )(heraia_window_t *)
typedef void(* QuitProc )(void)
typedef void(* RunProc )(GtkWidget *, gpointer)
typedef void(* RefreshProc )(heraia_window_t *, void *)
typedef int PluginPriority
typedef gboolean(* ImportFunction )(const gchar *filename, void *user_data)
typedef gboolean(* ExportFunction )(const gchar *filename, void *user_data)

Enumerations

enum  PluginType { HERAIA_PLUGIN_UNKNOWN = -1, HERAIA_PLUGIN_FILTER = 0, HERAIA_PLUGIN_ACTION = 1 }
enum  PluginState {
  PLUGIN_STATE_RUNNING, PLUGIN_STATE_INITIALIZING, PLUGIN_STATE_LOADED, PLUGIN_STATE_NEW,
  PLUGIN_STATE_EXITING, PLUGIN_STATE_NONE
}

Functions

gboolean plugin_capable (void)
heraia_plugin_tnew_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_tfind_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)


Define Documentation

#define HERAIA_PLUGIN_API_VERSION   1

Definition at line 33 of file plugin.h.

#define HERAIA_PRIORITY_DEFAULT   0

Definition at line 71 of file plugin.h.

Referenced by heraia_plugin_init().

#define HERAIA_PRIORITY_HIGHEST   9999

Definition at line 72 of file plugin.h.

#define HERAIA_PRIORITY_LOWEST   -9999

Definition at line 73 of file plugin.h.


Typedef Documentation

typedef gboolean(* ExportFunction)(const gchar *filename, void *user_data)

Definition at line 84 of file plugin.h.

typedef gboolean(* ImportFunction)(const gchar *filename, void *user_data)

import / export and filters functions this may change quickly

Definition at line 81 of file plugin.h.

typedef void(* InitProc)(heraia_window_t *)

Definition at line 60 of file plugin.h.

typedef int PluginPriority

Priorities ...

Definition at line 70 of file plugin.h.

typedef void(* QuitProc)(void)

Definition at line 61 of file plugin.h.

typedef void(* RefreshProc)(heraia_window_t *, void *)

Definition at line 63 of file plugin.h.

typedef void(* RunProc)(GtkWidget *, gpointer)

Definition at line 62 of file plugin.h.


Enumeration Type Documentation

May indicate the plugin state

Enumerator:
PLUGIN_STATE_RUNNING 
PLUGIN_STATE_INITIALIZING 
PLUGIN_STATE_LOADED 
PLUGIN_STATE_NEW 
PLUGIN_STATE_EXITING 
PLUGIN_STATE_NONE 

Definition at line 49 of file plugin.h.

enum PluginType

Plugin types.

Enumerator:
HERAIA_PLUGIN_UNKNOWN 
HERAIA_PLUGIN_FILTER 
HERAIA_PLUGIN_ACTION 

Definition at line 38 of file plugin.h.


Function Documentation

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().

Here is the call graph for this function:

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  ) 

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


Generated on Sat Jan 17 20:57:41 2009 for Heraia by  doxygen 1.5.6