logo

Trait penrose::core::xconnection::XState[][src]

pub trait XState: XAtomQuerier {
    fn root(&self) -> Xid;
fn current_screens(&self) -> Result<Vec<Screen>>;
fn cursor_position(&self) -> Result<Point>;
fn warp_cursor(&self, win_id: Option<Xid>, screen: &Screen) -> Result<()>;
fn client_geometry(&self, id: Xid) -> Result<Region>;
fn active_clients(&self) -> Result<Vec<Xid>>;
fn focused_client(&self) -> Result<Xid>; }
Expand description

State queries against the running X server

Required methods

The root window ID

Determine the currently connected screens and return their details

Determine the current (x,y) position of the cursor relative to the root window.

Warp the cursor to be within the specified window. If id == None then behaviour is definined by the implementor (e.g. warp cursor to active window, warp to center of screen)

Return the current (x, y, w, h) dimensions of the requested window

Run on startup/restart to determine already running windows that we need to track

Return the client ID of the crate::core::client::Client that currently holds X focus

Implementors