Module input

Source
Expand description

Runtime input uses logical display pixels. Legacy polling remains available; PlayerInput consumes the same ordered, bounded event journal.

Modules§

calibration
Opt-in checked calibration for normalized embedding-host samples.
touch_layout
Project authored HUD shapes once for both drawing and existing touch routing.

Structs§

Action
ActionDescriptor
Borrowed metadata for building hints from an action’s current bindings.
ActionHandle
An opaque action identity owned by one ActionMap.
ActionMap
Registration/rebinding may allocate. Feeds, consumption and context changes reuse bounded storage. ActionHandle access checks map ownership and bounds in constant time without allocating. Legacy usize access remains available.
AppliedConfig
Binding
BindingConflict
Two nonzero-scale bindings using the same source in currently active contexts.
ConfigBinding
A binding’s location in a proposed configuration, including host-owned context.
ConfigValidation
Non-mutating preview of a valid file merged with this host’s registrations.
ContextId
ControlSettings
DecodedConfig
PadState
PlayerInput
SavedAction
VisibleTouchLabel
A label actually drawn for one output of an installed touch-control slot. slot is the stable slice index passed to PlayerInput::set_touch_layout, also used by super::super::touch_layout::TouchSlot. A stick can have separate labels for its X and Y codes; a look region uses TouchDelta codes. Labels describe the current drawing, including any customized geometry. Omit controls whose labels are hidden. Merely installing a hit region does not establish visibility.

Enums§

ActionKind
ActionSnapshotError
A rejected atomic group read. Neither input nor caller output is changed.
CaptureDevice
ConfigError
A config decoding, host compatibility, or strict-import rejection.
ContextMode
ControlsStatus
HintDevice
Device family used to select binding hints. Keyboard and mouse share a family because a player commonly uses both together. Controller and touch labels use the host’s channel numbers, not guessed hardware glyphs.
HintError
A hint cannot be formatted. Both errors leave the caller’s buffer unchanged.
InputCode
InputError
Preset
StorageError
VisibleHintError
Errors from the opt-in visible-control formatter. Every error leaves the entire caller buffer unchanged; the legacy HintError is preserved.

Constants§

MAX_ACTIONS
MAX_ACTIVE_CODES
MAX_BINDINGS
MAX_CONFIG_BYTES
MAX_CONFIG_CONFLICTS
Maximum number of shared-source pairs retained by ActionMap::validate_config.
MAX_CONTEXTS
MAX_CONTEXT_DEPTH

Functions§

decode_config
gamepad_sample
Supply a controller sample from a first-party embedding host. The same bounded journal and normalized axes/buttons are used by browser and Linux providers.
gamepads
Current controller states; at most four controllers and fixed channel counts.
host_frame
Drive the shared action journal and optional immediate UI from a custom renderer host. Call once per render frame, outside a start game future. The callback can sample PlayerInput, advance its game, then draw settings. UI vertices remain available through the normal renderer ABI after return.
logical_touches
touch_event
Feed a logical-pixel touch from an embedding platform host.