pub fn watch_frontmost_application_changes(
on_change: impl Fn() + Send + Sync + 'static,
) -> Result<ForegroundApplicationObserver, ForegroundApplicationObserverError>Expand description
Observe native foreground-application changes.
The callback is an invalidation, not another source of application identity:
call frontmost_application to read the authoritative current value. It
may run on any thread, must return quickly, and is invoked once after native
registration so the consumer can seed its state without a polling read.