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.
This commit is contained in:
TingPing
2015-02-02 19:35:49 -05:00
parent a216ed1df9
commit f4f27e438b
25 changed files with 871 additions and 147 deletions

View File

@@ -178,7 +178,6 @@ typedef enum
} feicon;
void fe_tray_set_icon (feicon icon);
void fe_tray_set_tooltip (const char *text);
void fe_tray_set_balloon (const char *title, const char *text);
void fe_open_chan_list (server *serv, char *filter, int do_refresh);
const char *fe_get_default_font ();

View File

@@ -3470,12 +3470,6 @@ cmd_topic (struct session *sess, char *tbuf, char *word[], char *word_eol[])
static int
cmd_tray (struct session *sess, char *tbuf, char *word[], char *word_eol[])
{
if (strcmp (word[2], "-b") == 0)
{
fe_tray_set_balloon (word[3], word[4][0] ? word[4] : NULL);
return TRUE;
}
if (strcmp (word[2], "-t") == 0)
{
fe_tray_set_tooltip (word[3][0] ? word[3] : NULL);

View File

@@ -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 ();

View File

@@ -163,6 +163,7 @@ struct _hexchat_plugin
};
#endif
GModule *module_load (char *filename);
char *plugin_load (session *sess, char *filename, char *arg);
int plugin_reload (session *sess, char *name, int by_filename);
void plugin_add (session *sess, char *filename, void *handle, void *init_func, void *deinit_func, char *arg, int fake);