Skip to main content

WindowHandleProbe

Trait WindowHandleProbe 

pub trait WindowHandleProbe: Send + Sync {
    type Handle: Send + Sync + 'static;

    // Required method
    fn window_handle_for_process(&self, pid: u32) -> Option<Self::Handle>;
}
Expand description

Looks up an opaque platform window handle owned by a given process.

Required Associated Types§

type Handle: Send + Sync + 'static

Opaque platform-specific window handle type (HWND on Windows, X11 window XID, Wayland surface id, …).

Required Methods§

fn window_handle_for_process(&self, pid: u32) -> Option<Self::Handle>

Return a window handle owned by pid, if one exists.

§Arguments
  • pid - Operating-system process id of the window’s owner.
§Returns

Some(handle) when a window owned by pid is found, otherwise None. If pid owns multiple windows it is unspecified which handle is returned.

Implementors§