luna-sysmgr-common
 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 
23  enum {
27  isSetFullScreen = 1 << 2,
31  isSetHasPauseUi = 1 << 6,
38  isSetGyro = 1 << 14,
40  isSetAlsDisabled = 1 << 16,
42  };
43 
44  enum {
50  };
51 
52  unsigned int flags;
53 
56  bool fullScreen;
61  bool hasPauseUi;
64  unsigned int dockBrightness;
65  unsigned int statusBarColor;
70 
72  : flags(0)
73  , isBlockScreenTimeout(false)
74  , isSubtleLightbar(false)
75  , fullScreen(false)
76  , activeTouchpanel(false)
77  , alsDisabled (false)
79  , suppressBannerMessages(false)
80  , hasPauseUi(false)
81  , suppressGestures(false)
82  , dockBrightness(100)
83  , dashboardManualDrag(false)
84  , statusBarColor(0x00000000)
85  , rotationLockMaximized(false)
87  , gyroEnabled(false)
88  , compassEnabled(false)
89  {
90  }
91 
92  void merge(const WindowProperties& props);
93 
94  // convenience functions
96  void setSubtleLightbar (bool enable) { flags |= isSetSubtleLightbar; isSubtleLightbar = 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);
102  void setHasPauseUi(bool val) { flags |= isSetHasPauseUi; hasPauseUi = val; }
105  void setStatusBarColor(unsigned int color) { flags |= isSetStatusBarColor; statusBarColor = color; }
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