Murl::Input::IDeviceHandler Interface Referenceabstract

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 IAccelerometerAddAccelerometerDevice (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 IAccelerometerDeviceGetAccelerometerDevice (UInt32 index=0) const =0
 Get a registered accelerometer device object. More...
 
virtual IGyroscopeAddGyroscopeDevice (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 IGyroscopeDeviceGetGyroscopeDevice (UInt32 index=0) const =0
 Get a registered gyroscope device object. More...
 
virtual IHeadingAddHeadingDevice (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 IHeadingDeviceGetHeadingDevice (UInt32 index=0) const =0
 Get a registered heading device object. More...
 
virtual ILocationAddLocationDevice (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 ILocationDeviceGetLocationDevice (UInt32 index=0) const =0
 Get a registered location device object. More...
 
virtual IGameControllerAddGameControllerDevice (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 IGameControllerDeviceGetGameControllerDevice (UInt32 index=0) const =0
 Get a registered game controller device object. More...
 
virtual IGameControllerDeviceGetGameControllerDevice (UInt32 index=0)=0
 Get a registered mutable game controller device object. More...
 
virtual IKeyboardAddKeyboardDevice (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 IKeyboardDeviceGetKeyboardDevice (UInt32 index=0) const =0
 Get a registered keyboard device object. More...
 
virtual IMotionAddMotionDevice (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 IMotionDeviceGetMotionDevice (UInt32 index=0) const =0
 Get a registered motion device object. More...
 
virtual IMouseAddMouseDevice (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 IMouseDeviceGetMouseDevice (UInt32 index=0) const =0
 Get a registered mouse device object. More...
 
virtual IOrientationAddOrientationDevice (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 IOrientationDeviceGetOrientationDevice (UInt32 index=0) const =0
 Get a registered orientation device object. More...
 
virtual IRawButtonAddRawButtonDevice (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 IRawButtonDeviceGetRawButtonDevice (UInt32 index=0) const =0
 Get a registered raw-button device object. More...
 
virtual IRawKeyboardAddRawKeyboardDevice (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 IRawKeyboardDeviceGetRawKeyboardDevice (UInt32 index=0) const =0
 Get a registered raw-keyboard device object. More...
 
virtual IRawMouseAddRawMouseDevice (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 IRawMouseDeviceGetRawMouseDevice (UInt32 index=0) const =0
 Get a registered raw-mouse device object. More...
 
virtual ITouchScreenAddTouchScreenDevice (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 ITouchScreenDeviceGetTouchScreenDevice (UInt32 index=0) const =0
 Get a registered touch-screen device object. More...
 
virtual IVirtualMouseGetVirtualMouse ()=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()

virtual Bool Murl::Input::IDeviceHandler::Init ( const IAppConfiguration appConfig)
pure virtual

Initialize the device handler.

Parameters
appConfigThe application configuration object.
Returns
true if successful.

◆ DeInit()

virtual Bool Murl::Input::IDeviceHandler::DeInit ( )
pure virtual

Deinitialize the device handler.

Returns
true if successful.

◆ UpdateDevices()

virtual Bool Murl::Input::IDeviceHandler::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()

virtual void Murl::Input::IDeviceHandler::ConfigChanged ( const IAppConfiguration appConfig)
pure virtual

Notification of changed configuration.

The notification is executed in the engine thread context if any configuration item has changed.

Parameters
appConfigThe application configuration object.

◆ BeginLogicUpdate()

virtual Bool Murl::Input::IDeviceHandler::BeginLogicUpdate ( ITouchableHandler touchableHandler)
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
touchableHandlerThe touchable handler object.
Returns
true if successful.

◆ EndLogicUpdate()

virtual Bool Murl::Input::IDeviceHandler::EndLogicUpdate ( ITouchableHandler touchableHandler)
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
touchableHandlerThe touchable handler object.
Returns
true if successful.

◆ AddAccelerometerDevice()

virtual IAccelerometer* Murl::Input::IDeviceHandler::AddAccelerometerDevice ( const String name)
pure virtual

Create an accelerometer device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created accelerometer device object.

◆ RemoveAccelerometerDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveAccelerometerDevice ( IAccelerometer *&  accelerometer)
pure virtual

Remove an accelerometer device from the devicehandler and destroy the object.

Parameters
accelerometerA reference to the accelerometer device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetAccelerometerDevice()

virtual const IAccelerometerDevice* Murl::Input::IDeviceHandler::GetAccelerometerDevice ( UInt32  index = 0) const
pure virtual

Get a registered accelerometer device object.

Parameters
indexThe zero-based index of the device.
Returns
The accelerometer device object or null if the index is out of range.

◆ AddGyroscopeDevice()

virtual IGyroscope* Murl::Input::IDeviceHandler::AddGyroscopeDevice ( const String name)
pure virtual

Create a gyroscope device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created gyroscope device object.

◆ RemoveGyroscopeDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveGyroscopeDevice ( IGyroscope *&  gyroscope)
pure virtual

Remove a gyroscope device from the devicehandler and destroy the object.

Parameters
gyroscopeA reference to the gyroscope device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetGyroscopeDevice()

virtual const IGyroscopeDevice* Murl::Input::IDeviceHandler::GetGyroscopeDevice ( UInt32  index = 0) const
pure virtual

Get a registered gyroscope device object.

Parameters
indexThe zero-based index of the device.
Returns
The gyroscope device object or null if index the is out of range.

◆ AddHeadingDevice()

virtual IHeading* Murl::Input::IDeviceHandler::AddHeadingDevice ( const String name)
pure virtual

Create a heading device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created heading device object.

◆ RemoveHeadingDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveHeadingDevice ( IHeading *&  heading)
pure virtual

Remove a heading device from the devicehandler and destroy the object.

Parameters
headingA reference to the heading device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetHeadingDevice()

virtual const IHeadingDevice* Murl::Input::IDeviceHandler::GetHeadingDevice ( UInt32  index = 0) const
pure virtual

Get a registered heading device object.

Parameters
indexThe zero-based index of the device.
Returns
The heading device object or null if index the is out of range.

◆ AddLocationDevice()

virtual ILocation* Murl::Input::IDeviceHandler::AddLocationDevice ( const String name)
pure virtual

Create a location device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created location device object.

◆ RemoveLocationDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveLocationDevice ( ILocation *&  location)
pure virtual

Remove a location device from the devicehandler and destroy the object.

Parameters
locationA reference to the location device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetLocationDevice()

virtual const ILocationDevice* Murl::Input::IDeviceHandler::GetLocationDevice ( UInt32  index = 0) const
pure virtual

Get a registered location device object.

Parameters
indexThe zero-based index of the device.
Returns
The location device object or null if index the is out of range.

◆ AddGameControllerDevice()

virtual IGameController* Murl::Input::IDeviceHandler::AddGameControllerDevice ( const String name)
pure virtual

Create a game controller device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created game controller device object.

◆ RemoveGameControllerDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveGameControllerDevice ( IGameController *&  gameController)
pure virtual

Remove a game controller device from the devicehandler and destroy the object.

Parameters
gameControllerA reference to the game controller device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetNumberOfGameControllerDevices()

virtual UInt32 Murl::Input::IDeviceHandler::GetNumberOfGameControllerDevices ( ) const
pure virtual

Get the number of registered game controller devices.

Returns
The number of registered game controller devices.

◆ GetGameControllerDevice() [1/2]

virtual const IGameControllerDevice* Murl::Input::IDeviceHandler::GetGameControllerDevice ( UInt32  index = 0) const
pure virtual

Get a registered game controller device object.

A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Parameters
indexThe zero-based index of the device.
Returns
The game controller device object or null if index the is out of range.

◆ GetGameControllerDevice() [2/2]

virtual IGameControllerDevice* Murl::Input::IDeviceHandler::GetGameControllerDevice ( UInt32  index = 0)
pure virtual

Get a registered mutable game controller device object.

A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Parameters
indexThe zero-based index of the device.
Returns
The mutable game controller device object or null if index the is out of range.

◆ AddKeyboardDevice()

virtual IKeyboard* Murl::Input::IDeviceHandler::AddKeyboardDevice ( const String name)
pure virtual

Create a keyboard device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created keyboard device object.

◆ RemoveKeyboardDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveKeyboardDevice ( IKeyboard *&  keyboard)
pure virtual

Remove a keyboard device from the devicehandler and destroy the object.

Parameters
keyboardA reference to the keyboard device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetKeyboardDevice()

virtual const IKeyboardDevice* Murl::Input::IDeviceHandler::GetKeyboardDevice ( UInt32  index = 0) const
pure virtual

Get a registered keyboard device object.

Parameters
indexThe zero-based index of the device.
Returns
The keyboard device object or null if index the is out of range.

◆ AddMotionDevice()

virtual IMotion* Murl::Input::IDeviceHandler::AddMotionDevice ( const String name)
pure virtual

Create a motion device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created motion device object.

◆ RemoveMotionDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveMotionDevice ( IMotion *&  motion)
pure virtual

Remove a motion device from the devicehandler and destroy the object.

Parameters
motionA reference to the motion device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetMotionDevice()

virtual const IMotionDevice* Murl::Input::IDeviceHandler::GetMotionDevice ( UInt32  index = 0) const
pure virtual

Get a registered motion device object.

Parameters
indexThe zero-based index of the device.
Returns
The motion device object or null if index the is out of range.

◆ AddMouseDevice()

virtual IMouse* Murl::Input::IDeviceHandler::AddMouseDevice ( const String name)
pure virtual

Create a mouse device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created mouse device object.

◆ RemoveMouseDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveMouseDevice ( IMouse *&  mouse)
pure virtual

Remove a mouse device from the devicehandler and destroy the object.

Parameters
mouseA reference to the mouse device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetMouseDevice()

virtual const IMouseDevice* Murl::Input::IDeviceHandler::GetMouseDevice ( UInt32  index = 0) const
pure virtual

Get a registered mouse device object.

Parameters
indexThe zero-based index of the device.
Returns
The mouse device object or null if index the is out of range.

◆ AddOrientationDevice()

virtual IOrientation* Murl::Input::IDeviceHandler::AddOrientationDevice ( const String name)
pure virtual

Create a orientation device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created orientation device object.

◆ RemoveOrientationDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveOrientationDevice ( IOrientation *&  orientation)
pure virtual

Remove a orientation device from the devicehandler and destroy the object.

Parameters
orientationA reference to the orientation device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetOrientationDevice()

virtual const IOrientationDevice* Murl::Input::IDeviceHandler::GetOrientationDevice ( UInt32  index = 0) const
pure virtual

Get a registered orientation device object.

Parameters
indexThe zero-based index of the device.
Returns
The orientation device object or null if index the is out of range.

◆ AddRawButtonDevice()

virtual IRawButton* Murl::Input::IDeviceHandler::AddRawButtonDevice ( const String name)
pure virtual

Create a raw-button device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created raw-button device object.

◆ RemoveRawButtonDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveRawButtonDevice ( IRawButton *&  rawButton)
pure virtual

Remove a raw-button device from the devicehandler and destroy the object.

Parameters
rawButtonA reference to the raw-button device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetRawButtonDevice()

virtual const IRawButtonDevice* Murl::Input::IDeviceHandler::GetRawButtonDevice ( UInt32  index = 0) const
pure virtual

Get a registered raw-button device object.

Parameters
indexThe zero-based index of the device.
Returns
The raw-button device object or null if index the is out of range.

◆ AddRawKeyboardDevice()

virtual IRawKeyboard* Murl::Input::IDeviceHandler::AddRawKeyboardDevice ( const String name)
pure virtual

Create a raw-keyboard device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created raw-keyboard device object.

◆ RemoveRawKeyboardDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveRawKeyboardDevice ( IRawKeyboard *&  rawKeyboard)
pure virtual

Remove a raw-keyboard device from the devicehandler and destroy the object.

Parameters
rawKeyboardA reference to the raw-keyboard device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetRawKeyboardDevice()

virtual const IRawKeyboardDevice* Murl::Input::IDeviceHandler::GetRawKeyboardDevice ( UInt32  index = 0) const
pure virtual

Get a registered raw-keyboard device object.

Parameters
indexThe zero-based index of the device.
Returns
The raw-keyboard device object or null if index the is out of range.

◆ AddRawMouseDevice()

virtual IRawMouse* Murl::Input::IDeviceHandler::AddRawMouseDevice ( const String name)
pure virtual

Create a raw-mouse device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created raw-mouse device object.

◆ RemoveRawMouseDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveRawMouseDevice ( IRawMouse *&  rawMouse)
pure virtual

Remove a raw-mouse device from the devicehandler and destroy the object.

Parameters
rawMouseA reference to the raw-mouse device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetRawMouseDevice()

virtual const IRawMouseDevice* Murl::Input::IDeviceHandler::GetRawMouseDevice ( UInt32  index = 0) const
pure virtual

Get a registered raw-mouse device object.

Parameters
indexThe zero-based index of the device.
Returns
The raw-mouse device object or null if index the is out of range.

◆ AddTouchScreenDevice()

virtual ITouchScreen* Murl::Input::IDeviceHandler::AddTouchScreenDevice ( const String name)
pure virtual

Create a touch-screen device and add the device to the input device handler.

Parameters
nameThe device name, the default device name is "BuiltIn".
Returns
The created touch-screen device object.

◆ RemoveTouchScreenDevice()

virtual Bool Murl::Input::IDeviceHandler::RemoveTouchScreenDevice ( ITouchScreen *&  touchScreen)
pure virtual

Remove a touch-screen device from the devicehandler and destroy the object.

Parameters
touchScreenA reference to the touch-screen device pointer. After destruction the pointer is set to null.
Returns
true if successful.

◆ GetNumberOfTouchScreenDevices()

virtual UInt32 Murl::Input::IDeviceHandler::GetNumberOfTouchScreenDevices ( ) const
pure virtual

Get the number of registered touch-screen devices.

Returns
The number of registered touch-screen devices.

◆ GetTouchScreenDevice()

virtual const ITouchScreenDevice* Murl::Input::IDeviceHandler::GetTouchScreenDevice ( UInt32  index = 0) const
pure virtual

Get a registered touch-screen device object.

A valid device index is [0 .. GetNumberOfTouchScreenDevices() - 1].

Parameters
indexThe zero-based index of the device.
Returns
The touch-screen device object or null if index the is out of range.

◆ GetVirtualMouse()

virtual IVirtualMouse* Murl::Input::IDeviceHandler::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


Copyright © 2011-2018 Spraylight GmbH.