Trait XEventHandler

Source
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§

Source

fn flush(&self) -> bool

Flush pending actions to the X event loop

Source

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

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

Source

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.

Source

fn build_client_event(&self, kind: ClientMessageKind) -> Result<ClientMessage>

Build the required event data for sending a known client event.

Implementors§

Source§

impl XEventHandler for XcbConnection

Source§

impl<T> XEventHandler for T
where T: StubXEventHandler,