Skip to main content

Module input

Module input 

Source
Expand description

Backend-agnostic input snapshot returned by RenderBackend::take_input. Each backend was previously carrying its own structurally-identical InputState; this single type replaces those duplicates.

Structs§

InputPacket
One frame’s sampled window input, taken beside the backend right after the draw (whose event pump produced it) and consumed by the input system. In serial execution it is deposited and consumed within the same tick; the pipelined driver ships it across the thread boundary instead.
RenderInput
Accumulated input state since the last poll. Drained and reset every frame by GraphicsSystem and converted into a FrameInput component for Camera3DSystem to consume.

Functions§

wheel_notches_to_scroll_delta
Convert a signed wheel rotation in notches (positive = rotated away from the user, i.e. scroll up) into an additive scroll_delta increment. Negated so a positive scroll_delta scrolls a panel’s content up, matching FrameInput.scroll_delta’s convention (see ui.rs and metal/input.rs).