Screen
Receive information about system’s monitor or screen.
| Module | require("gui") |
| Type | Object |
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
DisplaygetAllDisplays()
Return the list of displays that are currently available.
Return
ArraygetDisplayNearestWindow(window)
Return the display nearest the specified window.
Parameters
Windowwindow
Return
DisplaygetDisplayNearestPoint(point)
Return the display nearest the specified DIP point.
Parameters
PointFpoint
Return
DisplaygetCursorScreenPoint()
Return the current absolute position of the mouse pointer.
Return
PointFEvents
onAddDisplay(display)
Emitted when a new display is available.
Parameters
Displaydisplay
Preventable
No.onRemoveDisplay(display)
Emitted when the display has been removed.
Parameters
Displaydisplay
Preventable
No.onUpdateDisplay(display)
Emitted when there are changes happened to display.
Parameters
Displaydisplay