Merge "Change a service name of the indicator and remove a unused indicator style...
[platform/core/uifw/dali-adaptor.git] / adaptors / public-api / adaptor-framework / window.cpp
1 /*
2  * Copyright (c) 2014 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 Orientation Window::GetOrientation()
94 {
95   Internal::Adaptor::OrientationPtr orientation = GetImplementation(*this).GetOrientation();
96   return Orientation(orientation.Get());
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::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrientation>& orientations)
110 {
111   GetImplementation(*this).SetAvailableOrientations( orientations );
112 }
113
114 const std::vector<Dali::Window::WindowOrientation>& Window::GetAvailableOrientations()
115 {
116   return GetImplementation(*this).GetAvailableOrientations();
117 }
118
119 void Window::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
120 {
121   GetImplementation(*this).SetPreferredOrientation( orientation );
122 }
123
124 Dali::Window::WindowOrientation Window::GetPreferredOrientation()
125 {
126   return GetImplementation(*this).GetPreferredOrientation();
127 }
128
129 DragAndDropDetector Window::GetDragAndDropDetector() const
130 {
131   return GetImplementation(*this).GetDragAndDropDetector();
132 }
133
134 Any Window::GetNativeHandle() const
135 {
136   return GetImplementation(*this).GetNativeHandle();
137 }
138
139 Window::Window( Internal::Adaptor::Window* window )
140 : BaseHandle( window )
141 {
142 }
143
144 } // namespace Dali