Trait XClientProperties

Source
pub trait XClientProperties {
    // Required methods
    fn list_props(&self, id: Xid) -> Result<Vec<String>>;
    fn get_prop(&self, id: Xid, name: &str) -> Result<Prop>;
    fn delete_prop(&self, id: Xid, name: &str) -> Result<()>;
    fn change_prop(&self, id: Xid, name: &str, val: Prop) -> Result<()>;
    fn set_client_state(&self, id: Xid, wm_state: WindowState) -> Result<()>;

    // Provided methods
    fn client_supports_protocol(&self, id: Xid, proto: &str) -> Result<bool> { ... }
    fn client_accepts_focus(&self, id: Xid) -> bool { ... }
    fn toggle_client_fullscreen(
        &self,
        id: Xid,
        client_is_fullscreen: bool,
    ) -> Result<()> { ... }
    fn client_name(&self, id: Xid) -> Result<String> { ... }
    fn client_should_float(&self, id: Xid, floating_classes: &[&str]) -> bool { ... }
}
Expand description

Querying and updating properties on X clients

Required Methods§

Source

fn list_props(&self, id: Xid) -> Result<Vec<String>>

Return the list of all properties set on the given client window

Properties should be returned as their string name as would be used to intern the respective atom.

Source

fn get_prop(&self, id: Xid, name: &str) -> Result<Prop>

Query a property for a client by ID and name.

Can fail if the property name is invalid or we get a malformed response from xcb.

Source

fn delete_prop(&self, id: Xid, name: &str) -> Result<()>

Delete an existing property from a client

Source

fn change_prop(&self, id: Xid, name: &str, val: Prop) -> Result<()>

Change an existing property for a client

Source

fn set_client_state(&self, id: Xid, wm_state: WindowState) -> Result<()>

Update a client’s WM_STATE property to the given value.

See the ICCCM docs for more information on what each value means for the client.

Provided Methods§

Source

fn client_supports_protocol(&self, id: Xid, proto: &str) -> Result<bool>

Check to see if a given client window supports a particular protocol or not

Source

fn client_accepts_focus(&self, id: Xid) -> bool

Check to see if a given client accepts input focus

Source

fn toggle_client_fullscreen( &self, id: Xid, client_is_fullscreen: bool, ) -> Result<()>

Toggle the fullscreen state of the given client ID with the X server

Source

fn client_name(&self, id: Xid) -> Result<String>

Fetch a client’s name proprty following ICCCM / EWMH standards

Source

fn client_should_float(&self, id: Xid, floating_classes: &[&str]) -> bool

Determine whether the target client should be tiled or allowed to float

Implementors§

Source§

impl XClientProperties for XcbConnection

Source§

impl XClientProperties for XcbDraw

Source§

impl<T> XClientProperties for T
where T: StubXClientProperties,