1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
pub use *;
pub
pub use *;
/// Returns the document URL of the focused window for the given OS process,
/// when the platform and the application expose one.
///
/// This is a thin facade over the platform module. Today only macOS provides
/// a real implementation (via the Accessibility API's `AXDocument`
/// attribute); Linux and Windows return `Ok(None)` until equivalent support
/// is implemented for those targets.
///
/// Callers should treat `Ok(None)` as a soft signal ("no document open / no
/// URL available") and surface real errors only in the
/// [`FocusTrackerError::PermissionDenied`] case, which means the platform
/// blocked the lookup and the caller should back off.
///
/// # Errors
///
/// Returns [`FocusTrackerError::PermissionDenied`] when macOS denies
/// Accessibility access. Other errors are platform-specific.