Revert "WheelEvent class pimpling"
authorJoogab Yun <joogab.yun@samsung.com>
Tue, 1 Sep 2020 08:07:59 +0000 (17:07 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Tue, 1 Sep 2020 08:07:59 +0000 (17:07 +0900)
This reverts commit 87425c2c91241f25877bc368589b66250cb24ad9.

14 files changed:
dali/devel-api/adaptor-framework/event-feeder.h
dali/devel-api/adaptor-framework/window-devel.h
dali/integration-api/adaptor-framework/scene-holder-impl.h
dali/integration-api/adaptor-framework/scene-holder.cpp
dali/integration-api/adaptor-framework/scene-holder.h
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/window-system/common/event-handler.cpp
dali/internal/window-system/common/event-handler.h
dali/internal/window-system/common/window-base.h
dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp
dali/internal/window-system/windows/window-base-win.cpp

index e1648a6..bffbcd4 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_EVENT_FEEDER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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
index 4e14202..fd1a95e 100644 (file)
@@ -29,7 +29,7 @@ namespace Dali
 {
 struct KeyEvent;
 class TouchEvent;
-class WheelEvent;
+struct WheelEvent;
 class RenderTaskList;
 
 namespace DevelWindow
index c5d5936..664a344 100644 (file)
@@ -41,8 +41,8 @@ class Any;
 class Adaptor;
 class Actor;
 class Layer;
-class WheelEvent;
 struct TouchPoint;
+struct WheelEvent;
 struct KeyEvent;
 
 namespace Integration
index d7b1514..a51a38d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.GetType() ), wheelEvent.GetDirection(), wheelEvent.GetModifiers(), wheelEvent.GetPoint(), wheelEvent.GetDelta(), wheelEvent.GetTime() );
+  Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp );
   GetImplementation(*this).FeedWheelEvent( event );
 }
 
index 2026e19..ee29a4d 100644 (file)
@@ -31,8 +31,8 @@ class Actor;
 class Layer;
 class Any;
 class TouchEvent;
-class WheelEvent;
 struct TouchPoint;
+struct WheelEvent;
 struct KeyEvent;
 
 namespace Internal DALI_INTERNAL
index a48b607..e21c096 100755 (executable)
@@ -27,7 +27,6 @@
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/object/object-registry.h>
-#include <dali/public-api/events/wheel-event.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/core.h>
@@ -568,9 +567,9 @@ void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp )
   mWindows.front()->FeedTouchPoint( convertedPoint, timeStamp );
 }
 
-void Adaptor::FeedWheelEvent( Dali::WheelEvent& wheelEvent )
+void Adaptor::FeedWheelEvent( WheelEvent& wheelEvent )
 {
-  Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >( wheelEvent.GetType() ), wheelEvent.GetDirection(), wheelEvent.GetModifiers(), wheelEvent.GetPoint(), wheelEvent.GetDelta(), wheelEvent.GetTime() );
+  Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp );
   mWindows.front()->FeedWheelEvent( event );
 }
 
index 5d0e63a..11d2237 100755 (executable)
@@ -246,7 +246,7 @@ public: // AdaptorInternalServices implementation
   /**
    * @copydoc Dali::EventFeeder::FeedWheelEvent()
    */
-  virtual void FeedWheelEvent( Dali::WheelEvent& wheelEvent );
+  virtual void FeedWheelEvent( WheelEvent& wheelEvent );
 
   /**
    * @copydoc Dali::EventFeeder::FeedKeyEvent()
index 3392797..448684d 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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,11 +149,13 @@ void EventHandler::OnTouchEvent( Integration::Point& point, uint32_t timeStamp )
   }
 }
 
-void EventHandler::OnWheelEvent( Integration::WheelEvent& wheelEvent )
+void EventHandler::OnWheelEvent( 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( wheelEvent );
+    (*iter)->OnWheelEvent( event );
   }
 }
 
index ca7fb68..549e29c 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_EVENT_HANDLER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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( Integration::WheelEvent& wheelEvent );
+  void OnWheelEvent( WheelEvent& wheelEvent );
 
   /**
    * Called when a key event is received.
index 6d1ee90..8d5f71d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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 <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/point.h>
-#include <dali/integration-api/events/wheel-event-integ.h>
+#include <dali/public-api/events/wheel-event.h>
 #include <string>
 #include <vector>
 #include <cstdint>
@@ -75,7 +75,7 @@ public:
 
   // Input events
   typedef Signal< void ( Integration::Point&, uint32_t ) > TouchEventSignalType;
-  typedef Signal< void ( Integration::WheelEvent& ) > WheelEventSignalType;
+  typedef Signal< void ( WheelEvent& ) > WheelEventSignalType;
   typedef Signal< void( Integration::KeyEvent& ) > KeyEventSignalType;
 
   // Clipboard
index 1e2c507..53fc688 100644 (file)
@@ -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 );
 
-    Integration::WheelEvent wheelEvent( Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( mouseWheelEvent->x, mouseWheelEvent->y ), mouseWheelEvent->z, mouseWheelEvent->timestamp );
+    WheelEvent wheelEvent( 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;
 
-  Integration::WheelEvent wheelEvent( Integration::WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2( 0.0f, 0.0f ), direction, timeStamp );
+  WheelEvent wheelEvent( WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2( 0.0f, 0.0f ), direction, timeStamp );
 
   mWheelEventSignal.Emit( wheelEvent );
 }
index e3934f3..86e0bf8 100755 (executable)
@@ -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 );
 
-    Integration::WheelEvent wheelEvent( Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( mouseWheelEvent->x, mouseWheelEvent->y ), mouseWheelEvent->z, mouseWheelEvent->timestamp );
+    WheelEvent wheelEvent( 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;
 
-  Integration::WheelEvent wheelEvent( Integration::WheelEvent::CUSTOM_WHEEL, direction, 0, Vector2( 0.0f, 0.0f ), 0, timeStamp );
+  WheelEvent wheelEvent( WheelEvent::CUSTOM_WHEEL, direction, 0, Vector2( 0.0f, 0.0f ), 0, timeStamp );
 
   mWheelEventSignal.Emit( wheelEvent );
 }
index 934d9dd..8a7add1 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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 );
 
-    Integration::WheelEvent wheelEvent( Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( static_cast<float>( mouseWheelEvent->x ), static_cast<float>( mouseWheelEvent->y ) ), mouseWheelEvent->z, mouseWheelEvent->timestamp );
+    WheelEvent wheelEvent( WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( static_cast<float>( mouseWheelEvent->x ), static_cast<float>( mouseWheelEvent->y ) ), mouseWheelEvent->z, mouseWheelEvent->timestamp );
 
     mWheelEventSignal.Emit( wheelEvent );
   }
index 8349ac2..95cfcad 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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 );
 
-    Integration::WheelEvent wheelEvent( Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent.direction, mouseWheelEvent.modifiers, Vector2( mouseWheelEvent.x, mouseWheelEvent.y ), mouseWheelEvent.z, mouseWheelEvent.timestamp );
+    WheelEvent wheelEvent( WheelEvent::MOUSE_WHEEL, mouseWheelEvent.direction, mouseWheelEvent.modifiers, Vector2( mouseWheelEvent.x, mouseWheelEvent.y ), mouseWheelEvent.z, mouseWheelEvent.timestamp );
 
     mWheelEventSignal.Emit( wheelEvent );
   }