![]() |
![]() |
![]() |
Libral, the Rubrica Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
RPluginRPlugin |
#define R_PLUGIN_TYPE RPluginPrivate; RPluginAction; RPlugin; RPlugin* r_plugin_new (void); void r_plugin_free (RPlugin *plugin); void r_plugin_set_obj (RPlugin *plugin, gpointer obj); gpointer r_plugin_get_obj (RPlugin *plugin); void r_plugin_add_action (RPlugin *plugin, RPluginAction *action); void r_plugin_add_filter (RPlugin *plugin, RFilter *filter); gpointer r_plugin_get_handle (RPlugin *plugin, gchar *name); GList* r_plugin_get_filters (RPlugin *plugin); gchar* r_plugin_get_name (RPlugin *plugin); gchar* r_plugin_get_info (RPlugin *plugin); gchar* r_plugin_get_file_name (RPlugin *plugin); gboolean r_plugin_is_configurable (RPlugin *plugin); void r_plugin_run_configure_gui (RPlugin *plugin);
"plugin-configurable" gboolean : Read / Write / Construct "plugin-filename" gchararray : Read / Write / Construct "plugin-info" gchararray : Read / Write / Construct "plugin-name" gchararray : Read / Write / Construct
typedef struct { gchar* name; gchar* handle; } RPluginAction;
RPluginAction is used to manage the action that a plugin can make
examples (from rubrica's plugin): action->name = g_strdup("read"); action->handle = (gpointer) r_rubrica_open_file;
void r_plugin_set_obj (RPlugin *plugin, gpointer obj);
use this function to set the real plugin. This function is called by the plugin (see rubrica, csv, vcard plugins source) during initialization. The obj is returned by a g_object_new call and is the object that makes work.
|
a RPlugin |
|
a gpointer |
gpointer r_plugin_get_obj (RPlugin *plugin);
Get the real plugin (a gobject)
|
a RPlugin |
Returns : |
a gpointer |
void r_plugin_add_action (RPlugin *plugin, RPluginAction *action);
add a RPluginAction to the plugin.
|
a RPlugin |
|
a RPluginAction |
void r_plugin_add_filter (RPlugin *plugin, RFilter *filter);
Add a RFilter to the plugin
gpointer r_plugin_get_handle (RPlugin *plugin, gchar *name);
Get the handle with the given name
|
a RPlugin |
|
|
Returns : |
a pointer to the requested function or NULL if
function was not found
|
GList* r_plugin_get_filters (RPlugin *plugin);
Get the plugin's file filters
gchar* r_plugin_get_name (RPlugin *plugin);
Get the plugin's name
|
a RPlugin |
Returns : |
a gchar* |
gchar* r_plugin_get_info (RPlugin *plugin);
Get info about the plugin
|
a RPlugin |
Returns : |
a gchar* |
gchar* r_plugin_get_file_name (RPlugin *plugin);
Get the plugin's file name
|
a RPlugin |
Returns : |
a gchar* |
gboolean r_plugin_is_configurable (RPlugin *plugin);
Check if the plugin is configurable
|
a RPlugin |
Returns : |
TRUE if plugin is configurable, FALSE otherwise
|
plugin-configurable
" property"plugin-configurable" gboolean : Read / Write / Construct
is the plugin configurable?
Default value: FALSE
plugin-filename
" property"plugin-filename" gchararray : Read / Write / Construct
the plungin's file name
Default value: NULL
plugin-info
" property"plugin-info" gchararray : Read / Write / Construct
a short plugin's description
Default value: NULL
plugin-name
" property"plugin-name" gchararray : Read / Write / Construct
the plungin's name
Default value: NULL