Bug 798413 - Tests for export signature from MAR files. r=bsmith
[gecko.git] / widget / nsIScreen.idl
blobb7054c3010170cace1a23ad22d454f99f00846cf
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 [scriptable, uuid(D6F13AF4-8ACA-4A10-8687-3F99C3692AC0)]
10 interface nsIScreen : nsISupports
12 /**
13 * Levels of brightness for the screen, from off to full brightness.
15 const unsigned long BRIGHTNESS_DIM = 0;
16 const unsigned long BRIGHTNESS_FULL = 1;
18 /* The number of different brightness levels */
19 const unsigned long BRIGHTNESS_LEVELS = 2;
21 /**
22 * Allowable screen rotations, when the underlying widget toolkit
23 * supports rotating the screen.
25 * ROTATION_0_DEG is the default, unrotated configuration.
27 const unsigned long ROTATION_0_DEG = 0;
28 const unsigned long ROTATION_90_DEG = 1;
29 const unsigned long ROTATION_180_DEG = 2;
30 const unsigned long ROTATION_270_DEG = 3;
32 void GetRect(out long left, out long top, out long width, out long height);
33 void GetAvailRect(out long left, out long top, out long width, out long height);
35 /**
36 * Locks the minimum brightness of the screen, forcing it to be at
37 * least as bright as a certain brightness level. Each call to this
38 * function must eventually be followed by a corresponding call to
39 * unlockMinimumBrightness, with the same brightness level.
41 * @param brightness A brightness level, one of the above constants.
43 void lockMinimumBrightness(in unsigned long brightness);
45 /**
46 * Releases a lock on the screen brightness. This must be called
47 * (eventually) after a corresponding call to lockMinimumBrightness.
49 * @param brightness A brightness level, one of the above constants.
51 void unlockMinimumBrightness(in unsigned long brightness);
53 readonly attribute long pixelDepth;
54 readonly attribute long colorDepth;
55 /**
56 * Get/set the screen rotation, on platforms that support changing
57 * screen rotation.
59 attribute unsigned long rotation;
61 /**
62 * The number of device pixels per screen point in HiDPI mode.
63 * Returns 1.0 if HiDPI mode is disabled or unsupported.
65 readonly attribute double contentsScaleFactor;