Source code

Revision control

Other Tools

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
12
namespace mozilla {
13
namespace hal {
14
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
typedef uint32_t ScreenOrientation;
18
19
static const ScreenOrientation eScreenOrientation_None = 0;
20
static const ScreenOrientation eScreenOrientation_PortraitPrimary = 1u << 0;
21
static const ScreenOrientation eScreenOrientation_PortraitSecondary = 1u << 1;
22
static const ScreenOrientation eScreenOrientation_LandscapePrimary = 1u << 2;
23
static const ScreenOrientation eScreenOrientation_LandscapeSecondary = 1u << 3;
24
// eScreenOrientation_Default will use the natural orientation for the deivce,
25
// it could be PortraitPrimary or LandscapePrimary depends on display resolution
26
static const ScreenOrientation eScreenOrientation_Default = 1u << 4;
27
28
class ScreenConfiguration;
29
typedef Observer<ScreenConfiguration> ScreenConfigurationObserver;
30
31
} // namespace hal
32
} // namespace mozilla
33
34
#endif // mozilla_HalScreenConfiguration_h