API ReferencePlatform & Testing
Shortcuts, Tray & Notifications
Global shortcuts, tray items, notifications, taskbar, and badges.
use incular::prelude::*;
fn main() {
println!("shortcut id: {}", GlobalShortcutId::new(1).get());
println!("tray: {}", TrayItemId::from_parts(0, 1).index());
let progress = TaskbarProgress::normal(0.5).expect("progress");
println!("fraction: {:?}", progress.fraction());
let _dock = TaskbarDockState::for_window(WindowId::from_parts(0, 1))
.progress(progress)
.badge(ApplicationBadge::Count(3));
}TaskbarProgress: None / Indeterminate / Normal(f) / Paused(f) /
Error(f) (fraction() reads back; non-finite/out-of-range rejected:
TaskbarProgressError). ApplicationBadge: None (default) / Count(u64) / Text(String).
Runtime handles (GlobalShortcutRegistration, NotificationHandle,
TrayItemHandle) live in incular-runtime; platform holds the stable ids
(GlobalShortcutId, NotificationId /
NotificationActionId, TrayItemId).
GlobalShortcutUnregistrationRequest awaits unregistration like its
registration counterpart.
Related: Application.