1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 interface Screen : EventTarget {
8 // http://dev.w3.org/csswg/cssom-view/#the-screen-interface
10 readonly attribute long availWidth;
12 readonly attribute long availHeight;
14 readonly attribute long width;
16 readonly attribute long height;
18 readonly attribute long colorDepth;
20 readonly attribute long pixelDepth;
23 readonly attribute long top;
25 readonly attribute long left;
27 readonly attribute long availTop;
29 readonly attribute long availLeft;
32 * Returns the current screen orientation.
33 * Can be: landscape-primary, landscape-secondary,
34 * portrait-primary or portrait-secondary.
36 readonly attribute DOMString mozOrientation;
38 attribute EventHandler onmozorientationchange;
41 * Lock screen orientation to the specified type.
44 boolean mozLockOrientation(DOMString orientation);
46 boolean mozLockOrientation(sequence<DOMString> orientation);
49 * Unlock the screen orientation.
51 void mozUnlockOrientation();