Skip to main content

Crate consortium_hmi_input

Crate consortium_hmi_input 

Source
Expand description

Backend-neutral input event model for Consortium HMI runtimes.

HMI backends (consortium-hmi-pocket, and later a WebKit adapter) and the event sources that drive them speak different concrete APIs — winit on a desktop, libinput/evdev on a Linux kiosk, embedded-hal drivers on a bare-metal core, or a Consortium IPC channel carrying events from a real-time core. This crate is the neutral middle: a single InputEvent type expressed in logical UI coordinates, plus a pull-based InputSource contract that every source implements.

InputEvent derives consortium_ipc::IpcSafe and serde, so a real-time core can serialize events with a Consortium codec and forward them across IPC to a Linux HMI host exactly like any other cross-core message. The type is no_std and allocation-free, so the same definition compiles for firmware and for the Linux host.

Structs§

SliceSource
An InputSource that replays a fixed slice of events once.

Enums§

ButtonCode
A logical control on a gamepad-style input surface.
InputEvent
A semantic input event, independent of its hardware or OS source.
PointerButton
A pointer (mouse) button.
ScrollAxis
Axis a InputEvent::Scroll applies to.
TouchPhase
Lifecycle phase of a touch contact.

Traits§

InputSource
A non-blocking, drain-style source of InputEvents.