This class keeps track of all the devices on a system, and sends out events when a device has been hot-plugged. More...
#include "inputDeviceManager.h"
Public Member Functions | |
void | add_device (InputDevice *device) |
Called when a new device has been discovered. More... | |
InputDeviceSet | get_devices () const |
Description: Returns all currently connected devices. More... | |
InputDeviceSet | get_devices (InputDevice::DeviceClass device_class) const |
Description: Returns all currently connected devices of the given device class. More... | |
void | remove_device (InputDevice *device) |
Called when a device has been removed, or when a device should otherwise no longer be tracked. More... | |
virtual void | update () |
Polls the system to see if there are any new devices. More... | |
Static Public Member Functions | |
static InputDeviceManager * | get_global_ptr () |
Returns the singleton InputDeviceManager instance. More... | |
This class keeps track of all the devices on a system, and sends out events when a device has been hot-plugged.
Definition at line 33 of file inputDeviceManager.h.
void InputDeviceManager::add_device | ( | InputDevice * | device | ) |
Called when a new device has been discovered.
This may also be used to register virtual devices.
This causes a connect-device event to be thrown.
Definition at line 92 of file inputDeviceManager.cxx.
References InputDeviceSet::add_device().
InputDeviceSet InputDeviceManager::get_devices | ( | ) | const |
Description: Returns all currently connected devices.
Definition at line 54 of file inputDeviceManager.cxx.
InputDeviceSet InputDeviceManager::get_devices | ( | InputDevice::DeviceClass | device_class | ) | const |
Description: Returns all currently connected devices of the given device class.
Definition at line 70 of file inputDeviceManager.cxx.
|
inlinestatic |
Returns the singleton InputDeviceManager instance.
Definition at line 18 of file inputDeviceManager.I.
void InputDeviceManager::remove_device | ( | InputDevice * | device | ) |
Called when a device has been removed, or when a device should otherwise no longer be tracked.
This causes a disconnect-device event to be thrown.
Definition at line 113 of file inputDeviceManager.cxx.
References InputDeviceSet::remove_device().
|
virtual |
Polls the system to see if there are any new devices.
In some implementations this is a no-op.
Definition at line 127 of file inputDeviceManager.cxx.