Hid

Namespace: dmHid Language: C++ Type: Defold C++ File: hid.h Source: engine/hid/src/dmsdk/hid/hid.h Include: dmsdk/hid/hid.h

Used to add input to the engine

API

AddKeyboardChar

Type: FUNCTION Add text input

Parameters

AddTouch

Type: FUNCTION Adds a touch event touch.

Parameters

dmHID::HContext

Type: TYPEDEF HID context handle

dmHID::HGamepad

Type: TYPEDEF gamepad context handle

dmHID::HKeyboard

Type: TYPEDEF keyboard context handle

dmHID::HMouse

Type: TYPEDEF mouse context handle

dmHID::HTouchDevice

Type: TYPEDEF touch device context handle

dmHID::INVALID_GAMEPAD_HANDLE [type: dmHID::HGamepad]

Type: CONSTANT invalid gamepad handle

dmHID::INVALID_KEYBOARD_HANDLE [type: dmHID::HKeyboard]

Type: CONSTANT invalid keyboard handle

dmHID::INVALID_MOUSE_HANDLE [type: dmHID::HMouse]

Type: CONSTANT invalid mouse handle

dmHID::INVALID_TOUCHDEVICE_HANDLE [type: dmHID::HTouchDevice]

Type: CONSTANT invalid touch devicehandle

dmHID::MAX_CHAR_COUNT

Type: CONSTANT max number of characters

dmHID::MAX_GAMEPAD_AXIS_COUNT [type: uint32_t]

Type: CONSTANT Maximum number of gamepad axis supported

dmHID::MAX_GAMEPAD_BUTTON_COUNT [type: uint32_t]

Type: CONSTANT Maximum number of gamepad buttons supported

dmHID::MAX_GAMEPAD_COUNT [type: uint32_t]

Type: CONSTANT Maximum number of gamepads supported

dmHID::MAX_GAMEPAD_HAT_COUNT [type: uint32_t]

Type: CONSTANT Maximum number of gamepad hats supported

dmHID::MAX_KEYBOARD_COUNT [type: uint32_t]

Type: CONSTANT Maximum number of keyboards supported

dmHID::MAX_MOUSE_COUNT [type: uint32_t]

Type: CONSTANT Maximum number of mice supported

dmHID::MAX_TOUCH_COUNT [type: uint32_t]

Type: CONSTANT Maximum number of simultaneous touches supported

dmHID::MAX_TOUCH_DEVICE_COUNT [type: uint32_t]

Type: CONSTANT Maximum number of touch devices supported

GamepadPacket

Type: STRUCT Contains the current state of a gamepad

Notes

GetGamePad

Type: FUNCTION gets a gamepad device handle

Parameters

Returns

GetGamePad

Type: FUNCTION gets a gamepad device handle

Parameters

Returns

GetGamepadButton

Type: FUNCTION Convenience function to retrieve the state of a gamepad button from a gamepad packet.

Parameters

Returns

GetGamepadHat

Type: FUNCTION Convenience function to retrieve the state of a gamepad hat from a gamepad packet.

Parameters

Returns

GetGamepadPacket

Type: FUNCTION Obtain a gamepad packet reflecting the current input state of the gamepad in a HID context.

Parameters

Returns

GetKeyboard

Type: FUNCTION gets a keyboard handle

Parameters

Returns

GetMouse

Type: FUNCTION gets a mouse handle

Parameters

Returns

GetMouseButton

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

Parameters

Returns

GetMousePacket

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

Parameters

Returns

GetTouchDevice

Type: FUNCTION gets a touch device handle

Parameters

Returns

Key

Type: ENUM keyboard key enumeration

Members

KeyboardPacket

Type: STRUCT Contains the current state of a keyboard

Notes

MouseButton

Type: ENUM mouse button enumeration

Members

MousePacket

Type: STRUCT Contains the current state of a mouse

Notes

Phase

Type: ENUM touch phase enumeration

Notes

Members

SetGamepadAxis

Type: FUNCTION Sets the state of a gamepad axis.

Parameters

SetGamepadButton

Type: FUNCTION Sets the state of a gamepad button.

Parameters

SetKey

Type: FUNCTION Sets the state of a key.

Parameters

SetMouseButton

Type: FUNCTION Sets the state of a mouse button.

Parameters

SetMousePosition

Type: FUNCTION Sets the position of a mouse.

Parameters

SetMouseWheel

Type: FUNCTION Sets the mouse wheel.

Parameters

Touch

Type: STRUCT Data for a single touch, e.g. finger

Members