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
- Action
Descriptor - Borrowed metadata for building hints from an action’s current bindings.
- Action
Handle - An opaque action identity owned by one
ActionMap. - Action
Map - Registration/rebinding may allocate. Feeds, consumption and context changes
reuse bounded storage.
ActionHandleaccess checks map ownership and bounds in constant time without allocating. Legacyusizeaccess remains available. - Applied
Config - Binding
- Binding
Conflict - Two nonzero-scale bindings using the same source in currently active contexts.
- Config
Binding - A binding’s location in a proposed configuration, including host-owned context.
- Config
Validation - Non-mutating preview of a valid file merged with this host’s registrations.
- Context
Id - Control
Settings - Decoded
Config - PadState
- Player
Input - Saved
Action - Visible
Touch Label - A label actually drawn for one output of an installed touch-control slot.
slotis the stable slice index passed toPlayerInput::set_touch_layout, also used bysuper::super::touch_layout::TouchSlot. A stick can have separate labels for its X and Y codes; a look region usesTouchDeltacodes. 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§
- Action
Kind - Action
Snapshot Error - A rejected atomic group read. Neither input nor caller output is changed.
- Capture
Device - Config
Error - A config decoding, host compatibility, or strict-import rejection.
- Context
Mode - Controls
Status - Hint
Device - 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.
- Hint
Error - A hint cannot be formatted. Both errors leave the caller’s buffer unchanged.
- Input
Code - Input
Error - Preset
- Storage
Error - Visible
Hint Error - Errors from the opt-in visible-control formatter. Every error leaves the
entire caller buffer unchanged; the legacy
HintErroris 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
startgame 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.