Revert "WheelEvent class pimpling"
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / windows / window-base-win.cpp
index 2ad916c..95cfcad 100755 (executable)
@@ -67,7 +67,7 @@ WindowBaseWin::~WindowBaseWin()
 void WindowBaseWin::Initialize( PositionSize positionSize, Any surface, bool isTransparent )
 {
   // see if there is a surface in Any surface
-  unsigned int surfaceId = GetSurfaceId( surface );
+  uintptr_t surfaceId = GetSurfaceId( surface );
 
   // if the surface is empty, create a new one.
   if( surfaceId == 0 )
@@ -78,8 +78,7 @@ void WindowBaseWin::Initialize( PositionSize positionSize, Any surface, bool isT
   }
   else
   {
-    // XLib should already be initialized so no point in calling XInitThreads
-    mWin32Window = static_cast< WinWindowHandle >( surfaceId );
+    SetWinWindow( surfaceId );
   }
 
   mWindowImpl.SetListener( MakeCallback( this, &WindowBaseWin::EventEntry ) );
@@ -128,7 +127,7 @@ void WindowBaseWin::OnMouseButtonDown( int type, TWinEventInfo *event )
     Integration::Point point;
     point.SetDeviceId( touchEvent.multi.device );
     point.SetState( state );
-    point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + mWindowImpl.GetEdgeHeight() ) );
+    point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + WindowsPlatform::WindowImpl::EDGE_HEIGHT ) );
     point.SetRadius( touchEvent.multi.radius, Vector2( touchEvent.multi.radius_x, touchEvent.multi.radius_y ) );
     point.SetPressure( touchEvent.multi.pressure );
     point.SetAngle( Degree( touchEvent.multi.angle ) );
@@ -152,7 +151,7 @@ void WindowBaseWin::OnMouseButtonUp( int type, TWinEventInfo *event )
     Integration::Point point;
     point.SetDeviceId( touchEvent.multi.device );
     point.SetState( state );
-    point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + mWindowImpl.GetEdgeHeight() ) );
+    point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + WindowsPlatform::WindowImpl::EDGE_HEIGHT ) );
     point.SetRadius( touchEvent.multi.radius, Vector2( touchEvent.multi.radius_x, touchEvent.multi.radius_y ) );
     point.SetPressure( touchEvent.multi.pressure );
     point.SetAngle( Degree( touchEvent.multi.angle ) );
@@ -176,7 +175,7 @@ void WindowBaseWin::OnMouseButtonMove( int type, TWinEventInfo *event )
     Integration::Point point;
     point.SetDeviceId( touchEvent.multi.device );
     point.SetState( state );
-    point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + mWindowImpl.GetEdgeHeight() ) );
+    point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + WindowsPlatform::WindowImpl::EDGE_HEIGHT) );
     point.SetRadius( touchEvent.multi.radius, Vector2( touchEvent.multi.radius_x, touchEvent.multi.radius_y ) );
     point.SetPressure( touchEvent.multi.pressure );
     point.SetAngle( Degree( touchEvent.multi.angle ) );
@@ -206,7 +205,7 @@ void WindowBaseWin::OnKeyDown( int type, TWinEventInfo *event )
     DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n" );
 
     int keyCode = event->wParam;
-    std::string keyName( WindowsPlatformImplementation::GetKeyName( keyCode ) );
+    std::string keyName( WindowsPlatform::GetKeyName( keyCode ) );
     std::string keyString;
     std::string emptyString;
 
@@ -229,7 +228,7 @@ void WindowBaseWin::OnKeyUp( int type, TWinEventInfo *event )
     DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n" );
 
     int keyCode = event->wParam;
-    std::string keyName( WindowsPlatformImplementation::GetKeyName( keyCode ) );
+    std::string keyName( WindowsPlatform::GetKeyName( keyCode ) );
     std::string keyString;
     std::string emptyString;
 
@@ -455,6 +454,10 @@ void WindowBaseWin::SetWindowRotationAngle( int degree )
 {
 }
 
+int WindowBaseWin::GetWindowRotationAngle()
+{
+}
+
 void WindowBaseWin::WindowRotationCompleted( int degree, int width, int height )
 {
 }
@@ -463,9 +466,13 @@ void WindowBaseWin::SetTransparency( bool transparent )
 {
 }
 
-unsigned int WindowBaseWin::GetSurfaceId( Any surface ) const
+int WindowBaseWin::GetOrientation() const
+{
+}
+
+uintptr_t WindowBaseWin::GetSurfaceId( Any surface ) const
 {
-  unsigned int surfaceId = 0;
+  uintptr_t surfaceId = 0;
 
   if ( surface.Empty() == false )
   {
@@ -480,12 +487,25 @@ unsigned int WindowBaseWin::GetSurfaceId( Any surface ) const
 
 void WindowBaseWin::CreateWinWindow( PositionSize positionSize, bool isTransparent )
 {
-  long hWnd = mWindowImpl.CreateHwnd( "Demo", "Demo", positionSize.x, positionSize.y, positionSize.width, positionSize.height, NULL );
+  long hWnd = WindowsPlatform::WindowImpl::CreateHwnd( "Demo", positionSize.x, positionSize.y, positionSize.width, positionSize.height, NULL );
+  mWindowImpl.SetHWND(hWnd);
+
+  mWin32Window = static_cast<WinWindowHandle>(hWnd);
 
-  mWin32Window = (WinWindowHandle)hWnd;
   DALI_ASSERT_ALWAYS( mWin32Window != 0 && "There is no Windows window" );
 }
 
+void WindowBaseWin::SetWinWindow( uintptr_t surfaceId )
+{
+  HWND hWnd = (HWND)surfaceId;
+
+  mWin32Window = static_cast<WinWindowHandle>(surfaceId);
+
+  mWindowImpl.SetHWND(surfaceId);
+
+  mWindowImpl.SetWinProc();
+}
+
 void WindowBaseWin::EventEntry( TWinEventInfo *event )
 {
   unsigned int uMsg = event->uMsg;
@@ -556,6 +576,16 @@ void WindowBaseWin::SetParent( WindowBase* parentWinBase )
 
 }
 
+int WindowBaseWin::CreateFrameRenderedSyncFence()
+{
+  return -1;
+}
+
+int WindowBaseWin::CreateFramePresentedSyncFence()
+{
+  return -1;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal