Trait DisplayServer

Source
pub trait DisplayServer<H: Handle> {
    // Required methods
    fn new(config: &impl Config) -> Self;
    fn get_next_events(&mut self) -> Vec<DisplayEvent<H>>;
    fn reload_config(
        &mut self,
        config: &impl Config,
        focused: Option<WindowHandle<H>>,
        windows: &[Window<H>],
    );
    fn wait_readable(&self) -> Pin<Box<dyn Future<Output = ()>>>;
    fn flush(&self);
    fn generate_verify_focus_event(&self) -> Option<DisplayEvent<H>>;

    // Provided methods
    fn update_windows(&self, _windows: Vec<&Window<H>>) { ... }
    fn update_workspaces(&self, _focused: Option<&Workspace>) { ... }
    fn execute_action(
        &mut self,
        _act: DisplayAction<H>,
    ) -> Option<DisplayEvent<H>> { ... }
}

Required Methods§

Source

fn new(config: &impl Config) -> Self

Source

fn get_next_events(&mut self) -> Vec<DisplayEvent<H>>

Source

fn reload_config( &mut self, config: &impl Config, focused: Option<WindowHandle<H>>, windows: &[Window<H>], )

Source

fn wait_readable(&self) -> Pin<Box<dyn Future<Output = ()>>>

Source

fn flush(&self)

Source

fn generate_verify_focus_event(&self) -> Option<DisplayEvent<H>>

Provided Methods§

Source

fn update_windows(&self, _windows: Vec<&Window<H>>)

Source

fn update_workspaces(&self, _focused: Option<&Workspace>)

Source

fn execute_action(&mut self, _act: DisplayAction<H>) -> Option<DisplayEvent<H>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§