@mozilla.org/gfx/screenmanager;1 as a service:
var screenManager = Components.classes["@mozilla.org/gfx/screenmanager;1"] .getService(Components.interfaces.nsIScreenManager);
| || ||The number of screens on the user's computer. Read only.|
| || ||The primary display screen; this is the screen with the menu bar (on the Mac) or taskbar or equivalent on Windows or Linux. Read only.|
nsIScreen instance for the native widget pointer. This pointer's definition is specific to the platform's native widget implementation, and is typically of the same type as
nsIScreen screenForNativeWidget( in voidPtr nativeWidget );
- The native widget for which to obtain an
nsIScreen instance for the native widget pointer.
nsIScreen containing the specified rectangle. If the rectangle overlaps multiple screens, the screen containing the majority of the rectangle's area is selected and returned.
The coordinates must be specified using global (screen) coordinates, and are in pixels.
nsIScreen screenForRect( in long left, in long top, in long width, in long height );
- The left edge of the rectangle.
- The top edge of the rectangle.
- The width of the rectangle.
- The height of the rectangle.
nsIScreen containing the majority of the rectangle's area.