Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / windows / window-base-win.cpp
index 2ad916c..86994da 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -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 ) );
@@ -193,7 +192,7 @@ void WindowBaseWin::OnMouseWheel( int type, TWinEventInfo *event )
   {
     DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseWin::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 );
+    Integration::WheelEvent wheelEvent( Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent.direction, mouseWheelEvent.modifiers, Vector2( mouseWheelEvent.x, mouseWheelEvent.y ), mouseWheelEvent.z, mouseWheelEvent.timestamp );
 
     mWheelEventSignal.Emit( wheelEvent );
   }
@@ -482,10 +481,22 @@ void WindowBaseWin::CreateWinWindow( PositionSize positionSize, bool isTranspare
 {
   long hWnd = mWindowImpl.CreateHwnd( "Demo", "Demo", positionSize.x, positionSize.y, positionSize.width, positionSize.height, NULL );
 
-  mWin32Window = (WinWindowHandle)hWnd;
+  mWin32Window = static_cast<WinWindowHandle>(hWnd);
+
   DALI_ASSERT_ALWAYS( mWin32Window != 0 && "There is no Windows window" );
 }
 
+void WindowBaseWin::SetWinWindow( unsigned int surfaceId )
+{
+  HWND hWnd = (HWND)surfaceId;
+
+  mWin32Window = static_cast<WinWindowHandle>(surfaceId);
+
+  mWindowImpl.SetHWND( reinterpret_cast<uint64_t>(hWnd));
+
+  mWindowImpl.SetWinProc();
+}
+
 void WindowBaseWin::EventEntry( TWinEventInfo *event )
 {
   unsigned int uMsg = event->uMsg;
@@ -556,6 +567,16 @@ void WindowBaseWin::SetParent( WindowBase* parentWinBase )
 
 }
 
+int WindowBaseWin::CreateFrameRenderedSyncFence()
+{
+  return -1;
+}
+
+int WindowBaseWin::CreateFramePresentedSyncFence()
+{
+  return -1;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal