Crate libnotify [−] [src]
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 |
|
Enums
Urgency |
The urgency level of the notification. |
Functions
get_app_name |
Gets the application name registered. |
get_server_caps |
Synchronously queries the server for its capabilities and returns them as a Vector. |
get_server_info |
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. |
init |
Initialized libnotify. This must be called before any other functions. |
is_initted |
Gets whether or not libnotify is initialized. |
set_app_name |
Sets the application name. |
uninit |
Uninitialized libnotify. |