Skip to main content

IInputBackend

Trait IInputBackend 

Source
pub trait IInputBackend {
    // Required methods
    fn initialize(
        &self,
        info: Rc<dyn IScreenInfoProvider>,
        on_input: Rc<dyn Fn(RawEvent)>,
    );
    fn set_input_root(&self, root: Rc<dyn IInputRoot>);
}

Required Methods§

Source

fn initialize( &self, info: Rc<dyn IScreenInfoProvider>, on_input: Rc<dyn Fn(RawEvent)>, )

Starts the backend. on_input is called on the UI thread, where raw input events live (the reference calls it on the thread of the backend and the top-level posts the event).

Source

fn set_input_root(&self, root: Rc<dyn IInputRoot>)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§