Screen
Receive information about system’s monitor or screen.
Module | require("yue.gui") |
Type | table |
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
table
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