Panda3D
Public Member Functions | Static Public Member Functions | List of all members
InputDeviceManager Class Reference

This class keeps track of all the devices on a system, and sends out events when a device has been hot-plugged. More...

Public Member Functions

 addDevice (InputDevice device)
 Called when a new device has been discovered. More...
 
InputDeviceSet getDevices ()
 Description: Returns all currently connected devices. More...
 
InputDeviceSet getDevices (InputDevice::DeviceClass device_class)
 Description: Returns all currently connected devices of the given device class. More...
 
 removeDevice (InputDevice device)
 Called when a device has been removed, or when a device should otherwise no longer be tracked. More...
 
 update ()
 Polls the system to see if there are any new devices. More...
 

Static Public Member Functions

static InputDeviceManager getGlobalPtr ()
 Returns the singleton InputDeviceManager instance. More...
 

Detailed Description

This class keeps track of all the devices on a system, and sends out events when a device has been hot-plugged.

Since
1.10.0

Member Function Documentation

◆ addDevice()

addDevice ( 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.

◆ getDevices() [1/2]

InputDeviceSet getDevices ( )

Description: Returns all currently connected devices.

◆ getDevices() [2/2]

InputDeviceSet getDevices ( InputDevice::DeviceClass  device_class)

Description: Returns all currently connected devices of the given device class.

◆ getGlobalPtr()

static InputDeviceManager getGlobalPtr ( )
static

Returns the singleton InputDeviceManager instance.

◆ removeDevice()

removeDevice ( 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.

◆ update()

update ( )

Polls the system to see if there are any new devices.

In some implementations this is a no-op.