ferroui-linuxframebuffer 0.1.0-preview.2

The Linux framebuffer platform of FerroUI: one full-screen top-level on a framebuffer device or a KMS output, with input from the kernel's input devices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! An input backend (the port of `IInputBackend.cs`).

use super::IScreenInfoProvider;
use crate::raw_event_grouping::RawEvent;
use ferroui_base::input::IInputRoot;
use std::rc::Rc;

pub trait IInputBackend {
    /// 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).
    fn initialize(&self, info: Rc<dyn IScreenInfoProvider>, on_input: Rc<dyn Fn(RawEvent)>);

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