Display

expect class Display

Represents a physical display device (eg a Touchscreen).

actual class Display
actual class Display

Types

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion

Functions

Link copied to clipboard
expect fun cleanCpuCache()

Clean any CPU cache that is related to this display.

actual fun cleanCpuCache()
actual fun cleanCpuCache()
Link copied to clipboard
expect fun loadScreen(screen: LvglObjectBase)

Make a screen active.

actual fun loadScreen(screen: LvglObjectBase)
actual fun loadScreen(screen: LvglObjectBase)
Link copied to clipboard
expect fun scalePixels(pixels: Short): Short

Scale the given number of pixels (a distance or size) relative to a 160 DPI display considering the DPI of the default display. It ensures that e.g. lv_dpx(100) will have the same physical size regardless to the DPI of the display.

actual fun scalePixels(pixels: Short): Short
actual fun scalePixels(pixels: Short): Short
Link copied to clipboard
expect fun setBackgroundColor(color: Color)

Set the background color of the display.

actual fun setBackgroundColor(color: Color)
actual fun setBackgroundColor(color: Color)
Link copied to clipboard
expect fun setBackgroundImage(imageSrc: StringReference)

Set the background image of the display.

actual fun setBackgroundImage(imageSrc: StringReference)
actual fun setBackgroundImage(imageSrc: StringReference)
Link copied to clipboard
expect fun setBackgroundOpacity(opacity: UByte)

Set the opacity of the background.

actual fun setBackgroundOpacity(opacity: UByte)
actual fun setBackgroundOpacity(opacity: UByte)
Link copied to clipboard
expect fun triggerActivity()

Manually trigger an activity on this display.

actual fun triggerActivity()
actual fun triggerActivity()

Properties

Link copied to clipboard
expect val activeScreen: LvglObjectBase

The active screen for the display.

actual val activeScreen: LvglObjectBase
actual val activeScreen: LvglObjectBase
Link copied to clipboard
expect val inactiveTime: UInt

The elapsed time (in ms) since last user activity on a display (e.g. click).

actual val inactiveTime: UInt
actual val inactiveTime: UInt
Link copied to clipboard
val lvDispPtr: CPointer<lv_disp_t>?
Link copied to clipboard
val lvDispPtr: CPointer<lv_disp_t>?
Link copied to clipboard
expect val prevScreen: LvglObjectBase?

The previous screen. Only used during screen transitions. Will be null if the screen isn't used.

actual val prevScreen: LvglObjectBase?
actual val prevScreen: LvglObjectBase?
Link copied to clipboard
expect val sysLayer: LvglObjectBase

Return with the system layer. Same on every screen and it is above the normal screen and the top layer.

actual val sysLayer: LvglObjectBase
actual val sysLayer: LvglObjectBase
Link copied to clipboard
expect var theme: Theme

The theme that is applied to this display.

actual var theme: Theme
actual var theme: Theme
Link copied to clipboard
expect val topLayer: LvglObjectBase

Return with the top layer. Same on every screen and it is above the normal screen layer.

actual val topLayer: LvglObjectBase
actual val topLayer: LvglObjectBase