![]() |
Murl Engine API
Version 2018.3
|
The IDeviceHandler interface. More...
#include <murl_input_i_device_handler.h>
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().
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... | |
|
pure virtual |
Initialize the device handler.
appConfig | The application configuration object. |
|
pure virtual |
Deinitialize the device handler.
|
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().
|
pure virtual |
Notification of changed configuration.
The notification is executed in the engine thread context if any configuration item has changed.
appConfig | The application configuration object. |
|
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.
touchableHandler | The touchable handler object. |
|
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().
touchableHandler | The touchable handler object. |
|
pure virtual |
Create an accelerometer device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove an accelerometer device from the devicehandler and destroy the object.
accelerometer | A reference to the accelerometer device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered accelerometer device object.
index | The zero-based index of the device. |
|
pure virtual |
Create a gyroscope device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove a gyroscope device from the devicehandler and destroy the object.
gyroscope | A reference to the gyroscope device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered gyroscope device object.
index | The zero-based index of the device. |
Create a heading device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
Remove a heading device from the devicehandler and destroy the object.
heading | A reference to the heading device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered heading device object.
index | The zero-based index of the device. |
|
pure virtual |
Create a location device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove a location device from the devicehandler and destroy the object.
location | A reference to the location device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered location device object.
index | The zero-based index of the device. |
|
pure virtual |
Create a game controller device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove a game controller device from the devicehandler and destroy the object.
gameController | A reference to the game controller device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get the number of registered game controller devices.
|
pure virtual |
Get a registered game controller device object.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].
index | The zero-based index of the device. |
|
pure virtual |
Get a registered mutable game controller device object.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].
index | The zero-based index of the device. |
|
pure virtual |
Create a keyboard device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove a keyboard device from the devicehandler and destroy the object.
keyboard | A reference to the keyboard device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered keyboard device object.
index | The zero-based index of the device. |
Create a motion device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
Remove a motion device from the devicehandler and destroy the object.
motion | A reference to the motion device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered motion device object.
index | The zero-based index of the device. |
Create a mouse device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
Remove a mouse device from the devicehandler and destroy the object.
mouse | A reference to the mouse device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered mouse device object.
index | The zero-based index of the device. |
|
pure virtual |
Create a orientation device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove a orientation device from the devicehandler and destroy the object.
orientation | A reference to the orientation device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered orientation device object.
index | The zero-based index of the device. |
|
pure virtual |
Create a raw-button device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove a raw-button device from the devicehandler and destroy the object.
rawButton | A reference to the raw-button device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered raw-button device object.
index | The zero-based index of the device. |
|
pure virtual |
Create a raw-keyboard device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove a raw-keyboard device from the devicehandler and destroy the object.
rawKeyboard | A reference to the raw-keyboard device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered raw-keyboard device object.
index | The zero-based index of the device. |
|
pure virtual |
Create a raw-mouse device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove a raw-mouse device from the devicehandler and destroy the object.
rawMouse | A reference to the raw-mouse device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get a registered raw-mouse device object.
index | The zero-based index of the device. |
|
pure virtual |
Create a touch-screen device and add the device to the input device handler.
name | The device name, the default device name is "BuiltIn". |
|
pure virtual |
Remove a touch-screen device from the devicehandler and destroy the object.
touchScreen | A reference to the touch-screen device pointer. After destruction the pointer is set to null. |
|
pure virtual |
Get the number of registered touch-screen devices.
|
pure virtual |
Get a registered touch-screen device object.
A valid device index is [0 .. GetNumberOfTouchScreenDevices() - 1].
index | The zero-based index of the device. |
|
pure virtual |
Get the virtual-mouse device object.