Crate win32_notif

Crate win32_notif 

Source
Expand description

Win32 Notification

This library implements UWP XML Toast Notification This is a safe wrapper around the official WinRT apis

§Example

use win32_notif::{
 notification::visual::progress::{Progress, ProgressValue},
 string, NotificationBuilder, ToastsNotifier,
};

fn main() {
  let notifier = ToastsNotifier::new("Microsoft.Windows.Explorer").unwrap();
  let notif = NotificationBuilder::new()
    .visual(Progress::new(
      None,
      string!("Downloading..."),
      ProgressValue::BindTo("prog"),
      None,
    ))
    // Use the newest data binding method
    .value("prog", "0.3")
    .build(1, &notifier, "a", "ahq")
    .unwrap();

  let _ = notif.show();
  loop {}
}

Modules§

data
handler
notification
notifier

Macros§

string
Creates a reference to a value in notification

Structs§

Notification
The Notification Object
NotificationActivatedEventHandler
NotificationBuilder
The way to build a Notification
NotificationDataSet
NotificationDismissedEventHandler
NotificationFailedEventHandler
ToastsNotifier

Enums§

NotifError
NotificationMirroring
NotificationPriority

Traits§

ManageNotification
NotificationImpl
ToXMLunsafe