1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/Screen.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +interface Screen : EventTarget { 1.10 + // CSSOM-View 1.11 + // http://dev.w3.org/csswg/cssom-view/#the-screen-interface 1.12 + [Throws] 1.13 + readonly attribute long availWidth; 1.14 + [Throws] 1.15 + readonly attribute long availHeight; 1.16 + [Throws] 1.17 + readonly attribute long width; 1.18 + [Throws] 1.19 + readonly attribute long height; 1.20 + [Throws] 1.21 + readonly attribute long colorDepth; 1.22 + [Throws] 1.23 + readonly attribute long pixelDepth; 1.24 + 1.25 + [Throws] 1.26 + readonly attribute long top; 1.27 + [Throws] 1.28 + readonly attribute long left; 1.29 + [Throws] 1.30 + readonly attribute long availTop; 1.31 + [Throws] 1.32 + readonly attribute long availLeft; 1.33 + 1.34 + /** 1.35 + * Returns the current screen orientation. 1.36 + * Can be: landscape-primary, landscape-secondary, 1.37 + * portrait-primary or portrait-secondary. 1.38 + */ 1.39 + readonly attribute DOMString mozOrientation; 1.40 + 1.41 + attribute EventHandler onmozorientationchange; 1.42 + 1.43 + /** 1.44 + * Lock screen orientation to the specified type. 1.45 + */ 1.46 + [Throws] 1.47 + boolean mozLockOrientation(DOMString orientation); 1.48 + [Throws] 1.49 + boolean mozLockOrientation(sequence<DOMString> orientation); 1.50 + 1.51 + /** 1.52 + * Unlock the screen orientation. 1.53 + */ 1.54 + void mozUnlockOrientation(); 1.55 +};