2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <window-impl.h>
23 #include <orientation-impl.h>
28 Window Window::New(PositionSize posSize, const std::string name, bool isTransparent)
30 Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, isTransparent);
31 return Window(window);
42 Window::Window(const Window& handle)
47 Window& Window::operator=(const Window& rhs)
49 BaseHandle::operator=(rhs);
53 Window& Window::operator=(BaseHandle::NullType* rhs)
55 DALI_ASSERT_ALWAYS( (rhs == NULL) && "Can only assign NULL pointer to handle");
60 void Window::SetIndicatorStyle( IndicatorStyle style )
62 GetImplementation(*this).SetIndicatorStyle( style );
65 void Window::ShowIndicator( IndicatorVisibleMode visibleMode )
67 GetImplementation(*this).ShowIndicator( visibleMode );
70 void Window::SetIndicatorBgOpacity( IndicatorBgOpacity opacity )
72 GetImplementation(*this).SetIndicatorBgOpacity( opacity );
75 void Window::RotateIndicator( WindowOrientation orientation )
77 GetImplementation(*this).RotateIndicator( orientation );
80 void Window::SetClass( std::string name, std::string klass )
82 GetImplementation(*this).SetClass( name, klass );
87 GetImplementation(*this).Raise();
92 GetImplementation(*this).Lower();
95 void Window::Activate()
97 GetImplementation(*this).Activate();
100 Orientation Window::GetOrientation()
102 Internal::Adaptor::OrientationPtr orientation = GetImplementation(*this).GetOrientation();
103 return Orientation(orientation.Get());
106 void Window::AddAvailableOrientation( WindowOrientation orientation )
108 GetImplementation(*this).AddAvailableOrientation( orientation );
111 void Window::RemoveAvailableOrientation( WindowOrientation orientation )
113 GetImplementation(*this).RemoveAvailableOrientation( orientation );
116 void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrientation>& orientations)
118 GetImplementation(*this).SetAvailableOrientations( orientations );
121 const std::vector<Dali::Window::WindowOrientation>& Window::GetAvailableOrientations()
123 return GetImplementation(*this).GetAvailableOrientations();
126 void Window::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
128 GetImplementation(*this).SetPreferredOrientation( orientation );
131 Dali::Window::WindowOrientation Window::GetPreferredOrientation()
133 return GetImplementation(*this).GetPreferredOrientation();
136 DragAndDropDetector Window::GetDragAndDropDetector() const
138 return GetImplementation(*this).GetDragAndDropDetector();
141 Window::Window( Internal::Adaptor::Window* window )
142 : BaseHandle( window )