mOpaqueState( false ),
mResizeEnabled( false ),
mType( Dali::Window::NORMAL ),
+ mParentWindow( NULL ),
mPreferredOrientation( Dali::Window::PORTRAIT ),
mRotationAngle( 0 ),
mWindowWidth( 0 ),
mWindowHeight( 0 ),
mFocusChangedSignal(),
mResizedSignal(),
- mDeleteRequestSignal()
+ mDeleteRequestSignal(),
+ mFocusChangeSignal(),
+ mResizeSignal(),
+ mTransitionEffectEventSignal()
{
}
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 );
void Window::Raise()
{
mWindowBase->Raise();
+ DALI_LOG_RELEASE_INFO( "Window (%p) Raise() \n", this );
}
void Window::Lower()
{
mWindowBase->Lower();
+ DALI_LOG_RELEASE_INFO( "Window (%p) Lower() \n", this );
}
void Window::Activate()
{
mWindowBase->Activate();
+ DALI_LOG_RELEASE_INFO( "Window (%p) Activate() \n", this );
}
uint32_t Window::GetLayerCount() const
{
Uint16Pair newSize( newRect.width, newRect.height );
+ bool forceUpdate = false;
+ if( mWindowBase->IsEglWindowRotationSupported() )
+ {
+ forceUpdate = true;
+ }
+
+ SurfaceResized( forceUpdate );
+
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
+ Dali::Window handle( this );
mResizedSignal.Emit( newSize );
+ mResizeSignal.Emit( handle, newSize );
mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
}
{
Uint16Pair newSize( newRect.width, newRect.height );
+ bool forceUpdate = false;
+ if( mWindowBase->IsEglWindowRotationSupported() )
+ {
+ forceUpdate = true;
+ }
+
+ SurfaceResized( forceUpdate );
+
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
+ Dali::Window handle( this );
mResizedSignal.Emit( newSize );
-
+ mResizeSignal.Emit( handle, newSize );
mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
}
}
void Window::OnFocusChanged( bool focusIn )
{
+ Dali::Window handle( this );
mFocusChangedSignal.Emit( focusIn );
+ mFocusChangeSignal.Emit( handle, focusIn );
}
void Window::OnOutputTransformed()
{
+ bool forceUpdate = false;
+ if( mWindowBase->IsEglWindowRotationSupported() )
+ {
+ forceUpdate = true;
+ }
PositionSize positionSize = mSurface->GetPositionSize();
+ SurfaceResized( forceUpdate );
mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
}
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 );
mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight );
- mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) );
+ bool forceUpdate = false;
+ if( mWindowBase->IsEglWindowRotationSupported() )
+ {
+ forceUpdate = true;
+ }
+
+ SurfaceResized( forceUpdate );
+
+ mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) );
// Emit signal
- mResizedSignal.Emit( Dali::Window::WindowSize( mRotationAngle, mWindowHeight ) );
+ Dali::Window handle( this );
+ 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()
return Dali::Window( windowImpl );
}
+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;
+}
+
} // Adaptor
} // Internal