Class Bindings
Defined in File input-bindings.h
Inheritance Relationships
Derived Type
public CE::Platform::GLFW::GainputMapper(Class GainputMapper)
Class Documentation
-
class Bindings
Owns physical-to-semantic mappings.
Device notifications update pending physical state on the polling thread; publish_actions() commits one immutable result for a platform poll. Configuration and on_* calls belong to that same owner thread. Published handles may be read on other threads.
Subclassed by CE::Platform::GLFW::GainputMapper
Public Functions
-
BindingId bind_button(CE::Input::Control control, Id action)
Declaration:
[[nodiscard]]Bind one physical control to a semantic button on the polling owner.
Multiple mappings to one button action combine with OR. Conflicting button/axis use of an action is rejected.
- Parameters:
control – Physical device and button identity.
action – Application-owned semantic identity read from tick input.
- Returns:
Nonzero registration ID for later unbind().
-
BindingId bind_button(Chord chord, Id action)
Declaration:
[[nodiscard]]Bind an AND chord to a semantic button; alternative mappings combine with OR.
Empty chords and conflicting button/axis use of an action are rejected. Configuration belongs to the polling owner.
- Parameters:
chord – Controls that must all be held in one poll.
action – Application-owned semantic button identity.
- Returns:
Nonzero registration ID for later unbind().
-
BindingId bind_axis(CE::Input::Control axis, Id action, AxisOptions options = {})
Declaration:
[[nodiscard]]
-
BindingId bind_axis(Chord modifiers, CE::Input::Control axis, Id action, AxisOptions options = {})
Declaration:
[[nodiscard]]
-
bool unbind(BindingId binding)
Remove one mapping on the polling owner.
Removal affects the next publication; it does not erase already mapped relative activity or earlier immutable handles.
- Parameters:
binding – Registration ID returned when the mapping was added.
- Returns:
Whether an existing mapping was removed; unknown IDs return false.
-
void clear()
-
BindingId bind_button(CE::Input::Control control, Id action)