C4 Engine
C4 Engine API Documentation

class InputDevice

Defined in:  C4Input.h
Encapsulates an individual input device.
Definition

class InputDevice : public ListElement<InputDevice>, public Memory<InputDevice>

Member Functions
InputDevice::GetInputDeviceType Returns the type of an input device.
InputDevice::GetInputDeviceHidUsage Returns the HID usage of an input device.
InputDevice::GetInputDeviceName Returns the name of an input device.
InputDevice::GetFirstInputControl Returns the first control belonging to an input device.
InputDevice::GetNextInputControl Returns the next control in an input device's control tree.
InputDevice::FindInputControl Returns the control having a given HID usage or name.
Description
The InputDevice class encapsulates an individual input device that is available for user input. The types of input devices that can be represented by the InputDevice class include mice, keyboards, and any kind of game controller. The particular type of input device can be determined by calling the InputDevice::GetInputDeviceType function.

Each input device has a tree of input controls attached to it, and this tree always contains at least one item. Iteration over all of the input controls is done by using the InputDevice::GetFirstInputControl and InputDevice::GetNextInputControl functions.
Base Classes
ListElement<InputDevice> Used internally by the Input Manager.
Memory<InputDevice> Input devices are allocated in a dedicated heap.
See Also

MouseDevice

KeyboardDevice

JoystickDevice

GameDevice

PlayStationDevice

XboxDevice

InputControl