pub trait XEventHandler {
// Required methods
fn flush(&self) -> bool;
fn wait_for_event(&self) -> Result<XEvent>;
fn send_client_event(&self, msg: ClientMessage) -> Result<()>;
fn build_client_event(
&self,
kind: ClientMessageKind,
) -> Result<ClientMessage>;
}
Expand description
Sending and receiving X events
Required Methods§
Sourcefn wait_for_event(&self) -> Result<XEvent>
fn wait_for_event(&self) -> Result<XEvent>
Wait for the next event from the X server and return it as an XEvent
Sourcefn send_client_event(&self, msg: ClientMessage) -> Result<()>
fn send_client_event(&self, msg: ClientMessage) -> Result<()>
Send an X event to the target client
The msg
being sent can be composed by hand or, for known common message types, generated
using the build_client_event method.
Sourcefn build_client_event(&self, kind: ClientMessageKind) -> Result<ClientMessage>
fn build_client_event(&self, kind: ClientMessageKind) -> Result<ClientMessage>
Build the required event data for sending a known client event.