Bug 1858983 [wpt PR 42532] - Update wpt metadata, a=testonly
[gecko.git] / hal / HalScreenConfiguration.h
blob9a577884b63d386f2a1331c5082358d70a9d379c
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 // Undo X11/X.h's definition of None
14 #undef None
16 namespace mozilla::hal {
18 // Make sure that any change to ScreenOrientation values are also made in
19 // mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoScreenOrientation.java
20 enum class ScreenOrientation : uint32_t {
21 None = 0,
22 PortraitPrimary = 1u << 0,
23 PortraitSecondary = 1u << 1,
24 LandscapePrimary = 1u << 2,
25 LandscapeSecondary = 1u << 3,
26 // Default will use the natural orientation for the device, it could be
27 // PortraitPrimary or LandscapePrimary depends on display resolution
28 Default = 1u << 4,
31 constexpr auto kAllScreenOrientationBits = ScreenOrientation((1 << 5) - 1);
33 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(ScreenOrientation);
35 } // namespace mozilla::hal
37 #endif // mozilla_HalScreenConfiguration_h