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§
Sourcefn list_props(&self, id: Xid) -> Result<Vec<String>>
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.
Sourcefn get_prop(&self, id: Xid, name: &str) -> Result<Prop>
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.
Sourcefn delete_prop(&self, id: Xid, name: &str) -> Result<()>
fn delete_prop(&self, id: Xid, name: &str) -> Result<()>
Delete an existing property from a client
Sourcefn change_prop(&self, id: Xid, name: &str, val: Prop) -> Result<()>
fn change_prop(&self, id: Xid, name: &str, val: Prop) -> Result<()>
Change an existing property for a client
Sourcefn set_client_state(&self, id: Xid, wm_state: WindowState) -> Result<()>
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§
Sourcefn client_supports_protocol(&self, id: Xid, proto: &str) -> Result<bool>
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
Sourcefn client_accepts_focus(&self, id: Xid) -> bool
fn client_accepts_focus(&self, id: Xid) -> bool
Check to see if a given client accepts input focus
Sourcefn toggle_client_fullscreen(
&self,
id: Xid,
client_is_fullscreen: bool,
) -> Result<()>
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
Sourcefn client_name(&self, id: Xid) -> Result<String>
fn client_name(&self, id: Xid) -> Result<String>
Fetch a client’s name proprty following ICCCM / EWMH standards
Sourcefn client_should_float(&self, id: Xid, floating_classes: &[&str]) -> bool
fn client_should_float(&self, id: Xid, floating_classes: &[&str]) -> bool
Determine whether the target client should be tiled or allowed to float