/*
- * 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.
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 )
}
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 ) );
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 ) );
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 ) );
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 ) );
{
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 );
}
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;
// Ensure key event string is not NULL as keys like SHIFT have a null string.
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 );
}
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;
// Ensure key event string is not NULL as keys like SHIFT have a null string.
keyString.push_back( event->wParam );
- Integration::KeyEvent keyEvent( keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, 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 );
}
{
}
+int WindowBaseWin::GetWindowRotationAngle()
+{
+}
+
void WindowBaseWin::WindowRotationCompleted( int degree, int width, int height )
{
}
{
}
-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 )
{
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;
}
+int WindowBaseWin::CreateFrameRenderedSyncFence()
+{
+ return -1;
+}
+
+int WindowBaseWin::CreateFramePresentedSyncFence()
+{
+ return -1;
+}
+
} // namespace Adaptor
} // namespace Internal