diff options
author | TingPing <tingping@fedoraproject.org> | 2015-02-02 19:35:49 -0500 |
---|---|---|
committer | TingPing <tingping@fedoraproject.org> | 2015-02-04 20:24:53 -0500 |
commit | f4f27e438b0791e1c0708c4f031aa80c59d965b1 (patch) | |
tree | c68f1fb8cbbe88b7878e8fef690fd00c150f66ec /src/common/plugin.c | |
parent | a216ed1df9394325bc573cd3f1693eb467a89938 (diff) |
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.
Diffstat (limited to 'src/common/plugin.c')
-rw-r--r-- | src/common/plugin.c | 20 |
1 files changed, 14 insertions, 6 deletions
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 (); |