X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Ftizen-wayland%2Fecore-wl%2Fwindow-base-ecore-wl.cpp;h=8a38dee96ce0ac1210cc11954992fb2c77057b26;hb=aa19ec5a3944989bb2eed21eb6c316775cafd38a;hp=1b4e54b4c9449edfa835bacbd897e620374549f5;hpb=641c43874ce1a7ec9b554440bdd4637ee8efe828;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp index 1b4e54b..1b2c93f 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp @@ -268,6 +268,7 @@ static Eina_Bool EcoreEventRotate( void* data, int type, void* event ) WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data ); if( windowBase ) { + DALI_LOG_RELEASE_INFO( "WindowBaseEcoreWl::EcoreEventRotate\n" ); windowBase->OnRotation( data, type, event ); } return ECORE_CALLBACK_PASS_ON; @@ -812,7 +813,7 @@ void WindowBaseEcoreWl::OnRotation( void* data, int type, void* event ) if( ev->win == static_cast< unsigned int >( ecore_wl_window_id_get( mEcoreWindow ) ) ) { - DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnRotation\n" ); + DALI_LOG_RELEASE_INFO( "WindowBaseEcoreWl::OnRotation, angle: %d, width: %d, height: %d\n", ev->angle, ev->w, ev->h ); RotationEvent rotationEvent; rotationEvent.angle = ev->angle; @@ -946,7 +947,7 @@ void WindowBaseEcoreWl::OnMouseWheel( void* data, int type, void* event ) { DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::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 ); } @@ -961,7 +962,7 @@ void WindowBaseEcoreWl::OnDetentRotation( void* data, int type, void* event ) int direction = ( detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE ) ? 1 : -1; int timeStamp = detentEvent->timestamp; - WheelEvent wheelEvent( WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2( 0.0f, 0.0f ), direction, timeStamp ); + Integration::WheelEvent wheelEvent( Integration::WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2( 0.0f, 0.0f ), direction, timeStamp ); mWheelEventSignal.Emit( wheelEvent ); } @@ -1014,7 +1015,7 @@ void WindowBaseEcoreWl::OnKeyDown( void* data, int type, void* event ) GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass ); GetDeviceSubclass( ecore_device_subclass_get( keyEvent->dev ), deviceSubclass ); - Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, compose, deviceName, deviceClass, deviceSubclass ); + Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, compose, deviceName, deviceClass, deviceSubclass ); mKeyEventSignal.Emit( keyEvent ); } @@ -1028,6 +1029,15 @@ void WindowBaseEcoreWl::OnKeyUp( void* data, int type, void* event ) { DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n" ); +#if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 23) + // Cancel processing flag is sent because this key event will combine with the previous key. So, the event should not actually perform anything. + if( keyEvent->event_flags & ECORE_EVENT_FLAG_CANCEL ) + { + DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp: This event flag indicates the event is canceled. \n" ); + return; + } +#endif // Since ecore 1.23 version + std::string keyName( keyEvent->keyname ); std::string logicalKey( "" ); std::string keyString( "" ); @@ -1068,7 +1078,7 @@ void WindowBaseEcoreWl::OnKeyUp( void* data, int type, void* event ) GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass ); GetDeviceSubclass( ecore_device_subclass_get( keyEvent->dev ), deviceSubclass ); - Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, compose, deviceName, deviceClass, deviceSubclass ); + Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::UP, compose, deviceName, deviceClass, deviceSubclass ); mKeyEventSignal.Emit( keyEvent ); } @@ -1364,19 +1374,21 @@ void WindowBaseEcoreWl::Activate() ecore_wl_window_activate( mEcoreWindow ); } -void WindowBaseEcoreWl::SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations ) +void WindowBaseEcoreWl::SetAvailableAnlges( const std::vector< int >& angles ) { int rotations[4] = { 0 }; - for( std::size_t i = 0; i < orientations.size(); ++i ) + DALI_LOG_RELEASE_INFO( "WindowBaseEcoreWl::SetAvailableAnlges, angle's count: %d\n", angles.size() ); + for( std::size_t i = 0; i < angles.size(); ++i ) { - rotations[i] = static_cast< int >( orientations[i] ); + rotations[i] = static_cast< int >( angles[i] ); + DALI_LOG_RELEASE_INFO( "%d ", rotations[i] ); } - ecore_wl_window_rotation_available_rotations_set( mEcoreWindow, rotations, orientations.size() ); + ecore_wl_window_rotation_available_rotations_set( mEcoreWindow, rotations, angles.size() ); } -void WindowBaseEcoreWl::SetPreferredOrientation( Dali::Window::WindowOrientation orientation ) +void WindowBaseEcoreWl::SetPreferredAngle( int angle ) { - ecore_wl_window_rotation_preferred_rotation_set( mEcoreWindow, orientation ); + ecore_wl_window_rotation_preferred_rotation_set( mEcoreWindow, angle ); } void WindowBaseEcoreWl::SetAcceptFocus( bool accept ) @@ -2153,6 +2165,27 @@ void WindowBaseEcoreWl::CreateWindow( PositionSize positionSize ) } } +void WindowBaseEcoreWl::SetParent( WindowBase* parentWinBase ) +{ + Ecore_Wl_Window* ecoreParent = NULL; + if( parentWinBase ) + { + WindowBaseEcoreWl* winBaseEcore = static_cast( parentWinBase ); + ecoreParent = winBaseEcore->mEcoreWindow; + } + ecore_wl_window_parent_set( mEcoreWindow, ecoreParent ); +} + +int WindowBaseEcoreWl::CreateFrameRenderedSyncFence() +{ + return -1; +} + +int WindowBaseEcoreWl::CreateFramePresentedSyncFence() +{ + return -1; +} + } // namespace Adaptor } // namespace Internal