f2a8068401fc5b068aa4828fa63a2058661a58d3
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / window.cpp
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/public-api/adaptor-framework/window.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/window-system/common/window-impl.h>
23 #include <dali/internal/window-system/common/orientation-impl.h>
24
25 namespace Dali
26 {
27
28 Window Window::New(PositionSize posSize, const std::string& name, bool isTransparent)
29 {
30   Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, "", isTransparent);
31   return Window(window);
32 }
33
34 Window Window::New(PositionSize posSize, const std::string& name, const std::string& className, bool isTransparent)
35 {
36   Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent);
37   return Window(window);
38 }
39
40 Window::Window()
41 {
42 }
43
44 Window::~Window()
45 {
46 }
47
48 Window::Window(const Window& handle)
49 : BaseHandle(handle)
50 {
51 }
52
53 Window& Window::operator=(const Window& rhs)
54 {
55   BaseHandle::operator=(rhs);
56   return *this;
57 }
58
59 void Window::ShowIndicator( IndicatorVisibleMode visibleMode )
60 {
61   GetImplementation(*this).ShowIndicator( visibleMode );
62 }
63
64 Window::IndicatorSignalType& Window::IndicatorVisibilityChangedSignal()
65 {
66   return GetImplementation(*this).IndicatorVisibilityChangedSignal();
67 }
68
69 void Window::SetIndicatorBgOpacity( IndicatorBgOpacity opacity )
70 {
71   GetImplementation(*this).SetIndicatorBgOpacity( opacity );
72 }
73
74 void Window::RotateIndicator( WindowOrientation orientation )
75 {
76   GetImplementation(*this).RotateIndicator( orientation );
77 }
78
79 void Window::SetClass( std::string name, std::string klass )
80 {
81   GetImplementation(*this).SetClass( name, klass );
82 }
83
84 void Window::Raise()
85 {
86   GetImplementation(*this).Raise();
87 }
88
89 void Window::Lower()
90 {
91   GetImplementation(*this).Lower();
92 }
93
94 void Window::Activate()
95 {
96   GetImplementation(*this).Activate();
97 }
98
99 void Window::AddAvailableOrientation( WindowOrientation orientation )
100 {
101   GetImplementation(*this).AddAvailableOrientation( orientation );
102 }
103
104 void Window::RemoveAvailableOrientation( WindowOrientation orientation )
105 {
106   GetImplementation(*this).RemoveAvailableOrientation( orientation );
107 }
108
109 void Window::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
110 {
111   GetImplementation(*this).SetPreferredOrientation( orientation );
112 }
113
114 Dali::Window::WindowOrientation Window::GetPreferredOrientation()
115 {
116   return GetImplementation(*this).GetPreferredOrientation();
117 }
118
119 DragAndDropDetector Window::GetDragAndDropDetector() const
120 {
121   return GetImplementation(*this).GetDragAndDropDetector();
122 }
123
124 Any Window::GetNativeHandle() const
125 {
126   return GetImplementation(*this).GetNativeHandle();
127 }
128
129 Window::FocusSignalType& Window::FocusChangedSignal()
130 {
131   return GetImplementation(*this).FocusChangedSignal();
132 }
133
134 void Window::SetAcceptFocus( bool accept )
135 {
136   GetImplementation(*this).SetAcceptFocus( accept );
137 }
138
139 bool Window::IsFocusAcceptable() const
140 {
141   return GetImplementation(*this).IsFocusAcceptable();
142 }
143
144 void Window::Show()
145 {
146   GetImplementation(*this).Show();
147 }
148
149 void Window::Hide()
150 {
151   GetImplementation(*this).Hide();
152 }
153
154 bool Window::IsVisible() const
155 {
156   return GetImplementation(*this).IsVisible();
157 }
158
159 unsigned int Window::GetSupportedAuxiliaryHintCount() const
160 {
161   return GetImplementation(*this).GetSupportedAuxiliaryHintCount();
162 }
163
164 std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
165 {
166   return GetImplementation(*this).GetSupportedAuxiliaryHint( index );
167 }
168
169 unsigned int Window::AddAuxiliaryHint( const std::string& hint, const std::string& value )
170 {
171   return GetImplementation(*this).AddAuxiliaryHint( hint, value );
172 }
173
174 bool Window::RemoveAuxiliaryHint( unsigned int id )
175 {
176   return GetImplementation(*this).RemoveAuxiliaryHint( id );
177 }
178
179 bool Window::SetAuxiliaryHintValue( unsigned int id, const std::string& value )
180 {
181   return GetImplementation(*this).SetAuxiliaryHintValue( id, value );
182 }
183
184 std::string Window::GetAuxiliaryHintValue( unsigned int id ) const
185 {
186   return GetImplementation(*this).GetAuxiliaryHintValue( id );
187 }
188
189 unsigned int Window::GetAuxiliaryHintId( const std::string& hint ) const
190 {
191   return GetImplementation(*this).GetAuxiliaryHintId( hint );
192 }
193
194 void Window::SetInputRegion( const Rect< int >& inputRegion )
195 {
196   return GetImplementation(*this).SetInputRegion( inputRegion );
197 }
198
199 void Window::SetType( Window::Type type )
200 {
201   GetImplementation(*this).SetType( type );
202 }
203
204 Window::Type Window::GetType() const
205 {
206   return GetImplementation(*this).GetType();
207 }
208
209 bool Window::SetNotificationLevel( Window::NotificationLevel::Type level )
210 {
211   return GetImplementation(*this).SetNotificationLevel( level );
212 }
213
214 Window::NotificationLevel::Type Window::GetNotificationLevel() const
215 {
216   return GetImplementation(*this).GetNotificationLevel();
217 }
218
219 void Window::SetOpaqueState( bool opaque )
220 {
221   GetImplementation(*this).SetOpaqueState( opaque );
222 }
223
224 bool Window::IsOpaqueState() const
225 {
226   return GetImplementation(*this).IsOpaqueState();
227 }
228
229 bool Window::SetScreenOffMode(Window::ScreenOffMode::Type screenMode)
230 {
231   return GetImplementation(*this).SetScreenOffMode(screenMode);
232 }
233
234 Window::ScreenOffMode::Type Window::GetScreenOffMode() const
235 {
236   return GetImplementation(*this).GetScreenOffMode();
237 }
238
239 bool Window::SetBrightness( int brightness )
240 {
241   return GetImplementation(*this).SetBrightness( brightness );
242 }
243
244 int Window::GetBrightness() const
245 {
246   return GetImplementation(*this).GetBrightness();
247 }
248
249 Window::ResizedSignalType& Window::ResizedSignal()
250 {
251   return GetImplementation(*this).ResizedSignal();
252 }
253
254 void Window::SetSize( Window::WindowSize size )
255 {
256   GetImplementation(*this).SetSize( size );
257 }
258
259 Window::WindowSize Window::GetSize() const
260 {
261   return GetImplementation(*this).GetSize();
262 }
263
264 void Window::SetPosition( Window::WindowPosition position )
265 {
266   GetImplementation(*this).SetPosition( position );
267 }
268
269 Window::WindowPosition Window::GetPosition() const
270 {
271   return GetImplementation(*this).GetPosition();
272 }
273
274 void Window::SetTransparency( bool transparent )
275 {
276   GetImplementation(*this).SetTransparency( transparent );
277 }
278
279 Window::Window( Internal::Adaptor::Window* window )
280 : BaseHandle( window )
281 {
282 }
283
284 } // namespace Dali