Debian Codegraph @

android/app/jni/extern/pfd-fixed/doc/notify.md

raw
1 ## Notification API
2
3 Displaying a desktop notification is done using the `pfd::notify` class. It can be provided a
4 title, a message text, and an `icon` for the notification style:
5
6 ```cpp
7 pfd::notify::notify(std::string const &title,
8 std::string const &text,
9 pfd::icon icon = pfd::icon::info);
10
11 enum class pfd::icon { info, warning, error };
12 ```
13
14 ## Example
15
16 Displaying a notification is straightforward. Emoji are supported:
17
18 ```cpp
19 pfd::notify("System event", "Something might be on fire 🔥",
20 pfd::icon::warning);
21 ```
22
23 The `pfd::notify` object needs not be kept around, letting the object clean up itself is enough.
24
25 ## Screenshots
26
27 Windows 10:
28 ![notify-win32](https://user-images.githubusercontent.com/245089/47142453-2ff76c00-d2c3-11e8-871a-1a110ac91eb2.png)
29
30 Mac OS X (dark theme):
31 ![image](https://user-images.githubusercontent.com/245089/56053188-bc0abd80-5d53-11e9-8298-68aa96315c6c.png)
32
33 Mac OS X (light theme):
34 ![image](https://user-images.githubusercontent.com/245089/56053137-92ea2d00-5d53-11e9-8cf2-049486c45713.png)
35
36 Linux (GNOME desktop):
37 ![notify-gnome](https://user-images.githubusercontent.com/245089/47142455-30900280-d2c3-11e8-8b76-ea16c7e502d4.png)
38
39 Linux (KDE desktop):
40 ![notify-kde](https://user-images.githubusercontent.com/245089/47149206-27a72d00-d2d3-11e8-8f1b-96e462f08c2b.png)