Skip to main content

ferroui_linuxframebuffer/input/null_input/
null_input_backend.rs

1//! The input backend without input (the port of `NullInputBackend.cs`).
2
3use crate::input::{IInputBackend, IScreenInfoProvider};
4use crate::raw_event_grouping::RawEvent;
5use ferroui_base::input::IInputRoot;
6use std::rc::Rc;
7
8#[derive(Default)]
9pub struct NullInputBackend;
10
11impl NullInputBackend {
12    pub fn new() -> Self {
13        Self
14    }
15}
16
17impl IInputBackend for NullInputBackend {
18    fn initialize(&self, _screen: Rc<dyn IScreenInfoProvider>, _on_input: Rc<dyn Fn(RawEvent)>) {}
19
20    fn set_input_root(&self, _root: Rc<dyn IInputRoot>) {}
21}