luna-sysmgr-common
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
WindowProperties.h
Go to the documentation of this file.
1
/* @@@LICENSE
2
*
3
* Copyright (c) 2008-2012 Hewlett-Packard Development Company, L.P.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
* LICENSE@@@ */
18
19
#ifndef WINDOWPROPERTIES_H
20
#define WINDOWPROPERTIES_H
21
22
struct
WindowProperties
{
23
enum
{
24
isSetNothing
= 0,
25
isSetBlockScreenTimeout
= 1 << 0,
26
isSetSubtleLightbar
= 1 << 1,
27
isSetFullScreen
= 1 << 2,
28
isSetFastAccelerometer
= 1 << 3,
29
isSetOverlayNotifications
= 1 << 4,
30
isSetSuppressBannerMessages
= 1 << 5,
31
isSetHasPauseUi
= 1 << 6,
32
isSetSuppressGestures
= 1 << 7,
33
isSetDashboardManualDragMode
= 1 << 9,
34
isSetStatusBarColor
= 1 << 10,
35
isSetRotationLockMaximized
= 1 << 11,
36
isSetAllowResizeOnPositiveSpaceChange
= 1 << 12,
37
isSetEnableCompassEvents
= 1 << 13,
38
isSetGyro
= 1 << 14,
39
isSetActiveTouchpanel
= 1 << 15,
40
isSetAlsDisabled
= 1 << 16,
41
isSetLast
42
};
43
44
enum
{
45
OverlayNotificationsBottom
= 0,
46
OverlayNotificationsLeft
,
47
OverlayNotificationsRight
,
48
OverlayNotificationsTop
,
49
OverlayNotificationsLast
50
};
51
52
unsigned
int
flags
;
53
54
bool
isBlockScreenTimeout
;
55
bool
isSubtleLightbar
;
56
bool
fullScreen
;
57
bool
activeTouchpanel
;
58
bool
alsDisabled
;
59
unsigned
int
overlayNotificationsPosition
;
60
bool
suppressBannerMessages
;
61
bool
hasPauseUi
;
62
bool
suppressGestures
;
63
bool
dashboardManualDrag
;
64
unsigned
int
dockBrightness
;
65
unsigned
int
statusBarColor
;
66
bool
rotationLockMaximized
;
67
bool
allowResizeOnPositiveSpaceChange
;
68
bool
gyroEnabled
;
69
bool
compassEnabled
;
70
71
WindowProperties
()
72
:
flags
(0)
73
,
isBlockScreenTimeout
(false)
74
,
isSubtleLightbar
(false)
75
,
fullScreen
(false)
76
,
activeTouchpanel
(false)
77
,
alsDisabled
(false)
78
,
overlayNotificationsPosition
(
OverlayNotificationsBottom
)
79
,
suppressBannerMessages
(false)
80
,
hasPauseUi
(false)
81
,
suppressGestures
(false)
82
,
dockBrightness
(100)
83
,
dashboardManualDrag
(false)
84
,
statusBarColor
(0x00000000)
85
,
rotationLockMaximized
(false)
86
,
allowResizeOnPositiveSpaceChange
(true)
87
,
gyroEnabled
(false)
88
,
compassEnabled
(false)
89
{
90
}
91
92
void
merge
(
const
WindowProperties
& props);
93
94
// convenience functions
95
void
setBlockScreenTimeout
(
bool
enable) {
flags
|=
isSetBlockScreenTimeout
;
isBlockScreenTimeout
= enable; }
96
void
setSubtleLightbar
(
bool
enable) {
flags
|=
isSetSubtleLightbar
;
isSubtleLightbar
= enable; }
97
void
setActiveTouchpanel
(
bool
enable) {
flags
|=
isSetActiveTouchpanel
;
activeTouchpanel
= enable; }
98
void
setAlsDisabled
(
bool
disable) {
flags
|=
isSetAlsDisabled
;
alsDisabled
= disable; }
99
void
setFullScreen
(
bool
enable) {
flags
|=
isSetFullScreen
;
fullScreen
= enable; }
100
void
setOverlayNotificationsPosition
(
unsigned
int
position);
101
void
setSuppressBannerMessages
(
bool
enable) {
flags
|=
isSetSuppressBannerMessages
;
suppressBannerMessages
= enable; }
102
void
setHasPauseUi
(
bool
val) {
flags
|=
isSetHasPauseUi
;
hasPauseUi
= val; }
103
void
setSuppressGestures
(
bool
val) {
flags
|=
isSetSuppressGestures
;
suppressGestures
= val; }
104
void
setDashboardManualDragMode
(
bool
isManual) {
flags
|=
isSetDashboardManualDragMode
;
dashboardManualDrag
= isManual; }
105
void
setStatusBarColor
(
unsigned
int
color) {
flags
|=
isSetStatusBarColor
;
statusBarColor
= color; }
106
void
setRotationLockMaximized
(
bool
enable) {
flags
|=
isSetRotationLockMaximized
;
rotationLockMaximized
= enable;}
107
void
setAllowResizeOnPositiveSpaceChange
(
bool
allow) {
flags
|=
isSetAllowResizeOnPositiveSpaceChange
;
allowResizeOnPositiveSpaceChange
= allow; }
108
void
setAllowGyroEvents
(
bool
allow) {
flags
|=
isSetGyro
;
gyroEnabled
= allow; }
109
void
setCompassEvents
(
bool
enable) {
flags
|=
isSetEnableCompassEvents
;
compassEnabled
= enable; }
110
};
111
112
113
114
#endif // WINDOWPROPERTIES_H
luna-sysmgr-common
include
WindowProperties.h
Generated on Fri Jun 21 2013 00:48:48 for luna-sysmgr-common by
1.8.3.1