2006-01-12 00:27:48 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-01-12 00:27:48 +03:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsIScreen.idl"
|
|
|
|
|
2013-04-10 01:07:02 +04:00
|
|
|
[scriptable, uuid(1C195990-FF9E-412B-AFE7-67D1C660BB27)]
|
2006-01-12 00:27:48 +03:00
|
|
|
interface nsIScreenManager : nsISupports
|
|
|
|
{
|
|
|
|
//
|
|
|
|
// Returns the screen that contains the rectangle. If the rect overlaps
|
|
|
|
// multiple screens, it picks the screen with the greatest area of intersection.
|
|
|
|
//
|
|
|
|
// The coordinates are in pixels (not twips) and in screen coordinates.
|
|
|
|
//
|
2006-01-12 00:27:52 +03:00
|
|
|
nsIScreen screenForRect ( in long left, in long top, in long width, in long height ) ;
|
2006-01-12 00:27:48 +03:00
|
|
|
|
|
|
|
// The screen with the menubar/taskbar. This shouldn't be needed very
|
|
|
|
// often.
|
|
|
|
readonly attribute nsIScreen primaryScreen;
|
|
|
|
|
2006-01-12 00:27:52 +03:00
|
|
|
// Holds the number of screens that are available
|
|
|
|
readonly attribute unsigned long numberOfScreens;
|
2006-09-21 01:08:24 +04:00
|
|
|
|
2013-04-10 01:07:02 +04:00
|
|
|
// The default DPI scaling factor of the screen environment (number of
|
|
|
|
// screen pixels corresponding to 1 CSS px, at the default zoom level).
|
|
|
|
//
|
|
|
|
// This is currently fixed at 1.0 on most platforms, but varies on Windows
|
|
|
|
// if the "logical DPI" scaling option in the Display control panel is set
|
|
|
|
// to a value other than 100% (e.g. 125% or 150% are increasingly common
|
|
|
|
// defaults on laptops with high-dpi screens). See bug 851520.
|
|
|
|
//
|
|
|
|
// NOTE that on OS X, this does -not- reflect the "backing scale factor"
|
|
|
|
// used to support Retina displays, which is a per-display property,
|
|
|
|
// not a system-wide scaling factor. The default ratio of CSS pixels to
|
|
|
|
// Cocoa points remains 1:1, even on a Retina screen where one Cocoa point
|
|
|
|
// corresponds to two device pixels. (This is exposed via other APIs:
|
|
|
|
// see window.devicePixelRatio).
|
|
|
|
//
|
|
|
|
// NOTE also that on Linux, this does -not- currently reflect changes
|
|
|
|
// to the system-wide (X11 or Gtk2) DPI value, as Firefox does not yet
|
|
|
|
// honor these settings. See bug 798362 and bug 712898.
|
|
|
|
readonly attribute float systemDefaultScale;
|
|
|
|
|
2006-09-21 01:08:24 +04:00
|
|
|
// Returns the nsIScreen instance for the given native widget pointer;
|
|
|
|
// the pointer is specific to the particular widget implementation,
|
2009-04-10 14:43:19 +04:00
|
|
|
// and is generally of the same type that NS_NATIVE_WINDOW is.
|
2006-09-21 01:08:24 +04:00
|
|
|
[noscript] nsIScreen screenForNativeWidget ( in voidPtr nativeWidget );
|
2006-01-12 00:27:48 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
%{ C++
|
|
|
|
|
|
|
|
%}
|