Crates.io | win32_notif |
lib.rs | win32_notif |
version | 0.4.0 |
source | src |
created_at | 2024-10-30 09:57:01.39925 |
updated_at | 2024-11-03 05:12:53.02907 |
description | Wrapper around Windows UWP XAML (WinRT) Notification api |
homepage | |
repository | https://github.com/AHQ-Softwares/win32_notif |
max_upload_size | |
id | 1428280 |
size | 52,583 |
A lightweight crate to help you to compose beautiful notifications for Windows OS.
use win32_notif::{Notif, NotifIcon, NotifState, NotifType, NotifFlags};
fn main() {
let notifier = ToastsNotifier::new("windows app user model id").unwrap();
let notif = NotificationBuilder::new()
.visual(Text::new(2, None, None, string!("Hello There 👋🏼")))
.action(ActionButton::new(
string!("Yes"),
string!("yes"),
ActivationType::Foreground,
AfterActivationBehavior::Default,
None,
string!("yes"),
HintButtonStyle::Success,
string!("Yes"),
false
))
.build(2, &*NOTIFIER, "tag", "group")
.unwrap();
notif.show().unwrap();
}