Hid

Used to add input to the engine

dmHID::HContext

HID context handle

HID context handle


dmHID::HGamepad

gamepad context handle

gamepad context handle


dmHID::HMouse

mouse context handle

mouse context handle


dmHID::HKeyboard

keyboard context handle

keyboard context handle


dmHID::HTouchDevice

touch device context handle

touch device context handle


dmHID::INVALID_GAMEPAD_HANDLE [type: dmHID::HGamepad]()

invalid gamepad handle

invalid gamepad handle


dmHID::INVALID_KEYBOARD_HANDLE [type: dmHID::HKeyboard]()

invalid keyboard handle

invalid keyboard handle


dmHID::INVALID_MOUSE_HANDLE [type: dmHID::HMouse]()

invalid mouse handle

invalid mouse handle


dmHID::INVALID_TOUCHDEVICE_HANDLE [type: dmHID::HTouchDevice]()

invalid touch devicehandle

invalid touch devicehandle


dmHID::MAX_GAMEPAD_COUNT [type: uint32_t]()

Maximum number of gamepads supported

Maximum number of gamepads supported


dmHID::MAX_GAMEPAD_AXIS_COUNT [type: uint32_t]()

Maximum number of gamepad axis supported

Maximum number of gamepad axis supported


dmHID::MAX_GAMEPAD_BUTTON_COUNT [type: uint32_t]()

Maximum number of gamepad buttons supported

Maximum number of gamepad buttons supported


dmHID::MAX_GAMEPAD_HAT_COUNT [type: uint32_t]()

Maximum number of gamepad hats supported

Maximum number of gamepad hats supported


dmHID::MAX_TOUCH_COUNT [type: uint32_t]()

Maximum number of simultaneous touches supported

Maximum number of simultaneous touches supported


dmHID::MAX_KEYBOARD_COUNT [type: uint32_t]()

Maximum number of keyboards supported

Maximum number of keyboards supported


dmHID::MAX_MOUSE_COUNT [type: uint32_t]()

Maximum number of mice supported

Maximum number of mice supported


dmHID::MAX_TOUCH_DEVICE_COUNT [type: uint32_t]()

Maximum number of touch devices supported

Maximum number of touch devices supported


dmHID::MAX_CHAR_COUNT()

max number of characters

max number of characters


Phase

touch phase enumeration

touch phase enumeration

MEMBERS

dmHID::PHASE_BEGAN -

dmHID::PHASE_MOVED -

dmHID::PHASE_STATIONARY -

dmHID::PHASE_ENDED -

dmHID::PHASE_CANCELLED -


Key

keyboard key enumeration

keyboard key enumeration

MEMBERS

dmHID::KEY_SPACE -

dmHID::KEY_EXCLAIM -

dmHID::KEY_QUOTEDBL -

dmHID::KEY_HASH -

dmHID::KEY_DOLLAR -

dmHID::KEY_AMPERSAND -

dmHID::KEY_QUOTE -

dmHID::KEY_LPAREN -

dmHID::KEY_RPAREN -

dmHID::KEY_ASTERISK -

dmHID::KEY_PLUS -

dmHID::KEY_COMMA -

dmHID::KEY_MINUS -

dmHID::KEY_PERIOD -

dmHID::KEY_SLASH -

dmHID::KEY_0 -

dmHID::KEY_1 -

dmHID::KEY_2 -

dmHID::KEY_3 -

dmHID::KEY_4 -

dmHID::KEY_5 -

dmHID::KEY_6 -

dmHID::KEY_7 -

dmHID::KEY_8 -

dmHID::KEY_9 -

dmHID::KEY_COLON -

dmHID::KEY_SEMICOLON -

dmHID::KEY_LESS -

dmHID::KEY_EQUALS -

dmHID::KEY_GREATER -

dmHID::KEY_QUESTION -

dmHID::KEY_AT -

dmHID::KEY_A -

dmHID::KEY_B -

dmHID::KEY_C -

dmHID::KEY_D -

dmHID::KEY_E -

dmHID::KEY_F -

dmHID::KEY_G -

dmHID::KEY_H -

dmHID::KEY_I -

dmHID::KEY_J -

dmHID::KEY_K -

dmHID::KEY_L -

dmHID::KEY_M -

dmHID::KEY_N -

dmHID::KEY_O -

dmHID::KEY_P -

dmHID::KEY_Q -

dmHID::KEY_R -

dmHID::KEY_S -

dmHID::KEY_T -

dmHID::KEY_U -

dmHID::KEY_V -

dmHID::KEY_W -

dmHID::KEY_X -

dmHID::KEY_Y -

dmHID::KEY_Z -

dmHID::KEY_LBRACKET -

dmHID::KEY_BACKSLASH -

dmHID::KEY_RBRACKET -

dmHID::KEY_CARET -

dmHID::KEY_UNDERSCORE -

dmHID::KEY_BACKQUOTE -

dmHID::KEY_LBRACE -

dmHID::KEY_PIPE -

dmHID::KEY_RBRACE -

dmHID::KEY_TILDE -

dmHID::KEY_ESC -

dmHID::KEY_F1 -

dmHID::KEY_F2 -

dmHID::KEY_F3 -

dmHID::KEY_F4 -

dmHID::KEY_F5 -

dmHID::KEY_F6 -

dmHID::KEY_F7 -

dmHID::KEY_F8 -

dmHID::KEY_F9 -

dmHID::KEY_F10 -

dmHID::KEY_F11 -

dmHID::KEY_F12 -

dmHID::KEY_UP -

dmHID::KEY_DOWN -

dmHID::KEY_LEFT -

dmHID::KEY_RIGHT -

dmHID::KEY_LSHIFT -

dmHID::KEY_RSHIFT -

dmHID::KEY_LCTRL -

dmHID::KEY_RCTRL -

dmHID::KEY_LALT -

dmHID::KEY_RALT -

dmHID::KEY_TAB -

dmHID::KEY_ENTER -

dmHID::KEY_BACKSPACE -

dmHID::KEY_INSERT -

dmHID::KEY_DEL -

dmHID::KEY_PAGEUP -

dmHID::KEY_PAGEDOWN -

dmHID::KEY_HOME -

dmHID::KEY_END -

dmHID::KEY_KP_0 -

dmHID::KEY_KP_1 -

dmHID::KEY_KP_2 -

dmHID::KEY_KP_3 -

dmHID::KEY_KP_4 -

dmHID::KEY_KP_5 -

dmHID::KEY_KP_6 -

dmHID::KEY_KP_7 -

dmHID::KEY_KP_8 -

dmHID::KEY_KP_9 -

dmHID::KEY_KP_DIVIDE -

dmHID::KEY_KP_MULTIPLY -

dmHID::KEY_KP_SUBTRACT -

dmHID::KEY_KP_ADD -

dmHID::KEY_KP_DECIMAL -

dmHID::KEY_KP_EQUAL -

dmHID::KEY_KP_ENTER -

dmHID::KEY_KP_NUM_LOCK -

dmHID::KEY_CAPS_LOCK -

dmHID::KEY_SCROLL_LOCK -

dmHID::KEY_PAUSE -

dmHID::KEY_LSUPER -

dmHID::KEY_RSUPER -

dmHID::KEY_MENU -

dmHID::KEY_BACK -

dmHID::MAX_KEY_COUNT -


MouseButton

mouse button enumeration

mouse button enumeration

MEMBERS

dmHID::MOUSE_BUTTON_LEFT -

dmHID::MOUSE_BUTTON_MIDDLE -

dmHID::MOUSE_BUTTON_RIGHT -

dmHID::MOUSE_BUTTON_1 -

dmHID::MOUSE_BUTTON_2 -

dmHID::MOUSE_BUTTON_3 -

dmHID::MOUSE_BUTTON_4 -

dmHID::MOUSE_BUTTON_5 -

dmHID::MOUSE_BUTTON_6 -

dmHID::MOUSE_BUTTON_7 -

dmHID::MOUSE_BUTTON_8 -

dmHID::MAX_MOUSE_BUTTON_COUNT -


KeyboardPacket()

Contains the current state of a keyboard

Contains the current state of a keyboard


MousePacket()

Contains the current state of a mouse

Contains the current state of a mouse


GamepadPacket()

Contains the current state of a gamepad

Contains the current state of a gamepad


Touch()

Data for a single touch, e.g. finger

Data for a single touch, e.g. finger

MEMBERS

m_TapCount - Single-click, double, etc

m_Phase - Begin, end, etc

m_X - Current x

m_Y - Current y

m_ScreenX - Current x, in screen space

m_ScreenY - Current y, in screen space

m_DX - Current dx

m_DY - Current dy

m_ScreenDX - Current dx, in screen space

m_ScreenDY - Current dy, in screen space

m_Id - Touch id


GetKeyboard(context, index)

gets a keyboard handle

gets a keyboard handle

PARAMETERS

context - context in which to find the gamepad

index - device index

RETURN

keyboard - Handle to keyboard. dmHID::INVALID_KEYBOARD_HANDLE if not available


GetMouse(context, index)

gets a mouse handle

gets a mouse handle

PARAMETERS

context - context in which to find the gamepad

index - device index

RETURN

mouse - Handle to mouse. dmHID::INVALID_MOUSE_HANDLE if not available


GetTouchDevice(context, index)

gets a touch device handle

gets a touch device handle

PARAMETERS

context - context in which to find the gamepad

index - device index

RETURN

device - Handle to touch device. dmHID::INVALID_TOUCH_DEVICE_HANDLE if not available


GetGamePad(context, index)

gets a gamepad device handle

gets a gamepad device handle

PARAMETERS

context - context in which to find the gamepad

index - device index

RETURN

gamepad - Handle to gamepad. dmHID::INVALID_GAMEPAD_HANDLE if not available


GetGamePad(gamepad, out)

gets a gamepad device handle

gets a gamepad device handle

PARAMETERS

gamepad - Handle to gamepad

out - Platform specific user id data

RETURN

result - true if gamepad has a user id data assigned to it


AddTouch(device, x, y, id, phase)

Adds a touch event touch.

Adds a touch event touch.

PARAMETERS

device - device handle

x - x-coordinate of the position

y - y-coordinate of the position

id - identifier of touch

phase - phase of touch


SetGamepadButton(gamepad, button, value)

Sets the state of a gamepad button.

Sets the state of a gamepad button.

PARAMETERS

gamepad - device handle

button - The requested button [0, dmHID::MAX_GAMEPAD_BUTTON_COUNT)

value - Button state


SetGamepadAxis(gamepad, axis, value)

Sets the state of a gamepad axis.

Sets the state of a gamepad axis.

PARAMETERS

gamepad - device handle

axis - The requested axis [0, dmHID::MAX_GAMEPAD_AXIS_COUNT)

value - axis value [-1, 1]


SetMouseButton(mouse, button, value)

Sets the state of a mouse button.

Sets the state of a mouse button.

PARAMETERS

mouse - device handle

button - The requested button

value - Button state


SetMousePosition(mouse, x, y)

Sets the position of a mouse.

Sets the position of a mouse.

PARAMETERS

mouse - device handle

x - x-coordinate of the position

y - y-coordinate of the position


SetMouseWheel(mouse, value)

Sets the mouse wheel.

Sets the mouse wheel.

PARAMETERS

mouse - device handle

value - wheel value


GetMousePacket(mouse, out_packet)

Obtain a mouse packet reflecting the current input...

Obtain a mouse packet reflecting the current input state of a HID context.

PARAMETERS

mouse - context from which to retrieve the packet

out_packet - Mouse packet out argument

RETURN

result - If the packet was successfully updated or not.


GetMouseButton(packet, button)

Convenience function to retrieve the state of a mo...

Convenience function to retrieve the state of a mouse button from a mouse packet.

PARAMETERS

packet - Mouse packet

button - The requested button

RETURN

result - If the button was pressed or not


SetKey(keyboard, key, value)

Sets the state of a key.

Sets the state of a key.

PARAMETERS

keyboard - context handle

key - The requested key

value - Key state


AddKeyboardChar(keyboard, chr)

Add text input

Add text input

PARAMETERS

keyboard - context handle

chr - The character (unicode)