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
Display
getAllDisplays()
Return the list of displays that are currently available.
Return
Array
getDisplayNearestWindow(window)
Return the display nearest the specified window
.
Parameters
Window
window
Return
Display
getDisplayNearestPoint(point)
Return the display nearest the specified DIP point
.
Parameters
PointF
point
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
Display
display
Preventable
No.onRemoveDisplay(display)
Emitted when the display
has been removed.
Parameters
Display
display
Preventable
No.onUpdateDisplay(display)
Emitted when there are changes happened to display
.
Parameters
Display
display