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 };
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.