Skip to main content

start_focus_tracking

Function start_focus_tracking 

Source
pub async fn start_focus_tracking<F>(
    callback: F,
) -> Result<(FocusTracker, JoinHandle<()>), String>
where F: Fn(FocusEvent) + Send + 'static,
Expand description

Start focus tracking with a callback

Convenience function that creates a tracker and starts it, invoking the callback for each focus event.

§Arguments

  • callback - Function to call with each focus event

§Returns

Returns the tracker and a handle that can be used to stop tracking.