Refactoring window system
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-base.h
1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H
3
4 /*
5  * Copyright (c) 2018 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 // INTERNAL INCLUDES
22 #include <dali/public-api/adaptor-framework/window.h>
23 #include <dali/internal/window-system/common/indicator-interface.h>
24
25 // EXTERNAL INCLUDES
26 #include <string>
27 #include <vector>
28
29 namespace Dali
30 {
31 namespace Internal
32 {
33 namespace Adaptor
34 {
35
36 /**
37  * WindowBase interface
38  */
39 class WindowBase
40 {
41 public:
42
43   /**
44    * @brief Default constructor
45    */
46   WindowBase() = default;
47
48   /**
49    * @brief Destructor
50    */
51   virtual ~WindowBase() = default;
52
53 public:
54
55   /**
56    * Second stage initialization
57    */
58   virtual void Initialize() = 0;
59
60   /**
61    * @copydoc Dali::Window::ShowIndicator()
62    */
63   virtual void ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode ) = 0;
64
65   /**
66    * Set the indicator properties on the window
67    */
68   virtual void SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation ) = 0;
69
70   /**
71    * @copydoc Dali::Internal::Adaptor::IndicatorInterface::Observer::IndicatorTypeChanged()
72    */
73   virtual void IndicatorTypeChanged( IndicatorInterface::Type type ) = 0;
74
75   /**
76    * @copydoc Dali::Window::SetClass()
77    */
78   virtual void SetClass( std::string name, std::string className ) = 0;
79
80   /**
81    * @copydoc Dali::Window::Raise()
82    */
83   virtual void Raise() = 0;
84
85   /**
86    * @copydoc Dali::Window::Lower()
87    */
88   virtual void Lower() = 0;
89
90   /**
91    * @copydoc Dali::Window::Activate()
92    */
93   virtual void Activate() = 0;
94
95   /**
96    * @copydoc Dali::Window::SetAvailableOrientations()
97    */
98   virtual void SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations ) = 0;
99
100   /**
101    * @copydoc Dali::Window::SetPreferredOrientation()
102    */
103   virtual void SetPreferredOrientation( Dali::Window::WindowOrientation orientation ) = 0;
104
105   /**
106    * @copydoc Dali::Window::SetAcceptFocus()
107    */
108   virtual void SetAcceptFocus( bool accept ) = 0;
109
110   /**
111    * @copydoc Dali::Window::Show()
112    */
113   virtual void Show() = 0;
114
115   /**
116    * @copydoc Dali::Window::Hide()
117    */
118   virtual void Hide() = 0;
119
120   /**
121    * @copydoc Dali::Window::GetSupportedAuxiliaryHintCount()
122    */
123   virtual unsigned int GetSupportedAuxiliaryHintCount() const = 0;
124
125   /**
126    * @copydoc Dali::Window::GetSupportedAuxiliaryHint()
127    */
128   virtual std::string GetSupportedAuxiliaryHint( unsigned int index ) const = 0;
129
130   /**
131    * @copydoc Dali::Window::AddAuxiliaryHint()
132    */
133   virtual unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value ) = 0;
134
135   /**
136    * @copydoc Dali::Window::RemoveAuxiliaryHint()
137    */
138   virtual bool RemoveAuxiliaryHint( unsigned int id ) = 0;
139
140   /**
141    * @copydoc Dali::Window::SetAuxiliaryHintValue()
142    */
143   virtual bool SetAuxiliaryHintValue( unsigned int id, const std::string& value ) = 0;
144
145   /**
146    * @copydoc Dali::Window::GetAuxiliaryHintValue()
147    */
148   virtual std::string GetAuxiliaryHintValue( unsigned int id ) const = 0;
149
150   /**
151    * @copydoc Dali::Window::GetAuxiliaryHintId()
152    */
153   virtual unsigned int GetAuxiliaryHintId( const std::string& hint ) const = 0;
154
155   /**
156    * @copydoc Dali::Window::SetInputRegion()
157    */
158   virtual void SetInputRegion( const Rect< int >& inputRegion ) = 0;
159
160   /**
161    * @copydoc Dali::Window::SetType()
162    */
163   virtual void SetType( Dali::Window::Type type ) = 0;
164
165   /**
166    * @copydoc Dali::Window::SetNotificationLevel()
167    */
168   virtual bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) = 0;
169
170   /**
171    * @copydoc Dali::Window::GetNotificationLevel()
172    */
173   virtual Dali::Window::NotificationLevel::Type GetNotificationLevel() const = 0;
174
175   /**
176    * @copydoc Dali::Window::SetOpaqueState()
177    */
178   virtual void SetOpaqueState( bool opaque ) = 0;
179
180   /**
181    * @copydoc Dali::Window::SetScreenOffMode()
182    */
183   virtual bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) = 0;
184
185   /**
186    * @copydoc Dali::Window::GetScreenOffMode()
187    */
188   virtual Dali::Window::ScreenOffMode::Type GetScreenOffMode() const = 0;
189
190   /**
191    * @copydoc Dali::Window::SetBrightness()
192    */
193   virtual bool SetBrightness( int brightness ) = 0;
194
195   /**
196    * @copydoc Dali::Window::GetBrightness()
197    */
198   virtual int GetBrightness() const = 0;
199
200 protected:
201
202   // Undefined
203   WindowBase(const WindowBase&) = delete;
204
205   // Undefined
206   WindowBase& operator=(const WindowBase& rhs) = delete;
207
208 };
209
210 } // namespace Adaptor
211
212 } // namespace internal
213
214 } // namespace Dali
215
216 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H