Murl Engine Lua Addon API  Version 1.0 beta
Murl.Logic.IDeviceHandler

The IDeviceHandler interface provides a collection of all engine's Input and Output device methods.

All methods can be called without consideration of the availability of the device, all methods simply return zero, false or empty strings if the corresponding device is not available.


Table members

Methods


Init()

Initialize the object.

Boolean Init()

Returns
Boolean true if successful.

DeInit()

Deinitialize the object.

Boolean DeInit()

Returns
Boolean true if successful.

ConfigChanged(appConfig)

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

ConfigChanged(Murl.IAppConfiguration appConfig)

Parameters
appConfigThe application configuration object.

IsAccelerationAvailable()

Check if the Input::IAccelerometerDevice is available.

Boolean IsAccelerationAvailable()

Returns
Boolean true if the device is available.

GetAccelerationX()

Forward to Input::Input::IAccelerometerDevice::GetAccelerationX() if control is available, otherwise 0 is returned.

Number GetAccelerationX()

Returns
Number

GetAccelerationY()

Forward to Input::IAccelerometerDevice::GetAccelerationY() if control is available, otherwise 0 is returned.

Number GetAccelerationY()

Returns
Number

GetAccelerationZ()

Forward to Input::IAccelerometerDevice::GetAccelerationZ() if control is available, otherwise 0 is returned.

Number GetAccelerationZ()

Returns
Number

GetAcceleration()

Forward to Input::IAccelerometerDevice::GetAcceleration() if control is available, otherwise a zero vector is returned.

Murl.Math.Vector GetAcceleration()

Returns
Murl.Math.Vector

IsGyroscopeAvailable()

Check if the Input::IGyroscopeDevice is available.

Boolean IsGyroscopeAvailable()

Returns
Boolean true if the device is available.

GetAngularVelocityX()

Forward to Input::IGyroscopeDevice::GetAngularVelocityX() if control is available, otherwise 0 is returned.

Number GetAngularVelocityX()

Returns
Number

GetAngularVelocityY()

Forward to Input::IGyroscopeDevice::GetAngularVelocityY() if control is available, otherwise 0 is returned.

Number GetAngularVelocityY()

Returns
Number

GetAngularVelocityZ()

Forward to Input::IGyroscopeDevice::GetAngularVelocityZ() if control is available, otherwise 0 is returned.

Number GetAngularVelocityZ()

Returns
Number

GetAngularVelocity()

Forward to Input::IGyroscopeDevice::GetAngularVelocity() if control is available, otherwise a zero vector is returned.

Murl.Math.Vector GetAngularVelocity()

Returns
Murl.Math.Vector

IsHeadingAvailable()

Check if the Input::IHeadingDevice is available.

Boolean IsHeadingAvailable()

Returns
Boolean true if the device is available.

GetMagneticFieldX()

Forward to Input::IHeadingDevice::GetMagneticFieldX() if control is available, otherwise 0 is returned.

Number GetMagneticFieldX()

Returns
Number

GetMagneticFieldY()

Forward to Input::IHeadingDevice::GetMagneticFieldY() if control is available, otherwise 0 is returned.

Number GetMagneticFieldY()

Returns
Number

GetMagneticFieldZ()

Forward to Input::IHeadingDevice::GetMagneticFieldZ() if control is available, otherwise 0 is returned.

Number GetMagneticFieldZ()

Returns
Number

GetMagneticField()

Forward to Input::IHeadingDevice::GetMagneticField() if control is available, otherwise a zero vector is returned.

Murl.Math.Vector GetMagneticField()

Returns
Murl.Math.Vector

GetMagneticAngle()

Forward to Input::IHeadingDevice::GetMagneticAngle() if control is available, otherwise 0 is returned.

Number GetMagneticAngle()

Returns
Number

GetTrueAngle()

Forward to Input::IHeadingDevice::GetTrueAngle() if control is available, otherwise 0 is returned.

Number GetTrueAngle()

Returns
Number

IsLocationAvailable()

Check if the Input::ILocationDevice is available.

Boolean IsLocationAvailable()

Returns
Boolean true if the device is available.

GetLatitude()

Forward to Input::ILocationDevice::GetLatitude() if control is available, otherwise 0 is returned.

Number GetLatitude()

Returns
Number

GetLongitude()

Forward to Input::ILocationDevice::GetLongitude() if control is available, otherwise 0 is returned.

Number GetLongitude()

Returns
Number

GetAltitude()

Forward to Input::ILocationDevice::GetAltitude() if control is available, otherwise 0 is returned.

Number GetAltitude()

Returns
Number

GetGeoLocation()

Forward to Input::ILocationDevice::GetGeoLocation() if control is available, otherwise a zero location is returned.

Murl.Util.GeoLocation GetGeoLocation()

Returns
Murl.Util.GeoLocation

GetVelocity()

Forward to Input::ILocationDevice::GetVelocity() if control is available, otherwise -1 is returned.

Number GetVelocity()

Returns
Number

GetHorizontalAccuracy()

Forward to Input::ILocationDevice::GetHorizontalAccuracy() if control is available, otherwise -1 is returned.

Number GetHorizontalAccuracy()

Returns
Number

GetVerticalAccuracy()

Forward to Input::ILocationDevice::GetVerticalAccuracy() if control is available, otherwise -1 is returned.

Number GetVerticalAccuracy()

Returns
Number

GetAuthorization()

Forward to Input::ILocationDevice::GetAuthorization() if control is available, otherwise IEnums::AUTHORIZATION_NOT_DETERMINED is returned.

Murl.IEnums.AuthorizationStatus GetAuthorization()

Returns
Murl.IEnums.AuthorizationStatus

GetNumberOfGameControllerDevices()

Get the number of Input::IGameControllerDevice devices. If an additional controller is connected the number of devices will increase.

Integer GetNumberOfGameControllerDevices()

Returns
Integer The number of game controller devices.

IsGameControllerConnected(deviceIndex)

Check if a game controller device is connected. If a controller is disconnected, the connected state changes to false and no more events are generated.
If another controller is connected, the controller device will be reconfigured and the connected state changes to true.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean IsGameControllerConnected(Integer deviceIndex)

Parameters
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if a game controller device is connected, if false no controller is connected or the deviceIndex is out of range.

GetGameControllerPlayerIndex(deviceIndex)

Get the game controller player index. A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Integer GetGameControllerPlayerIndex(Integer deviceIndex)

Parameters
deviceIndexThe zero-based index of the game controller device.
Returns
Integer The zero-based index of the player (typically indicated by lights on the controller), a negative value indicates an unset state (no lights are lit on the controller).

GetGameControllerDeviceInfo(deviceInfo, deviceIndex)

Get the game controller device information. A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean, Murl.IGameControllerMapping.DeviceInfo GetGameControllerDeviceInfo(Murl.IGameControllerMapping.DeviceInfo deviceInfo, Integer deviceIndex)

Parameters
deviceInfoThe device information return value.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the device is available, if false the 'deviceInfo' return value stays unchanged.
Murl.IGameControllerMapping.DeviceInfo deviceInfo The device information return value.

IsGameControllerButtonAvailable(button, deviceIndex)

Check if a specified game controller button is available. A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean IsGameControllerButtonAvailable(Murl.IEnums.GameControllerButton button, Integer deviceIndex)

Parameters
buttonThe game controller button identifier.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the button is available.

IsGameControllerButtonPressed(button, deviceIndex)

Check if a specified game controller button is pressed. A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean IsGameControllerButtonPressed(Murl.IEnums.GameControllerButton button, Integer deviceIndex)

Parameters
buttonThe game controller button identifier.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the button is pressed.

WasGameControllerButtonPressed(button, deviceIndex)

Check if a specified game controller button was pressed in the most recent tick. A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean WasGameControllerButtonPressed(Murl.IEnums.GameControllerButton button, Integer deviceIndex)

Parameters
buttonThe game controller button identifier.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the button was pressed in the most recent tick.

WasGameControllerButtonReleased(button, deviceIndex)

Check if a specified game controller button was released in the most recent tick. A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean WasGameControllerButtonReleased(Murl.IEnums.GameControllerButton button, Integer deviceIndex)

Parameters
buttonThe game controller button identifier.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the button was released in the most recent tick.

IsGameControllerControlAvailable(control, deviceIndex)

Check if a specified game controller control is available. A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean IsGameControllerControlAvailable(Murl.IEnums.GameControllerControl control, Integer deviceIndex)

Parameters
controlThe game controller control identifier.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the game controller control is available.

GetGameControllerShoulder(value, control, deviceIndex)

Get the game controller analog shoulder button value. The return value is in range [0.0 not pressed .. 1.0 full pressed].
Supported controls are IEnums::GAME_CONTROLLER_CONTROL_SHOULDER_L1, IEnums::GAME_CONTROLLER_CONTROL_SHOULDER_R1, IEnums::GAME_CONTROLLER_CONTROL_SHOULDER_L2 or IEnums::GAME_CONTROLLER_CONTROL_SHOULDER_R2.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean, Number GetGameControllerShoulder(Number value, Murl.IEnums.GameControllerControl control, Integer deviceIndex)

Parameters
valueThe button return value.
controlThe game controller control identifier.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the control and the device is available, if false the 'value' return value stays unchanged.
Number value The button return value.

GetGameControllerStick(xAxis, yAxis, control, deviceIndex)

Get the game controller analog stick axis values. The return values are in range [-1.0 bottom/left .. 1.0 top/right].
Supported controls are IEnums::GAME_CONTROLLER_CONTROL_LEFT_STICK or IEnums::GAME_CONTROLLER_CONTROL_RIGHT_STICK.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean, Number, Number GetGameControllerStick(Number xAxis, Number yAxis, Murl.IEnums.GameControllerControl control, Integer deviceIndex)

Parameters
xAxisThe x-axis return value.
yAxisThe y-axis return value.
controlThe game controller control identifier.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the control and the device is available, if false all return values stay unchanged.
Number xAxis The x-axis return value.
Number yAxis The y-axis return value.

GetGameControllerGravity(gravity, deviceIndex)

Get the game controller gravity axes values. Note that the total acceleration of the controller is equal to gravity plus acceleration.
The values are available if IsControlAvailable(IEnums::GAME_CONTROLLER_CONTROL_ACCELERATION).
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean, Murl.Math.Vector GetGameControllerGravity(Murl.Math.Vector gravity, Integer deviceIndex)

Parameters
gravityThe gravity axes return value in meter per seconds^2.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the control and the device is available, if false all return values stay unchanged.
Murl.Math.Vector gravity The gravity axes return value in meter per seconds^2.

GetGameControllerAcceleration(acceleration, deviceIndex)

Get the game controller acceleration axes values. Note that the total acceleration of the controller is equal to gravity plus acceleration.
The values are available if IsControlAvailable(IEnums::GAME_CONTROLLER_CONTROL_ACCELERATION).
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean, Murl.Math.Vector GetGameControllerAcceleration(Murl.Math.Vector acceleration, Integer deviceIndex)

Parameters
accelerationThe acceleration axes return value in meter per seconds^2.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the control and the device is available, if false all return values stay unchanged.
Murl.Math.Vector acceleration The acceleration axes return value in meter per seconds^2.

SetGameControllerTouchOrientationEnabled(isEnabled, deviceIndex)

Set the game controller touchpad orientation enabled state. The default value for this state is false, which means that the values of the touchpad are always determined based on the controller’s portrait orientation. If the state is set to true, then the touchpad values are calculated based on its current orientation, either landscape or portrait.
Supported control is IEnums::GAME_CONTROLLER_CONTROL_TOUCH_ORIENTATION.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean SetGameControllerTouchOrientationEnabled(Boolean isEnabled, Integer deviceIndex)

Parameters
isEnabledThe touchpad orientation enabled state.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the control and the device is available.

GetGameControllerTouchOrientationEnabled(isEnabled, deviceIndex)

Get the game controller touchpad orientation enabled state. A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean, Boolean GetGameControllerTouchOrientationEnabled(Boolean isEnabled, Integer deviceIndex)

Parameters
isEnabledThe touchpad orientation enabled state return value.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the control is available, if false the 'isEnabled' return value stay unchanged.
Boolean isEnabled The touchpad orientation enabled state return value.

SetGameControllerTouchAbsoluteEnabled(isEnabled, deviceIndex)

Set the game controller touchpad absolute enabled state. The default value for this state is false, which means that the location where the user first touches the touchpad is assumed to be the neutral (0/0) value for the touchpad. All subsequent values are calculated relative to this position until the user lifts the finger. The next time the user’s finger touches the touchpad, a new origin is chosen. If this state is set to true, then all values are calculated relative to the physical center of the touchpad.
Supported control is IEnums::GAME_CONTROLLER_CONTROL_TOUCH_ABS_REL.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean SetGameControllerTouchAbsoluteEnabled(Boolean isEnabled, Integer deviceIndex)

Parameters
isEnabledThe touchpad absolute enabled state.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the control and the device is available.

GetGameControllerTouchAbsoluteEnabled(isEnabled, deviceIndex)

Get the game controller touchpad absolute enabled state. A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean, Boolean GetGameControllerTouchAbsoluteEnabled(Boolean isEnabled, Integer deviceIndex)

Parameters
isEnabledThe touchpad absolute enabled state return value.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the control is available, if false the 'isEnabled' return value stay unchanged.
Boolean isEnabled The touchpad absolute enabled state return value.

SetGameControllerVibration(intensity, control, deviceIndex)

Set a game controller vibration with a specified intensity. Supported controls are IEnums::GAME_CONTROLLER_CONTROL_VIBRATE_LOW or IEnums::GAME_CONTROLLER_CONTROL_VIBRATE_HIGH.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Boolean SetGameControllerVibration(Number intensity, Murl.IEnums.GameControllerControl control, Integer deviceIndex)

Parameters
intensityThe intensity of the vibration in range [0.0 none .. 1.0 full].
controlThe game controller control identifier.
deviceIndexThe zero-based index of the game controller device.
Returns
Boolean true if the control and the device are available.

GetGameControllerMapping(deviceIndex)

Get the game controller mapping interface. Gamecontroller mapping is supported for USB HID game controller devices only, e.g. XBox controller or iOS controllers do not support mapping and return null.
A valid device index is [0 .. GetNumberOfGameControllerDevices() - 1].

Murl.SharedPointer.IGameControllerMapping GetGameControllerMapping(Integer deviceIndex)

Parameters
deviceIndexThe zero-based index of the game controller device.
Returns
Murl.SharedPointer.IGameControllerMapping The game controller mapping interface if the device is available or null if mapping is not supported by the game controller.

IsKeyboardAvailable()

Check if the Input::IKeyboardDevice is available.

Boolean IsKeyboardAvailable()

Returns
Boolean true if the device is available.

GetNumberOfKeys()

Forward to Input::IKeyboardDevice::GetNumberOfKeys() if control is available, otherwise 0 is returned.

Integer GetNumberOfKeys()

Returns
Integer

GetKey(index)

Forward to Input::IKeyboardDevice::GetKey() if control is available, otherwise an empty string is returned.

String GetKey(Integer index)

Returns
String

GetKeys()

Forward to Input::IKeyboardDevice::GetKeys() if control is available, otherwise an empty string array is returned.

Murl.Array.String GetKeys()

Returns
Murl.Array.String

GetKeyCode(index)

Get the key code of a key pressed in the most recent tick. A valid key buffer index is [0 .. GetNumberOfKeys() - 1].

Murl.IEnums.KeyCode GetKeyCode(Integer index)

Parameters
indexThe zero-based index of the key buffer.
Returns
Murl.IEnums.KeyCode The key code of the key or IEnums::KEYCODE_NONE if the key is not in the set of IEnums::KeyCode.

EditString(editString, maxLength, hideKeyboard, textGeometry, nonPrintableReplacement)

Edit a UTF8 string using all keys pressed in the most recent tick. This method supports the IEnums::KEYCODE_BACKSPACE key to remove UTF8 characters from the end of the string.

Integer, String EditString(String editString, Integer maxLength, Boolean hideKeyboard, Murl.Graph.ITextGeometry textGeometry, String nonPrintableReplacement)

Parameters
editStringThe string to edit.
maxLengthMaximum number of UTF8 characters to put into the string or zero for unlimited number of characters.
hideKeyboardIf true hide the on screen keyboard if the IEnums::KEYCODE_RETURN key was pressed.
textGeometryA textgeometry node to add printable characters only.
nonPrintableReplacementIf a text geometry node is given, any non-printable characters are replaced by this string if it is not empty.
Returns
Integer 1 if a character was added to the string or removed from the string, -1 if IEnums::KEYCODE_RETURN key was pressed or 0 if the string is unchanged.
String editString The string to edit.

IsMotionAvailable()

Check if the Input::IMotionDevice is available.

Boolean IsMotionAvailable()

Returns
Boolean true if the device is available.

IsShaken()

Forward to Input::IMotionDevice::IsShaken() if control is available, otherwise false is returned.

Boolean IsShaken()

Returns
Boolean

WasShaken()

Forward to Input::IMotionDevice::WasShaken() if control is available, otherwise false is returned.

Boolean WasShaken()

Returns
Boolean

IsMouseAvailable()

Check if the Input::IMouseDevice is available.

Boolean IsMouseAvailable()

Returns
Boolean true if the device is available.

WasMouseMoved()

Forward to Input::IMouseDevice::WasMoved() if control is available, otherwise false is returned.

Boolean WasMouseMoved()

Returns
Boolean

GetMousePosition(x, y)

Get the mouse position on the display surface. The return values are in range [-1.0 bottom/left .. 1.0 top/right].

Boolean, Number, Number GetMousePosition(Number x, Number y)

Parameters
xThe x-position return value.
yThe y-position return value.
Returns
Boolean true if the device is available, if false all return values stay unchanged.
Number x The x-position return value.
Number y The y-position return value.

IsMousePositionInRange()

Check if the mouse position is in range of the display surface. If the mouse cursor is moved out of the display surface (e.g. the window), the mouse positions are clipped to range [-1.0, 1.0]. This method can be used to detect this case.

Boolean IsMousePositionInRange()

Returns
Boolean true if the mouse position is in range.

IsMousePositionXInRange()

Forward to Input::IMouseDevice::IsPositionXInRange() if control is available, otherwise false is returned.

Boolean IsMousePositionXInRange()

Returns
Boolean

IsMousePositionYInRange()

Forward to Input::IMouseDevice::IsPositionYInRange() if control is available, otherwise false is returned.

Boolean IsMousePositionYInRange()

Returns
Boolean

IsMouseButtonPressed(button)

Check if a specified mouse button is pressed.

Boolean IsMouseButtonPressed(Murl.IEnums.MouseButton button)

Parameters
buttonThe mouse button identifier.
Returns
Boolean true if the button is pressed.

WasMouseButtonPressed(button)

Check if a specified mouse button was pressed in the most recent tick.

Boolean WasMouseButtonPressed(Murl.IEnums.MouseButton button)

Parameters
buttonThe mouse button identifier.
Returns
Boolean true if the button was pressed in the most recent tick.

WasMouseButtonReleased(button)

Check if a specified mouse button was released in the most recent tick.

Boolean WasMouseButtonReleased(Murl.IEnums.MouseButton button)

Parameters
buttonThe mouse button identifier.
Returns
Boolean true if the button was released in the most recent tick.

IsOrientationAvailable()

Check if the Input::IOrientationDevice is available.

Boolean IsOrientationAvailable()

Returns
Boolean true if the device is available.

GetOrientation()

Forward to Input::IOrientationDevice::GetOrientation() if control is available, otherwise IEnums::SENSOR_ORIENTATION_UNKNOWN is returned.

Murl.IEnums.SensorOrientation GetOrientation()

Returns
Murl.IEnums.SensorOrientation

IsRawButtonAvailable()

Check if the Input::IRawButtonDevice is available.

Boolean IsRawButtonAvailable()

Returns
Boolean true if the device is available.

IsRawButtonPressed(code)

Forward to Input::IRawButtonDevice::IsButtonPressed() if control is available, otherwise false is returned.

Boolean IsRawButtonPressed(Murl.RawButtonCode code)

Returns
Boolean

WasRawButtonPressed(code)

Forward to Input::IRawButtonDevice::WasButtonPressed() if control is available, otherwise false is returned.

Boolean WasRawButtonPressed(Murl.RawButtonCode code)

Returns
Boolean

WasRawButtonReleased(code)

Forward to Input::IRawButtonDevice::WasButtonReleased() if control is available, otherwise false is returned.

Boolean WasRawButtonReleased(Murl.RawButtonCode code)

Returns
Boolean

IsRawKeyboardAvailable()

Check if the Input::IRawKeyboardDevice is available.

Boolean IsRawKeyboardAvailable()

Returns
Boolean true if the device is available.

IsRawKeyPressed(code)

Forward to Input::IRawKeyboardDevice::IsKeyPressed() if control is available, otherwise false is returned.

Boolean IsRawKeyPressed(Murl.RawKeyCode code)

Returns
Boolean

WasRawKeyPressed(code)

Forward to Input::IRawKeyboardDevice::WasKeyPressed() if control is available, otherwise false is returned.

Boolean WasRawKeyPressed(Murl.RawKeyCode code)

Returns
Boolean

WasRawKeyReleased(code)

Forward to Input::IRawKeyboardDevice::WasKeyReleased() if control is available, otherwise false is returned.

Boolean WasRawKeyReleased(Murl.RawKeyCode code)

Returns
Boolean

IsRawMouseAvailable()

Check if the Input::IRawMouseDevice is available.

Boolean IsRawMouseAvailable()

Returns
Boolean true if the device is available.

GetRawMouseDelta(x, y)

Get the mouse axis delta values in the most recent tick.

Boolean, Number, Number GetRawMouseDelta(Number x, Number y)

Parameters
xThe x-axis return value.
yThe y-axis return value.
Returns
Boolean true if the device is available, if false all return values stay unchanged.
Number x The x-axis return value.
Number y The y-axis return value.

GetRawWheelDelta(x, y)

Get the mouse wheel axis delta values in the most recent tick.

Boolean, Number, Number GetRawWheelDelta(Number x, Number y)

Parameters
xThe x-axis return value.
yThe y-axis return value.
Returns
Boolean true if the device is available, if false all return values stay unchanged.
Number x The x-axis return value.
Number y The y-axis return value.

GetNumberOfTouchDevices()

Get the number of Input::ITouchScreenDevice devices. Multi touch devices represents each single touch by a separate device.

Integer GetNumberOfTouchDevices()

Returns
Integer The number of touch devices.

IsTouchPressed(deviceIndex)

Check if the touch is pressed. A valid device index is [0 .. GetNumberOfTouchDevices() - 1].

Boolean IsTouchPressed(Integer deviceIndex)

Parameters
deviceIndexThe zero-based index of the touch device.
Returns
Boolean true if the touch is pressed.

WasTouchCancelled(deviceIndex)

Check if the touch was cancelled in the most recent tick. A touch controller typically cancel multi touch inputs if too much simultaneous touches are present. A valid device index is [0 .. GetNumberOfTouchDevices() - 1].

Boolean WasTouchCancelled(Integer deviceIndex)

Parameters
deviceIndexThe zero-based index of the touch device.
Returns
Boolean true if the touch was cancelled in the most recent tick.

WasTouchPressed(deviceIndex)

Check if the touch was pressed in the most recent tick. A valid device index is [0 .. GetNumberOfTouchDevices() - 1].

Boolean WasTouchPressed(Integer deviceIndex)

Parameters
deviceIndexThe zero-based index of the touch device.
Returns
Boolean true if the touch was pressed in the most recent tick.

WasTouchReleased(deviceIndex)

Check if the touch was released in the most recent tick. A valid device index is [0 .. GetNumberOfTouchDevices() - 1].

Boolean WasTouchReleased(Integer deviceIndex)

Parameters
deviceIndexThe zero-based index of the touch device.
Returns
Boolean true if the touch was released in the most recent tick.

WasTouchMoved(deviceIndex)

Check if the touch was moved in the most recent tick. A valid device index is [0 .. GetNumberOfTouchDevices() - 1].

Boolean WasTouchMoved(Integer deviceIndex)

Parameters
deviceIndexThe zero-based index of the touch device.
Returns
Boolean true if the touch was moved in the most recent tick.

GetTouchPosition(x, y, deviceIndex)

Get the touch position on the display surface. The return values are in range [-1.0 bottom/left .. 1.0 top/right]. A valid device index is [0 .. GetNumberOfTouchDevices() - 1].

Boolean, Number, Number GetTouchPosition(Number x, Number y, Integer deviceIndex)

Parameters
xThe x-position return value.
yThe y-position return value.
deviceIndexThe zero-based index of the touch device.
Returns
Boolean true if the device is available, if false all return values stay unchanged.
Number x The x-position return value.
Number y The y-position return value.

IsKeyboardControlAvailable()

Check if the keyboard control is available.

Boolean IsKeyboardControlAvailable()

Returns
Boolean true if the control is available.

GetKeyboardControl()

Get the keyboard control interface. Use this interface to use on-screen keyboard with text fields.

Murl.IKeyboardControl GetKeyboardControl()

Returns
Murl.IKeyboardControl The keyboard control interface or null if not available.

SetKeyboardType(keyboardType)

Forward to IKeyboardControl::SetKeyboardType() if control is available.

SetKeyboardType(Murl.IKeyboardControl.KeyboardType keyboardType)


SetReturnKeyType(returnKeyType)

Forward to IKeyboardControl::SetReturnKeyType() if control is available.

SetReturnKeyType(Murl.IKeyboardControl.ReturnKeyType returnKeyType)


ShowKeyboard()

Forward to IKeyboardControl::Show() if control is available.

ShowKeyboard()


HideKeyboard()

Forward to IKeyboardControl::Hide() if control is available.

HideKeyboard()


ToggleKeyboard()

Toggle the show/hide state of the on-screen keyboard.

Boolean ToggleKeyboard()

Returns
Boolean true if the on-screen keyboard is showing.

IsKeyboardShowing()

Forward to IKeyboardControl::IsShowing() if control is available, otherwise false is returned.

Boolean IsKeyboardShowing()

Returns
Boolean true if the on-screen keyboard is showing.

WasKeyboardClosed()

Forward to IKeyboardControl::WasClosed() if control is available, otherwise false is returned.

Boolean WasKeyboardClosed()

Returns
Boolean true if the on-screen keyboard was closed.

HasKeyboardTextfield()

Forward to IKeyboardControl::HasTextfield() if control is available, otherwise false is returned.

Boolean HasKeyboardTextfield()

Returns
Boolean true if the on-screen keyboard has a text field for editing.

SetKeyboardTitle(title)

Forward to IKeyboardControl::SetTitle() if control is available.

SetKeyboardTitle(String title)

Parameters
titleThe title string.

SetKeyboardDescription(description)

Forward to IKeyboardControl::SetDescription() if control is available.

SetKeyboardDescription(String description)

Parameters
descriptionThe description string.

SetKeyboardText(text)

Forward to IKeyboardControl::SetText() if control is available.

SetKeyboardText(String text)

Parameters
textThe editing string.

GetKeyboardText()

Forward to IKeyboardControl::GetText() if control is available, otherwise an empty string is returned.

String GetKeyboardText()

Returns
String The editing string from the text field.

IsRumbleControlAvailable()

Check if the rumble control is available.

Boolean IsRumbleControlAvailable()

Returns
Boolean true if the control is available.

Rumble(duration)

Forward to IRumbleControl::Rumble() if control is available.

Rumble(Number duration)


IsAppStoreControlAvailable()

Check if the app-store control is available.

Boolean IsAppStoreControlAvailable()

Returns
Boolean true if the control is available.

GetAppStoreControl()

Get the app-store control interface.

Murl.IAppStoreControl GetAppStoreControl()

Returns
Murl.IAppStoreControl The app-store control interface or null if not available.

GetAppStoreStatus()

Forward to IAppStoreControl::GetStatus() if control is available, otherwise IAppStoreControl::STATUS_IDLE is returned.

Murl.IAppStoreControl.Status GetAppStoreStatus()

Returns
Murl.IAppStoreControl.Status

RegisterProduct(productId, productType)

Forward to IAppStoreControl::RegisterProduct() if control is available, otherwise false is returned.

Boolean RegisterProduct(String productId, Murl.IAppStoreProduct.ProductType productType)

Returns
Boolean

ConnectToStore()

Forward to IAppStoreControl::ConnectToStore() if control is available, otherwise false is returned.

Boolean ConnectToStore()

Returns
Boolean

DisconnectFromStore()

Forward to IAppStoreControl::DisconnectToStore() if control is available, otherwise false is returned.

Boolean DisconnectFromStore()

Returns
Boolean

ReconnectToStore()

Forward to IAppStoreControl::ReconnectToStore() if control is available, otherwise false is returned.

Boolean ReconnectToStore()

Returns
Boolean

RestoreTransactions()

Forward to IAppStoreControl::RestoreTransactions() if control is available, otherwise false is returned.

Boolean RestoreTransactions()

Returns
Boolean

GetNumberOfAvailableProducts()

Forward to IAppStoreControl::GetNumberOfAvailableProducts() if control is available, otherwise 0 is returned.

Integer GetNumberOfAvailableProducts()

Returns
Integer

GetAvailableProduct(index)

Forward to IAppStoreControl::GetAvailableProduct() if control is available, otherwise null is returned.

Murl.IAppStoreProduct GetAvailableProduct(Integer index)

Returns
Murl.IAppStoreProduct

GetAvailableProduct(productId)

Forward to IAppStoreControl::GetAvailableProduct() if control is available, otherwise null is returned.

Murl.IAppStoreProduct GetAvailableProduct(String productId)

Returns
Murl.IAppStoreProduct

CanPurchaseProducts()

Forward to IAppStoreControl::CanPurchaseProducts() if control is available, otherwise false is returned.

Boolean CanPurchaseProducts()

Returns
Boolean

PurchaseProduct(product)

Forward to IAppStoreControl::PurchaseProduct() if control is available, otherwise false is returned.

Boolean PurchaseProduct(Murl.IAppStoreProduct product)

Returns
Boolean

ConsumeProduct(product)

Forward to IAppStoreControl::ConsumeProduct() if control is available, otherwise false is returned.

Boolean ConsumeProduct(Murl.IAppStoreProduct product)

Returns
Boolean

ConfirmConsumedProduct(product)

Forward to IAppStoreControl::ConfirmConsumedProduct() if control is available, otherwise false is returned.

Boolean ConfirmConsumedProduct(Murl.IAppStoreProduct product)

Returns
Boolean

TryCancelProduct(product)

Forward to IAppStoreControl::TryCancelProduct() if control is available, otherwise false is returned.

Boolean TryCancelProduct(Murl.IAppStoreProduct product)

Returns
Boolean

GetAppStoreLastError()

Forward to IAppStoreControl::GetLastError() if control is available, otherwise an empty string is returned.

String GetAppStoreLastError()

Returns
String

ClearAppStoreLastError()

Forward to IAppStoreControl::ClearLastError() if control is available, otherwise false is returned.

Boolean ClearAppStoreLastError()

Returns
Boolean

IsCloudControlAvailable()

Check if the cloud control is available. The cloud control must be enabled during IApp::Configure() by setting IEngineConfiguration::SetCloudControlEnable().

Boolean IsCloudControlAvailable()

Returns
Boolean true if the control is available.

GetCloudControl()

Get the cloud control interface. The cloud control must be enabled during IApp::Configure() by setting IEngineConfiguration::SetCloudControlEnable().

Murl.ICloudControl GetCloudControl()

Returns
Murl.ICloudControl The cloud control interface or null if not available.

IsGameCenterControlAvailable()

Check if the game-center control is available.

Boolean IsGameCenterControlAvailable()

Returns
Boolean true if the control is available.

GetGameCenterControl()

Get the game center control interface.

Murl.IGameCenterControl GetGameCenterControl()

Returns
Murl.IGameCenterControl The game center control interface or null if not available.

IsSystemDialogControlAvailable()

Check if the system-dialog control is available.

Boolean IsSystemDialogControlAvailable()

Returns
Boolean true if the control is available.

CreateSystemDialog(title, message)

Forward to ISystemDialogControl::CreateSystemDialog() if control is available, otherwise null is returned.

Murl.ISystemDialog CreateSystemDialog(String title, String message)

Returns
Murl.ISystemDialog

CreateSystemDialog(title, message, button0Label)

Create a system-dialog object with 1 button.

Murl.ISystemDialog CreateSystemDialog(String title, String message, String button0Label)

Parameters
titleThe title string for the system-dialog object.
messageThe message string for the system-dialog object.
button0LabelThe button label string for the system-dialog object.
Returns
Murl.ISystemDialog The system-dialog object or null if creation failed.

CreateSystemDialog(title, message, button0Label, button1Label)

Create a system-dialog object with 2 buttons. Button appearance is right to left or bottom up.

Murl.ISystemDialog CreateSystemDialog(String title, String message, String button0Label, String button1Label)

Parameters
titleThe title string for the system-dialog object.
messageThe message string for the system-dialog object.
button0LabelThe 1st button label string for the system-dialog object.
button1LabelThe 2nd button label string for the system-dialog object.
Returns
Murl.ISystemDialog The system-dialog object or null if creation failed.

CreateSystemDialog(title, message, button0Label, button1Label, button2Label)

Create a system-dialog object with 3 buttons. Button appearance is right to left or bottom up.

Murl.ISystemDialog CreateSystemDialog(String title, String message, String button0Label, String button1Label, String button2Label)

Parameters
titleThe title string for the system-dialog object.
messageThe message string for the system-dialog object.
button0LabelThe 1st button label string for the system-dialog object.
button1LabelThe 2nd button label string for the system-dialog object.
button2LabelThe 3rd button label string for the system-dialog object.
Returns
Murl.ISystemDialog The system-dialog object or null if creation failed.

CreateSystemDialog(title, message, buttonLabels)

Create a system-dialog object with a variable number of buttons. Button appearance is right to left or bottom up.

Murl.ISystemDialog CreateSystemDialog(String title, String message, Murl.Array.String buttonLabels)

Parameters
titleThe title string for the system-dialog object.
messageThe message string for the system-dialog object.
buttonLabelsThe button label strings for the system-dialog object.
Returns
Murl.ISystemDialog The system-dialog object or null if creation failed.

DestroySystemDialog(dialog)

Forward to ISystemDialogControl::DestroySystemDialog() if control is available.

Murl.ISystemDialog DestroySystemDialog(Murl.ISystemDialog dialog)

Returns
Murl.ISystemDialog

IsWebControlAvailable()

Check if the web control is available.

Boolean IsWebControlAvailable()

Returns
Boolean true if the control is available.

OpenUrlInSystemBrowser(url)

Forward to IWebControl::OpenUrlInSystemBrowser() if control is available, otherwise false is returned.

Boolean OpenUrlInSystemBrowser(String url)

Returns
Boolean

CreateUrlRequest()

Forward to IWebControl::CreateUrlRequest() if control is available, otherwise null is returned.

Murl.IUrlRequest CreateUrlRequest()

Returns
Murl.IUrlRequest

DestroyUrlRequest(urlRequest)

Forward to IWebControl::DestroyUrlRequest() if control is available.

Murl.IUrlRequest DestroyUrlRequest(Murl.IUrlRequest urlRequest)

Returns
Murl.IUrlRequest

CreateEMail(subject, message)

Forward to IWebControl::CreateEMail() if control is available, otherwise null is returned.

Murl.IEMail CreateEMail(String subject, String message)

Returns
Murl.IEMail

CreateEMail(subject, message, recipientAddress)

Forward to IWebControl::CreateEMail() if control is available, otherwise null is returned.

Murl.IEMail CreateEMail(String subject, String message, String recipientAddress)

Returns
Murl.IEMail

DestroyEMail(eMail)

Forward to IWebControl::DestroyEMail() if control is available.

Murl.IEMail DestroyEMail(Murl.IEMail eMail)

Returns
Murl.IEMail

IsScreenshotControlAvailable()

Check if the screen-shot control is available.

Boolean IsScreenshotControlAvailable()

Returns
Boolean true if the control is available.

CreateScreenshot()

Forward to IScreenshotControl::CreateScreenshot() if control is available, otherwise false is returned.

Boolean CreateScreenshot()

Returns
Boolean

DestroyScreenshot()

Forward to IScreenshotControl::DestroyScreenshot() if control is available, otherwise false is returned.

Boolean DestroyScreenshot()

Returns
Boolean

IsScreenshotBusy()

Forward to IScreenshotControl::IsBusy() if control is available, otherwise false is returned.

Boolean IsScreenshotBusy()

Returns
Boolean

IsScreenshotReady()

Forward to IScreenshotControl::IsReady() if control is available, otherwise false is returned.

Boolean IsScreenshotReady()

Returns
Boolean

GetScreenshotImage()

Forward to IScreenshotControl::GetScreenshotImage() if control is available, otherwise null is returned.

Murl.Resource.IImage GetScreenshotImage()

Returns
Murl.Resource.IImage

IsPreferencesControlAvailable()

Check if the preferences control is available.

Boolean IsPreferencesControlAvailable()

Returns
Boolean true if the control is available.

GetPreferencesControl()

Get the preferences control interface.

Murl.IPreferencesControl GetPreferencesControl()

Returns
Murl.IPreferencesControl The preferences control interface or null if not available.

PreferenceExists(key)

Forward to IPreferencesControl::Exists() if control is available, otherwise false is returned.

Boolean PreferenceExists(String key)

Returns
Boolean

GetPreferenceValue(key)

Forward to IPreferencesControl::GetValue(const String& key) if control is available, otherwise an empty string is returned.

String GetPreferenceValue(String key)

Returns
String

GetPreferenceValue(key, value)

Forward to IPreferencesControl::GetValue(const String& key, String& value) if control is available, otherwise false is returned.

Boolean, String GetPreferenceValue(String key, String value)

Returns
Boolean
String

SetPreferenceValue(key, value)

Forward to IPreferencesControl::SetValue() if control is available, otherwise false is returned.

Boolean SetPreferenceValue(String key, String value)

Returns
Boolean

GetPreferenceData(key, value)

Forward to IPreferencesControl::GetData() if control is available, otherwise false is returned.

Boolean, Murl.Data GetPreferenceData(String key, Murl.Data value)

Returns
Boolean
Murl.Data

SetPreferenceData(key, value)

Forward to IPreferencesControl::SetData() if control is available, otherwise false is returned.

Boolean SetPreferenceData(String key, Murl.Data value)

Returns
Boolean

PreferenceRemove(key)

Forward to IPreferencesControl::Remove() if control is available, otherwise false is returned.

Boolean PreferenceRemove(String key)

Returns
Boolean

IsTelephonyControlAvailable()

Check if the telephony control is available.

Boolean IsTelephonyControlAvailable()

Returns
Boolean true if the control is available.

GetTelephonyCarrierName()

Forward to ITelephonyControl::GetCarrierName() if control is available, otherwise an empty string is returned.

String GetTelephonyCarrierName()

Returns
String

GetTelephonyCountryCode()

Forward to ITelephonyControl::GetCountryCode() if control is available, otherwise an empty string is returned.

String GetTelephonyCountryCode()

Returns
String

GetTelephonyNetworkCode()

Forward to ITelephonyControl::GetNetworkCode() if control is available, otherwise an empty string is returned.

String GetTelephonyNetworkCode()

Returns
String

TerminateApp()

Forward to IAppControl::TerminateApp() if control is available, otherwise false is returned.

Boolean TerminateApp()

Returns
Boolean

IsTerminatingApp()

Forward to IAppControl::IsTerminatingApp() if control is available, otherwise false is returned.

Boolean IsTerminatingApp()

Returns
Boolean

SuspendApp()

Forward to IAppControl::SuspendApp() if control is available, otherwise false is returned.

Boolean SuspendApp()

Returns
Boolean

IsSuspendingApp()

Forward to IAppControl::IsSuspendingApp() if control is available, otherwise false is returned.

Boolean IsSuspendingApp()

Returns
Boolean

SetLoadingProgress(progress)

Forward to IAppControl::SetLoadingProgress() if control is available, otherwise false is returned.

Boolean SetLoadingProgress(Number progress)

Returns
Boolean

GetLoadingProgress()

Forward to IAppControl::GetLoadingProgress() if control is available, otherwise 0.0 is returned.

Number GetLoadingProgress()

Returns
Number

IsMusicPlayerControlAvailable()

Check if the music player control is available.

Boolean IsMusicPlayerControlAvailable()

Returns
Boolean true if the control is available.

GetMusicPlayerControl()

Get the music player control interface.

Murl.IMusicPlayerControl GetMusicPlayerControl()

Returns
Murl.IMusicPlayerControl The music player control interface or null if not available.

GetVirtualMouse()

Get the virtual-mouse device object.

Murl.IVirtualMouse GetVirtualMouse()

Returns
Murl.IVirtualMouse The virtual-mouse device object.

GetInputDeviceHandler()

Get the input devicehandler object.

Murl.Input.IDeviceHandler GetInputDeviceHandler()

Returns
Murl.Input.IDeviceHandler The input devicehandler object.

GetOutputDeviceHandler()

Get the output devicehandler object.

Murl.Output.IDeviceHandler GetOutputDeviceHandler()

Returns
Murl.Output.IDeviceHandler The output devicehandler object.