Merge "(Orientation) Move to devel-api" into tizen
[platform/core/uifw/dali-adaptor.git] / adaptors / public-api / adaptor-framework / window.cpp
1 /*
2  * Copyright (c) 2015 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 <window.h>
20
21 // INTERNAL INCLUDES
22 #include <window-impl.h>
23 #include <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()
35 {
36 }
37
38 Window::~Window()
39 {
40 }
41
42 Window::Window(const Window& handle)
43 : BaseHandle(handle)
44 {
45 }
46
47 Window& Window::operator=(const Window& rhs)
48 {
49   BaseHandle::operator=(rhs);
50   return *this;
51 }
52
53 void Window::ShowIndicator( IndicatorVisibleMode visibleMode )
54 {
55   GetImplementation(*this).ShowIndicator( visibleMode );
56 }
57
58 Window::IndicatorSignalType& Window::IndicatorVisibilityChangedSignal()
59 {
60   return GetImplementation(*this).IndicatorVisibilityChangedSignal();
61 }
62
63 void Window::SetIndicatorBgOpacity( IndicatorBgOpacity opacity )
64 {
65   GetImplementation(*this).SetIndicatorBgOpacity( opacity );
66 }
67
68 void Window::RotateIndicator( WindowOrientation orientation )
69 {
70   GetImplementation(*this).RotateIndicator( orientation );
71 }
72
73 void Window::SetClass( std::string name, std::string klass )
74 {
75   GetImplementation(*this).SetClass( name, klass );
76 }
77
78 void Window::Raise()
79 {
80   GetImplementation(*this).Raise();
81 }
82
83 void Window::Lower()
84 {
85   GetImplementation(*this).Lower();
86 }
87
88 void Window::Activate()
89 {
90   GetImplementation(*this).Activate();
91 }
92
93 void Window::AddAvailableOrientation( WindowOrientation orientation )
94 {
95   GetImplementation(*this).AddAvailableOrientation( orientation );
96 }
97
98 void Window::RemoveAvailableOrientation( WindowOrientation orientation )
99 {
100   GetImplementation(*this).RemoveAvailableOrientation( orientation );
101 }
102
103 void Window::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
104 {
105   GetImplementation(*this).SetPreferredOrientation( orientation );
106 }
107
108 Dali::Window::WindowOrientation Window::GetPreferredOrientation()
109 {
110   return GetImplementation(*this).GetPreferredOrientation();
111 }
112
113 DragAndDropDetector Window::GetDragAndDropDetector() const
114 {
115   return GetImplementation(*this).GetDragAndDropDetector();
116 }
117
118 Any Window::GetNativeHandle() const
119 {
120   return GetImplementation(*this).GetNativeHandle();
121 }
122
123 Window::Window( Internal::Adaptor::Window* window )
124 : BaseHandle( window )
125 {
126 }
127
128 } // namespace Dali