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:
parent
803eacc488
commit
d212a93e44
@ -30,9 +30,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBNOTIFY
|
#ifdef HAVE_LIBNOTIFY
|
||||||
#include <libnotify/notify.h>
|
#include <libnotify/notify.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef PLATFORM_CYGWIN
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_NCURSES_H
|
#ifdef HAVE_NCURSES_H
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
#endif
|
#endif
|
||||||
@ -1686,6 +1691,27 @@ _notify(const char * const message, int timeout,
|
|||||||
log_error("Libnotify initialisation error.");
|
log_error("Libnotify initialisation error.");
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user