X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fwindows%2Fwindow-base-win.cpp;h=d5cbe7be02ea7c952ca67f1b4e117a876d0d4122;hb=f110d85fb0606f3cfac47ad8d760168078d83148;hp=2b75b9f7108a4e5e35de3ee2e62d98baec85c52d;hpb=27f821a6f1119b40391cfe78c42b643549fb00e9;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/windows/window-base-win.cpp b/dali/internal/window-system/windows/window-base-win.cpp index 2b75b9f..d5cbe7b 100755 --- a/dali/internal/window-system/windows/window-base-win.cpp +++ b/dali/internal/window-system/windows/window-base-win.cpp @@ -61,7 +61,7 @@ WindowBaseWin::WindowBaseWin( Dali::PositionSize positionSize, Any surface, bool WindowBaseWin::~WindowBaseWin() { - WindowsPlatformImplementation::PostWinMessage( WM_CLOSE, 0, 0, mWin32Window ); + mWindowImpl.PostWinMessage( WM_CLOSE, 0, 0 ); } void WindowBaseWin::Initialize( PositionSize positionSize, Any surface, bool isTransparent ) @@ -82,7 +82,7 @@ void WindowBaseWin::Initialize( PositionSize positionSize, Any surface, bool isT mWin32Window = static_cast< WinWindowHandle >( surfaceId ); } - WindowsPlatformImplementation::SetListener( MakeCallback( this, &WindowBaseWin::EventEntry ) ); + mWindowImpl.SetListener( MakeCallback( this, &WindowBaseWin::EventEntry ) ); } void WindowBaseWin::OnDeleteRequest() @@ -100,25 +100,25 @@ void WindowBaseWin::OnFocusOut( int type, TWinEventInfo *event ) void WindowBaseWin::OnWindowDamaged( int type, TWinEventInfo *event ) { - Event_Mouse_Button* windowDamagedEvent( (Event_Mouse_Button*)event ); - - if( windowDamagedEvent->window == mWin32Window ) - { - DamageArea area; - area.x = 0; - area.y = 0; - WindowSystem::GetScreenSize( area.width, area.height ); - - mWindowDamagedSignal.Emit( area ); - } + Event_Mouse_Button* windowDamagedEvent( (Event_Mouse_Button*)event ); + + if( windowDamagedEvent->window == mWin32Window ) + { + DamageArea area; + area.x = 0; + area.y = 0; + WindowSystem::GetScreenSize( area.width, area.height ); + + mWindowDamagedSignal.Emit( area ); + } } 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.x = LOWORD( event->lParam ); + touchEvent.y = HIWORD( event->lParam ); touchEvent.multi.device = DEVICE_MOUSE; if( touchEvent.window == mWin32Window ) @@ -128,7 +128,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 + WindowsPlatformImplementation::GetEdgeHeight() ) ); + point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + mWindowImpl.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 ) ); @@ -141,8 +141,8 @@ 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.x = LOWORD( event->lParam ); + touchEvent.y = HIWORD( event->lParam ); touchEvent.multi.device = DEVICE_MOUSE; if( touchEvent.window == mWin32Window ) @@ -152,7 +152,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 + WindowsPlatformImplementation::GetEdgeHeight() ) ); + point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + mWindowImpl.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 ) ); @@ -165,8 +165,8 @@ 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.x = LOWORD( event->lParam ); + touchEvent.y = HIWORD( event->lParam ); touchEvent.multi.device = DEVICE_MOUSE; if( touchEvent.window == mWin32Window ) @@ -176,7 +176,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 + WindowsPlatformImplementation::GetEdgeHeight() ) ); + point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + mWindowImpl.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 ) ); @@ -239,7 +239,7 @@ void WindowBaseWin::OnKeyUp( int type, TWinEventInfo *event ) // 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::Up, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS ); mKeyEventSignal.Emit( keyEvent ); } @@ -291,24 +291,13 @@ void WindowBaseWin::Move( 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::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode ) -{ -} - -void WindowBaseWin::SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation ) -{ -} - -void WindowBaseWin::IndicatorTypeChanged( IndicatorInterface::Type type ) -{ -} - void WindowBaseWin::SetClass( const std::string& name, const std::string& className ) { } @@ -325,11 +314,11 @@ void WindowBaseWin::Activate() { } -void WindowBaseWin::SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations ) +void WindowBaseWin::SetAvailableAnlges( const std::vector< int >& angles ) { } -void WindowBaseWin::SetPreferredOrientation( Dali::Window::WindowOrientation orientation ) +void WindowBaseWin::SetPreferredAngle( int angle ) { } @@ -448,7 +437,7 @@ void WindowBaseWin::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertic float xres, yres; //// 1 inch = 25.4 millimeters - WindowsPlatformImplementation::GetDPI( mWin32Window, xres, yres ); + mWindowImpl.GetDPI( xres, yres ); xres *= 1.5f; yres *= 1.5f; @@ -466,6 +455,10 @@ void WindowBaseWin::SetWindowRotationAngle( int degree ) { } +int WindowBaseWin::GetWindowRotationAngle() +{ +} + void WindowBaseWin::WindowRotationCompleted( int degree, int width, int height ) { } @@ -474,6 +467,10 @@ void WindowBaseWin::SetTransparency( bool transparent ) { } +int WindowBaseWin::GetOrientation() const +{ +} + unsigned int WindowBaseWin::GetSurfaceId( Any surface ) const { unsigned int surfaceId = 0; @@ -491,11 +488,9 @@ unsigned int WindowBaseWin::GetSurfaceId( Any surface ) const void WindowBaseWin::CreateWinWindow( PositionSize positionSize, bool isTransparent ) { - long hWnd = WindowsPlatformImplementation::CreateHwnd( "Demo", "Demo", positionSize.x, positionSize.y, positionSize.width, positionSize.height, NULL ); - - WindowsPlatformImplementation::ShowWindow( hWnd ); - - mWin32Window = (WinWindowHandle)hWnd; + long hWnd = mWindowImpl.CreateHwnd( "Demo", "Demo", positionSize.x, positionSize.y, positionSize.width, positionSize.height, NULL ); + + mWin32Window = (WinWindowHandle)hWnd; DALI_ASSERT_ALWAYS( mWin32Window != 0 && "There is no Windows window" ); } @@ -503,67 +498,72 @@ void WindowBaseWin::EventEntry( TWinEventInfo *event ) { unsigned int uMsg = event->uMsg; - switch( uMsg ) - { - 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; - } - + switch( uMsg ) + { + 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; + break; } } +void WindowBaseWin::SetParent( WindowBase* parentWinBase ) +{ + +} + } // namespace Adaptor } // namespace Internal