The IDeviceHandler interface. More...
#include "murl_input_i_device_handler.h"
Inherited by Murl::Input::DeviceHandler.
Public Member Functions | |
virtual Bool | Init (const IAppConfiguration *appConfig)=0 |
Initialize the device handler. More... | |
virtual Bool | DeInit ()=0 |
Deinitialize the device handler. More... | |
virtual Bool | UpdateDevices ()=0 |
Update all registered devices. More... | |
virtual void | ConfigChanged (const IAppConfiguration *appConfig)=0 |
Notification of changed configuration. More... | |
virtual Bool | BeginLogicUpdate (ITouchableHandler *touchableHandler)=0 |
Begin updating the touchable handler. More... | |
virtual Bool | EndLogicUpdate (ITouchableHandler *touchableHandler)=0 |
End updating the touchable handler. More... | |
virtual IAccelerometer * | AddAccelerometerDevice (const String &name)=0 |
Create an accelerometer device and add the device to the input device handler. More... | |
virtual Bool | RemoveAccelerometerDevice (IAccelerometer *&accelerometer)=0 |
Remove an accelerometer device from the devicehandler and destroy the object. More... | |
virtual const IAccelerometerDevice * | GetAccelerometerDevice (UInt32 index=0) const =0 |
Get a registered accelerometer device object. More... | |
virtual IGyroscope * | AddGyroscopeDevice (const String &name)=0 |
Create a gyroscope device and add the device to the input device handler. More... | |
virtual Bool | RemoveGyroscopeDevice (IGyroscope *&gyroscope)=0 |
Remove a gyroscope device from the devicehandler and destroy the object. More... | |
virtual const IGyroscopeDevice * | GetGyroscopeDevice (UInt32 index=0) const =0 |
Get a registered gyroscope device object. More... | |
virtual IHeading * | AddHeadingDevice (const String &name)=0 |
Create a heading device and add the device to the input device handler. More... | |
virtual Bool | RemoveHeadingDevice (IHeading *&heading)=0 |
Remove a heading device from the devicehandler and destroy the object. More... | |
virtual const IHeadingDevice * | GetHeadingDevice (UInt32 index=0) const =0 |
Get a registered heading device object. More... | |
virtual ILocation * | AddLocationDevice (const String &name)=0 |
Create a location device and add the device to the input device handler. More... | |
virtual Bool | RemoveLocationDevice (ILocation *&location)=0 |
Remove a location device from the devicehandler and destroy the object. More... | |
virtual const ILocationDevice * | GetLocationDevice (UInt32 index=0) const =0 |
Get a registered location device object. More... | |
virtual IGameController * | AddGameControllerDevice (const String &name)=0 |
Create a game controller device and add the device to the input device handler. More... | |
virtual Bool | RemoveGameControllerDevice (IGameController *&gameController)=0 |
Remove a game controller device from the devicehandler and destroy the object. More... | |
virtual UInt32 | GetNumberOfGameControllerDevices () const =0 |
Get the number of registered game controller devices. More... | |
virtual const IGameControllerDevice * | GetGameControllerDevice (UInt32 index=0) const =0 |
Get a registered game controller device object. More... | |
virtual IGameControllerDevice * | GetGameControllerDevice (UInt32 index=0)=0 |
Get a registered mutable game controller device object. More... | |
virtual IKeyboard * | AddKeyboardDevice (const String &name)=0 |
Create a keyboard device and add the device to the input device handler. More... | |
virtual Bool | RemoveKeyboardDevice (IKeyboard *&keyboard)=0 |
Remove a keyboard device from the devicehandler and destroy the object. More... | |
virtual const IKeyboardDevice * | GetKeyboardDevice (UInt32 index=0) const =0 |
Get a registered keyboard device object. More... | |
virtual IMotion * | AddMotionDevice (const String &name)=0 |
Create a motion device and add the device to the input device handler. More... | |
virtual Bool | RemoveMotionDevice (IMotion *&motion)=0 |
Remove a motion device from the devicehandler and destroy the object. More... | |
virtual const IMotionDevice * | GetMotionDevice (UInt32 index=0) const =0 |
Get a registered motion device object. More... | |
virtual IMouse * | AddMouseDevice (const String &name)=0 |
Create a mouse device and add the device to the input device handler. More... | |
virtual Bool | RemoveMouseDevice (IMouse *&mouse)=0 |
Remove a mouse device from the devicehandler and destroy the object. More... | |
virtual const IMouseDevice * | GetMouseDevice (UInt32 index=0) const =0 |
Get a registered mouse device object. More... | |
virtual IOrientation * | AddOrientationDevice (const String &name)=0 |
Create a orientation device and add the device to the input device handler. More... | |
virtual Bool | RemoveOrientationDevice (IOrientation *&orientation)=0 |
Remove a orientation device from the devicehandler and destroy the object. More... | |
virtual const IOrientationDevice * | GetOrientationDevice (UInt32 index=0) const =0 |
Get a registered orientation device object. More... | |
virtual IRawButton * | AddRawButtonDevice (const String &name)=0 |
Create a raw-button device and add the device to the input device handler. More... | |
virtual Bool | RemoveRawButtonDevice (IRawButton *&rawButton)=0 |
Remove a raw-button device from the devicehandler and destroy the object. More... | |
virtual const IRawButtonDevice * | GetRawButtonDevice (UInt32 index=0) const =0 |
Get a registered raw-button device object. More... | |
virtual IRawKeyboard * | AddRawKeyboardDevice (const String &name)=0 |
Create a raw-keyboard device and add the device to the input device handler. More... | |
virtual Bool | RemoveRawKeyboardDevice (IRawKeyboard *&rawKeyboard)=0 |
Remove a raw-keyboard device from the devicehandler and destroy the object. More... | |
virtual const IRawKeyboardDevice * | GetRawKeyboardDevice (UInt32 index=0) const =0 |
Get a registered raw-keyboard device object. More... | |
virtual IRawMouse * | AddRawMouseDevice (const String &name)=0 |
Create a raw-mouse device and add the device to the input device handler. More... | |
virtual Bool | RemoveRawMouseDevice (IRawMouse *&rawMouse)=0 |
Remove a raw-mouse device from the devicehandler and destroy the object. More... | |
virtual const IRawMouseDevice * | GetRawMouseDevice (UInt32 index=0) const =0 |
Get a registered raw-mouse device object. More... | |
virtual ITouchScreen * | AddTouchScreenDevice (const String &name)=0 |
Create a touch-screen device and add the device to the input device handler. More... | |
virtual Bool | RemoveTouchScreenDevice (ITouchScreen *&touchScreen)=0 |
Remove a touch-screen device from the devicehandler and destroy the object. More... | |
virtual UInt32 | GetNumberOfTouchScreenDevices () const =0 |
Get the number of registered touch-screen devices. More... | |
virtual const ITouchScreenDevice * | GetTouchScreenDevice (UInt32 index=0) const =0 |
Get a registered touch-screen device object. More... | |
virtual IVirtualMouse * | GetVirtualMouse ()=0 |
Get the virtual-mouse device object. More... | |
Detailed Description
The IDeviceHandler interface.
The device handler creates and registers all input device instances. Devices are used by the platform which post's the current device states. The states are processed by the registered devices each logic tick before executing the logic processors Logic::IEngineProcessor::ProcessTick().
Member Function Documentation
◆ Init()
|
pure virtual |
Initialize the device handler.
- Parameters
-
appConfig The application configuration object.
- Returns
- true if successful.
◆ DeInit()
|
pure virtual |
Deinitialize the device handler.
- Returns
- true if successful.
◆ UpdateDevices()
|
pure virtual |
Update all registered devices.
The update is executed in the logic thread context each logic tick before executing the logic processors Logic::IEngineProcessor::ProcessTick().
- Returns
- true if successful.
◆ ConfigChanged()
|
pure virtual |
Notification of changed configuration.
The notification is executed in the engine thread context if any configuration item has changed.
- Parameters
-
appConfig The application configuration object.
◆ BeginLogicUpdate()
|
pure virtual |
Begin updating the touchable handler.
The update is executed in the logic thread context each logic tick after executing the logic processors Logic::IEngineProcessor::ProcessTick() and before the graph's logic-traversal.
- Parameters
-
touchableHandler The touchable handler object.
- Returns
- true if successful.
◆ EndLogicUpdate()
|
pure virtual |
End updating the touchable handler.
The update is executed in the logic thread context each logic tick after executing UpdateDevices() and before executing the logic processors Logic::IEngineProcessor::ProcessTick().
- Parameters
-
touchableHandler The touchable handler object.
- Returns
- true if successful.
◆ AddAccelerometerDevice()
|
pure virtual |
Create an accelerometer device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created accelerometer device object.
◆ RemoveAccelerometerDevice()
|
pure virtual |
Remove an accelerometer device from the devicehandler and destroy the object.
- Parameters
-
accelerometer A reference to the accelerometer device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetAccelerometerDevice()
|
pure virtual |
Get a registered accelerometer device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The accelerometer device object or null if the index is out of range.
◆ AddGyroscopeDevice()
|
pure virtual |
Create a gyroscope device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created gyroscope device object.
◆ RemoveGyroscopeDevice()
|
pure virtual |
Remove a gyroscope device from the devicehandler and destroy the object.
- Parameters
-
gyroscope A reference to the gyroscope device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetGyroscopeDevice()
|
pure virtual |
Get a registered gyroscope device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The gyroscope device object or null if index the is out of range.
◆ AddHeadingDevice()
Create a heading device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created heading device object.
◆ RemoveHeadingDevice()
Remove a heading device from the devicehandler and destroy the object.
- Parameters
-
heading A reference to the heading device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetHeadingDevice()
|
pure virtual |
Get a registered heading device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The heading device object or null if index the is out of range.
◆ AddLocationDevice()
|
pure virtual |
Create a location device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created location device object.
◆ RemoveLocationDevice()
|
pure virtual |
Remove a location device from the devicehandler and destroy the object.
- Parameters
-
location A reference to the location device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetLocationDevice()
|
pure virtual |
Get a registered location device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The location device object or null if index the is out of range.
◆ AddGameControllerDevice()
|
pure virtual |
Create a game controller device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created game controller device object.
◆ RemoveGameControllerDevice()
|
pure virtual |
Remove a game controller device from the devicehandler and destroy the object.
- Parameters
-
gameController A reference to the game controller device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetNumberOfGameControllerDevices()
|
pure virtual |
Get the number of registered game controller devices.
- Returns
- The number of registered game controller devices.
◆ GetGameControllerDevice() [1/2]
|
pure virtual |
Get a registered game controller device object.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].
- Parameters
-
index The zero-based index of the device.
- Returns
- The game controller device object or null if index the is out of range.
◆ GetGameControllerDevice() [2/2]
|
pure virtual |
Get a registered mutable game controller device object.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].
- Parameters
-
index The zero-based index of the device.
- Returns
- The mutable game controller device object or null if index the is out of range.
◆ AddKeyboardDevice()
|
pure virtual |
Create a keyboard device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created keyboard device object.
◆ RemoveKeyboardDevice()
|
pure virtual |
Remove a keyboard device from the devicehandler and destroy the object.
- Parameters
-
keyboard A reference to the keyboard device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetKeyboardDevice()
|
pure virtual |
Get a registered keyboard device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The keyboard device object or null if index the is out of range.
◆ AddMotionDevice()
Create a motion device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created motion device object.
◆ RemoveMotionDevice()
Remove a motion device from the devicehandler and destroy the object.
- Parameters
-
motion A reference to the motion device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetMotionDevice()
|
pure virtual |
Get a registered motion device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The motion device object or null if index the is out of range.
◆ AddMouseDevice()
Create a mouse device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created mouse device object.
◆ RemoveMouseDevice()
Remove a mouse device from the devicehandler and destroy the object.
- Parameters
-
mouse A reference to the mouse device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetMouseDevice()
|
pure virtual |
Get a registered mouse device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The mouse device object or null if index the is out of range.
◆ AddOrientationDevice()
|
pure virtual |
Create a orientation device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created orientation device object.
◆ RemoveOrientationDevice()
|
pure virtual |
Remove a orientation device from the devicehandler and destroy the object.
- Parameters
-
orientation A reference to the orientation device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetOrientationDevice()
|
pure virtual |
Get a registered orientation device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The orientation device object or null if index the is out of range.
◆ AddRawButtonDevice()
|
pure virtual |
Create a raw-button device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created raw-button device object.
◆ RemoveRawButtonDevice()
|
pure virtual |
Remove a raw-button device from the devicehandler and destroy the object.
- Parameters
-
rawButton A reference to the raw-button device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetRawButtonDevice()
|
pure virtual |
Get a registered raw-button device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The raw-button device object or null if index the is out of range.
◆ AddRawKeyboardDevice()
|
pure virtual |
Create a raw-keyboard device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created raw-keyboard device object.
◆ RemoveRawKeyboardDevice()
|
pure virtual |
Remove a raw-keyboard device from the devicehandler and destroy the object.
- Parameters
-
rawKeyboard A reference to the raw-keyboard device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetRawKeyboardDevice()
|
pure virtual |
Get a registered raw-keyboard device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The raw-keyboard device object or null if index the is out of range.
◆ AddRawMouseDevice()
|
pure virtual |
Create a raw-mouse device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created raw-mouse device object.
◆ RemoveRawMouseDevice()
|
pure virtual |
Remove a raw-mouse device from the devicehandler and destroy the object.
- Parameters
-
rawMouse A reference to the raw-mouse device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetRawMouseDevice()
|
pure virtual |
Get a registered raw-mouse device object.
- Parameters
-
index The zero-based index of the device.
- Returns
- The raw-mouse device object or null if index the is out of range.
◆ AddTouchScreenDevice()
|
pure virtual |
Create a touch-screen device and add the device to the input device handler.
- Parameters
-
name The device name, the default device name is "BuiltIn".
- Returns
- The created touch-screen device object.
◆ RemoveTouchScreenDevice()
|
pure virtual |
Remove a touch-screen device from the devicehandler and destroy the object.
- Parameters
-
touchScreen A reference to the touch-screen device pointer. After destruction the pointer is set to null.
- Returns
- true if successful.
◆ GetNumberOfTouchScreenDevices()
|
pure virtual |
Get the number of registered touch-screen devices.
- Returns
- The number of registered touch-screen devices.
◆ GetTouchScreenDevice()
|
pure virtual |
Get a registered touch-screen device object.
A valid device index is [0 .. GetNumberOfTouchScreenDevices() - 1].
- Parameters
-
index The zero-based index of the device.
- Returns
- The touch-screen device object or null if index the is out of range.
◆ GetVirtualMouse()
|
pure virtual |
Get the virtual-mouse device object.
- Returns
- The virtual-mouse device object.
The documentation for this interface was generated from the following file:
- murl_input_i_device_handler.h