Revert "[Tizen] Add screen and client rotation itself function"
authorhuiyu.eun <huiyu.eun@samsung.com>
Wed, 25 Sep 2019 05:23:36 +0000 (14:23 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Wed, 25 Sep 2019 05:23:36 +0000 (14:23 +0900)
This reverts commit fde0e4db4cbd45f71aaa2098552fc6a30bd36a04.

23 files changed:
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.h
dali/integration-api/render-surface-interface.h
dali/integration-api/scene-holder-impl.cpp
dali/integration-api/scene-holder-impl.h
dali/internal/window-system/common/window-base.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-render-surface.cpp
dali/internal/window-system/common/window-render-surface.h
dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h
dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h
dali/internal/window-system/windows/platform-implement-win.cpp
dali/internal/window-system/windows/platform-implement-win.h
dali/internal/window-system/windows/window-base-win.cpp
dali/internal/window-system/windows/window-base-win.h

index 066b37e9ac2e4178788cb74964aaef73e6fe2098..332d77eb71a4311cc316f682b76f34991f99d338 100644 (file)
@@ -40,11 +40,6 @@ void TestRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVe
   dpiHorizontal = dpiVertical = 96;
 };
 
-int TestRenderSurface::GetOrientation() const
-{
-  return 0;
-};
-
 void TestRenderSurface::InitializeGraphics()
 {
 }
index be38d000a23536dc23aa006bd05046fe2faa3d9a..fba89c25cb2de7f8edb01205e97d3061082adde0 100644 (file)
@@ -52,11 +52,6 @@ public:
    */
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical );
 
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetOrientation
-   */
-  virtual int GetOrientation() const;
-
   /**
    * @copydoc Dali::Integration::RenderSurface::InitializeGraphics
    */
index 3fc746ce65aa6af376e2c589c68d23d939dccf5f..501bf622427dffe4cf0145d9539db6e4f7662c03 100644 (file)
@@ -88,12 +88,6 @@ public:
    */
   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
    */
index 7727a230185b8beeea26ed0facc85fecaef61025..a5eca047e67e10bc2eb9f3dc3b23d2a265154973 100644 (file)
@@ -201,9 +201,9 @@ void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface)
   OnSurfaceSet( surface );
 }
 
-void SceneHolder::SurfaceResized( bool forceUpdate )
+void SceneHolder::SurfaceResized()
 {
-  mScene.SurfaceResized( forceUpdate );
+  mScene.SurfaceResized();
 }
 
 Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const
index 2e44aa21f3bee1ae8dee0b18e2c7c28a60f03162..29ebf02de0eb7222b4514b1dedf6319c0ec00e28 100644 (file)
@@ -118,7 +118,7 @@ public:
   /**
    * @brief Called when the surface set is resized.
    */
-  void SurfaceResized( bool forceUpdate );
+  void SurfaceResized();
 
   /**
    * @brief Get the render surface
index a9e340f3ea5111452414a823e06b157ad040229b..5f29f56ce307dabfae73ce0603aa4147c257983f 100644 (file)
@@ -308,12 +308,6 @@ public:
    */
   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
    */
@@ -324,11 +318,6 @@ public:
    */
   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
    */
index a5f7d0fd64ca3cbd07dd9a234303d07c04d9d348..7759dadd3c65088ba753a822a1bd98f55ba7aed1 100644 (file)
@@ -454,13 +454,7 @@ void Window::SetSize( Dali::Window::WindowSize size )
   {
     Uint16Pair newSize( newRect.width, newRect.height );
 
-    bool forceUpdate = false;
-    if( mWindowBase->IsEglWindowRotationSupported() )
-    {
-      forceUpdate = true;
-    }
-
-    SurfaceResized( forceUpdate );
+    SurfaceResized();
 
     mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
 
@@ -518,13 +512,7 @@ void Window::SetPositionSize( PositionSize positionSize )
   {
     Uint16Pair newSize( newRect.width, newRect.height );
 
-    bool forceUpdate = false;
-    if( mWindowBase->IsEglWindowRotationSupported() )
-    {
-      forceUpdate = true;
-    }
-
-    SurfaceResized( forceUpdate );
+    SurfaceResized();
 
     mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
 
@@ -602,13 +590,8 @@ void Window::OnFocusChanged( bool focusIn )
 
 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 ) );
 }
@@ -644,13 +627,7 @@ void Window::OnRotation( const RotationEvent& rotation )
 
   mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight );
 
-  bool forceUpdate = false;
-  if( mWindowBase->IsEglWindowRotationSupported() )
-  {
-    forceUpdate = true;
-  }
-
-  SurfaceResized( forceUpdate );
+  SurfaceResized();
 
   mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) );
 
index e4bb8901e0d6ac440ca5c50987897e12537868a3..8bb94c526fe6c180c05035b228eda9346d0898e1 100644 (file)
@@ -117,7 +117,6 @@ void WindowRenderSurface::Initialize( Any surface )
   if( mScreenRotationAngle != 0 )
   {
     mScreenRotationFinished = false;
-    mResizeFinished = false;
   }
 }
 
@@ -148,6 +147,12 @@ void WindowRenderSurface::SetTransparency( bool transparent )
 
 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 )
   {
     TriggerEventFactoryInterface& triggerFactory = Internal::Adaptor::Adaptor::GetImplementation( Adaptor::Get() ).GetTriggerEventFactoryInterface();
@@ -200,11 +205,6 @@ void WindowRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpi
   dpiVertical = mDpiVertical;
 }
 
-int WindowRenderSurface::GetOrientation() const
-{
-  return mWindowBase->GetOrientation();
-}
-
 void WindowRenderSurface::InitializeGraphics()
 {
 
@@ -357,11 +357,11 @@ bool WindowRenderSurface::PreRender( bool resizingSurface )
 
   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 );
 
@@ -378,23 +378,9 @@ bool WindowRenderSurface::PreRender( bool resizingSurface )
     }
 
     // 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" );
@@ -501,7 +487,6 @@ void WindowRenderSurface::OutputTransformed()
   {
     mScreenRotationAngle = screenRotationAngle;
     mScreenRotationFinished = false;
-    mResizeFinished = false;
 
     mOutputTransformedSignal.Emit();
 
index 2401a39239e44a004d8f0711c6d7a110bff84afe..87493424b21d684e1e5b839aab89c6a01f1ee0a7 100644 (file)
@@ -129,12 +129,6 @@ public: // from Dali::Integration::RenderSurface
    */
   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()
    */
index 0eecbcc8d25f5fae755110083205de66f3431c81..5b67e2698e7c761c7a52bae5541a5529d36a5b0c 100644 (file)
@@ -584,10 +584,7 @@ WindowBaseEcoreWl::WindowBaseEcoreWl( Dali::PositionSize positionSize, Any surfa
   mBrightness( 0 ),
   mBrightnessChangeState( 0 ),
   mBrightnessChangeDone( true ),
-  mOwnSurface( false ),
-  mWindowRotationAngle( 0 ),
-  mScreenRotationAngle( 0 ),
-  mSupportedPreProtation( 0 )
+  mOwnSurface( false )
 #ifdef DALI_ELDBUS_AVAILABLE
   , mSystemConnection( NULL )
 #endif
@@ -1319,10 +1316,9 @@ bool WindowBaseEcoreWl::IsEglWindowRotationSupported()
   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;
 }
 
@@ -2063,16 +2059,6 @@ void WindowBaseEcoreWl::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVe
   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;
@@ -2086,21 +2072,14 @@ int WindowBaseEcoreWl::GetScreenRotationAngle()
     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 );
index 6965904f503744e739fab4c1e0d44e6d1395a21a..922e27809d8b1e3381ba21300af4ae837388d84c 100644 (file)
@@ -394,12 +394,6 @@ public:
    */
   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()
    */
@@ -410,11 +404,6 @@ public:
    */
   virtual void SetWindowRotationAngle( int degree ) override;
 
-  /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
-   */
-  virtual int GetWindowRotationAngle() override;
-
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
    */
@@ -491,9 +480,6 @@ private:
 
   bool                                 mOwnSurface;
 
-  int                                  mWindowRotationAngle;
-  int                                  mScreenRotationAngle;
-  int                                  mSupportedPreProtation;
 #ifdef DALI_ELDBUS_AVAILABLE
   Eldbus_Connection*                   mSystemConnection;
 #endif // DALI_ELDBUS_AVAILABLE
index 1c6a63b3997c8d3300ca2de0dfbd7ce4d09a0582..2f5cf3427133ca991690a8633e3354cbd6f1eea0 100755 (executable)
@@ -601,10 +601,7 @@ WindowBaseEcoreWl2::WindowBaseEcoreWl2( Dali::PositionSize positionSize, Any sur
   mBrightnessChangeDone( true ),
   mOwnSurface( false ),
   mMoveResizeSerial( 0 ),
-  mLastSubmittedMoveResizeSerial( 0 ),
-  mWindowRotationAngle( 0 ),
-  mScreenRotationAngle( 0 ),
-  mSupportedPreProtation( 0 )
+  mLastSubmittedMoveResizeSerial( 0 )
 #ifdef DALI_ELDBUS_AVAILABLE
   , mSystemConnection( NULL )
 #endif
@@ -833,7 +830,7 @@ void WindowBaseEcoreWl2::OnRotation( void* data, int type, void* event )
 
   if( ev->win == static_cast< unsigned int >( ecore_wl2_window_id_get( mEcoreWindow ) ) )
   {
-    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl2::OnRotation\n" );
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnRotation\n" );
 
     RotationEvent rotationEvent;
     rotationEvent.angle = ev->angle;
@@ -972,7 +969,7 @@ void WindowBaseEcoreWl2::OnMouseButtonCancel( void* data, int type, void* event
 
     mTouchEventSignal.Emit( point, touchEvent->timestamp );
 
-    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseButtonCancel\n" );
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseButtonCancel\n" );
   }
 }
 
@@ -982,7 +979,7 @@ void WindowBaseEcoreWl2::OnMouseWheel( void* data, int type, void* event )
 
   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 );
 
@@ -994,7 +991,7 @@ void WindowBaseEcoreWl2::OnDetentRotation( void* data, int type, void* event )
 {
   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;
@@ -1010,7 +1007,7 @@ void WindowBaseEcoreWl2::OnKeyDown( void* data, int type, void* event )
 
   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( "" );
@@ -1064,7 +1061,7 @@ void WindowBaseEcoreWl2::OnKeyUp( void* data, int type, void* event )
 
   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( "" );
@@ -1364,10 +1361,9 @@ bool WindowBaseEcoreWl2::IsEglWindowRotationSupported()
   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;
 }
 
@@ -2109,16 +2105,6 @@ void WindowBaseEcoreWl2::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiV
   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;
@@ -2131,21 +2117,15 @@ int WindowBaseEcoreWl2::GetScreenRotationAngle()
   {
     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 );
index 3d2186f5cc8d2b8d032576383749551f4c065dd9..2b45ae038059079b71e39bbe2877b778f804bbdb 100644 (file)
@@ -399,12 +399,6 @@ public:
    */
   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()
    */
@@ -415,11 +409,6 @@ public:
    */
   virtual void SetWindowRotationAngle( int degree ) override;
 
-  /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
-   */
-  virtual int GetWindowRotationAngle() override;
-
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
    */
@@ -499,9 +488,6 @@ private:
   volatile uint32_t                    mMoveResizeSerial;
   uint32_t                             mLastSubmittedMoveResizeSerial;
 
-  int                                  mWindowRotationAngle;
-  int                                  mScreenRotationAngle;
-  int                                  mSupportedPreProtation;
 #ifdef DALI_ELDBUS_AVAILABLE
   Eldbus_Connection*                   mSystemConnection;
 #endif // DALI_ELDBUS_AVAILABLE
index e69e8f151d23668c246895450ce7455bb8283c27..54004b1f64d8e7a3b78851c6486915b684c4a8aa 100644 (file)
@@ -142,11 +142,6 @@ void NativeRenderSurfaceEcoreWl::GetDpi( unsigned int& dpiHorizontal, unsigned i
   dpiVertical   = int( yres + 0.5f );
 }
 
-int NativeRenderSurfaceEcoreWl::GetOrientation() const
-{
-  return 0;
-}
-
 void NativeRenderSurfaceEcoreWl::InitializeGraphics()
 {
   DALI_LOG_TRACE_METHOD( gNativeSurfaceLogFilter );
index 00e71333909595fb4b9d94f540f993c4d0a93c96..1a1affcf40f745fb9c5f7c185763b7cfc2f9fedf 100644 (file)
@@ -83,12 +83,6 @@ public: // from Dali::Integration::RenderSurface
    */
   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()
    */
index 41a44daaff2afaa88f30924483102ec8c3fb4301..514b049f78ec2ba0070f13310c3c18dca3fb2df1 100644 (file)
@@ -150,11 +150,6 @@ void PixmapRenderSurfaceEcoreX::GetDpi( unsigned int& dpiHorizontal, unsigned in
   dpiVertical   = int( yres + 0.5f );
 }
 
-int PixmapRenderSurfaceEcoreX::GetOrientation() const
-{
-  return 0;
-}
-
 void PixmapRenderSurfaceEcoreX::InitializeGraphics()
 {
   mGraphics = &mAdaptor->GetGraphicsInterface();
index c9d8da7dd4f7ef4e381703d14e5c33ac450078b6..1e51708d0a99c2a0d2d180f1483ad1b11813994c 100644 (file)
@@ -82,12 +82,6 @@ public: // from Dali::Integration::RenderSurface
    */
   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()
    */
index a000b74b02612f38f7fb28802e04a81d8c669be8..0c36b1d88ef6d11f7c0d816d7724fad0dd33f22a 100755 (executable)
@@ -829,11 +829,6 @@ void WindowBaseEcoreX::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVer
   dpiVertical   = ecore_x_dpi_get();
 }
 
-int WindowBaseEcoreX::GetOrientation() const
-{
-  return 0;
-}
-
 int WindowBaseEcoreX::GetScreenRotationAngle()
 {
   return 0;
@@ -843,11 +838,6 @@ void WindowBaseEcoreX::SetWindowRotationAngle( int degree )
 {
 }
 
-int WindowBaseEcoreX::GetWindowRotationAngle()
-{
-  return 0;
-}
-
 void WindowBaseEcoreX::WindowRotationCompleted( int degree, int width, int height )
 {
 }
index f6618e787d80bccd79b4ea56652aa4d252cdd44a..6c99f462a0b4ab93ccd3d6e4204a6074870d9e28 100644 (file)
@@ -328,12 +328,6 @@ public:
    */
   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()
    */
@@ -344,11 +338,6 @@ public:
    */
   virtual void SetWindowRotationAngle( int degree ) override;
 
-  /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
-   */
-  virtual int GetWindowRotationAngle() override;
-
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
    */
index e6075f35302c35d97a15885d9bc0150604de921b..1d79ce85cfd8fc6879588c72fc8b145cd2bc98cf 100755 (executable)
@@ -1,33 +1,33 @@
-/*
-* Copyright (c) 2018 Samsung Electronics Co., Ltd.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
-
-// CLASS HEADER
-#include <dali/internal/window-system/windows/platform-implement-win.h>
-
-// EXTERNAL INCLUDES
-#include <windows.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/window-system/windows/event-system-win.h>
-
-static constexpr float INCH = 25.4;
-
-using namespace std;
-
+/*\r
+* Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+*\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/\r
+\r
+// CLASS HEADER\r
+#include <dali/internal/window-system/windows/platform-implement-win.h>\r
+\r
+// EXTERNAL INCLUDES\r
+#include <windows.h>\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/internal/window-system/windows/event-system-win.h>\r
+\r
+static constexpr float INCH = 25.4;\r
+\r
+using namespace std;\r
+\r
 namespace Dali
 {
 
@@ -36,355 +36,350 @@ namespace Internal
 
 namespace Adaptor
 {
-
-namespace WindowsPlatformImplementation
-{
-
-void RunLoop()
-{
-  MSG nMsg = { 0 };
-
-  while( GetMessage( &nMsg, 0, NULL, NULL ) )
-  {
-    if( WIN_CALLBACK_EVENT == nMsg.message )
-    {
-      Dali::CallbackBase *callback = ( Dali::CallbackBase* )nMsg.wParam;
-      Dali::CallbackBase::Execute( *callback );
-    }
-
-    TranslateMessage( &nMsg );
-    DispatchMessage( &nMsg );
-
-    if( WM_CLOSE == nMsg.message )
-    {
-      break;
-    }
-  }
-}
-
-void GetDPI( uint64_t hWnd, float &xDpi, float &yDpi )
-{
-  HDC hdcScreen = GetDC( reinterpret_cast<HWND>( hWnd ) );
-
-  int32_t iX = GetDeviceCaps( hdcScreen, HORZRES );    // pixel
-  int32_t iY = GetDeviceCaps( hdcScreen, VERTRES );    // pixel
-  int32_t iPhsX = GetDeviceCaps( hdcScreen, HORZSIZE );    // mm
-  int32_t iPhsY = GetDeviceCaps( hdcScreen, VERTSIZE );    // mm
-
-  xDpi = static_cast<float>( iX ) / static_cast<float>( iPhsX ) * INCH;
-  yDpi = static_cast<float>( iY ) / static_cast<float>( iPhsY ) * INCH;
-}
-
-int GetOrientation()
-{
-  return 0;
-}
-
-CallbackBase *listener = NULL;
-
-LRESULT CALLBACK WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
-  if( NULL != listener )
-  {
-    TWinEventInfo eventInfo( reinterpret_cast<uint64_t>( hWnd ), uMsg, wParam, lParam);
-    CallbackBase::Execute( *listener, &eventInfo );
-  }
-
-  LRESULT ret = DefWindowProc( hWnd, uMsg, wParam, lParam );
-  return ret;
-}
-
-DWORD windowStyle = WS_OVERLAPPED;
-
-int32_t GetEdgeWidth()
-{
-  switch( windowStyle )
-  {
-    case WS_OVERLAPPED:
-    {
-      return 8;
-    }
-    default:
-    {
-      return 0;
-    }
-  }
-}
-
-int32_t GetEdgeHeight()
-{
-  switch( windowStyle )
-  {
-    case WS_OVERLAPPED:
-    {
-      return 18;
-    }
-    default:
-    {
-      return 0;
-    }
-  }
-}
-
-class WindowsDisplayInfo
-{
-public:
-  static int GetColorDepth()
-  {
-    DALI_ASSERT_DEBUG(colorDepth >= 0 && "HWND hasn't been created, no color depth");
-    return colorDepth;
-  }
-
-  static void SetHWND( HWND inHWnd )
-  {
-    if( hWnd != inHWnd )
-    {
-      hWnd = inHWnd;
-      hdc = GetDC( hWnd );
-      colorDepth = GetDeviceCaps( WindowsDisplayInfo::hdc, BITSPIXEL ) * GetDeviceCaps( WindowsDisplayInfo::hdc, PLANES );
-    }
-  }
-
-private:
-  static int colorDepth;
-  static HWND hWnd;
-  static HDC hdc;
-};
-
-int WindowsDisplayInfo::colorDepth = -1;
-HWND WindowsDisplayInfo::hWnd = NULL;
-HDC WindowsDisplayInfo::hdc = NULL;
-
-int GetColorDepth()
-{
-  return WindowsDisplayInfo::GetColorDepth();
-}
-
-uint64_t CreateHwnd(
-    _In_opt_ const char *lpClassName,
-    _In_opt_ const char *lpWindowName,
-    _In_ int X,
-    _In_ int Y,
-    _In_ int nWidth,
-    _In_ int nHeight,
-    _In_opt_ uint64_t parent)
-{
-  WNDCLASS cs = { 0 };
-  cs.cbClsExtra = 0;
-  cs.cbWndExtra = 0;
-  cs.hbrBackground = (HBRUSH)( COLOR_WINDOW + 2 );
-  cs.hCursor = NULL;
-  cs.hIcon = NULL;
-  cs.hInstance = GetModuleHandle( NULL );
-  cs.lpfnWndProc = (WNDPROC)WinProc;
-  cs.lpszClassName = lpClassName;
-  cs.lpszMenuName = NULL;
-  cs.style = CS_VREDRAW | CS_HREDRAW;
-  RegisterClass( &cs );
-
-  HWND hWnd = CreateWindow( lpClassName, lpWindowName, windowStyle, X, Y, nWidth + 2 * GetEdgeWidth(), nHeight + 2 * GetEdgeHeight(), NULL, NULL, cs.hInstance, NULL );
-  ShowWindow( hWnd, SW_SHOW );
-
-  WindowsDisplayInfo::SetHWND( hWnd );
-
-  return reinterpret_cast<uint64_t>( hWnd );
-}
-
-void SetListener( CallbackBase *callback )
-{
-  listener = callback;
-}
-
-bool PostWinMessage(
-    _In_ uint32_t Msg,
-    _In_ uint32_t wParam,
-    _In_ uint64_t lParam,
-    _In_ uint64_t hWnd)
-{
-  return (bool)PostMessage( reinterpret_cast<HWND>( hWnd ), Msg, wParam, lParam );
-}
-
-bool PostWinThreadMessage(
-    _In_ uint32_t Msg,
-    _In_ uint32_t wParam,
-    _In_ uint64_t lParam,
-    _In_ uint64_t threadID/* = -1*/ )
-{
-  if( -1 == threadID )
-  {
-    threadID = GetCurrentThreadId();
-  }
-
-  return (bool)PostThreadMessage( threadID, Msg, wParam, lParam );
-}
-
-void ShowWindow( uint64_t hWnd)
-{
-  ::ShowWindow( reinterpret_cast<HWND>( hWnd ), SW_SHOW);
-}
-
-void HideWindow( uint64_t hWnd)
-{
-  ::ShowWindow( reinterpret_cast<HWND>( hWnd ), SW_HIDE);
-}
-
-struct TTimerCallbackInfo
-{
-  void *data;
-  timerCallback callback;
-  HWND hWnd;
-};
-
-void CALLBACK TimerProc(HWND hWnd, UINT nMsg, UINT_PTR nTimerid, DWORD dwTime)
-{
-  TTimerCallbackInfo *info = (TTimerCallbackInfo*)nTimerid;
-  info->callback( info->data );
-}
-
-int SetTimer(int interval, timerCallback callback, void *data)
-{
-  TTimerCallbackInfo *callbackInfo = new TTimerCallbackInfo;
-  callbackInfo->data = data;
-  callbackInfo->callback = callback;
-  callbackInfo->hWnd = ::GetActiveWindow();
-
-  UINT_PTR timerID = (UINT_PTR)callbackInfo;
-  ::SetTimer( callbackInfo->hWnd, timerID, interval, TimerProc );
-
-  return timerID;
-}
-
-void KillTimer(int id)
-{
-  TTimerCallbackInfo *info = (TTimerCallbackInfo*)id;
-  ::KillTimer( info->hWnd, id );
-  delete info;
-}
-
-const char* GetKeyName( int keyCode )
-{
-  switch( keyCode )
-  {
-    case VK_BACK:
-    {
-      return "Backspace";
-    }
-    case VK_TAB:
-    {
-      return "Tab";
-    }
-    case VK_RETURN:
-    {
-      return "Return";
-    }
-    case VK_ESCAPE:
-    {
-      return "Escape";
-    }
-    case VK_SPACE:
-    {
-      return "Space";
-    }
-    case VK_LEFT:
-    {
-      return "Left";
-    }
-    case VK_UP:
-    {
-      return "Up";
-    }
-    case VK_RIGHT:
-    {
-      return "Right";
-    }
-    case VK_DOWN:
-    {
-      return "Down";
-    }
-    case 48:
-    {
-      return "0";
-    }
-    case 49:
-    {
-      return "1";
-    }
-    case 50:
-    {
-      return "2";
-    }
-    case 51:
-    {
-      return "3";
-    }
-    case 52:
-    {
-      return "4";
-    }
-    case 53:
-    {
-      return "5";
-    }
-    case 54:
-    {
-      return "6";
-    }
-    case 55:
-    {
-      return "7";
-    }
-    case 56:
-    {
-      return "8";
-    }
-    case 57:
-    {
-      return "9";
-    }
-    default:
-    {
-      break;
-    }
-  }
-
-  return "";
-}
-
-static LARGE_INTEGER cpuFrequency;
-static LARGE_INTEGER *pCpuFrequency = NULL;
-
-uint64_t GetCurrentThreadId()
-{
-  return ::GetCurrentThreadId();
-}
-
-void GetNanoseconds( uint64_t& timeInNanoseconds )
-{
-  if( NULL == pCpuFrequency )
-  {
-    pCpuFrequency = &cpuFrequency;
-    QueryPerformanceFrequency( pCpuFrequency );
-  }
-
-  LARGE_INTEGER curTime;
-  QueryPerformanceCounter( &curTime );
-
-  timeInNanoseconds = static_cast<double>(curTime.QuadPart) / static_cast<double>(pCpuFrequency->QuadPart) * 1000000000;
-}
-
-unsigned int GetCurrentMilliSeconds( void )
-{
-  if( NULL == pCpuFrequency )
-  {
-    pCpuFrequency = &cpuFrequency;
-    QueryPerformanceFrequency( pCpuFrequency );
-  }
-
-  LARGE_INTEGER curTime;
-  QueryPerformanceCounter( &curTime );
-
-  return curTime.QuadPart * 1000 / pCpuFrequency->QuadPart;
-}
+\r
+namespace WindowsPlatformImplementation\r
+{\r
+\r
+void RunLoop()\r
+{\r
+  MSG nMsg = { 0 };\r
+\r
+  while( GetMessage( &nMsg, 0, NULL, NULL ) )\r
+  {\r
+    if( WIN_CALLBACK_EVENT == nMsg.message )\r
+    {\r
+      Dali::CallbackBase *callback = ( Dali::CallbackBase* )nMsg.wParam;\r
+      Dali::CallbackBase::Execute( *callback );\r
+    }\r
+\r
+    TranslateMessage( &nMsg );\r
+    DispatchMessage( &nMsg );\r
+\r
+    if( WM_CLOSE == nMsg.message )\r
+    {\r
+      break;\r
+    }\r
+  }\r
+}\r
+\r
+void GetDPI( uint64_t hWnd, float &xDpi, float &yDpi )\r
+{\r
+  HDC hdcScreen = GetDC( reinterpret_cast<HWND>( hWnd ) );\r
+\r
+  int32_t iX = GetDeviceCaps( hdcScreen, HORZRES );    // pixel\r
+  int32_t iY = GetDeviceCaps( hdcScreen, VERTRES );    // pixel\r
+  int32_t iPhsX = GetDeviceCaps( hdcScreen, HORZSIZE );    // mm\r
+  int32_t iPhsY = GetDeviceCaps( hdcScreen, VERTSIZE );    // mm\r
+\r
+  xDpi = static_cast<float>( iX ) / static_cast<float>( iPhsX ) * INCH;\r
+  yDpi = static_cast<float>( iY ) / static_cast<float>( iPhsY ) * INCH;\r
+}\r
+\r
+CallbackBase *listener = NULL;\r
+\r
+LRESULT CALLBACK WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)\r
+{\r
+  if( NULL != listener )\r
+  {\r
+    TWinEventInfo eventInfo( reinterpret_cast<uint64_t>( hWnd ), uMsg, wParam, lParam);\r
+    CallbackBase::Execute( *listener, &eventInfo );\r
+  }\r
+\r
+  LRESULT ret = DefWindowProc( hWnd, uMsg, wParam, lParam );\r
+  return ret;\r
+}\r
+\r
+DWORD windowStyle = WS_OVERLAPPED;\r
+\r
+int32_t GetEdgeWidth()\r
+{\r
+  switch( windowStyle )\r
+  {\r
+    case WS_OVERLAPPED:\r
+    {\r
+      return 8;\r
+    }\r
+    default:\r
+    {\r
+      return 0;\r
+    }\r
+  }\r
+}\r
+\r
+int32_t GetEdgeHeight()\r
+{\r
+  switch( windowStyle )\r
+  {\r
+    case WS_OVERLAPPED:\r
+    {\r
+      return 18;\r
+    }\r
+    default:\r
+    {\r
+      return 0;\r
+    }\r
+  }\r
+}\r
+\r
+class WindowsDisplayInfo\r
+{\r
+public:\r
+  static int GetColorDepth()\r
+  {\r
+    DALI_ASSERT_DEBUG(colorDepth >= 0 && "HWND hasn't been created, no color depth");\r
+    return colorDepth;\r
+  }\r
+\r
+  static void SetHWND( HWND inHWnd )\r
+  {\r
+    if( hWnd != inHWnd )\r
+    {\r
+      hWnd = inHWnd;\r
+      hdc = GetDC( hWnd );\r
+      colorDepth = GetDeviceCaps( WindowsDisplayInfo::hdc, BITSPIXEL ) * GetDeviceCaps( WindowsDisplayInfo::hdc, PLANES );\r
+    }\r
+  }\r
+\r
+private:\r
+  static int colorDepth;\r
+  static HWND hWnd;\r
+  static HDC hdc;\r
+};\r
+\r
+int WindowsDisplayInfo::colorDepth = -1;\r
+HWND WindowsDisplayInfo::hWnd = NULL;\r
+HDC WindowsDisplayInfo::hdc = NULL;\r
+\r
+int GetColorDepth()\r
+{\r
+  return WindowsDisplayInfo::GetColorDepth();\r
+}\r
+\r
+uint64_t CreateHwnd(\r
+    _In_opt_ const char *lpClassName,\r
+    _In_opt_ const char *lpWindowName,\r
+    _In_ int X,\r
+    _In_ int Y,\r
+    _In_ int nWidth,\r
+    _In_ int nHeight,\r
+    _In_opt_ uint64_t parent)\r
+{\r
+  WNDCLASS cs = { 0 };\r
+  cs.cbClsExtra = 0;\r
+  cs.cbWndExtra = 0;\r
+  cs.hbrBackground = (HBRUSH)( COLOR_WINDOW + 2 );\r
+  cs.hCursor = NULL;\r
+  cs.hIcon = NULL;\r
+  cs.hInstance = GetModuleHandle( NULL );\r
+  cs.lpfnWndProc = (WNDPROC)WinProc;\r
+  cs.lpszClassName = lpClassName;\r
+  cs.lpszMenuName = NULL;\r
+  cs.style = CS_VREDRAW | CS_HREDRAW;\r
+  RegisterClass( &cs );\r
+\r
+  HWND hWnd = CreateWindow( lpClassName, lpWindowName, windowStyle, X, Y, nWidth + 2 * GetEdgeWidth(), nHeight + 2 * GetEdgeHeight(), NULL, NULL, cs.hInstance, NULL );\r
+  ShowWindow( hWnd, SW_SHOW );\r
+\r
+  WindowsDisplayInfo::SetHWND( hWnd );\r
+\r
+  return reinterpret_cast<uint64_t>( hWnd );\r
+}\r
+\r
+void SetListener( CallbackBase *callback )\r
+{\r
+  listener = callback;\r
+}\r
+\r
+bool PostWinMessage(\r
+    _In_ uint32_t Msg,\r
+    _In_ uint32_t wParam,\r
+    _In_ uint64_t lParam,\r
+    _In_ uint64_t hWnd)\r
+{\r
+  return (bool)PostMessage( reinterpret_cast<HWND>( hWnd ), Msg, wParam, lParam );\r
+}\r
+\r
+bool PostWinThreadMessage(\r
+    _In_ uint32_t Msg,\r
+    _In_ uint32_t wParam,\r
+    _In_ uint64_t lParam,\r
+    _In_ uint64_t threadID/* = -1*/ )\r
+{\r
+  if( -1 == threadID )\r
+  {\r
+    threadID = GetCurrentThreadId();\r
+  }\r
+\r
+  return (bool)PostThreadMessage( threadID, Msg, wParam, lParam );\r
+}\r
+\r
+void ShowWindow( uint64_t hWnd)\r
+{\r
+  ::ShowWindow( reinterpret_cast<HWND>( hWnd ), SW_SHOW);\r
+}\r
+\r
+void HideWindow( uint64_t hWnd)\r
+{\r
+  ::ShowWindow( reinterpret_cast<HWND>( hWnd ), SW_HIDE);\r
+}\r
+\r
+struct TTimerCallbackInfo\r
+{\r
+  void *data;\r
+  timerCallback callback;\r
+  HWND hWnd;\r
+};\r
+\r
+void CALLBACK TimerProc(HWND hWnd, UINT nMsg, UINT_PTR nTimerid, DWORD dwTime)\r
+{\r
+  TTimerCallbackInfo *info = (TTimerCallbackInfo*)nTimerid;\r
+  info->callback( info->data );\r
+}\r
+\r
+int SetTimer(int interval, timerCallback callback, void *data)\r
+{\r
+  TTimerCallbackInfo *callbackInfo = new TTimerCallbackInfo;\r
+  callbackInfo->data = data;\r
+  callbackInfo->callback = callback;\r
+  callbackInfo->hWnd = ::GetActiveWindow();\r
+\r
+  UINT_PTR timerID = (UINT_PTR)callbackInfo;\r
+  ::SetTimer( callbackInfo->hWnd, timerID, interval, TimerProc );\r
+\r
+  return timerID;\r
+}\r
+\r
+void KillTimer(int id)\r
+{\r
+  TTimerCallbackInfo *info = (TTimerCallbackInfo*)id;\r
+  ::KillTimer( info->hWnd, id );\r
+  delete info;\r
+}\r
+\r
+const char* GetKeyName( int keyCode )\r
+{\r
+  switch( keyCode )\r
+  {\r
+    case VK_BACK:\r
+    {\r
+      return "Backspace";\r
+    }\r
+    case VK_TAB:\r
+    {\r
+      return "Tab";\r
+    }\r
+    case VK_RETURN:\r
+    {\r
+      return "Return";\r
+    }\r
+    case VK_ESCAPE:\r
+    {\r
+      return "Escape";\r
+    }\r
+    case VK_SPACE:\r
+    {\r
+      return "Space";\r
+    }\r
+    case VK_LEFT:\r
+    {\r
+      return "Left";\r
+    }\r
+    case VK_UP:\r
+    {\r
+      return "Up";\r
+    }\r
+    case VK_RIGHT:\r
+    {\r
+      return "Right";\r
+    }\r
+    case VK_DOWN:\r
+    {\r
+      return "Down";\r
+    }\r
+    case 48:\r
+    {\r
+      return "0";\r
+    }\r
+    case 49:\r
+    {\r
+      return "1";\r
+    }\r
+    case 50:\r
+    {\r
+      return "2";\r
+    }\r
+    case 51:\r
+    {\r
+      return "3";\r
+    }\r
+    case 52:\r
+    {\r
+      return "4";\r
+    }\r
+    case 53:\r
+    {\r
+      return "5";\r
+    }\r
+    case 54:\r
+    {\r
+      return "6";\r
+    }\r
+    case 55:\r
+    {\r
+      return "7";\r
+    }\r
+    case 56:\r
+    {\r
+      return "8";\r
+    }\r
+    case 57:\r
+    {\r
+      return "9";\r
+    }\r
+    default:\r
+    {\r
+      break;\r
+    }\r
+  }\r
+\r
+  return "";\r
+}\r
+
+static LARGE_INTEGER cpuFrequency;\r
+static LARGE_INTEGER *pCpuFrequency = NULL;\r
+\r
+uint64_t GetCurrentThreadId()\r
+{\r
+  return ::GetCurrentThreadId();\r
+}\r
+\r
+void GetNanoseconds( uint64_t& timeInNanoseconds )\r
+{\r
+  if( NULL == pCpuFrequency )\r
+  {\r
+    pCpuFrequency = &cpuFrequency;\r
+    QueryPerformanceFrequency( pCpuFrequency );\r
+  }\r
+\r
+  LARGE_INTEGER curTime;\r
+  QueryPerformanceCounter( &curTime );\r
+\r
+  timeInNanoseconds = static_cast<double>(curTime.QuadPart) / static_cast<double>(pCpuFrequency->QuadPart) * 1000000000;\r
+}\r
+\r
+unsigned int GetCurrentMilliSeconds( void )\r
+{\r
+  if( NULL == pCpuFrequency )\r
+  {\r
+    pCpuFrequency = &cpuFrequency;\r
+    QueryPerformanceFrequency( pCpuFrequency );\r
+  }\r
+\r
+  LARGE_INTEGER curTime;\r
+  QueryPerformanceCounter( &curTime );\r
+\r
+  return curTime.QuadPart * 1000 / pCpuFrequency->QuadPart;\r
+}\r
 
 } // namespace WindowsPlatformImplement
 
@@ -392,4 +387,4 @@ unsigned int GetCurrentMilliSeconds( void )
 
 } // namespace internal
 
-} // namespace Dali
+} // namespace Dali\r
index 51e40f8c7f249a52e181b5111e7f1a72fb026f72..18b33c19272f9b395ae3f499cccd2a75c01abbdc 100755 (executable)
@@ -1,21 +1,21 @@
 #ifndef PLATFORM_IMPLEMENT_WIN_INCLUDE\r
 #define PLATFORM_IMPLEMENT_WIN_INCLUDE\r
 \r
-/*\r
-* Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the "License");\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an "AS IS" BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*\r
+/*
+* Copyright (c) 2018 Samsung Electronics Co., Ltd.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
 */\r
 \r
 // EXTERNAL_HEADERS\r
 typedef uint64_t   WinWindowHandle;\r
 typedef uint64_t   WinPixmap;\r
 \r
-namespace Dali\r
-{\r
-\r
-namespace Internal\r
-{\r
-\r
-namespace Adaptor\r
-{\r
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
 \r
 namespace WindowsPlatformImplementation\r
 {\r
@@ -77,8 +77,6 @@ void KillTimer(int id);
 \r
 void GetDPI( uint64_t hWnd, float &xDpi, float &yDpi );\r
 \r
-int GetOrientation() const;\r
-\r
 const char* GetKeyName( int keyCode );\r
 \r
 uint64_t GetCurrentThreadId();\r
@@ -87,12 +85,12 @@ void GetNanoseconds( uint64_t& timeInNanoseconds );
 \r
 unsigned int GetCurrentMilliSeconds( void );\r
 \r
-} // namespace WindowsPlatformImplement\r
-\r
-} // namespace Adaptor\r
-\r
-} // namespace internal\r
-\r
-} // namespace Dali\r
-\r
+} // namespace WindowsPlatformImplement
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
+
 #endif // WIN32_WINDOWS_SYSTEM_INCLUDE\r
index 7efa8b3639583fdb095a1092dcdfacab905f7832..87af13975bf9a030a06d0a69f021dbbcf2211dd4 100755 (executable)
@@ -454,10 +454,6 @@ void WindowBaseWin::SetWindowRotationAngle( int degree )
 {
 }
 
-int WindowBaseWin::GetWindowRotationAngle()
-{
-}
-
 void WindowBaseWin::WindowRotationCompleted( int degree, int width, int height )
 {
 }
@@ -466,10 +462,6 @@ void WindowBaseWin::SetTransparency( bool transparent )
 {
 }
 
-int WindowBaseWin::GetOrientation() const
-{
-}
-
 unsigned int WindowBaseWin::GetSurfaceId( Any surface ) const
 {
   unsigned int surfaceId = 0;
index ea08334356f2279ea460b40aa16553ed17f93796..f19fdfc411438f027bfe6dd12e125afaf6b411fa 100755 (executable)
@@ -326,11 +326,6 @@ public:
    */
   virtual void SetWindowRotationAngle( int degree ) override;
 
-  /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
-   */
-  virtual void GetWindowRotationAngle() override;
-
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
    */
@@ -341,12 +336,6 @@ public:
    */
   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()
    */