Viewport

abstract class Viewport

Inheritors

Functions

Link copied to clipboard

Receive the screen rendering area height. The height is depends on the glasses hardware and is available ONLY after the connection was established.

Link copied to clipboard
fun getId(): Int

Get the screen id (auto generated)

Link copied to clipboard

Get the name

Link copied to clipboard

Receive the screen rendering area width. The width is depends on the glasses hardware and is available ONLY after the connection was established.

Link copied to clipboard
Link copied to clipboard

Indicates if the screen is paused

Link copied to clipboard

Indicates if the screen is resumed

Link copied to clipboard
protected open fun onCreate()

Override this function to be notified when the screen is created

Link copied to clipboard
protected open fun onDestroy()

Override this function to be notified when the screen is destroyed

Link copied to clipboard
protected open fun onPause()

Override this function to be notified when the screen is paused

Link copied to clipboard
protected open fun onResourcesUploadEnd()

Override this function to be notified when the resources upload batch process was ended

Link copied to clipboard
protected open fun onResourceUploadResult(resource: UIResource)

Override this function to be notified about a single resource upload result The function is called when the resource was uploaded successfully or the upload was failed

Link copied to clipboard
protected open fun onResume()

Override this function to be notified when the screen is resumed

Link copied to clipboard
protected open fun onTouch(touchDirection: TouchDirection): Boolean

Override this function to be notified about the glasses touch gestures

Link copied to clipboard
protected open fun onUpdateUI(timestampMs: Long)

Override this function to be notified when the screen is about to be drawn

Link copied to clipboard
open fun removeAll()

Remove all ui elements from the screen

Link copied to clipboard

This function starts uploading the resources to the glasses. Usually this function should be called within the onCreate or the onResume functions, as part of the screen UI preparations

Link copied to clipboard

set the screen render rate

Link copied to clipboard
open override fun toString(): String

returns a string with the screen name & id

Link copied to clipboard

Indicates if the screen was created