winrt-toast-reborn

Crates.iowinrt-toast-reborn
lib.rswinrt-toast-reborn
version0.2.1
sourcesrc
created_at2024-05-30 15:26:03.276815
updated_at2024-05-31 05:32:53.213352
descriptionA toast notification library for Windows 10 and 11.
homepage
repositoryhttps://github.com/AtifChy/winrt-toast.git
max_upload_size
id1256982
size60,709
Atif Chowdhury (AtifChy)

documentation

README

winrt-toast-reborn

Crates.io Docs.rs License

A mostly usable binding to the Windows ToastNotification API.

Example

use winrt_toast::{Toast, Text, Header, ToastManager};
use winrt_toast::content::text::TextPlacement;

fn main() {
    let manager = ToastManager::new(ToastManager::POWERSHELL_AUM_ID);

    let mut toast = Toast::new();
    toast
        .text1("Title")
        .text2(Text::new("Body"))
        .text3(
            Text::new("Via SMS")
                .with_placement(TextPlacement::Attribution)
        );

    manager.show(&toast).expect("Failed to show toast");
}

To-Do Features

  • Button style and tooltips in actions
  • Better callbacks
  • Sound
  • Adaptive contents and data binding
  • Groups and subgroups
Commit count: 33

cargo fmt