Skip to main content

types Namespace

Input type definitions. More...

Definition

namespace helios::input::types { ... }

Enumerations Index

enum classGamepadInput { ... }

Bitmask enum for gamepad input buttons. More...

enumGamepad { ... }

Enumerates gamepad identifiers in bitmask-friendly values. More...

enumKey { ... }

Enumerates common keyboard keys. More...

Description

Input type definitions.

This namespace contains type definitions for input handling, including key codes, gamepad ids and input device states used throughout the input system. Provides platform-independent type definitions for representing input events and states.

Enumerations

Gamepad

enum helios::input::types::Gamepad

Enumerates gamepad identifiers in bitmask-friendly values.

Enumeration values
ONE (= 1)
TWO (= 2)
THREE (= 4)
FOUR (= 8)
size_Number of logical gamepad entries represented by this enum (= 4)

This enumeration provides identifiers for gamepads, commonly identified by the logical port they are mapped to. Values are chosen for convenient bitmask composition (ONE | TWO, ...).

Implementing APIs should map their platform-specific gamepad indices to these identifiers.

Definition at line 110 of file Gamepad.ixx.

110 enum Gamepad {
111 ONE = 1, // 1
112 TWO = 2, // 10
113 THREE = 4, // 100
114 FOUR = 8, // 1000
115
116
117
118 /**
119 * @brief Number of logical gamepad entries represented by this enum.
120 */
122 };

GamepadInput

enum class helios::input::types::GamepadInput
strong

Bitmask enum for gamepad input buttons.

Enumeration values
StartStart button (= 1 << 0)
SelectSelect/Back button (= 1 << 5)
AA button (bottom face button) (= 1 << 1)
BB button (right face button) (= 1 << 2)
XX button (left face button) (= 1 << 3)
YY button (top face button) (= 1 << 4)
LeftStickLeft stick button (L3) (= 1 << 6)
RightStickRight stick button (R3) (= 1 << 7)
UpD-pad up (= 1 << 8)
DownD-pad down (= 1 << 9)
LeftD-pad left (= 1 << 10)
RightD-pad right (= 1 << 11)
LeftBumperLeft bumper (L1) (= 1 << 12)
RightBumperRight bumper (R1) (= 1 << 13)
LeftTriggerLeft trigger (L2) (= 1 << 14)
RightTriggerRight trigger (R2) (= 1 << 15)

Each value represents a single button as a bit flag, allowing efficient combination and querying of multiple inputs.

Definition at line 17 of file Gamepad.ixx.

17 enum class GamepadInput {
18
19 /**
20 * @brief Start button.
21 */
22 Start = 1 << 0,
23
24 /**
25 * @brief Select/Back button.
26 */
27 Select = 1 << 5,
28
29 /**
30 * @brief A button (bottom face button).
31 */
32 A = 1 << 1,
33
34 /**
35 * @brief B button (right face button).
36 */
37 B = 1 << 2,
38
39 /**
40 * @brief X button (left face button).
41 */
42 X = 1 << 3,
43
44 /**
45 * @brief Y button (top face button).
46 */
47 Y = 1 << 4,
48
49 /**
50 * @brief Left stick button (L3).
51 */
52 LeftStick = 1 << 6,
53
54 /**
55 * @brief Right stick button (R3).
56 */
57 RightStick = 1 << 7,
58
59 /**
60 * @brief D-pad up.
61 */
62 Up = 1 << 8,
63
64 /**
65 * @brief D-pad down.
66 */
67 Down = 1 << 9,
68
69 /**
70 * @brief D-pad left.
71 */
72 Left = 1 << 10,
73
74 /**
75 * @brief D-pad right.
76 */
77 Right = 1 << 11,
78
79 /**
80 * @brief Left bumper (L1).
81 */
82 LeftBumper = 1 << 12,
83
84 /**
85 * @brief Right bumper (R1).
86 */
87 RightBumper = 1 << 13,
88
89 /**
90 * @brief Left trigger (L2).
91 */
92 LeftTrigger = 1 << 14,
93
94 /**
95 * @brief Right trigger (R2).
96 */
97 RightTrigger = 1 << 15
98 };

Key

enum helios::input::types::Key

Enumerates common keyboard keys.

Enumeration values
ESC
TILDE
size_Number of logical gamepad entries represented by this enum (= 4)

This enumeration provides identifiers for various keyboard keys. It's intended to be a platform-agnostic representation of physical keys.

Implementing APIs are advised to properly map their implementation against this enumeration.

Definition at line 20 of file Key.ixx.

20 enum Key {
21
23
25
26 /**
27 * @brief Number of entries in this enumeration.
28 */
30 };

The documentation for this namespace was generated from the following files:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.