Screen

Receive information about system’s monitor or screen.

Modulerequire("gui")
TypeObject

This class can not be created by user, you can only receive its global instance from the screen property of the module:

gui.screen.getPrimaryDisplay()

Methods

getPrimaryDisplay()

Return the primary display.

Return

Display

getAllDisplays()

Return the list of displays that are currently available.

Return

Array

getDisplayNearestWindow(window)

Return the display nearest the specified window.

Parameters

Return

Display

getDisplayNearestPoint(point)

Return the display nearest the specified DIP point.

Parameters

Return

Display

getCursorScreenPoint()

Return the current absolute position of the mouse pointer.

Return

PointF

Events

onAddDisplay(display)

Emitted when a new display is available.

Parameters

Preventable

No.

onRemoveDisplay(display)

Emitted when the display has been removed.

Parameters

Preventable

No.

onUpdateDisplay(display)

Emitted when there are changes happened to display.

Parameters

Preventable

No.