+ windowImpl = dynamic_cast<Internal::Adaptor::Window*>( adaptor.GetWindow( actor ) );
+ if( windowImpl )
+ {
+ return Dali::Window( windowImpl );
+ }
+ }
+
+ return Dali::Window();
+}
+
+void Window::SetParent( Dali::Window& parent )
+{
+ if ( DALI_UNLIKELY( parent ) )
+ {
+ mParentWindow = parent;
+ Dali::Window self = Dali::Window( this );
+ // check circular parent window setting
+ if ( Dali::DevelWindow::GetParent( parent ) == self )
+ {
+ Dali::DevelWindow::Unparent( parent );
+ }
+ mWindowBase->SetParent( GetImplementation( mParentWindow ).mWindowBase );
+ }
+}
+
+void Window::Unparent()
+{
+ mWindowBase->SetParent( nullptr );
+ mParentWindow.Reset();
+}
+
+Dali::Window Window::GetParent()
+{
+ return mParentWindow;
+}
+
+Dali::Window::WindowOrientation Window::GetCurrentOrientation() const
+{
+ DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), GetCurrentOrientation(): %d\n", this, mNativeWindowId, mRotationAngle );
+ return ConvertToOrientation( mRotationAngle );
+}
+
+void Window::SetAvailableOrientations( const Dali::Vector<Dali::Window::WindowOrientation>& orientations )
+{
+ Dali::Vector<float>::SizeType count = orientations.Count();
+ for( Dali::Vector<float>::SizeType index = 0; index < count; ++index )
+ {
+ if( IsOrientationAvailable( orientations[index] ) == false )
+ {
+ DALI_LOG_ERROR("Window::SetAvailableOrientations, invalid orientation: %d\n", orientations[index]);
+ continue;
+ }
+
+ bool found = false;
+ int convertedAngle = ConvertToAngle( orientations[index] );
+
+ for( std::size_t i = 0; i < mAvailableAngles.size(); i++ )
+ {
+ if( mAvailableAngles[i] == convertedAngle )
+ {
+ found = true;
+ break;
+ }
+ }
+
+ if( !found )
+ {
+ DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), SetAvailableOrientations: %d\n", this, mNativeWindowId, convertedAngle );
+ mAvailableAngles.push_back( convertedAngle );
+ }