2013-11-01 06:07:10 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set sw=2 ts=8 et ft=cpp : */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_HalScreenConfiguration_h
|
|
|
|
#define mozilla_HalScreenConfiguration_h
|
|
|
|
|
|
|
|
#include "mozilla/Observer.h"
|
2022-02-14 10:51:06 +03:00
|
|
|
#include "mozilla/TypedEnumBits.h"
|
2013-11-01 06:07:10 +04:00
|
|
|
|
2023-02-06 07:51:26 +03:00
|
|
|
// Undo X11/X.h's definition of None
|
|
|
|
#undef None
|
|
|
|
|
2022-02-14 10:51:06 +03:00
|
|
|
namespace mozilla::hal {
|
2018-08-29 23:54:56 +03:00
|
|
|
|
|
|
|
// Make sure that any change to ScreenOrientation values are also made in
|
|
|
|
// mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoScreenOrientation.java
|
2022-02-14 10:51:06 +03:00
|
|
|
enum class ScreenOrientation : uint32_t {
|
|
|
|
None = 0,
|
|
|
|
PortraitPrimary = 1u << 0,
|
|
|
|
PortraitSecondary = 1u << 1,
|
|
|
|
LandscapePrimary = 1u << 2,
|
|
|
|
LandscapeSecondary = 1u << 3,
|
|
|
|
// Default will use the natural orientation for the device, it could be
|
|
|
|
// PortraitPrimary or LandscapePrimary depends on display resolution
|
|
|
|
Default = 1u << 4,
|
|
|
|
};
|
2018-08-29 23:54:56 +03:00
|
|
|
|
2022-02-14 10:51:06 +03:00
|
|
|
constexpr auto kAllScreenOrientationBits = ScreenOrientation((1 << 5) - 1);
|
|
|
|
|
|
|
|
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(ScreenOrientation);
|
2018-08-29 23:54:56 +03:00
|
|
|
|
2022-02-14 10:51:06 +03:00
|
|
|
} // namespace mozilla::hal
|
2013-11-01 06:07:10 +04:00
|
|
|
|
|
|
|
#endif // mozilla_HalScreenConfiguration_h
|