Expand description
Rustic bindings to libnotify
extern crate libnotify;
fn main() {
// Init libnotify
libnotify::init("myapp").unwrap();
// Create a new notification (doesn't show it yet)
let n = libnotify::Notification::new("Summary",
Some("Optional Body"),
None);
// Show the notification
n.show().unwrap();
// Update the existent notification
n.update("I am another notification", None, None).unwrap();
// Show the updated notification
n.show().unwrap();
// We are done, deinit
libnotify::uninit();
}
Structs§
Notification
represents a passive pop-up notification. It can contain summary text, body text, and an icon, as well as hints specifying how the notification should be presented. The notification is rendered by a notification daemon, and may present the notification in any number of ways. As such, there is a clear separation of content and presentation, and this API enforces that.
Enums§
- The urgency level of the notification.
Functions§
- Gets the application name registered.
- Synchronously queries the server for its capabilities and returns them as a Vector.
- Synchronously queries the server for its information, specifically, the name, vendor, server version, and the version of the notifications specification that it is compliant with.
- Initialized libnotify. This must be called before any other functions.
- Gets whether or not libnotify is initialized.
- Sets the application name.
- Uninitialized libnotify.