Enumerations | |
enum | type { CHAT , TURN_CHANGED , OTHER } |
Functions | |
bool | available () |
Returns whether we were compiled with support for desktop notifications. More... | |
void | send (const std::string &owner, const std::string &message, type t) |
Displays a desktop notification message, from owner, of type t. More... | |
Enumerator | |
---|---|
CHAT | |
TURN_CHANGED | |
OTHER |
Definition at line 24 of file notifications.hpp.
bool desktop::notifications::available | ( | ) |
Returns whether we were compiled with support for desktop notifications.
Definition at line 40 of file notifications.cpp.
Referenced by gui2::dialogs::mp_alerts_options::pre_show().
void desktop::notifications::send | ( | const std::string & | owner, |
const std::string & | message, | ||
type | t | ||
) |
Displays a desktop notification message, from owner, of type t.
If it is an appropriate time to send a desktop notification (i.e. the window does not have focus and the feature is not disabled by the preferences), and wesnoth was compiled with support for this feature, a notification will be issued. If there is no support for notifications, this fcn is a no-op.
Definition at line 42 of file notifications.cpp.
Referenced by mp::ui_alerts::friend_message(), mp::ui_alerts::game_created(), mp::ui_alerts::game_has_begun(), mp::ui_alerts::player_joins(), mp::ui_alerts::player_leaves(), mp::ui_alerts::private_message(), mp::ui_alerts::public_message(), mp::ui_alerts::ready_for_start(), mp::ui_alerts::server_message(), and mp::ui_alerts::turn_changed().