Expand description
Platform-neutral input events (pointer, keyboard, IME, window).
§Examples
use ailloli_ui_core::event::{FocusEvent, Event};
assert!(matches!(Event::Focus(FocusEvent::new(true)), Event::Focus(_)));Platform-neutral UI events.
ailloli_ui_winit maps winit events into these types before the runtime
routes them to focused widgets.
§Matching extensible payloads
Provider-produced payloads that may gain platform-neutral data are marked
#[non_exhaustive]. Consumer matches must include a fallback arm. Construct
events through their lowercase constructors (for example,
PointerEvent::button,
FileEvent::dropped, or
ImeEvent::commit)
instead of depending on exhaustive framework internals. MouseButton
remains a compatibility alias; new code should use
PointerButton.
The top-level Event boundary is extensible too.
Consumer matches must therefore retain a fallback arm when matching either
the envelope or one of its provider-produced payloads.
Re-exports§
pub use file::FileEvent;pub use focus::FocusEvent;pub use ime::ImeEvent;pub use ime::ImePreedit;pub use ime::ImePreeditError;pub use keyboard::Key;pub use keyboard::KeyEvent;pub use keyboard::KeyState;pub use keyboard::Modifiers;pub use keyboard::NamedKey;pub use pointer::ActivationKind;pub use pointer::MouseButton;pub use pointer::PointerButton;pub use pointer::PointerEvent;pub use pointer::PointerId;pub use pointer::PointerSample;pub use pointer::PointerSampleError;pub use pointer::PointerSource;pub use pointer::WheelDelta;pub use window::WindowEvent;
Modules§
- file
- File hover/drop batches and compatibility variants.
- focus
- Runtime focus gain/loss notifications.
- ime
- Input Method Editor composition and commit payloads.
- keyboard
- Keyboard keys, modifiers, and transition payloads.
- pointer
- Pointer sources, samples, buttons, motion, and wheel payloads.
- window
- Window surface and lifecycle notifications.
Enums§
- Event
- Top-level event envelope delivered to the runtime.