1extern crate winrt_notification;
2use std::path::Path;
3use winrt_notification::{
4 IconCrop,
5 Toast,
6};
7
8fn main() {
9 Toast::new("application that needs a toast with an image")
10 .hero(&Path::new("C:\\absolute\\path\\to\\image.jpeg"), "alt text")
11 .icon(
12 &Path::new("c:/this/style/works/too/image.png"),
13 IconCrop::Circular,
14 "alt text",
15 )
16 .title("Lots of pictures here")
17 .text1("One above the text as the hero")
18 .text2("One to the left as an icon, and several below")
19 .image(&Path::new("c:/photos/sun.png"), "the sun")
20 .image(&Path::new("c:/photos/moon.png"), "the moon")
21 .sound(None) .show()
23 .expect("notification failed");
24}