Add example to the documentation

This commit is contained in:
Mika Attila 2015-03-10 08:46:54 +01:00
parent e9665b08c2
commit a0955acabd
1 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,17 @@
//! Rustic bindings to [libnotify](https://developer.gnome.org/libnotify/)
//!
//! ```rust
//! extern crate libnotify;
//!
//! fn main() {
//! let notify = libnotify::Context::new("hello").unwrap();
//! let n = notify.new_notification("This is the summary.",
//! Some("This is the optional body text."),
//! None).unwrap();
//! n.show().unwrap();
//! }
//! ```
extern crate "libnotify-sys" as sys;
extern crate "glib-2_0-sys" as glib;