From f4f27e438b0791e1c0708c4f031aa80c59d965b1 Mon Sep 17 00:00:00 2001 From: TingPing Date: Mon, 2 Feb 2015 19:35:49 -0500 Subject: Implement windows 8.1+ notifications This splits notifications up into multiple backends currently only libnotify on unix and win8 toasts. The win8 backend was originally written by @leeter though heavily modified. --- src/common/plugin.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/common/plugin.c') diff --git a/src/common/plugin.c b/src/common/plugin.c index d2782e01..8d990dc9 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -355,15 +355,11 @@ plugin_kill_all (void) #ifdef USE_PLUGIN -/* load a plugin from a filename. Returns: NULL-success or an error string */ - -char * -plugin_load (session *sess, char *filename, char *arg) +GModule * +module_load (char *filename) { void *handle; char *filepart; - hexchat_init_func *init_func; - hexchat_deinit_func *deinit_func; char *pluginpath; /* get the filename without path */ @@ -383,6 +379,18 @@ plugin_load (session *sess, char *filename, char *arg) handle = g_module_open (filename, 0); } + return handle; +} + +/* load a plugin from a filename. Returns: NULL-success or an error string */ + +char * +plugin_load (session *sess, char *filename, char *arg) +{ + GModule *handle = module_load (filename); + hexchat_init_func *init_func; + hexchat_deinit_func *deinit_func; + if (handle == NULL) return (char *)g_module_error (); -- cgit 1.4.1