1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et ft=cpp : */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_HalScreenConfiguration_h
8 #define mozilla_HalScreenConfiguration_h
10 #include "mozilla/Observer.h"
11 #include "mozilla/TypedEnumBits.h"
13 namespace mozilla::hal
{
15 // Make sure that any change to ScreenOrientation values are also made in
16 // mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoScreenOrientation.java
17 enum class ScreenOrientation
: uint32_t {
19 PortraitPrimary
= 1u << 0,
20 PortraitSecondary
= 1u << 1,
21 LandscapePrimary
= 1u << 2,
22 LandscapeSecondary
= 1u << 3,
23 // Default will use the natural orientation for the device, it could be
24 // PortraitPrimary or LandscapePrimary depends on display resolution
28 constexpr auto kAllScreenOrientationBits
= ScreenOrientation((1 << 5) - 1);
30 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(ScreenOrientation
);
32 } // namespace mozilla::hal
34 #endif // mozilla_HalScreenConfiguration_h