rlvgl_platform/input.rs
1//! Abstractions for input devices.
2use rlvgl_core::event::Event;
3
4/// Trait for input devices such as touchscreens or mice.
5pub trait InputDevice {
6 /// Retrieve the next input event if available.
7 fn poll(&mut self) -> Option<Event>;
8}
9
10/// Dummy input device that yields no events.
11pub struct DummyInput;
12
13impl InputDevice for DummyInput {
14 fn poll(&mut self) -> Option<Event> {
15 None
16 }
17}
18
19/// Alias used by platform backends for standard events.
20pub type InputEvent = Event;