Crate libnotify [] [src]

Rustic bindings to libnotify

extern crate libnotify;

fn main() {
    // Create a libnotify context
    let notify = libnotify::Context::new("myapp").unwrap();
    // Create a new notification and show it
    let n = notify.new_notification("Summary",
                                    Some("Optional Body"),
                                    None).unwrap();
    n.show().unwrap();
    // You can also use the .show() convenience method on the context
    notify.show("I am another notification", None, None).unwrap();
}

Structs

Context

The context which within libnotify operates.

Notification

A passive pop-up notification

NotificationShowError

An error that can happen when attempting to show a notification.

Enums

ContextCreationError

Error that can happen on context creation

NotificationCreationError

An error that can happen when attempting to create a notification.