Dali 3D User Interface Engine
window.h
Go to the documentation of this file.
1 #ifndef __DALI_WINDOW_H__
2 #define __DALI_WINDOW_H__
3 
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 
21 // EXTERNAL INCLUDES
22 #include <string>
28 
29 namespace Dali
30 {
37 
38 namespace Internal DALI_INTERNAL
39 {
40 namespace Adaptor
41 {
42 class Window;
43 }
44 }
45 
46 class DragAndDropDetector;
47 class Orientation;
48 
57 {
58 public:
60 
61 public:
62 
63  // Enumerations
64 
70  {
71  PORTRAIT = 0,
72  LANDSCAPE = 90,
73  PORTRAIT_INVERSE = 180,
74  LANDSCAPE_INVERSE = 270
75  };
76 
82  {
83  OPAQUE = 100, // Fully opaque indicator Bg
84  TRANSLUCENT = 50, // Semi translucent indicator Bg
85  TRANSPARENT = 0 // Fully transparent indicator Bg
86  };
87 
93  {
94  INVISIBLE = 0, // hide indicator
95  VISIBLE = 1, // show indicator
96  AUTO = 2 // hide in default, will show when necessary
97  };
98 
99  // Methods
100 
109  static Window New(PositionSize windowPosition, const std::string& name, bool isTransparent = false);
110 
120  static Window New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent = false);
121 
129  Window();
130 
137  ~Window();
138 
145  Window(const Window& handle);
146 
154  Window& operator=(const Window& rhs);
155 
161  void ShowIndicator( IndicatorVisibleMode visibleMode );
162 
168  void SetIndicatorBgOpacity( IndicatorBgOpacity opacity );
169 
178  void RotateIndicator(WindowOrientation orientation);
179 
186  void SetClass(std::string name, std::string klass);
187 
192  void Raise();
193 
198  void Lower();
199 
204  void Activate();
205 
210  void AddAvailableOrientation( WindowOrientation orientation );
211 
216  void RemoveAvailableOrientation( WindowOrientation orientation );
217 
224  void SetPreferredOrientation( WindowOrientation orientation );
225 
231  WindowOrientation GetPreferredOrientation();
232 
238  DragAndDropDetector GetDragAndDropDetector() const;
239 
245  Any GetNativeHandle() const;
246 
247 public: // Signals
252  IndicatorSignalType& IndicatorVisibilityChangedSignal();
253 
254 public: // Not intended for application developers
260  explicit DALI_INTERNAL Window( Internal::Adaptor::Window* window );
261 };
262 
266 } // namespace Dali
267 
268 #endif // __DALI_WINDOW_H__
Dali Docs Home
Read more about Dali