winrt-notification 0.1.1

An incomplete wrapper over the WinRT toast api
docs.rs failed to build winrt-notification-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: winrt-notification-0.5.1

winrt-notification

license version

An incomplete wrapper over the WinRT toast api

Tested in windows 10. Untested in Windows 8 and 8.1, might work.

Currently has no support for Adaptive Content or Actions

Will not work for Windows 7.

Usage

#Cargo.toml
[dependencies]
winrt-notification = "0.1"

Examples

extern crate winrt_notification;
use winrt_notification::{Duration, Sound, Toast};

fn main() {
    Toast::new("My application name")
        .title("Look at this flip!")
        .text1("(╯°□°)╯︵ ┻━┻")
        .sound(Some(Sound::SMS))
        .duration(Duration::Short)
        .show()
        .expect("unable to toast");
}
extern crate winrt_notification;
use std::path::Path;
use winrt_notification::{IconCrop, Toast};

fn main() {
    Toast::new("application that needs a toast with an image")
        .hero(&Path::new("C:\\absolute\\path\\to\\image.jpeg"), "alt text")
        .icon(
            &Path::new("/c/this/style/works/too/image.png"),
            IconCrop::Circular,
            "alt text",
        )
        .title("Lots of pictures here")
        .text1("One above the text as the hero")
        .text2("One to the left as an icon, and several below")
        .image(&Path::new("/c/photos/sun.png"), "the sun")
        .image(&Path::new("/c/photos/moon.png"), "the moon")
        .sound(None) // will be silent
        .show()
        .expect("unable to toast");
}