1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/base/ScreenOrientation.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,27 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef mozilla_dom_ScreenOrientation_h 1.9 +#define mozilla_dom_ScreenOrientation_h 1.10 + 1.11 +namespace mozilla { 1.12 +namespace dom { 1.13 + 1.14 +// Make sure that any change here is also made in 1.15 +// * mobile/android/base/GeckoScreenOrientationListener.java 1.16 +typedef uint32_t ScreenOrientation; 1.17 + 1.18 +static const ScreenOrientation eScreenOrientation_None = 0; 1.19 +static const ScreenOrientation eScreenOrientation_PortraitPrimary = 1u << 0; 1.20 +static const ScreenOrientation eScreenOrientation_PortraitSecondary = 1u << 1; 1.21 +static const ScreenOrientation eScreenOrientation_LandscapePrimary = 1u << 2; 1.22 +static const ScreenOrientation eScreenOrientation_LandscapeSecondary = 1u << 3; 1.23 +//eScreenOrientation_Default will use the natural orientation for the deivce, 1.24 +//it could be PortraitPrimary or LandscapePrimary depends on display resolution 1.25 +static const ScreenOrientation eScreenOrientation_Default = 1u << 4; 1.26 + 1.27 +} // namespace dom 1.28 +} // namespace mozilla 1.29 + 1.30 +#endif // mozilla_dom_ScreenOrientation_h