X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fext.h;fp=src%2Fext.h;h=edc3a44034ab47724ceaa3cd03c4e5239e7d8c46;hb=5b7b5519d955cd0c99d094ba140514e0a2b73083;hp=0000000000000000000000000000000000000000;hpb=8988b3bef0760b4cab8144715cc3d8f55688861c;p=chaz%2Fhomebank diff --git a/src/ext.h b/src/ext.h new file mode 100644 index 0000000..edc3a44 --- /dev/null +++ b/src/ext.h @@ -0,0 +1,46 @@ + +#ifndef __EXT_H__ +#define __EXT_H__ + +#include + +#include "ext-value.h" + + +typedef gint (*PluginEngineInitializer)(int* argc, char** argv[], char** env[]); +typedef void (*PluginEngineTerminator)(); +typedef gboolean (*PluginEngineFileChecker)(const gchar* plugin_filepath); +typedef GHashTable* (*PluginMetadataReader)(const gchar* plugin_filepath); +typedef gint (*PluginLoader)(const gchar* plugin_filepath); +typedef void (*PluginUnloader)(const gchar* plugin_filepath); +typedef void (*PluginExecutor)(const gchar* plugin_filepath); +typedef void (*PluginHookCaller)(const gchar* hook_id, GList* args); + +void ext_init(int* argc, char** argv[], char** env[]); +void ext_term(void); +void ext_register(const gchar* type, + PluginEngineInitializer, + PluginEngineTerminator, + PluginEngineFileChecker, + PluginMetadataReader, + PluginLoader, + PluginUnloader, + PluginExecutor, + PluginHookCaller); + + +gchar** ext_list_plugins(void); +gchar* ext_find_plugin(const gchar* plugin_filename); +GHashTable* ext_read_plugin_metadata(const gchar* plugin_filename); +gint ext_load_plugin(const gchar* plugin_filename); +void ext_unload_plugin(const gchar* plugin_filename); +gboolean ext_is_plugin_loaded(const gchar* plugin_filename); +void ext_execute_action(const gchar* plugin_filename); +void ext_hook(const gchar* hook_id, ...); +void ext_vhook(const gchar* hook_id, GList* args); +gboolean ext_has(const gchar* feature); +void* ext_symbol_lookup(const gchar* symbol); +void ext_run_modal(const gchar* title, const gchar* text, const gchar* type); + +#endif +