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"
|
|
|
|
|
2012-02-07 02:33:04 +04:00
|
|
|
[scriptable, uuid(d961f76e-8437-4bc6-9ada-a1c98ace9560)]
|
2006-01-12 00:27:48 +03:00
|
|
|
interface nsIScreen : nsISupports
|
|
|
|
{
|
2010-12-22 01:33:48 +03:00
|
|
|
/**
|
|
|
|
* Levels of brightness for the screen, from off to full brightness.
|
|
|
|
*/
|
|
|
|
const unsigned long BRIGHTNESS_DIM = 0;
|
|
|
|
const unsigned long BRIGHTNESS_FULL = 1;
|
|
|
|
|
|
|
|
/* The number of different brightness levels */
|
|
|
|
const unsigned long BRIGHTNESS_LEVELS = 2;
|
|
|
|
|
2012-02-07 02:33:04 +04:00
|
|
|
/**
|
|
|
|
* Allowable screen rotations, when the underlying widget toolkit
|
|
|
|
* supports rotating the screen.
|
|
|
|
*
|
|
|
|
* ROTATION_0_DEG is the default, unrotated configuration.
|
|
|
|
*/
|
|
|
|
const unsigned long ROTATION_0_DEG = 0;
|
|
|
|
const unsigned long ROTATION_90_DEG = 1;
|
|
|
|
const unsigned long ROTATION_180_DEG = 2;
|
|
|
|
const unsigned long ROTATION_270_DEG = 3;
|
|
|
|
|
2012-01-05 06:12:48 +04:00
|
|
|
void GetRect(out long left, out long top, out long width, out long height);
|
|
|
|
void GetAvailRect(out long left, out long top, out long width, out long height);
|
|
|
|
|
2010-12-22 01:33:48 +03:00
|
|
|
/**
|
|
|
|
* Locks the minimum brightness of the screen, forcing it to be at
|
|
|
|
* least as bright as a certain brightness level. Each call to this
|
|
|
|
* function must eventually be followed by a corresponding call to
|
|
|
|
* unlockMinimumBrightness, with the same brightness level.
|
|
|
|
*
|
|
|
|
* @param brightness A brightness level, one of the above constants.
|
|
|
|
*/
|
|
|
|
void lockMinimumBrightness(in unsigned long brightness);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Releases a lock on the screen brightness. This must be called
|
|
|
|
* (eventually) after a corresponding call to lockMinimumBrightness.
|
|
|
|
*
|
|
|
|
* @param brightness A brightness level, one of the above constants.
|
|
|
|
*/
|
|
|
|
void unlockMinimumBrightness(in unsigned long brightness);
|
2012-01-05 06:12:48 +04:00
|
|
|
|
|
|
|
readonly attribute long pixelDepth;
|
2012-02-07 02:33:04 +04:00
|
|
|
readonly attribute long colorDepth;
|
|
|
|
/**
|
|
|
|
* Get/set the screen rotation, on platforms that support changing
|
|
|
|
* screen rotation.
|
|
|
|
*/
|
|
|
|
attribute unsigned long rotation;
|
2010-12-22 01:33:48 +03:00
|
|
|
};
|