win32_notification

Crates.iowin32_notification
lib.rswin32_notification
version0.1.0
sourcesrc
created_at2020-01-04 19:25:45.037894
updated_at2020-01-04 19:25:45.037894
descriptionAllows easy creation and manipulation of Win32 notifications.
homepage
repositoryhttps://github.com/AmaranthineCodices/win32-notification
max_upload_size
id195205
size14,076
Lily (AmaranthineCodices)

documentation

README

win32_notification

A simple wrapper around Shell_NotifyIcon. See my blog post for more information on how this works.

use std::thread;
use std::time::Duration;
use win32_notification::NotificationBuilder;

fn main() {
    let notification = NotificationBuilder::new()
        .title_text("Notification Title")
        .info_text("This is the notification body")
        .build()
        .expect("Could not create notification");

    notification.show().expect("Failed to show notification");
    thread::sleep(Duration::from_secs(5));
    notification
        .delete()
        .expect("Failed to delete notification");
}
Commit count: 0

cargo fmt