michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: interface Screen : EventTarget { michael@0: // CSSOM-View michael@0: // http://dev.w3.org/csswg/cssom-view/#the-screen-interface michael@0: [Throws] michael@0: readonly attribute long availWidth; michael@0: [Throws] michael@0: readonly attribute long availHeight; michael@0: [Throws] michael@0: readonly attribute long width; michael@0: [Throws] michael@0: readonly attribute long height; michael@0: [Throws] michael@0: readonly attribute long colorDepth; michael@0: [Throws] michael@0: readonly attribute long pixelDepth; michael@0: michael@0: [Throws] michael@0: readonly attribute long top; michael@0: [Throws] michael@0: readonly attribute long left; michael@0: [Throws] michael@0: readonly attribute long availTop; michael@0: [Throws] michael@0: readonly attribute long availLeft; michael@0: michael@0: /** michael@0: * Returns the current screen orientation. michael@0: * Can be: landscape-primary, landscape-secondary, michael@0: * portrait-primary or portrait-secondary. michael@0: */ michael@0: readonly attribute DOMString mozOrientation; michael@0: michael@0: attribute EventHandler onmozorientationchange; michael@0: michael@0: /** michael@0: * Lock screen orientation to the specified type. michael@0: */ michael@0: [Throws] michael@0: boolean mozLockOrientation(DOMString orientation); michael@0: [Throws] michael@0: boolean mozLockOrientation(sequence orientation); michael@0: michael@0: /** michael@0: * Unlock the screen orientation. michael@0: */ michael@0: void mozUnlockOrientation(); michael@0: };