#include <windows_tray_notification.hpp>
|
| static bool | show (std::string title, std::string message) |
| | Displays a tray notification. More...
|
| |
| static void | handle_system_event (const SDL_Event &event) |
| | Frees resources when a notification disappears, switches user to the wesnoth window if the notification popup was clicked by user. More...
|
| |
◆ windows_tray_notification() [1/2]
| windows_tray_notification::windows_tray_notification |
( |
| ) |
|
|
explicitprivate |
◆ windows_tray_notification() [2/2]
◆ adjust_length()
| void windows_tray_notification::adjust_length |
( |
std::string & |
title, |
|
|
std::string & |
message |
|
) |
| |
|
staticprivate |
◆ create_tray_icon()
| bool windows_tray_notification::create_tray_icon |
( |
| ) |
|
|
staticprivate |
◆ destroy_tray_icon()
| void windows_tray_notification::destroy_tray_icon |
( |
| ) |
|
|
staticprivate |
◆ get_window_handle()
| HWND windows_tray_notification::get_window_handle |
( |
| ) |
|
|
staticprivate |
◆ handle_system_event()
| void windows_tray_notification::handle_system_event |
( |
const SDL_Event & |
event | ) |
|
|
static |
◆ operator=()
◆ set_tray_message()
| bool windows_tray_notification::set_tray_message |
( |
const std::string & |
title, |
|
|
const std::string & |
message |
|
) |
| |
|
staticprivate |
◆ show()
| bool windows_tray_notification::show |
( |
std::string |
title, |
|
|
std::string |
message |
|
) |
| |
|
static |
Displays a tray notification.
When user clicks on the notification popup, the user switches to the wesnoth window.
- Parameters
-
| title | Title of a notification. Gets truncated if longer than 64 characters, including the terminating null character. |
| message | Message of a notification. Gets truncated if longer than 256 characters, including the terminating null character. |
- Returns
- True if message was shown successfully, False otherwise.
Definition at line 210 of file windows_tray_notification.cpp.
References adjust_length(), create_tray_icon(), destroy_tray_icon(), nid, and set_tray_message().
◆ string_to_wstring()
| std::wstring windows_tray_notification::string_to_wstring |
( |
const std::string & |
string, |
|
|
std::size_t |
maxlength |
|
) |
| |
|
staticprivate |
◆ switch_to_wesnoth_window()
| void windows_tray_notification::switch_to_wesnoth_window |
( |
| ) |
|
|
staticprivate |
◆ ICON_ID
| const int windows_tray_notification::ICON_ID = 1007 |
|
staticprivate |
◆ MAX_MESSAGE_LENGTH
| const std::size_t windows_tray_notification::MAX_MESSAGE_LENGTH = 255 |
|
staticprivate |
◆ MAX_TITLE_LENGTH
| const std::size_t windows_tray_notification::MAX_TITLE_LENGTH = 63 |
|
staticprivate |
◆ message_reset
| bool windows_tray_notification::message_reset = false |
|
staticprivate |
◆ nid
| NOTIFYICONDATA * windows_tray_notification::nid = nullptr |
|
staticprivate |
◆ WM_TRAYNOTIFY
| const unsigned int windows_tray_notification::WM_TRAYNOTIFY = 32868 |
|
staticprivate |
The documentation for this class was generated from the following files: