X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-impl.cpp;h=fbf04ca1326122f7dde255e67bf8763249be1ae6;hb=4a9e4c30b48b78a9767fe0810fad00ba9169e36d;hp=7759dadd3c65088ba753a822a1bd98f55ba7aed1;hpb=2e3ec621b8263bdadcb89b028a85c6a7d87b6d7e;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 7759dad..fbf04ca 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -86,7 +86,9 @@ Window::Window() mResizedSignal(), mDeleteRequestSignal(), mFocusChangeSignal(), - mResizeSignal() + mResizeSignal(), + mVisibilityChangedSignal(), + mTransitionEffectEventSignal() { } @@ -113,6 +115,7 @@ void Window::Initialize(const PositionSize& positionSize, const std::string& nam mWindowBase->IconifyChangedSignal().Connect( this, &Window::OnIconifyChanged ); mWindowBase->FocusChangedSignal().Connect( this, &Window::OnFocusChanged ); mWindowBase->DeleteRequestSignal().Connect( this, &Window::OnDeleteRequest ); + mWindowBase->TransitionEffectEventSignal().Connect( this, &Window::OnTransitionEffectEvent ); mWindowSurface->OutputTransformedSignal().Connect( this, &Window::OnOutputTransformed ); @@ -291,6 +294,9 @@ void Window::Show() { WindowVisibilityObserver* observer( mAdaptor ); observer->OnWindowShown(); + + Dali::Window handle( this ); + mVisibilityChangedSignal.Emit( handle, true ); } DALI_LOG_RELEASE_INFO( "Window (%p) Show(): iconified = %d\n", this, mIconified ); @@ -306,6 +312,9 @@ void Window::Hide() { WindowVisibilityObserver* observer( mAdaptor ); observer->OnWindowHidden(); + + Dali::Window handle( this ); + mVisibilityChangedSignal.Emit( handle, false ); } DALI_LOG_RELEASE_INFO( "Window (%p) Hide(): iconified = %d\n", this, mIconified ); @@ -454,7 +463,13 @@ void Window::SetSize( Dali::Window::WindowSize size ) { Uint16Pair newSize( newRect.width, newRect.height ); - SurfaceResized(); + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + + SurfaceResized( forceUpdate ); mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize ); @@ -512,7 +527,13 @@ void Window::SetPositionSize( PositionSize positionSize ) { Uint16Pair newSize( newRect.width, newRect.height ); - SurfaceResized(); + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + + SurfaceResized( forceUpdate ); mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize ); @@ -563,6 +584,9 @@ void Window::OnIconifyChanged( bool iconified ) { WindowVisibilityObserver* observer( mAdaptor ); observer->OnWindowHidden(); + + Dali::Window handle( this ); + mVisibilityChangedSignal.Emit( handle, false ); } DALI_LOG_RELEASE_INFO( "Window (%p) Iconified: visible = %d\n", this, mVisible ); @@ -575,6 +599,9 @@ void Window::OnIconifyChanged( bool iconified ) { WindowVisibilityObserver* observer( mAdaptor ); observer->OnWindowShown(); + + Dali::Window handle( this ); + mVisibilityChangedSignal.Emit( handle, true ); } DALI_LOG_RELEASE_INFO( "Window (%p) Deiconified: visible = %d\n", this, mVisible ); @@ -590,8 +617,13 @@ void Window::OnFocusChanged( bool focusIn ) void Window::OnOutputTransformed() { + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } PositionSize positionSize = mSurface->GetPositionSize(); - SurfaceResized(); + SurfaceResized( forceUpdate ); mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) ); mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) ); } @@ -601,6 +633,12 @@ void Window::OnDeleteRequest() mDeleteRequestSignal.Emit(); } +void Window::OnTransitionEffectEvent( DevelWindow::EffectState state, DevelWindow::EffectType type ) +{ + Dali::Window handle( this ); + mTransitionEffectEventSignal.Emit( handle, state, type ); +} + void Window::OnTouchPoint( Dali::Integration::Point& point, int timeStamp ) { FeedTouchPoint( point, timeStamp ); @@ -627,16 +665,22 @@ void Window::OnRotation( const RotationEvent& rotation ) mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight ); - SurfaceResized(); + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + + SurfaceResized( forceUpdate ); - mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) ); + mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) ); // Emit signal Dali::Window handle( this ); - mResizedSignal.Emit( Dali::Window::WindowSize( mRotationAngle, mWindowHeight ) ); - mResizeSignal.Emit( handle, Dali::Window::WindowSize( mRotationAngle, mWindowHeight ) ); + mResizedSignal.Emit( Dali::Window::WindowSize( mWindowWidth, mWindowHeight ) ); + mResizeSignal.Emit( handle, Dali::Window::WindowSize( mWindowWidth, mWindowHeight ) ); - mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) ); + mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) ); } void Window::OnPause() @@ -708,20 +752,20 @@ void Window::SetParent( Dali::Window& parent ) if ( DALI_UNLIKELY( parent ) ) { mParentWindow = parent; - Dali::Window grandParent = Dali::DevelWindow::GetParent( parent ); + Dali::Window self = Dali::Window( this ); // check circular parent window setting - if ( DALI_UNLIKELY( grandParent ) && mWindowBase->IsMatchedWindow( grandParent.GetNativeHandle() ) ) + if ( Dali::DevelWindow::GetParent( parent ) == self ) { Dali::DevelWindow::Unparent( parent ); } - mWindowBase->SetParent( parent.GetNativeHandle() ); + mWindowBase->SetParent( GetImplementation( mParentWindow ).mWindowBase ); } } void Window::Unparent() { - Any parent; - mWindowBase->SetParent( parent ); + mWindowBase->SetParent( nullptr ); + mParentWindow.Reset(); } Dali::Window Window::GetParent()