Device

API ReferenceRendererDevice

+ [`Device.platform`](#deviceplatform)
+ [`Device.desktop`](#devicedesktop)
+ [`Device.tablet`](#devicetablet)
+ [`Device.phone`](#devicephone)
+ [`Device.mobile`](#devicemobile)
+ [`Device.pixelRatio`](#devicepixelratio)
+ [`Device.log()`](#devicelog)
+ [`Device.pointer`](#devicepointer)
+ [`Device.onPointerPress()`](#deviceonpointerpress)
+ [`Device.onPointerRelease()`](#deviceonpointerrelease)
+ [`Device.onPointerMove()`](#deviceonpointermove)
+ [`Device.onPointerWheel()`](#deviceonpointerwheel)
+ [`Device.keyboard`](#devicekeyboard)
+ [`Device.onKeyPress()`](#deviceonkeypress)
+ [`Device.onKeyHold()`](#deviceonkeyhold)
+ [`Device.onKeyRelease()`](#deviceonkeyrelease)
+ [`Device.onKeyInput()`](#deviceonkeyinput)

Source


Device.platform

Static property of
Device
Type
Boolean
Default
'Unix'

Possible values are:

  • Android,
  • iOS,
  • BlackBerry,
  • WindowsCE,
  • WindowsRT,
  • WindowsPhone,
  • Linux,
  • Windows,
  • Unix,
  • OSX.
Text {
    text: 'You are using: ' + Device.platform
    font.pixelSize: 30
}

Source


Device.desktop

Static property of
Device
Type
Boolean
Default
true

Source


Device.tablet

Static property of
Device
Type
Boolean
Default
false

Source


Device.phone

Static property of
Device
Type
Boolean
Default
false

Source


Device.mobile

Static property of
Device
Type
Boolean
Default
false

Tablet or a phone.

Text {
    text: Device.mobile ? 'Mobile' : 'Desktop'
    font.pixelSize: 30
}

Source


Device.pixelRatio

Static property of
Device
Type
Boolean
Default
1
Text {
    text: Device.pixelRatio >= 2 ? 'Retina' : 'Non-retina'
    font.pixelSize: 30
}

Source


Device.log()

Static method of
Device
Parameters
  • message... — String

Source


Device.pointer

Static property of
Device
Type
Device.PointerEvent
Read Only

Source


Device.onPointerPress()

Static property of
Device
Parameters
  • event — Device.PointerEvent
Type
Signal

Source


Device.onPointerRelease()

Static property of
Device
Parameters
  • event — Device.PointerEvent
Type
Signal

Source


Device.onPointerMove()

Static property of
Device
Parameters
  • event — Device.PointerEvent
Type
Signal

Source


Device.onPointerWheel()

Static property of
Device
Parameters
  • event — Device.PointerEvent
Type
Signal

Source


Device.keyboard

Static property of
Device
Type
Device.KeyboardEvent
Read Only

Source


Device.onKeyPress()

Static property of
Device
Parameters
  • event — Device.KeyboardEvent
Type
Signal

Source


Device.onKeyHold()

Static property of
Device
Parameters
  • event — Device.KeyboardEvent
Type
Signal

Source


Device.onKeyRelease()

Static property of
Device
Parameters
  • event — Device.KeyboardEvent
Type
Signal

Source


Device.onKeyInput()

Static property of
Device
Parameters
  • event — Device.KeyboardEvent
Type
Signal

Source

Class Device.PointerEvent

Source


Device.x

Static property of
Device
Type
Float
Read Only

Device.onXChange()

Static property of
Device
Parameters
  • oldValue — Float
Type
Signal

Source


Device.y

Static property of
Device
Type
Float
Read Only

Device.onYChange()

Static property of
Device
Parameters
  • oldValue — Float
Type
Signal

Source


Device.movementX

Static property of
Device
Type
Float
Read Only

Device.onMovementXChange()

Static property of
Device
Parameters
  • oldValue — Float
Type
Signal

Source


Device.movementY

Static property of
Device
Type
Float
Read Only

Device.onMovementYChange()

Static property of
Device
Parameters
  • oldValue — Float
Type
Signal

Source


Device.deltaX

Static property of
Device
Type
Float
Read Only

Device.onDeltaXChange()

Static property of
Device
Parameters
  • oldValue — Float
Type
Signal

Source


Device.deltaY

Static property of
Device
Type
Float
Read Only

Device.onDeltaYChange()

Static property of
Device
Parameters
  • oldValue — Float
Type
Signal

Source

Class Device.KeyboardEvent()

Source


Device.visible

Static property of
Device
Type
Boolean
Read Only

Device.onVisibleChange()

Static property of
Device
Parameters
  • oldValue — Boolean
Type
Signal

Source


Device.key

Static property of
Device
Type
String
Read Only

Device.onKeyChange()

Static property of
Device
Parameters
  • oldValue — String
Type
Signal

Source


Device.text

Static property of
Device
Type
String
Read Only

Device.onTextChange()

Static property of
Device
Parameters
  • oldValue — String
Type
Signal

Source


Device.show()

Static method of
Device

Source


Device.hide()

Static method of
Device

Source

results matching ""

    No results matching ""