mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-06 04:45:05 +00:00
1.3 KiB
1.3 KiB
Notification API
Displaying a desktop notification is done using the pfd::notify
class. It can be provided a
title, a message text, and an icon
for the notification style:
pfd::notify::notify(std::string const &title,
std::string const &text,
pfd::icon icon = pfd::icon::info);
enum class pfd::icon { info, warning, error };
Example
Displaying a notification is straightforward. Emoji are supported:
pfd::notify("System event", "Something might be on fire 🔥",
pfd::icon::warning);
The pfd::notify
object needs not be kept around, letting the object clean up itself is enough.