tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

HalScreenConfiguration.h (1266B)


      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/. */
      6 
      7 #ifndef mozilla_HalScreenConfiguration_h
      8 #define mozilla_HalScreenConfiguration_h
      9 
     10 #include "mozilla/Observer.h"
     11 #include "mozilla/TypedEnumBits.h"
     12 
     13 // Undo X11/X.h's definition of None
     14 #undef None
     15 
     16 namespace mozilla::hal {
     17 
     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,
     29 };
     30 
     31 constexpr auto kAllScreenOrientationBits = ScreenOrientation((1 << 5) - 1);
     32 
     33 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(ScreenOrientation);
     34 
     35 }  // namespace mozilla::hal
     36 
     37 #endif  // mozilla_HalScreenConfiguration_h