Expand description
Input for a drawing area, independent of a windowing or UI backend.
Positions and scrolling use local logical pixels, X right and Y down.
Adapters produce one CanvasInput per application frame. Events retain the
order supplied by that adapter, not necessarily the original OS event history.
A canvas has one primary pointer (mouse or primary touch), five buttons, and
logical keys. Text editing, IME, individual touch IDs and raw device motion
belong to the host’s platform/UI API.
Capture belongs to the canvas where a press started. Movement and release may
occur outside its bounds. Event::Cancelled ends all held interactions on
focus loss, geometry changes, or removal; it must not activate a click action.
Structs§
- Canvas
Input - Immutable input paired with one content frame.
- Input
State - Adapter-side accumulator. Clearing a frame keeps held state; cancellation clears held state and emits an explicit cancellation instead of fake releases.
- Modifiers