From 34119fd554726fb691edbaa033e7b215ef2cca0b Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Tue, 1 Sep 2020 17:00:15 +0900 Subject: [PATCH] Revert "Revert "WheelEvent class pimpling"" This reverts commit 98e01f18efbc26115184269a4ccd84d29fa2901f. --- dali/devel-api/adaptor-framework/event-feeder.h | 4 ++-- dali/devel-api/adaptor-framework/window-devel.h | 2 +- .../integration-api/adaptor-framework/scene-holder-impl.h | 2 +- dali/integration-api/adaptor-framework/scene-holder.cpp | 4 ++-- dali/integration-api/adaptor-framework/scene-holder.h | 2 +- dali/internal/adaptor/common/adaptor-impl.cpp | 5 +++-- dali/internal/adaptor/common/adaptor-impl.h | 2 +- dali/internal/window-system/common/event-handler.cpp | 8 +++----- dali/internal/window-system/common/event-handler.h | 4 ++-- dali/internal/window-system/common/window-base.h | 6 +++--- .../tizen-wayland/ecore-wl/window-base-ecore-wl.cpp | 4 ++-- .../tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp | 4 ++-- .../window-system/ubuntu-x11/window-base-ecore-x.cpp | 4 ++-- dali/internal/window-system/windows/window-base-win.cpp | 4 ++-- 14 files changed, 27 insertions(+), 28 deletions(-) diff --git a/dali/devel-api/adaptor-framework/event-feeder.h b/dali/devel-api/adaptor-framework/event-feeder.h index bffbcd4e5..e1648a60f 100644 --- a/dali/devel-api/adaptor-framework/event-feeder.h +++ b/dali/devel-api/adaptor-framework/event-feeder.h @@ -2,7 +2,7 @@ #define DALI_EVENT_FEEDER_H /* - * Copyright (c) 2019 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. @@ -24,8 +24,8 @@ namespace Dali { +class WheelEvent; struct KeyEvent; -struct WheelEvent; struct TouchPoint; namespace EventFeeder diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index fd1a95efe..4e1420238 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -29,7 +29,7 @@ namespace Dali { struct KeyEvent; class TouchEvent; -struct WheelEvent; +class WheelEvent; class RenderTaskList; namespace DevelWindow diff --git a/dali/integration-api/adaptor-framework/scene-holder-impl.h b/dali/integration-api/adaptor-framework/scene-holder-impl.h index 664a34438..c5d5936a3 100644 --- a/dali/integration-api/adaptor-framework/scene-holder-impl.h +++ b/dali/integration-api/adaptor-framework/scene-holder-impl.h @@ -41,8 +41,8 @@ class Any; class Adaptor; class Actor; class Layer; +class WheelEvent; struct TouchPoint; -struct WheelEvent; struct KeyEvent; namespace Integration diff --git a/dali/integration-api/adaptor-framework/scene-holder.cpp b/dali/integration-api/adaptor-framework/scene-holder.cpp index a51a38da8..d7b1514c4 100644 --- a/dali/integration-api/adaptor-framework/scene-holder.cpp +++ b/dali/integration-api/adaptor-framework/scene-holder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 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. @@ -96,7 +96,7 @@ void SceneHolder::FeedTouchPoint( Dali::TouchPoint& point, int timeStamp ) void SceneHolder::FeedWheelEvent( Dali::WheelEvent& wheelEvent ) { - Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp ); + Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >( wheelEvent.GetType() ), wheelEvent.GetDirection(), wheelEvent.GetModifiers(), wheelEvent.GetPoint(), wheelEvent.GetDelta(), wheelEvent.GetTime() ); GetImplementation(*this).FeedWheelEvent( event ); } diff --git a/dali/integration-api/adaptor-framework/scene-holder.h b/dali/integration-api/adaptor-framework/scene-holder.h index ee29a4d3e..2026e198f 100644 --- a/dali/integration-api/adaptor-framework/scene-holder.h +++ b/dali/integration-api/adaptor-framework/scene-holder.h @@ -31,8 +31,8 @@ class Actor; class Layer; class Any; class TouchEvent; +class WheelEvent; struct TouchPoint; -struct WheelEvent; struct KeyEvent; namespace Internal DALI_INTERNAL diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index e21c09664..a48b60712 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -567,9 +568,9 @@ void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp ) mWindows.front()->FeedTouchPoint( convertedPoint, timeStamp ); } -void Adaptor::FeedWheelEvent( WheelEvent& wheelEvent ) +void Adaptor::FeedWheelEvent( Dali::WheelEvent& wheelEvent ) { - Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp ); + Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >( wheelEvent.GetType() ), wheelEvent.GetDirection(), wheelEvent.GetModifiers(), wheelEvent.GetPoint(), wheelEvent.GetDelta(), wheelEvent.GetTime() ); mWindows.front()->FeedWheelEvent( event ); } diff --git a/dali/internal/adaptor/common/adaptor-impl.h b/dali/internal/adaptor/common/adaptor-impl.h index 11d223770..5d0e63a6f 100755 --- a/dali/internal/adaptor/common/adaptor-impl.h +++ b/dali/internal/adaptor/common/adaptor-impl.h @@ -246,7 +246,7 @@ public: // AdaptorInternalServices implementation /** * @copydoc Dali::EventFeeder::FeedWheelEvent() */ - virtual void FeedWheelEvent( WheelEvent& wheelEvent ); + virtual void FeedWheelEvent( Dali::WheelEvent& wheelEvent ); /** * @copydoc Dali::EventFeeder::FeedKeyEvent() diff --git a/dali/internal/window-system/common/event-handler.cpp b/dali/internal/window-system/common/event-handler.cpp index 448684d35..33927978a 100755 --- a/dali/internal/window-system/common/event-handler.cpp +++ b/dali/internal/window-system/common/event-handler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 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. @@ -149,13 +149,11 @@ void EventHandler::OnTouchEvent( Integration::Point& point, uint32_t timeStamp ) } } -void EventHandler::OnWheelEvent( WheelEvent& wheelEvent ) +void EventHandler::OnWheelEvent( Integration::WheelEvent& wheelEvent ) { - Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp ); - for ( ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter ) { - (*iter)->OnWheelEvent( event ); + (*iter)->OnWheelEvent( wheelEvent ); } } diff --git a/dali/internal/window-system/common/event-handler.h b/dali/internal/window-system/common/event-handler.h index 549e29cad..ca7fb6826 100755 --- a/dali/internal/window-system/common/event-handler.h +++ b/dali/internal/window-system/common/event-handler.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_EVENT_HANDLER_H /* - * Copyright (c) 2019 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. @@ -166,7 +166,7 @@ private: /** * Called when a mouse wheel is received. */ - void OnWheelEvent( WheelEvent& wheelEvent ); + void OnWheelEvent( Integration::WheelEvent& wheelEvent ); /** * Called when a key event is received. diff --git a/dali/internal/window-system/common/window-base.h b/dali/internal/window-system/common/window-base.h index 8d5f71d6d..6d1ee9065 100644 --- a/dali/internal/window-system/common/window-base.h +++ b/dali/internal/window-system/common/window-base.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H /* - * Copyright (c) 2019 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. @@ -21,7 +21,7 @@ // EXTERNAL INCLUDES #include #include -#include +#include #include #include #include @@ -75,7 +75,7 @@ public: // Input events typedef Signal< void ( Integration::Point&, uint32_t ) > TouchEventSignalType; - typedef Signal< void ( WheelEvent& ) > WheelEventSignalType; + typedef Signal< void ( Integration::WheelEvent& ) > WheelEventSignalType; typedef Signal< void( Integration::KeyEvent& ) > KeyEventSignalType; // Clipboard 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 53fc688a5..1e2c50731 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 @@ -947,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 ); } @@ -962,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 ); } diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index 86e0bf872..e3934f3a8 100755 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -1111,7 +1111,7 @@ void WindowBaseEcoreWl2::OnMouseWheel( void* data, int type, void* event ) { DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::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 ); } @@ -1126,7 +1126,7 @@ void WindowBaseEcoreWl2::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, direction, 0, Vector2( 0.0f, 0.0f ), 0, timeStamp ); + Integration::WheelEvent wheelEvent( Integration::WheelEvent::CUSTOM_WHEEL, direction, 0, Vector2( 0.0f, 0.0f ), 0, timeStamp ); mWheelEventSignal.Emit( wheelEvent ); } diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp index 8a7add1b5..934d9ddb4 100755 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 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. @@ -505,7 +505,7 @@ void WindowBaseEcoreX::OnMouseWheel( void* data, int type, void* event ) { DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreX::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( static_cast( mouseWheelEvent->x ), static_cast( mouseWheelEvent->y ) ), mouseWheelEvent->z, mouseWheelEvent->timestamp ); + Integration::WheelEvent wheelEvent( Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( static_cast( mouseWheelEvent->x ), static_cast( mouseWheelEvent->y ) ), mouseWheelEvent->z, mouseWheelEvent->timestamp ); mWheelEventSignal.Emit( wheelEvent ); } diff --git a/dali/internal/window-system/windows/window-base-win.cpp b/dali/internal/window-system/windows/window-base-win.cpp index c846e541f..1eb6ec4cf 100755 --- a/dali/internal/window-system/windows/window-base-win.cpp +++ b/dali/internal/window-system/windows/window-base-win.cpp @@ -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. @@ -192,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 ); } -- 2.34.1