1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Experimental balloon on cygwin

This commit is contained in:
James Booth 2012-12-12 00:25:10 +00:00
parent 803eacc488
commit d212a93e44

View File

@ -30,9 +30,14 @@
#endif
#include <glib.h>
#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
#endif
#ifdef PLATFORM_CYGWIN
#include <windows.h>
#endif
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#endif
@ -1686,6 +1691,27 @@ _notify(const char * const message, int timeout,
log_error("Libnotify initialisation error.");
}
#endif
#ifdef PLATFORM_CYGWIN
NOTIFYICONDATA nid;
nid.cbSize = sizeof(NOTIFYICONDATA);
//nid.hWnd = hWnd;
nid.uID = 100;
nid.uVersion = NOTIFYICON_VERSION;
//nid.uCallbackMessage = WM_MYMESSAGE;
nid.hIcon = LoadIcon(NULL, IDI_APPLICATION);
strcpy(nid.szTip, "Tray Icon");
nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
Shell_NotifyIcon(NIM_ADD, &nid);
// For a Ballon Tip
nid.uFlags = NIF_INFO;
strcpy(nid.szInfoTitle, "Profanity"); // Title
strcpy(nid.szInfo, "New something!" ); // Copy Tip
nid.uTimeout = 3000; // 3 Seconds
nid.dwInfoFlags = NIIF_INFO;
Shell_NotifyIcon(NIM_MODIFY, &nid);
#endif
}
static void