forked from jigish/slate
-
Notifications
You must be signed in to change notification settings - Fork 0
Screen Object
jigish edited this page Feb 1, 2013
·
6 revisions
The Screen Object is returned by various Slate API functions. This page describes it in detail.
The Screen Object represents a screen. It can be used to reference screens in operations.
Return the id of the Screen. This can be used to reference the screen in operations.
// assuming screen is the Screen Object
var screenId = screen.id();Return the rectangle that represents this Screen's location and size.
// assuming screen is the Screen Object
var rect = screen.rect();
var topLeftX = rect.x;
var topLeftY = rect.y;
var width = rect.width;
var height = rect.height;Alias: main
Returns true if this screen is the main screen, false otherwise.
// assuming screen is the Screen Object
var isMain = screen.isMain();