Add Window::SetLayout method
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / windows / window-base-win.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 87af139..c8792be
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -19,8 +19,8 @@
 #include <dali/internal/window-system/windows/window-base-win.h>
 
 // EXTERNAL_HEADERS
-#include <dali/public-api/object/any.h>
 #include <dali/integration-api/debug.h>
+#include <dali/public-api/object/any.h>
 
 // INTERNAL HEADERS
 #include <dali/internal/window-system/common/window-impl.h>
 
 namespace Dali
 {
-
 namespace Internal
 {
-
 namespace Adaptor
 {
-
 namespace
 {
-
-const Device::Class::Type DEFAULT_DEVICE_CLASS = Device::Class::NONE;
+const Device::Class::Type    DEFAULT_DEVICE_CLASS    = Device::Class::NONE;
 const Device::Subclass::Type DEFAULT_DEVICE_SUBCLASS = Device::Subclass::NONE;
 
-const unsigned int PRIMARY_TOUCH_BUTTON_ID( 1 );
+const unsigned int PRIMARY_TOUCH_BUTTON_ID(1);
 
 #if defined(DEBUG_ENABLED)
-Debug::Filter* gWindowBaseLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_WINDOW_BASE" );
+Debug::Filter* gWindowBaseLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_WINDOW_BASE");
 #endif
 
 } // unnamed namespace
 
-WindowBaseWin::WindowBaseWin( Dali::PositionSize positionSize, Any surface, bool isTransparent )
-: mWin32Window( 0 ),
-  mOwnSurface( false ),
-  mIsTransparent( false ), // Should only be set to true once we actually create a transparent window regardless of what isTransparent is.
-  mRotationAppSet( false )
+WindowBaseWin::WindowBaseWin(Dali::PositionSize positionSize, Any surface, bool isTransparent)
+: mWin32Window(0),
+  mOwnSurface(false),
+  mIsTransparent(false), // Should only be set to true once we actually create a transparent window regardless of what isTransparent is.
+  mRotationAppSet(false)
 {
-  Initialize( positionSize, surface, isTransparent );
+  Initialize(positionSize, surface, isTransparent);
 }
 
 WindowBaseWin::~WindowBaseWin()
 {
-  WindowsPlatformImplementation::PostWinMessage( WM_CLOSE, 0, 0, mWin32Window );
+  mWindowImpl.PostWinMessage(WM_CLOSE, 0, 0);
 }
 
-void WindowBaseWin::Initialize( PositionSize positionSize, Any surface, bool isTransparent )
+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 )
+  if(surfaceId == 0)
   {
     // we own the surface about to created
     mOwnSurface = true;
-    CreateWinWindow( positionSize, isTransparent );
+    CreateWinWindow(positionSize, isTransparent);
   }
   else
   {
-    // XLib should already be initialized so no point in calling XInitThreads
-    mWin32Window = static_cast< WinWindowHandle >( surfaceId );
+    SetWinWindow(surfaceId);
   }
 
-  WindowsPlatformImplementation::SetListener( MakeCallback( this, &WindowBaseWin::EventEntry ) );
+  mWindowImpl.SetListener(MakeCallback(this, &WindowBaseWin::EventEntry));
 }
 
 void WindowBaseWin::OnDeleteRequest()
@@ -90,158 +85,158 @@ void WindowBaseWin::OnDeleteRequest()
   mDeleteRequestSignal.Emit();
 }
 
-void WindowBaseWin::OnFocusIn( int type, TWinEventInfo *event )
+void WindowBaseWin::OnFocusIn(int type, TWinEventInfo* event)
 {
 }
 
-void WindowBaseWin::OnFocusOut( int type, TWinEventInfo *event )
+void WindowBaseWin::OnFocusOut(int type, TWinEventInfo* event)
 {
 }
 
-void WindowBaseWin::OnWindowDamaged( int type, TWinEventInfo *event )
+void WindowBaseWin::OnWindowDamaged(int type, TWinEventInfo* event)
 {
-  Event_Mouse_Button* windowDamagedEvent( (Event_Mouse_Button*)event );
+  Event_Mouse_Button* windowDamagedEvent((Event_Mouse_Button*)event);
 
-  if( windowDamagedEvent->window == mWin32Window )
+  if(windowDamagedEvent->window == mWin32Window)
   {
     DamageArea area;
     area.x = 0;
     area.y = 0;
-    WindowSystem::GetScreenSize( area.width, area.height );
+    WindowSystem::GetScreenSize(area.width, area.height);
 
-    mWindowDamagedSignal.Emit( area );
+    mWindowDamagedSignal.Emit(area);
   }
 }
 
-void WindowBaseWin::OnMouseButtonDown( int type, TWinEventInfo *event )
+void WindowBaseWin::OnMouseButtonDown(int type, TWinEventInfo* event)
 {
   Event_Mouse_Button touchEvent = *((Event_Mouse_Button*)event);
-  touchEvent.timestamp = GetTickCount();
-  touchEvent.x = LOWORD( event->lParam );
-  touchEvent.y = HIWORD( event->lParam );
-  touchEvent.multi.device = DEVICE_MOUSE;
+  touchEvent.timestamp          = GetTickCount();
+  touchEvent.x                  = LOWORD(event->lParam);
+  touchEvent.y                  = HIWORD(event->lParam);
+  touchEvent.multi.device       = DEVICE_MOUSE;
 
-  if( touchEvent.window == mWin32Window )
+  if(touchEvent.window == mWin32Window)
   {
-    PointState::Type state ( PointState::DOWN );
+    PointState::Type state(PointState::DOWN);
 
     Integration::Point point;
-    point.SetDeviceId( touchEvent.multi.device );
-    point.SetState( state );
-    point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + WindowsPlatformImplementation::GetEdgeHeight() ) );
-    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 ) );
-
-    mTouchEventSignal.Emit( point, touchEvent.timestamp );
+    point.SetDeviceId(touchEvent.multi.device);
+    point.SetState(state);
+    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));
+
+    mTouchEventSignal.Emit(point, touchEvent.timestamp);
   }
 }
 
-void WindowBaseWin::OnMouseButtonUp( int type, TWinEventInfo *event )
+void WindowBaseWin::OnMouseButtonUp(int type, TWinEventInfo* event)
 {
-  Event_Mouse_Button touchEvent = *( (Event_Mouse_Button*)event );
-  touchEvent.timestamp = GetTickCount();
-  touchEvent.x = LOWORD( event->lParam );
-  touchEvent.y = HIWORD( event->lParam );
-  touchEvent.multi.device = DEVICE_MOUSE;
+  Event_Mouse_Button touchEvent = *((Event_Mouse_Button*)event);
+  touchEvent.timestamp          = GetTickCount();
+  touchEvent.x                  = LOWORD(event->lParam);
+  touchEvent.y                  = HIWORD(event->lParam);
+  touchEvent.multi.device       = DEVICE_MOUSE;
 
-  if( touchEvent.window == mWin32Window )
+  if(touchEvent.window == mWin32Window)
   {
-    PointState::Type state( PointState::UP );
+    PointState::Type state(PointState::UP);
 
     Integration::Point point;
-    point.SetDeviceId( touchEvent.multi.device );
-    point.SetState( state );
-    point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + WindowsPlatformImplementation::GetEdgeHeight() ) );
-    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 ) );
-
-    mTouchEventSignal.Emit( point, touchEvent.timestamp );
+    point.SetDeviceId(touchEvent.multi.device);
+    point.SetState(state);
+    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));
+
+    mTouchEventSignal.Emit(point, touchEvent.timestamp);
   }
 }
 
-void WindowBaseWin::OnMouseButtonMove( int type, TWinEventInfo *event )
+void WindowBaseWin::OnMouseButtonMove(int type, TWinEventInfo* event)
 {
   Event_Mouse_Button touchEvent = *((Event_Mouse_Button*)event);
-  touchEvent.timestamp = GetTickCount();
-  touchEvent.x = LOWORD( event->lParam );
-  touchEvent.y = HIWORD( event->lParam );
-  touchEvent.multi.device = DEVICE_MOUSE;
+  touchEvent.timestamp          = GetTickCount();
+  touchEvent.x                  = LOWORD(event->lParam);
+  touchEvent.y                  = HIWORD(event->lParam);
+  touchEvent.multi.device       = DEVICE_MOUSE;
 
-  if( touchEvent.window == mWin32Window )
+  if(touchEvent.window == mWin32Window)
   {
-    PointState::Type state( PointState::MOTION );
+    PointState::Type state(PointState::MOTION);
 
     Integration::Point point;
-    point.SetDeviceId( touchEvent.multi.device );
-    point.SetState( state );
-    point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + WindowsPlatformImplementation::GetEdgeHeight() ) );
-    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 ) );
-
-    mTouchEventSignal.Emit( point, touchEvent.timestamp );
+    point.SetDeviceId(touchEvent.multi.device);
+    point.SetState(state);
+    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));
+
+    mTouchEventSignal.Emit(point, touchEvent.timestamp);
   }
 }
 
-void WindowBaseWin::OnMouseWheel( int type, TWinEventInfo *event )
+void WindowBaseWin::OnMouseWheel(int type, TWinEventInfo* event)
 {
-  Event_Mouse_Wheel mouseWheelEvent = *((Event_Mouse_Wheel*)( event ));
+  Event_Mouse_Wheel mouseWheelEvent = *((Event_Mouse_Wheel*)(event));
 
-  if( mouseWheelEvent.window == mWin32Window )
+  if(mouseWheelEvent.window == mWin32Window)
   {
-    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 );
+    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 );
+    mWheelEventSignal.Emit(wheelEvent);
   }
 }
 
-void WindowBaseWin::OnKeyDown( int type, TWinEventInfo *event )
+void WindowBaseWin::OnKeyDown(int type, TWinEventInfo* event)
 {
-  if( event->mWindow == mWin32Window )
+  if(event->mWindow == mWin32Window)
   {
-    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n" );
+    DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n");
 
-    int keyCode = event->wParam;
-    std::string keyName( WindowsPlatformImplementation::GetKeyName( keyCode ) );
+    int         keyCode = event->wParam;
+    std::string keyName(WindowsPlatform::GetKeyName(keyCode));
     std::string keyString;
     std::string emptyString;
 
-    int modifier( 0 );
-    unsigned long time( 0 );
+    int           modifier(0);
+    unsigned long time(0);
 
     // Ensure key event string is not NULL as keys like SHIFT have a null string.
-    keyString.push_back( event->wParam );
+    keyString.push_back(event->wParam);
 
-    Integration::KeyEvent keyEvent( keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
+    Integration::KeyEvent keyEvent(keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS);
 
-    mKeyEventSignal.Emit( keyEvent );
+    mKeyEventSignal.Emit(keyEvent);
   }
 }
 
-void WindowBaseWin::OnKeyUp( int type, TWinEventInfo *event )
+void WindowBaseWin::OnKeyUp(int type, TWinEventInfo* event)
 {
-  if( event->mWindow == mWin32Window )
+  if(event->mWindow == mWin32Window)
   {
-    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n" );
+    DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n");
 
-    int keyCode = event->wParam;
-    std::string keyName( WindowsPlatformImplementation::GetKeyName( keyCode ) );
+    int         keyCode = event->wParam;
+    std::string keyName(WindowsPlatform::GetKeyName(keyCode));
     std::string keyString;
     std::string emptyString;
 
-    int modifier( 0 );
-    unsigned long time( 0 );
+    int           modifier(0);
+    unsigned long time(0);
 
     // Ensure key event string is not NULL as keys like SHIFT have a null string.
-    keyString.push_back( event->wParam );
+    keyString.push_back(event->wParam);
 
-    Integration::KeyEvent keyEvent( keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
+    Integration::KeyEvent keyEvent(keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::UP, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS);
 
-    mKeyEventSignal.Emit( keyEvent );
+    mKeyEventSignal.Emit(keyEvent);
   }
 }
 
@@ -255,28 +250,33 @@ int WindowBaseWin::GetNativeWindowId()
   return mWin32Window;
 }
 
-EGLNativeWindowType WindowBaseWin::CreateEglWindow( int width, int height )
+std::string WindowBaseWin::GetNativeWindowResourceId()
+{
+  return std::string();
+}
+
+EGLNativeWindowType WindowBaseWin::CreateEglWindow(int width, int height)
 {
-  return reinterpret_cast< EGLNativeWindowType >( mWin32Window );
+  return reinterpret_cast<EGLNativeWindowType>(mWin32Window);
 }
 
 void WindowBaseWin::DestroyEglWindow()
 {
 }
 
-void WindowBaseWin::SetEglWindowRotation( int angle )
+void WindowBaseWin::SetEglWindowRotation(int angle)
 {
 }
 
-void WindowBaseWin::SetEglWindowBufferTransform( int angle )
+void WindowBaseWin::SetEglWindowBufferTransform(int angle)
 {
 }
 
-void WindowBaseWin::SetEglWindowTransform( int angle )
+void WindowBaseWin::SetEglWindowTransform(int angle)
 {
 }
 
-void WindowBaseWin::ResizeEglWindow( PositionSize positionSize )
+void WindowBaseWin::ResizeEglWindow(PositionSize positionSize)
 {
 }
 
@@ -285,19 +285,24 @@ bool WindowBaseWin::IsEglWindowRotationSupported()
   return false;
 }
 
-void WindowBaseWin::Move( PositionSize positionSize )
+void WindowBaseWin::Move(PositionSize positionSize)
 {
 }
 
-void WindowBaseWin::Resize( PositionSize positionSize )
+void WindowBaseWin::Resize(PositionSize positionSize)
 {
+  ::SetWindowPos((HWND)mWin32Window, NULL, positionSize.x, positionSize.y, positionSize.width, positionSize.height, SWP_SHOWWINDOW);
 }
 
-void WindowBaseWin::MoveResize( PositionSize positionSize )
+void WindowBaseWin::MoveResize(PositionSize positionSize)
 {
 }
 
-void WindowBaseWin::SetClass( const std::string& name, const std::string& className )
+void WindowBaseWin::SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan)
+{
+}
+
+void WindowBaseWin::SetClass(const std::string& name, const std::string& className)
 {
 }
 
@@ -313,15 +318,41 @@ void WindowBaseWin::Activate()
 {
 }
 
-void WindowBaseWin::SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations )
+void WindowBaseWin::Maximize(bool maximize)
+{
+}
+
+bool WindowBaseWin::IsMaximized() const
+{
+  return false;
+}
+
+void WindowBaseWin::SetMaximumSize(Dali::Window::WindowSize size)
+{
+}
+
+void WindowBaseWin::Minimize(bool minimize)
+{
+}
+
+bool WindowBaseWin::IsMinimized() const
+{
+  return false;
+}
+
+void WindowBaseWin::SetMimimumSize(Dali::Window::WindowSize size)
+{
+}
+
+void WindowBaseWin::SetAvailableAnlges(const std::vector<int>& angles)
 {
 }
 
-void WindowBaseWin::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
+void WindowBaseWin::SetPreferredAngle(int angle)
 {
 }
 
-void WindowBaseWin::SetAcceptFocus( bool accept )
+void WindowBaseWin::SetAcceptFocus(bool accept)
 {
 }
 
@@ -338,71 +369,76 @@ unsigned int WindowBaseWin::GetSupportedAuxiliaryHintCount() const
   return 0;
 }
 
-std::string WindowBaseWin::GetSupportedAuxiliaryHint( unsigned int index ) const
+std::string WindowBaseWin::GetSupportedAuxiliaryHint(unsigned int index) const
 {
   return std::string();
 }
 
-unsigned int WindowBaseWin::AddAuxiliaryHint( const std::string& hint, const std::string& value )
+unsigned int WindowBaseWin::AddAuxiliaryHint(const std::string& hint, const std::string& value)
 {
   return 0;
 }
 
-bool WindowBaseWin::RemoveAuxiliaryHint( unsigned int id )
+bool WindowBaseWin::RemoveAuxiliaryHint(unsigned int id)
 {
   return false;
 }
 
-bool WindowBaseWin::SetAuxiliaryHintValue( unsigned int id, const std::string& value )
+bool WindowBaseWin::SetAuxiliaryHintValue(unsigned int id, const std::string& value)
 {
   return false;
 }
 
-std::string WindowBaseWin::GetAuxiliaryHintValue( unsigned int id ) const
+std::string WindowBaseWin::GetAuxiliaryHintValue(unsigned int id) const
 {
   return std::string();
 }
 
-unsigned int WindowBaseWin::GetAuxiliaryHintId( const std::string& hint ) const
+unsigned int WindowBaseWin::GetAuxiliaryHintId(const std::string& hint) const
 {
   return 0;
 }
 
-void WindowBaseWin::SetInputRegion( const Rect< int >& inputRegion )
+void WindowBaseWin::SetInputRegion(const Rect<int>& inputRegion)
 {
 }
 
-void WindowBaseWin::SetType( Dali::Window::Type type )
+void WindowBaseWin::SetType(Dali::WindowType type)
 {
 }
 
-bool WindowBaseWin::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
+Dali::WindowType WindowBaseWin::GetType() const
 {
-  return false;
+  return Dali::WindowType::NORMAL;
 }
 
-Dali::Window::NotificationLevel::Type WindowBaseWin::GetNotificationLevel() const
+Dali::WindowOperationResult WindowBaseWin::SetNotificationLevel(Dali::WindowNotificationLevel level)
 {
-  return Dali::Window::NotificationLevel::NONE;
+  return Dali::WindowOperationResult::NOT_SUPPORTED;
 }
 
-void WindowBaseWin::SetOpaqueState( bool opaque )
+Dali::WindowNotificationLevel WindowBaseWin::GetNotificationLevel() const
 {
+  return Dali::WindowNotificationLevel::NONE;
 }
 
-bool WindowBaseWin::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
+void WindowBaseWin::SetOpaqueState(bool opaque)
 {
-  return false;
 }
 
-Dali::Window::ScreenOffMode::Type WindowBaseWin::GetScreenOffMode() const
+Dali::WindowOperationResult WindowBaseWin::SetScreenOffMode(WindowScreenOffMode screenOffMode)
 {
-  return Dali::Window::ScreenOffMode::TIMEOUT;
+  return Dali::WindowOperationResult::NOT_SUPPORTED;
 }
 
-bool WindowBaseWin::SetBrightness( int brightness )
+WindowScreenOffMode WindowBaseWin::GetScreenOffMode() const
 {
-  return false;
+  return WindowScreenOffMode::TIMEOUT;
+}
+
+Dali::WindowOperationResult WindowBaseWin::SetBrightness(int brightness)
+{
+  return Dali::WindowOperationResult::NOT_SUPPORTED;
 }
 
 int WindowBaseWin::GetBrightness() const
@@ -410,39 +446,39 @@ int WindowBaseWin::GetBrightness() const
   return 0;
 }
 
-bool WindowBaseWin::GrabKey( Dali::KEY key, KeyGrab::KeyGrabMode grabMode )
+bool WindowBaseWin::GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode)
 {
   return false;
 }
 
-bool WindowBaseWin::UngrabKey( Dali::KEY key )
+bool WindowBaseWin::UngrabKey(Dali::KEY key)
 {
   return false;
 }
 
-bool WindowBaseWin::GrabKeyList( const Dali::Vector< Dali::KEY >& key, const Dali::Vector< KeyGrab::KeyGrabMode >& grabMode, Dali::Vector< bool >& result )
+bool WindowBaseWin::GrabKeyList(const Dali::Vector<Dali::KEY>& key, const Dali::Vector<KeyGrab::KeyGrabMode>& grabMode, Dali::Vector<bool>& result)
 {
   return false;
 }
 
-bool WindowBaseWin::UngrabKeyList( const Dali::Vector< Dali::KEY >& key, Dali::Vector< bool >& result )
+bool WindowBaseWin::UngrabKeyList(const Dali::Vector<Dali::KEY>& key, Dali::Vector<bool>& result)
 {
   return false;
 }
 
-void WindowBaseWin::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical )
+void WindowBaseWin::GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical)
 {
   // calculate DPI
   float xres, yres;
 
   //// 1 inch = 25.4 millimeters
-  WindowsPlatformImplementation::GetDPI( mWin32Window, xres, yres );
+  mWindowImpl.GetDPI(xres, yres);
 
   xres *= 1.5f;
   yres *= 1.5f;
 
-  dpiHorizontal = static_cast<int>( xres + 0.5f );  // rounding
-  dpiVertical = static_cast<int>( yres + 0.5f );
+  dpiHorizontal = static_cast<int>(xres + 0.5f); // rounding
+  dpiVertical   = static_cast<int>(yres + 0.5f);
 }
 
 int WindowBaseWin::GetScreenRotationAngle()
@@ -450,121 +486,176 @@ int WindowBaseWin::GetScreenRotationAngle()
   return 0;
 }
 
-void WindowBaseWin::SetWindowRotationAngle( int degree )
+void WindowBaseWin::SetWindowRotationAngle(int degree)
 {
 }
 
-void WindowBaseWin::WindowRotationCompleted( int degree, int width, int height )
+void WindowBaseWin::WindowRotationCompleted(int degree, int width, int height)
 {
 }
 
-void WindowBaseWin::SetTransparency( bool transparent )
+void WindowBaseWin::SetTransparency(bool transparent)
 {
 }
 
-unsigned int WindowBaseWin::GetSurfaceId( Any surface ) const
+int WindowBaseWin::GetWindowRotationAngle() const
 {
-  unsigned int surfaceId = 0;
+  return 0;
+}
+
+uintptr_t WindowBaseWin::GetSurfaceId(Any surface) const
+{
+  uintptr_t surfaceId = 0;
 
-  if ( surface.Empty() == false )
+  if(surface.Empty() == false)
   {
     // check we have a valid type
-    DALI_ASSERT_ALWAYS( (surface.GetType() == typeid ( WinWindowHandle ) )
-                        && "Surface type is invalid" );
+    DALI_ASSERT_ALWAYS((surface.GetType() == typeid(WinWindowHandle)) && "Surface type is invalid");
 
-    surfaceId = AnyCast< WinWindowHandle >( surface );
+    surfaceId = AnyCast<WinWindowHandle>(surface);
   }
   return surfaceId;
 }
 
-void WindowBaseWin::CreateWinWindow( PositionSize positionSize, bool isTransparent )
+void WindowBaseWin::CreateWinWindow(PositionSize positionSize, bool isTransparent)
 {
-  long hWnd = WindowsPlatformImplementation::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);
 
-  WindowsPlatformImplementation::ShowWindow( hWnd );
+  mWin32Window = static_cast<WinWindowHandle>(hWnd);
 
-  mWin32Window = (WinWindowHandle)hWnd;
-  DALI_ASSERT_ALWAYS( mWin32Window != 0 && "There is no Windows window" );
+  DALI_ASSERT_ALWAYS(mWin32Window != 0 && "There is no Windows window");
 }
 
-void WindowBaseWin::EventEntry( TWinEventInfo *event )
+void WindowBaseWin::SetWinWindow(uintptr_t surfaceId)
 {
-  unsigned int uMsg = event->uMsg;
+  HWND hWnd = (HWND)surfaceId;
 
-  switch( uMsg )
-  {
-  case WM_SETFOCUS:
-  {
-    OnFocusIn( uMsg, event );
-    break;
-  }
+  mWin32Window = static_cast<WinWindowHandle>(surfaceId);
 
-  case WM_KILLFOCUS:
-  {
-    OnFocusOut( uMsg, event );
-    break;
-  }
+  mWindowImpl.SetHWND(surfaceId);
 
-  case WM_PAINT:
-  {
-    OnWindowDamaged( uMsg, event );
-    break;
-  }
+  mWindowImpl.SetWinProc();
+}
 
-  case WM_LBUTTONDOWN:
-  {
-    OnMouseButtonDown( uMsg, event );
-    break;
-  }
+void WindowBaseWin::EventEntry(TWinEventInfo* event)
+{
+  unsigned int uMsg = event->uMsg;
 
-  case WM_LBUTTONUP:
+  switch(uMsg)
   {
-    OnMouseButtonUp( uMsg, event );
-    break;
+    case WM_SETFOCUS:
+    {
+      OnFocusIn(uMsg, event);
+      break;
+    }
+
+    case WM_KILLFOCUS:
+    {
+      OnFocusOut(uMsg, event);
+      break;
+    }
+
+    case WM_PAINT:
+    {
+      OnWindowDamaged(uMsg, event);
+      break;
+    }
+
+    case WM_LBUTTONDOWN:
+    {
+      OnMouseButtonDown(uMsg, event);
+      break;
+    }
+
+    case WM_LBUTTONUP:
+    {
+      OnMouseButtonUp(uMsg, event);
+      break;
+    }
+
+    case WM_MOUSEMOVE:
+    {
+      OnMouseButtonMove(uMsg, event);
+      break;
+    }
+
+    case WM_MOUSEWHEEL:
+    {
+      OnMouseWheel(uMsg, event);
+      break;
+    }
+
+    case WM_KEYDOWN:
+    {
+      OnKeyDown(uMsg, event);
+      break;
+    }
+
+    case WM_KEYUP:
+    {
+      OnKeyUp(uMsg, event);
+      break;
+    }
+
+    default:
+      break;
   }
+}
 
-  case WM_MOUSEMOVE:
-  {
-    OnMouseButtonMove( uMsg, event );
-    break;
-  }
+void WindowBaseWin::SetParent(WindowBase* parentWinBase, bool belowParent)
+{
+}
 
-  case WM_MOUSEWHEEL:
-  {
-    OnMouseWheel( uMsg, event );
-    break;
-  }
+int WindowBaseWin::CreateFrameRenderedSyncFence()
+{
+  return -1;
+}
 
-  case WM_KEYDOWN:
-  {
-    OnKeyDown( uMsg, event );
-    break;
-  }
+int WindowBaseWin::CreateFramePresentedSyncFence()
+{
+  return -1;
+}
 
-  case WM_KEYUP:
-  {
-    OnKeyUp( uMsg, event );
-    break;
-  }
+void WindowBaseWin::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
+{
+}
 
-  default:
-    break;
-  }
+void WindowBaseWin::InitializeIme()
+{
+}
+
+void WindowBaseWin::ImeWindowReadyToRender()
+{
+}
+
+void WindowBaseWin::RequestMoveToServer()
+{
 }
 
-void WindowBaseWin::SetParent( Any parent )
+void WindowBaseWin::RequestResizeToServer(WindowResizeDirection direction)
 {
+}
 
+void WindowBaseWin::EnableFloatingMode(bool enable)
+{
 }
 
-bool WindowBaseWin::IsMatchedWindow( Any window )
+bool WindowBaseWin::IsFloatingModeEnabled() const
 {
   return false;
 }
 
+void WindowBaseWin::IncludeInputRegion(const Rect<int>& inputRegion)
+{
+}
+
+void WindowBaseWin::ExcludeInputRegion(const Rect<int>& inputRegion)
+{
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
 
 } // namespace Dali
-