diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-06-17 01:42:14 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-06-17 01:42:14 +0000 |
commit | 0951fc45bce0c64e1124edb1bbd02e762b11463f (patch) | |
tree | 14eb9272b4ec05718171e76a9c7c9588397cfb06 /src/plugin.c | |
parent | a59340f334c6baba99236e61ab0d50058629d1e0 (diff) |
added plugin API.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2168 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/plugin.c b/src/plugin.c index 062200ff..69270ecf 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -34,8 +34,6 @@ enum { LAST_SIGNAL }; -#define syl_plugin_lookup_symbol(name) g_hash_table_lookup(sym_table, name) - #define SAFE_CALL(func_ptr) { if (func_ptr) func_ptr(); } #define SAFE_CALL_RET(func_ptr) (func_ptr ? func_ptr() : NULL) #define SAFE_CALL_ARG1(func_ptr, arg1) { if (func_ptr) func_ptr(arg1); } @@ -312,6 +310,11 @@ gint syl_plugin_add_symbol(const gchar *name, gpointer sym) return 0; } +gpointer syl_plugin_lookup_symbol(const gchar *name) +{ + return g_hash_table_lookup(sym_table, name); +} + const gchar *syl_plugin_get_prog_version(void) { gpointer sym; @@ -336,6 +339,14 @@ void syl_plugin_main_window_popup(gpointer mainwin) SAFE_CALL_ARG1(func, mainwin); } +GtkWidget *syl_plugin_main_window_get_statusbar(void) +{ + gpointer widget; + + widget = syl_plugin_lookup_symbol("main_window_statusbar"); + return GTK_WIDGET(widget); +} + void syl_plugin_app_will_exit(gboolean force) { void (*func)(gboolean); |