[][src]Trait penrose::xconnection::XConn

pub trait XConn {
    fn flush(&self) -> bool;
fn wait_for_event(&self) -> Option<XEvent>;
fn current_outputs(&self) -> Vec<Screen>;
fn position_window(&self, id: WinId, r: Region, border: u32);
fn mark_new_window(&self, id: WinId);
fn map_window(&self, id: WinId);
fn unmap_window(&self, id: WinId);
fn send_client_event(&self, id: WinId, atom_name: &str);
fn focus_client(&self, id: WinId);
fn set_client_border_color(&self, id: WinId, color: u32);
fn grab_keys(&self, key_bindings: &KeyBindings);
fn intern_atom(&self, name: &str) -> u32;
fn str_prop(&self, id: u32, name: &str) -> Result<String, String>;
fn atom_prop(&self, id: u32, name: &str) -> Result<u32, String>; }

A handle on a running X11 connection that we can use for issuing X requests

Required methods

fn flush(&self) -> bool

Flush pending actions to the X event loop

fn wait_for_event(&self) -> Option<XEvent>

Wait for the next event from the X server and return it as an XEvent

fn current_outputs(&self) -> Vec<Screen>

Determine the currently connected CRTCs and return their details

fn position_window(&self, id: WinId, r: Region, border: u32)

Reposition the window identified by 'id' to the specifed region

fn mark_new_window(&self, id: WinId)

Mark the given window as newly created

fn map_window(&self, id: WinId)

Map a window to the display. Called each time a map_notify event is received

fn unmap_window(&self, id: WinId)

Unmap a window from the display. Called each time an unmap_notify event is received

fn send_client_event(&self, id: WinId, atom_name: &str)

Send an X event to the target window

fn focus_client(&self, id: WinId)

Mark the given client as having focus

fn set_client_border_color(&self, id: WinId, color: u32)

Change the border color for the given client

fn grab_keys(&self, key_bindings: &KeyBindings)

Notify the X server that we are intercepting the user specified key bindings and prevent them being passed through to the underlying applications. This is what determines which key press events end up being sent through in the main event loop for the WindowManager.

fn intern_atom(&self, name: &str) -> u32

Intern an XCB atom by name, returning the atom ID if we are able

fn str_prop(&self, id: u32, name: &str) -> Result<String, String>

Use the xcb api to query a string property for a window by window ID and poperty name. Can fail if the property name is invalid or we get a malformed response from xcb.

fn atom_prop(&self, id: u32, name: &str) -> Result<u32, String>

Fetch an atom prop by name

Loading content...

Implementors

impl XConn for MockXConn[src]

impl XConn for XcbConnection[src]

Loading content...