26 #define _WIN32_IE _WIN32_WINNT_WIN7
29 #define NIIF_USER 0x00000004
31 #ifndef NIN_BALLOONTIMEOUT
32 #define NIN_BALLOONTIMEOUT (WM_USER + 4)
34 #ifndef NIN_BALLOONUSERCLICK
35 #define NIN_BALLOONUSERCLICK (WM_USER + 5)
54 static bool show(std::string title, std::string message);
65 static NOTIFYICONDATA*
nid;
74 static bool set_tray_message(
const std::string& title,
const std::string& message);
75 static void adjust_length(std::string& title, std::string& message);
78 static std::wstring
string_to_wstring(
const std::string&
string, std::size_t maxlength);
static bool set_tray_message(const std::string &title, const std::string &message)
static bool create_tray_icon()
static bool show(std::string title, std::string message)
Displays a tray notification.
static const unsigned int WM_TRAYNOTIFY
static void destroy_tray_icon()
static std::wstring string_to_wstring(const std::string &string, std::size_t maxlength)
static const std::size_t MAX_MESSAGE_LENGTH
static void handle_system_event(const SDL_Event &event)
Frees resources when a notification disappears, switches user to the wesnoth window if the notificati...
windows_tray_notification(const windows_tray_notification &w)
static NOTIFYICONDATA * nid
static void switch_to_wesnoth_window()
windows_tray_notification()
static void adjust_length(std::string &title, std::string &message)
static bool message_reset
static const std::size_t MAX_TITLE_LENGTH
static HWND get_window_handle()
windows_tray_notification & operator=(const windows_tray_notification &w)