The Battle for Wesnoth
1.13.4+dev
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
desktop
notifications.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2003 - 2016 by David White <
[email protected]
>
3
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY.
11
12
See the COPYING file for more details.
13
*/
14
15
#ifndef NOTIFICATIONS_NOTIFICATIONS_HPP_INCLUDED
16
#define NOTIFICATIONS_NOTIFICATIONS_HPP_INCLUDED
17
18
#include <string>
19
20
namespace
desktop
{
21
22
namespace
notifications
23
{
24
enum
type
{
CHAT
,
TURN_CHANGED
,
OTHER
};
25
26
/**
27
* Displays a desktop notification @a message, from @a owner, of type @a t.
28
*
29
* If it is an appropriate time to send a desktop notification (i.e. the window
30
* does not have focus and the feature is not disabled by the preferences),
31
* and wesnoth was compiled with support for this feature, a notification will
32
* be issued. If there is no support for notifications, this fcn is a no-op.
33
*
34
* @note Currently we have support for dbus (linux), windows tray notifications,
35
* and growl (Apple). To enable one of these, the corresponding compilation unit
36
* dbus_notification.cpp, growl_notification.cpp, windows_tray_notification.cpp,
37
* must be compiled, and the corresponding C++ symbol HAVE_LIBDBUS, HAVE_GROWL,
38
* _WIN32 must be defined for that compilation unit _and for this one_.
39
*/
40
void
send
(
const
std::string
& owner,
const
std::string
&
message
,
type
t
);
41
42
/** Returns whether we were compiled with support for desktop notifications. */
43
bool
available
();
44
}
45
46
}
47
48
#endif
desktop::notifications::OTHER
Definition:
notifications.hpp:24
type
GLuint GLuint GLsizei GLenum type
Definition:
glew.h:1221
desktop::notifications::CHAT
Definition:
notifications.hpp:24
desktop
Definition:
clipboard.cpp:36
t
GLdouble GLdouble t
Definition:
glew.h:1366
desktop::notifications::available
bool available()
Returns whether we were compiled with support for desktop notifications.
Definition:
notifications.cpp:43
desktop::notifications::send
void send(const std::string &, const std::string &, type)
Displays a desktop notification message, from owner, of type t.
Definition:
notifications.cpp:45
desktop::notifications::type
type
Definition:
notifications.hpp:24
message
GLsizei GLenum GLuint GLuint GLsizei char * message
Definition:
glew.h:2499
desktop::notifications::TURN_CHANGED
Definition:
notifications.hpp:24
string
GLsizei const GLcharARB ** string
Definition:
glew.h:4503
Generated by
1.8.8