dpiHorizontal = dpiVertical = 96;
};
-int TestRenderSurface::GetOrientation() const
-{
- return 0;
-};
-
void TestRenderSurface::InitializeGraphics()
{
}
virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical );
/**
- * @copydoc Dali::Integration::RenderSurface::GetOrientation
- */
- virtual int GetOrientation() const;
-
- /**
* @copydoc Dali::Integration::RenderSurface::InitializeGraphics
*/
virtual void InitializeGraphics();
virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) = 0;
/**
- * @brief Return the orientation of the surface.
- * @return The orientation
- */
- virtual int GetOrientation() const = 0;
-
- /**
* @brief InitializeGraphics the platform specific graphics surface interfaces
*/
virtual void InitializeGraphics() = 0;
OnSurfaceSet( surface );
}
-void SceneHolder::SurfaceResized( bool forceUpdate )
+void SceneHolder::SurfaceResized()
{
- mScene.SurfaceResized( forceUpdate );
+ mScene.SurfaceResized();
}
Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const
/**
* @brief Called when the surface set is resized.
*/
- void SurfaceResized( bool forceUpdate );
+ void SurfaceResized();
/**
* @brief Get the render surface
virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) = 0;
/**
- * @brief Return the orientation of the surface.
- * @return The orientation
- */
- virtual int GetOrientation() const = 0;
-
- /**
* @brief Get the screen rotation angle of the window
*/
virtual int GetScreenRotationAngle() = 0;
*/
virtual void SetWindowRotationAngle( int degree ) = 0;
- /**
- * @brief Get the rotation angle of the window
- */
- virtual int GetWindowRotationAngle() = 0;
-
/**
* @brief Inform the window rotation is completed
*/
{
Uint16Pair newSize( newRect.width, newRect.height );
- bool forceUpdate = false;
- if( mWindowBase->IsEglWindowRotationSupported() )
- {
- forceUpdate = true;
- }
-
- SurfaceResized( forceUpdate );
+ SurfaceResized();
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
{
Uint16Pair newSize( newRect.width, newRect.height );
- bool forceUpdate = false;
- if( mWindowBase->IsEglWindowRotationSupported() )
- {
- forceUpdate = true;
- }
-
- SurfaceResized( forceUpdate );
+ SurfaceResized();
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
void Window::OnOutputTransformed()
{
- bool forceUpdate = false;
- if( mWindowBase->IsEglWindowRotationSupported() )
- {
- forceUpdate = true;
- }
PositionSize positionSize = mSurface->GetPositionSize();
- SurfaceResized( forceUpdate );
+ SurfaceResized();
mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
}
mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight );
- bool forceUpdate = false;
- if( mWindowBase->IsEglWindowRotationSupported() )
- {
- forceUpdate = true;
- }
-
- SurfaceResized( forceUpdate );
+ SurfaceResized();
mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) );
if( mScreenRotationAngle != 0 )
{
mScreenRotationFinished = false;
- mResizeFinished = false;
}
}
void WindowRenderSurface::RequestRotation( int angle, int width, int height )
{
+ if( !mRotationSupported )
+ {
+ DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::Rotate: Rotation is not supported!\n" );
+ return;
+ }
+
if( !mRotationTrigger )
{
mRotationTrigger = TriggerEventFactory::CreateTriggerEvent( MakeCallback( this, &WindowRenderSurface::ProcessRotationRequest ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER );
dpiVertical = mDpiVertical;
}
-int WindowRenderSurface::GetOrientation() const
-{
- return mWindowBase->GetOrientation();
-}
-
void WindowRenderSurface::InitializeGraphics()
{
if( resizingSurface )
{
- int totalAngle = (mRotationAngle + mScreenRotationAngle) % 360;
-
// Window rotate or screen rotate
if( !mRotationFinished || !mScreenRotationFinished )
{
+ int totalAngle = (mRotationAngle + mScreenRotationAngle) % 360;
+
mWindowBase->SetEglWindowRotation( totalAngle );
mWindowBase->SetEglWindowBufferTransform( totalAngle );
}
// Resize case
- if ( !mResizeFinished )
+ if( !mResizeFinished )
{
- Dali::PositionSize positionSize;
- positionSize.x = mPositionSize.x;
- positionSize.y = mPositionSize.y;
- if( totalAngle == 0 || totalAngle == 180 )
- {
- positionSize.width = mPositionSize.width;
- positionSize.height = mPositionSize.height;
- }
- else
- {
- positionSize.width = mPositionSize.height;
- positionSize.height = mPositionSize.width;
- }
-
- mWindowBase->ResizeEglWindow( positionSize );
+ mWindowBase->ResizeEglWindow( mPositionSize );
mResizeFinished = true;
DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PreRender: Set resize\n" );
{
mScreenRotationAngle = screenRotationAngle;
mScreenRotationFinished = false;
- mResizeFinished = false;
mOutputTransformedSignal.Emit();
virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
/**
- * @brief Return the orientation of the surface.
- * @return The orientation
- */
- virtual int GetOrientation() const override;
-
- /**
* @copydoc Dali::Integration::RenderSurface::InitializeGraphics()
*/
virtual void InitializeGraphics() override;
mBrightness( 0 ),
mBrightnessChangeState( 0 ),
mBrightnessChangeDone( true ),
- mOwnSurface( false ),
- mWindowRotationAngle( 0 ),
- mScreenRotationAngle( 0 ),
- mSupportedPreProtation( 0 )
+ mOwnSurface( false )
#ifdef DALI_ELDBUS_AVAILABLE
, mSystemConnection( NULL )
#endif
wl_egl_window_capability capability = static_cast< wl_egl_window_capability >( wl_egl_window_get_capabilities( mEglWindow ) );
if( capability == WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED )
{
- mSupportedPreProtation = true;
return true;
}
- mSupportedPreProtation = false;
+
return false;
}
dpiVertical = int( yres + 0.5f );
}
-int WindowBaseEcoreWl::GetOrientation() const
-{
- int orientation = (mScreenRotationAngle + mWindowRotationAngle) % 360;
- if( mSupportedPreProtation )
- {
- orientation = 0;
- }
- return orientation;
-}
-
int WindowBaseEcoreWl::GetScreenRotationAngle()
{
int transform = 0;
transform = ecore_wl_output_transform_get( ecore_wl_window_output_find( mEcoreWindow ) );
}
- mScreenRotationAngle = transform * 90;
- return mScreenRotationAngle;
+ return transform * 90;
}
void WindowBaseEcoreWl::SetWindowRotationAngle( int degree )
{
- mWindowRotationAngle = degree;
ecore_wl_window_rotation_set( mEcoreWindow, degree );
}
-int WindowBaseEcoreWl::GetWindowRotationAngle()
-{
- return mWindowRotationAngle;
-}
-
void WindowBaseEcoreWl::WindowRotationCompleted( int degree, int width, int height )
{
ecore_wl_window_rotation_change_done_send( mEcoreWindow );
virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
/**
- * @brief Return the orientation of the surface.
- * @return The orientation
- */
- virtual int GetOrientation() const override;
-
- /**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle()
*/
virtual int GetScreenRotationAngle() override;
virtual void SetWindowRotationAngle( int degree ) override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
- */
- virtual int GetWindowRotationAngle() override;
-
- /**
* @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
*/
virtual void WindowRotationCompleted( int degree, int width, int height ) override;
bool mOwnSurface;
- int mWindowRotationAngle;
- int mScreenRotationAngle;
- int mSupportedPreProtation;
#ifdef DALI_ELDBUS_AVAILABLE
Eldbus_Connection* mSystemConnection;
#endif // DALI_ELDBUS_AVAILABLE
mBrightnessChangeDone( true ),
mOwnSurface( false ),
mMoveResizeSerial( 0 ),
- mLastSubmittedMoveResizeSerial( 0 ),
- mWindowRotationAngle( 0 ),
- mScreenRotationAngle( 0 ),
- mSupportedPreProtation( 0 )
+ mLastSubmittedMoveResizeSerial( 0 )
#ifdef DALI_ELDBUS_AVAILABLE
, mSystemConnection( NULL )
#endif
mTouchEventSignal.Emit( point, touchEvent->timestamp );
- DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseButtonCancel\n" );
+ DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseButtonCancel\n" );
}
}
if( mouseWheelEvent->window == static_cast< unsigned int >( ecore_wl2_window_id_get( mEcoreWindow ) ) )
{
- DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z );
+ DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z );
WheelEvent wheelEvent( WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( mouseWheelEvent->x, mouseWheelEvent->y ), mouseWheelEvent->z, mouseWheelEvent->timestamp );
{
Ecore_Event_Detent_Rotate* detentEvent = static_cast< Ecore_Event_Detent_Rotate* >( event );
- DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl2::OnDetentRotation\n" );
+ DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnDetentRotation\n" );
int direction = ( detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE ) ? 1 : -1;
int timeStamp = detentEvent->timestamp;
if( keyEvent->window == static_cast< unsigned int >( ecore_wl2_window_id_get( mEcoreWindow ) ) )
{
- DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnKeyDown\n" );
+ DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyDown\n" );
std::string keyName( keyEvent->keyname );
std::string logicalKey( "" );
if( keyEvent->window == static_cast< unsigned int >( ecore_wl2_window_id_get( mEcoreWindow ) ) )
{
- DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnKeyUp\n" );
+ DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n" );
std::string keyName( keyEvent->keyname );
std::string logicalKey( "" );
wl_egl_window_tizen_capability capability = static_cast< wl_egl_window_tizen_capability >( wl_egl_window_tizen_get_capabilities( mEglWindow ) );
if( capability == WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_SUPPORTED )
{
- mSupportedPreProtation = true;
return true;
}
- mSupportedPreProtation = false;
+
return false;
}
dpiVertical = int( yres + 0.5f );
}
-int WindowBaseEcoreWl2::GetOrientation() const
-{
- int orientation = (mScreenRotationAngle + mWindowRotationAngle) % 360;
- if( mSupportedPreProtation )
- {
- orientation = 0;
- }
- return orientation;
-}
-
int WindowBaseEcoreWl2::GetScreenRotationAngle()
{
int transform = 0;
{
transform = ecore_wl2_output_transform_get( ecore_wl2_window_output_find( mEcoreWindow ) );
}
- mScreenRotationAngle = transform * 90;
- return mScreenRotationAngle;
+
+ return transform * 90;
}
void WindowBaseEcoreWl2::SetWindowRotationAngle( int degree )
{
- mWindowRotationAngle = degree;
ecore_wl2_window_rotation_set( mEcoreWindow, degree );
}
-int WindowBaseEcoreWl2::GetWindowRotationAngle()
-{
- return mWindowRotationAngle;
-}
-
void WindowBaseEcoreWl2::WindowRotationCompleted( int degree, int width, int height )
{
ecore_wl2_window_rotation_change_done_send( mEcoreWindow, degree, width, height );
virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
/**
- * @brief Return the orientation of the surface.
- * @return The orientation
- */
- virtual int GetOrientation() const override;
-
- /**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle()
*/
virtual int GetScreenRotationAngle() override;
virtual void SetWindowRotationAngle( int degree ) override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
- */
- virtual int GetWindowRotationAngle() override;
-
- /**
* @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
*/
virtual void WindowRotationCompleted( int degree, int width, int height ) override;
volatile uint32_t mMoveResizeSerial;
uint32_t mLastSubmittedMoveResizeSerial;
- int mWindowRotationAngle;
- int mScreenRotationAngle;
- int mSupportedPreProtation;
#ifdef DALI_ELDBUS_AVAILABLE
Eldbus_Connection* mSystemConnection;
#endif // DALI_ELDBUS_AVAILABLE
dpiVertical = int( yres + 0.5f );
}
-int NativeRenderSurfaceEcoreWl::GetOrientation() const
-{
- return 0;
-}
-
void NativeRenderSurfaceEcoreWl::InitializeGraphics()
{
DALI_LOG_TRACE_METHOD( gNativeSurfaceLogFilter );
virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
/**
- * @brief Return the orientation of the surface.
- * @return The orientation
- */
- virtual int GetOrientation() const override;
-
- /**
* @copydoc Dali::Integration::RenderSurface::InitializeGraphics()
*/
virtual void InitializeGraphics() override;
dpiVertical = int( yres + 0.5f );
}
-int PixmapRenderSurfaceEcoreX::GetOrientation() const
-{
- return 0;
-}
-
void PixmapRenderSurfaceEcoreX::InitializeGraphics()
{
mGraphics = &mAdaptor->GetGraphicsInterface();
virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
/**
- * @brief Return the orientation of the surface.
- * @return The orientation
- */
- virtual int GetOrientation() const override;
-
- /**
* @copydoc Dali::Integration::RenderSurface::InitializeGraphics()
*/
virtual void InitializeGraphics() override;
dpiVertical = ecore_x_dpi_get();
}
-int WindowBaseEcoreX::GetOrientation() const
-{
- return 0;
-}
-
int WindowBaseEcoreX::GetScreenRotationAngle()
{
return 0;
{
}
-int WindowBaseEcoreX::GetWindowRotationAngle()
-{
- return 0;
-}
-
void WindowBaseEcoreX::WindowRotationCompleted( int degree, int width, int height )
{
}
virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
/**
- * @brief Return the orientation of the surface.
- * @return The orientation
- */
- virtual int GetOrientation() const override;
-
- /**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle()
*/
virtual int GetScreenRotationAngle() override;
virtual void SetWindowRotationAngle( int degree ) override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
- */
- virtual int GetWindowRotationAngle() override;
-
- /**
* @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
*/
virtual void WindowRotationCompleted( int degree, int width, int height ) override;
{
}
-int WindowBaseWin::GetWindowRotationAngle()
-{
-}
-
void WindowBaseWin::WindowRotationCompleted( int degree, int width, int height )
{
}
{
}
-int WindowBaseWin::GetOrientation() const
-{
-}
-
unsigned int WindowBaseWin::GetSurfaceId( Any surface ) const
{
unsigned int surfaceId = 0;
virtual void SetWindowRotationAngle( int degree ) override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
- */
- virtual void GetWindowRotationAngle() override;
-
- /**
* @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
*/
virtual void WindowRotationCompleted( int degree, int width, int height ) override;
virtual void SetTransparency( bool transparent ) override;
/**
- * @brief Return the orientation of the surface.
- * @return The orientation
- */
- virtual int GetOrientation() const override;
-
- /**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetParent()
*/
virtual void SetParent( WindowBase* parentWinBase ) override;