Merge "Reverts the previously implemented FeedTouch. The new Logic FeedTouch is comin...
authorjoogab yun <joogab.yun@samsung.com>
Tue, 18 Jun 2024 07:32:41 +0000 (07:32 +0000)
committerGerrit Code Review <gerrit@review>
Tue, 18 Jun 2024 07:32:41 +0000 (07:32 +0000)
20 files changed:
automated-tests/src/dali/utc-Dali-GeoTouchProcessing.cpp
automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp
automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp
automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp
automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp
automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp
dali/internal/event/events/gesture-detector-impl.cpp
dali/internal/event/events/gesture-event-processor.cpp
dali/internal/event/events/gesture-event-processor.h
dali/internal/event/events/gesture-event.h
dali/internal/event/events/gesture-processor.cpp
dali/internal/event/events/gesture-processor.h
dali/internal/event/events/gesture-recognizer.h
dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp
dali/internal/event/events/long-press-gesture/long-press-gesture-recognizer.cpp
dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp
dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp
dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp
dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp
dali/internal/event/events/touch-event-impl.h

index 0e0793f..4d02050 100644 (file)
@@ -1816,7 +1816,6 @@ int UtcDaliGeoTouchEventInterruptedDifferentConsumer02(void)
   END_TEST;
 }
 
-
 int UtcDaliGeoTouchEventGetRadius(void)
 {
   TestApplication application;
index 54d5556..3ed67dd 100644 (file)
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/devel-api/events/long-press-gesture-detector-devel.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/touch-integ.h>
 #include <dali/integration-api/input-options.h>
 #include <dali/integration-api/render-task-list-integ.h>
-#include <dali/internal/event/events/touch-event-impl.h>
-#include <dali/internal/event/render-tasks/render-task-impl.h>
 #include <dali/public-api/dali-core.h>
 #include <stdlib.h>
 #include <test-touch-event-utils.h>
@@ -134,19 +131,6 @@ struct TouchEventFunctor
   }
 };
 
-Integration::TouchEvent GenerateSingleTouch(PointState::Type state, const Vector2& screenPosition, uint32_t time)
-{
-  Integration::TouchEvent touchEvent;
-  Integration::Point      point;
-  point.SetState(state);
-  point.SetDeviceId(4);
-  point.SetScreenPosition(screenPosition);
-  point.SetDeviceClass(Device::Class::TOUCH);
-  point.SetDeviceSubclass(Device::Subclass::NONE);
-  touchEvent.points.push_back(point);
-  touchEvent.time = time;
-  return touchEvent;
-}
 } // namespace
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1137,53 +1121,3 @@ int UtcDaliLongPressGestureWhenGesturePropargation(void)
 
   END_TEST;
 }
-
-int UtcDaliLongPressGestureFeedTouch(void)
-{
-  TestApplication application;
-  Integration::Scene scene     = application.GetScene();
-  RenderTaskList   taskList  = scene.GetRenderTaskList();
-  Dali::RenderTask task      = taskList.GetTask(0);
-
-  Actor parentActor = Actor::New();
-  parentActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  parentActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  Actor childActor = Actor::New();
-  childActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  childActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  parentActor.Add(childActor);
-  application.GetScene().Add(parentActor);
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  SignalData             pData;
-  GestureReceivedFunctor pFunctor(pData);
-
-  LongPressGestureDetector parentDetector = LongPressGestureDetector::New();
-  parentDetector.DetectedSignal().Connect(&application, pFunctor);
-
-  Integration::TouchEvent tp = GenerateSingleTouch(PointState::DOWN, Vector2(50.0f, 50.0f), 100);
-  Internal::TouchEventPtr touchEventImpl(new Internal::TouchEvent(100));
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  TestTriggerLongPress(application);
-
-  tp = GenerateSingleTouch(PointState::UP, Vector2(50.0f, 50.0f), 150);
-  touchEventImpl = new Internal::TouchEvent(150);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  DALI_TEST_EQUALS(true, pData.functorCalled, TEST_LOCATION);
-  pData.Reset();
-
-  END_TEST;
-}
index 2d31057..a1d4483 100644 (file)
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/devel-api/events/pan-gesture-devel.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/touch-integ.h>
 #include <dali/integration-api/input-options.h>
 #include <dali/integration-api/profiling.h>
 #include <dali/integration-api/render-task-list-integ.h>
-#include <dali/internal/event/events/touch-event-impl.h>
-#include <dali/internal/event/render-tasks/render-task-impl.h>
 #include <dali/public-api/dali-core.h>
 #include <stdlib.h>
 #include <test-touch-event-utils.h>
@@ -202,19 +199,6 @@ PanGesture GeneratePan(unsigned int time,
   return pan;
 }
 
-Integration::TouchEvent GenerateSingleTouch(PointState::Type state, const Vector2& screenPosition, uint32_t time)
-{
-  Integration::TouchEvent touchEvent;
-  Integration::Point      point;
-  point.SetState(state);
-  point.SetDeviceId(4);
-  point.SetScreenPosition(screenPosition);
-  point.SetDeviceClass(Device::Class::TOUCH);
-  point.SetDeviceSubclass(Device::Subclass::NONE);
-  touchEvent.points.push_back(point);
-  touchEvent.time = time;
-  return touchEvent;
-}
 } // namespace
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -3058,221 +3042,3 @@ int UtcDaliPanGestureWhenGesturePropargation(void)
 
   END_TEST;
 }
-
-int UtcDaliPanGestureFeedTouch(void)
-{
-  TestApplication application;
-  Integration::Scene scene     = application.GetScene();
-  RenderTaskList   taskList  = scene.GetRenderTaskList();
-  Dali::RenderTask task      = taskList.GetTask(0);
-
-  Actor parentActor = Actor::New();
-  parentActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  parentActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  Actor childActor = Actor::New();
-  childActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  childActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  parentActor.Add(childActor);
-  application.GetScene().Add(parentActor);
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  SignalData             pData;
-  GestureReceivedFunctor pFunctor(pData);
-
-  PanGestureDetector parentDetector = PanGestureDetector::New();
-  parentDetector.DetectedSignal().Connect(&application, pFunctor);
-
-
-  Integration::TouchEvent tp = GenerateSingleTouch(PointState::DOWN, Vector2(50.0f, 50.0f), 100);
-  Internal::TouchEventPtr touchEventImpl(new Internal::TouchEvent(100));
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-
-  tp = GenerateSingleTouch(PointState::MOTION, Vector2(70.0f, 70.0f), 150);
-  touchEventImpl = new Internal::TouchEvent(150);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-
-  tp = GenerateSingleTouch(PointState::MOTION, Vector2(90.0f, 90.0f), 200);
-  touchEventImpl = new Internal::TouchEvent(200);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateSingleTouch(PointState::UP, Vector2(100.0f, 100.0f), 250);
-  touchEventImpl = new Internal::TouchEvent(250);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-
-  DALI_TEST_EQUALS(true, pData.functorCalled, TEST_LOCATION);
-  pData.Reset();
-
-  END_TEST;
-}
-
-int UtcDaliPanGestureFeedTouchWhenGesturePropargation(void)
-{
-  TestApplication application;
-  Integration::Scene scene     = application.GetScene();
-  RenderTaskList   taskList  = scene.GetRenderTaskList();
-  Dali::RenderTask task      = taskList.GetTask(0);
-
-  Actor parentActor = Actor::New();
-  parentActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  parentActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  Actor childActor = Actor::New();
-  childActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  childActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  parentActor.Add(childActor);
-  application.GetScene().Add(parentActor);
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  SignalData             pData;
-  GestureReceivedFunctor pFunctor(pData);
-
-  PanGestureDetector parentDetector = PanGestureDetector::New();
-  parentDetector.DetectedSignal().Connect(&application, pFunctor);
-
-  SignalData             cData;
-  GestureReceivedFunctor cFunctor(cData);
-
-  PanGestureDetector childDetector = PanGestureDetector::New();
-  childDetector.DetectedSignal().Connect(&application, cFunctor);
-
-  // Start gesture within the actor's area, we receive the gesture not parent actor but child actor.
-  Integration::TouchEvent tp = GenerateSingleTouch(PointState::DOWN, Vector2(50.0f, 50.0f), 100);
-  Internal::TouchEventPtr touchEventImpl(new Internal::TouchEvent(100));
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  tp = GenerateSingleTouch(PointState::MOTION, Vector2(60.0f, 60.0f), 150);
-  touchEventImpl = new Internal::TouchEvent(150);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  tp = GenerateSingleTouch(PointState::MOTION, Vector2(70.0f, 70.0f), 200);
-  touchEventImpl = new Internal::TouchEvent(200);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  tp = GenerateSingleTouch(PointState::MOTION, Vector2(80.0f, 80.0f), 250);
-  touchEventImpl = new Internal::TouchEvent(200);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  tp = GenerateSingleTouch(PointState::UP, Vector2(100.0f, 100.0f), 300);
-  touchEventImpl = new Internal::TouchEvent(250);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  DALI_TEST_EQUALS(true, cData.functorCalled, TEST_LOCATION);
-  DALI_TEST_EQUALS(false, pData.functorCalled, TEST_LOCATION);
-  cData.Reset();
-  pData.Reset();
-
-  // If GesturePropargation is set, a gesture event is to pass over to the parent.
-  Dali::DevelActor::SetNeedGesturePropagation(childActor, true);
-
-  // So now the parent got the gesture event.
-  tp = GenerateSingleTouch(PointState::DOWN, Vector2(50.0f, 50.0f), 100);
-  touchEventImpl = new Internal::TouchEvent(100);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  tp = GenerateSingleTouch(PointState::MOTION, Vector2(60.0f, 60.0f), 150);
-  touchEventImpl = new Internal::TouchEvent(150);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  tp = GenerateSingleTouch(PointState::MOTION, Vector2(70.0f, 70.0f), 200);
-  touchEventImpl = new Internal::TouchEvent(200);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  tp = GenerateSingleTouch(PointState::MOTION, Vector2(80.0f, 80.0f), 250);
-  touchEventImpl = new Internal::TouchEvent(200);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  tp = GenerateSingleTouch(PointState::UP, Vector2(100.0f, 100.0f), 300);
-  touchEventImpl = new Internal::TouchEvent(250);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  if(!childDetector.FeedTouch(childActor, touchEventHandle))
-  {
-    parentDetector.FeedTouch(parentActor, touchEventHandle);
-  }
-
-  DALI_TEST_EQUALS(true, cData.functorCalled, TEST_LOCATION);
-  DALI_TEST_EQUALS(true, pData.functorCalled, TEST_LOCATION);
-  cData.Reset();
-  pData.Reset();
-
-  END_TEST;
-}
\ No newline at end of file
index 2937a40..2c45979 100644 (file)
 #include <dali-test-suite-utils.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/touch-integ.h>
 #include <dali/integration-api/render-task-list-integ.h>
-#include <dali/internal/event/events/touch-event-impl.h>
-#include <dali/internal/event/render-tasks/render-task-impl.h>
 #include <dali/public-api/dali-core.h>
 #include <stdlib.h>
 #include <test-touch-event-utils.h>
@@ -116,23 +113,6 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
   Integration::Scene scene;
 };
 
-
-Integration::TouchEvent GenerateDoubleTouch(PointState::Type stateA, const Vector2& screenPositionA, PointState::Type stateB, const Vector2& screenPositionB, uint32_t time)
-{
-  Integration::TouchEvent touchEvent;
-  Integration::Point      point;
-  point.SetState(stateA);
-  point.SetScreenPosition(screenPositionA);
-  point.SetDeviceClass(Device::Class::TOUCH);
-  point.SetDeviceSubclass(Device::Subclass::NONE);
-  touchEvent.points.push_back(point);
-  point.SetScreenPosition(screenPositionB);
-  point.SetState(stateB);
-  touchEvent.points.push_back(point);
-  touchEvent.time = time;
-  return touchEvent;
-}
-
 } // namespace
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1225,87 +1205,4 @@ int UtcDaliPinchGestureWhenGesturePropargation(void)
   pData.Reset();
 
   END_TEST;
-}
-
-int UtcDaliPinchGestureFeedTouch(void)
-{
-  TestApplication application;
-  Integration::Scene scene     = application.GetScene();
-  RenderTaskList   taskList  = scene.GetRenderTaskList();
-  Dali::RenderTask task      = taskList.GetTask(0);
-
-  Actor parentActor = Actor::New();
-  parentActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  parentActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  Actor childActor = Actor::New();
-  childActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  childActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  parentActor.Add(childActor);
-  application.GetScene().Add(parentActor);
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  SignalData             pData;
-  GestureReceivedFunctor pFunctor(pData);
-
-  PinchGestureDetector parentDetector = PinchGestureDetector::New();
-  parentDetector.DetectedSignal().Connect(&application, pFunctor);
-
-  Integration::TouchEvent tp = GenerateDoubleTouch(PointState::DOWN, Vector2(2.0f, 20.0f), PointState::DOWN, Vector2(38.0f, 20.0f), 100);
-  Internal::TouchEventPtr touchEventImpl(new Internal::TouchEvent(100));
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 150);
-  touchEventImpl = new Internal::TouchEvent(150);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 200);
-  touchEventImpl = new Internal::TouchEvent(200);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 250);
-  touchEventImpl = new Internal::TouchEvent(250);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 300);
-  touchEventImpl = new Internal::TouchEvent(300);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::UP, Vector2(10.0f, 20.0f), PointState::UP, Vector2(30.0f, 20.0f), 350);
-  touchEventImpl = new Internal::TouchEvent(350);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-
-  DALI_TEST_EQUALS(true, pData.functorCalled, TEST_LOCATION);
-  pData.Reset();
-
-  END_TEST;
-}
+}
\ No newline at end of file
index 6b5b333..8c1d929 100644 (file)
 #include <dali-test-suite-utils.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/touch-integ.h>
 #include <dali/integration-api/render-task-list-integ.h>
-#include <dali/internal/event/events/touch-event-impl.h>
-#include <dali/internal/event/render-tasks/render-task-impl.h>
 #include <dali/public-api/dali-core.h>
 #include <stdlib.h>
 #include <test-touch-event-utils.h>
@@ -116,21 +113,6 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
   Integration::Scene scene;
 };
 
-Integration::TouchEvent GenerateDoubleTouch(PointState::Type stateA, const Vector2& screenPositionA, PointState::Type stateB, const Vector2& screenPositionB, uint32_t time)
-{
-  Integration::TouchEvent touchEvent;
-  Integration::Point      point;
-  point.SetState(stateA);
-  point.SetScreenPosition(screenPositionA);
-  point.SetDeviceClass(Device::Class::TOUCH);
-  point.SetDeviceSubclass(Device::Subclass::NONE);
-  touchEvent.points.push_back(point);
-  point.SetScreenPosition(screenPositionB);
-  point.SetState(stateB);
-  touchEvent.points.push_back(point);
-  touchEvent.time = time;
-  return touchEvent;
-}
 } // namespace
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1189,88 +1171,4 @@ int UtcDaliRotationGestureWhenGesturePropargation(void)
   pData.Reset();
 
   END_TEST;
-}
-
-
-int UtcDaliRotationGestureFeedTouch(void)
-{
-  TestApplication application;
-  Integration::Scene scene     = application.GetScene();
-  RenderTaskList   taskList  = scene.GetRenderTaskList();
-  Dali::RenderTask task      = taskList.GetTask(0);
-
-  Actor parentActor = Actor::New();
-  parentActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  parentActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  Actor childActor = Actor::New();
-  childActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  childActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  parentActor.Add(childActor);
-  application.GetScene().Add(parentActor);
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  SignalData             pData;
-  GestureReceivedFunctor pFunctor(pData);
-
-  RotationGestureDetector parentDetector = RotationGestureDetector::New();
-  parentDetector.DetectedSignal().Connect(&application, pFunctor);
-
-  Integration::TouchEvent tp = GenerateDoubleTouch(PointState::DOWN, Vector2(2.0f, 20.0f), PointState::DOWN, Vector2(38.0f, 20.0f), 100);
-  Internal::TouchEventPtr touchEventImpl(new Internal::TouchEvent(100));
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 150);
-  touchEventImpl = new Internal::TouchEvent(150);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 200);
-  touchEventImpl = new Internal::TouchEvent(200);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 250);
-  touchEventImpl = new Internal::TouchEvent(250);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::MOTION, Vector2(6.0f, 6.0f), PointState::MOTION, Vector2(18.0f, 18.0f), 300);
-  touchEventImpl = new Internal::TouchEvent(300);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateDoubleTouch(PointState::UP, Vector2(10.0f, 8.0f), PointState::UP, Vector2(14.0f, 16.0f), 350);
-  touchEventImpl = new Internal::TouchEvent(350);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->AddPoint(tp.GetPoint(1));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-
-  DALI_TEST_EQUALS(true, pData.functorCalled, TEST_LOCATION);
-  pData.Reset();
-
-  END_TEST;
-}
+}
\ No newline at end of file
index 09f176f..5c15b92 100644 (file)
 #include <dali-test-suite-utils.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/touch-integ.h>
 #include <dali/integration-api/render-task-list-integ.h>
-#include <dali/internal/event/events/touch-event-impl.h>
-#include <dali/internal/event/render-tasks/render-task-impl.h>
 #include <dali/public-api/dali-core.h>
 #include <stdlib.h>
 #include <test-touch-event-utils.h>
@@ -1334,51 +1331,3 @@ int UtcDaliTapGestureDetectorCheck(void)
 
   END_TEST;
 }
-
-int UtcDaliTapGestureFeedTouch(void)
-{
-  TestApplication application;
-  Integration::Scene scene     = application.GetScene();
-  RenderTaskList   taskList  = scene.GetRenderTaskList();
-  Dali::RenderTask task      = taskList.GetTask(0);
-
-  Actor parentActor = Actor::New();
-  parentActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  parentActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  Actor childActor = Actor::New();
-  childActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
-  childActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-
-  parentActor.Add(childActor);
-  application.GetScene().Add(parentActor);
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
-
-  SignalData             pData;
-  GestureReceivedFunctor pFunctor(pData);
-
-  TapGestureDetector parentDetector = TapGestureDetector::New();
-  parentDetector.DetectedSignal().Connect(&application, pFunctor);
-
-  Integration::TouchEvent tp = GenerateSingleTouch(PointState::DOWN, Vector2(50.0f, 50.0f), 1, 100);
-  Internal::TouchEventPtr touchEventImpl(new Internal::TouchEvent(100));
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  tp = GenerateSingleTouch(PointState::UP, Vector2(50.0f, 50.0f), 1, 150);
-  touchEventImpl = new Internal::TouchEvent(150);
-  touchEventImpl->AddPoint(tp.GetPoint(0));
-  touchEventImpl->SetRenderTask(task);
-  touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
-  parentDetector.FeedTouch(parentActor, touchEventHandle);
-
-  DALI_TEST_EQUALS(true, pData.functorCalled, TEST_LOCATION);
-  pData.Reset();
-
-  END_TEST;
-}
index 12bbbc1..1e98cb7 100644 (file)
@@ -27,8 +27,6 @@
 #include <dali/internal/event/common/thread-local-storage.h>
 #include <dali/internal/event/events/actor-gesture-data.h>
 #include <dali/internal/event/events/gesture-event-processor.h>
-#include <dali/internal/event/events/touch-event-impl.h>
-#include <dali/internal/event/render-tasks/render-task-impl.h>
 
 namespace Dali
 {
@@ -262,52 +260,8 @@ Dali::Actor GestureDetector::GetAttachedActor(size_t index) const
 
 bool GestureDetector::FeedTouch(Dali::Actor& actor, Dali::TouchEvent& touch)
 {
-  bool ret = false;
-  if(touch.GetPointCount() > 0)
-  {
-    const PointState::Type state = touch.GetState(0);
-    Dali::Internal::Actor& actorImpl(GetImplementation(actor));
-    if(state == PointState::DOWN)
-    {
-      //TODO We need to find a better way to add detectors to the processor other than detach and attach.
-      Detach(actorImpl);
-      Attach(actorImpl);
-      mIsDetected = false;
-    }
-
-    Integration::TouchEvent touchEvent(touch.GetTime());
-    for(std::size_t i = 0; i< touch.GetPointCount(); i++)
-    {
-      Integration::Point      point;
-      point.SetState(touch.GetState(i));
-      point.SetDeviceId(touch.GetDeviceId(i));
-      point.SetScreenPosition(touch.GetScreenPosition(i));
-      point.SetRadius(touch.GetRadius(i));
-      point.SetPressure(touch.GetPressure(i));
-      point.SetAngle(touch.GetAngle(i));
-      point.SetDeviceClass(touch.GetDeviceClass(i));
-      point.SetDeviceSubclass(touch.GetDeviceSubclass(i));
-      point.SetMouseButton(touch.GetMouseButton(i));
-      point.SetHitActor(touch.GetHitActor(i));
-      point.SetLocalPosition(touch.GetLocalPosition(i));
-      touchEvent.points.push_back(point);
-    }
-
-    Dali::Internal::TouchEvent& touchEventImpl(GetImplementation(touch));
-    mGestureEventProcessor.ProcessTouchEvent(this, actorImpl, GetImplementation(touchEventImpl.GetRenderTaskPtr()), actorImpl.GetScene(), touchEvent);
-
-    if(IsDetected())
-    {
-      ret = !actorImpl.NeedGesturePropagation();
-    }
-
-    if(state == PointState::FINISHED || state == PointState::INTERRUPTED || state == PointState::LEAVE)
-    {
-      //TODO We need to find a better way to remove detectors to the processor other than detach.
-      Detach(actorImpl);
-    }
-  }
-  return ret;
+  //TODO
+  return false;
 }
 
 bool GestureDetector::IsDetected() const
index 85abccc..1240148 100644 (file)
@@ -42,8 +42,7 @@ GestureEventProcessor::GestureEventProcessor(SceneGraph::UpdateManager& updateMa
   mRotationGestureProcessor(),
   mRenderController(renderController),
   envOptionMinimumPanDistance(-1),
-  envOptionMinimumPanEvents(-1),
-  mIsProcessingFeedTouch(false)
+  envOptionMinimumPanEvents(-1)
 {
 }
 
@@ -51,52 +50,11 @@ GestureEventProcessor::~GestureEventProcessor() = default;
 
 void GestureEventProcessor::ProcessTouchEvent(Scene& scene, const Integration::TouchEvent& event)
 {
-  if(!mIsProcessingFeedTouch)
-  {
-    mLongPressGestureProcessor.ProcessTouch(scene, event);
-    mPanGestureProcessor.ProcessTouch(scene, event);
-    mPinchGestureProcessor.ProcessTouch(scene, event);
-    mTapGestureProcessor.ProcessTouch(scene, event);
-    mRotationGestureProcessor.ProcessTouch(scene, event);
-  }
-  mIsProcessingFeedTouch = false;
-}
-
-void GestureEventProcessor::ProcessTouchEvent(GestureDetector* gestureDetector, Actor& actor, Dali::Internal::RenderTask& renderTask, Scene& scene, const Integration::TouchEvent& event)
-{
-  mIsProcessingFeedTouch = true;
-  switch(gestureDetector->GetType())
-  {
-    case GestureType::LONG_PRESS:
-    {
-      mLongPressGestureProcessor.ProcessTouch(gestureDetector, actor, renderTask, scene, event);
-      break;
-    }
-
-    case GestureType::PAN:
-    {
-      mPanGestureProcessor.ProcessTouch(gestureDetector, actor, renderTask, scene, event);
-      break;
-    }
-
-    case GestureType::PINCH:
-    {
-      mPinchGestureProcessor.ProcessTouch(gestureDetector, actor, renderTask, scene, event);
-      break;
-    }
-
-    case GestureType::TAP:
-    {
-      mTapGestureProcessor.ProcessTouch(gestureDetector, actor, renderTask, scene, event);
-      break;
-    }
-
-    case GestureType::ROTATION:
-    {
-      mRotationGestureProcessor.ProcessTouch(gestureDetector, actor, renderTask, scene, event);
-      break;
-    }
-  }
+  mLongPressGestureProcessor.ProcessTouch(scene, event);
+  mPanGestureProcessor.ProcessTouch(scene, event);
+  mPinchGestureProcessor.ProcessTouch(scene, event);
+  mTapGestureProcessor.ProcessTouch(scene, event);
+  mRotationGestureProcessor.ProcessTouch(scene, event);
 }
 
 void GestureEventProcessor::AddGestureDetector(GestureDetector* gestureDetector, Scene& scene)
index 8f3431f..b54ea9d 100644 (file)
@@ -74,16 +74,6 @@ public: // To be called by EventProcessor
    */
   void ProcessTouchEvent(Scene& scene, const Integration::TouchEvent& event);
 
-  /**
-   * This function is called by gesture detector whenever a touch event occurs
-   * @param[in] gestureDetector The gesture detector
-   * @param[in] actor The actor
-   * @param[in] renderTask The renderTask
-   * @param[in] scene The scene
-   * @param[in] event The event that has occurred
-   */
-  void ProcessTouchEvent(GestureDetector* gestureDetector, Actor& actor, Dali::Internal::RenderTask& renderTask, Scene& scene, const Integration::TouchEvent& event);
-
 public: // To be called by gesture detectors
   /**
    * This method adds the specified gesture detector to the relevant gesture processor.
@@ -345,7 +335,6 @@ private:
 
   int32_t envOptionMinimumPanDistance;
   int32_t envOptionMinimumPanEvents;
-  bool mIsProcessingFeedTouch;  // Whether the gesture is being recognized via FeedTouch in gestureDetector
 };
 
 } // namespace Internal
index 93923c4..d803dcf 100644 (file)
@@ -21,7 +21,6 @@
 // INTERNAL INCLUDES
 #include <dali/integration-api/events/event.h>
 #include <dali/internal/event/events/gesture-impl.h>
-#include <dali/internal/event/render-tasks/render-task-impl.h>
 
 namespace Dali
 {
index 3169495..a2d581c 100644 (file)
@@ -78,10 +78,7 @@ GestureProcessor::GestureProcessor(GestureType::Value type)
   mCurrentGesturedActor(nullptr),
   mPoint(),
   mEventTime(0u),
-  mGesturedActorDisconnected(false),
-  mFeededActor(nullptr),
-  mRenderTask(),
-  mGestureDetector(nullptr)
+  mGesturedActorDisconnected(false)
 {
 }
 
@@ -99,43 +96,10 @@ void GestureProcessor::ProcessTouch(Scene& scene, const Integration::TouchEvent&
       mPoint     = event.points[0];
       mEventTime = event.time;
     }
-    mFeededActor = nullptr;
-    mGestureDetector = nullptr;
     mGestureRecognizer->SendEvent(scene, event);
   }
 }
 
-void GestureProcessor::ProcessTouch(GestureDetector* gestureDetector, Actor& actor, Dali::Internal::RenderTask& renderTask, Scene& scene, const Integration::TouchEvent& event)
-{
-  if(mGestureRecognizer)
-  {
-    if(!event.points.empty())
-    {
-      mPoint     = event.points[0];
-      mEventTime = event.time;
-    }
-    mGestureDetector = gestureDetector;
-    mFeededActor.SetActor(&actor);
-    mRenderTask = &renderTask;
-    mGestureRecognizer->SendEvent(scene, event);
-  }
-}
-
-Actor* GestureProcessor::GetFeededActor()
-{
-  return mFeededActor.GetActor();
-}
-
-GestureDetector* GestureProcessor::GetFeededGestureDetector()
-{
-  return mGestureDetector;
-}
-
-RenderTaskPtr GestureProcessor::GetFeededRenderTask()
-{
-  return mRenderTask;
-}
-
 void GestureProcessor::GetGesturedActor(Actor*& actor, GestureDetectorContainer& gestureDetectors)
 {
   while(actor)
@@ -237,22 +201,6 @@ void GestureProcessor::ProcessAndEmit(HitTestAlgorithm::Results& hitTestResults)
   }
 }
 
-void GestureProcessor::ProcessAndEmitActor(HitTestAlgorithm::Results& hitTestResults, GestureDetector* gestureDetector)
-{
-  if(hitTestResults.actor && gestureDetector)
-  {
-    Actor*  actor(&GetImplementation(hitTestResults.actor));
-    GestureDetectorContainer gestureDetectors;
-    // Check deriving class for whether the current gesture satisfies the gesture detector's parameters.
-    if(actor && actor->IsVisible() && gestureDetector && CheckGestureDetector(gestureDetector, actor))
-    {
-      gestureDetectors.push_back(gestureDetector);
-      gestureDetector->SetDetected(true);
-      EmitGestureSignal(actor, gestureDetectors, hitTestResults.actorCoordinates);
-    }
-  }
-}
-
 bool GestureProcessor::HitTest(Scene& scene, Vector2 screenCoordinates, HitTestAlgorithm::Results& hitTestResults)
 {
   GestureHitTestCheck hitCheck(mType);
index b1874b4..e2015f3 100644 (file)
@@ -44,16 +44,6 @@ public:
   void ProcessTouch(Scene& scene, const Integration::TouchEvent& event);
 
   /**
-   * Process the touch event in the attached recognizer
-   * @param[in] gestureDetector The gesture detector which gesture want to recognize.
-   * @param[in] actor The actor which gesture want to recognize.
-   * @param[in] renderTask RenderTask.
-   * @param[in] scene Scene.
-   * @param[in] event Touch event to process
-   */
-  void ProcessTouch(GestureDetector* gestureDetector, Actor& actor, Dali::Internal::RenderTask& renderTask, Scene& scene, const Integration::TouchEvent& event);
-
-  /**
    * Returns whether any GestureDetector requires a Core::Update
    * @return true if update required
    */
@@ -80,24 +70,6 @@ protected:
   // Methods to be used by deriving classes
 
   /**
-   * @brief Gets the Feeded actor
-   * @return The actor which gesture want to recognize.
-   */
-  Actor* GetFeededActor();
-
-  /**
-   * @brief Gets the Feeded Gesture Detector.
-   * @return The gesture detector which gesture want to recognize.
-   */
-  GestureDetector* GetFeededGestureDetector();
-
-  /**
-   * @brief Get the Feeded Render Task object
-   * @return RenderTaskPtr
-   */
-  RenderTaskPtr GetFeededRenderTask();
-
-  /**
    * Given the hit actor, this walks up the actor tree to determine the actor that is connected to one (or several) gesture detectors.
    *
    * @param[in,out]  actor               The gestured actor. When this function returns, this is the actor that has been hit by the gesture.
@@ -120,17 +92,6 @@ protected:
   void ProcessAndEmit(HitTestAlgorithm::Results& hitTestResults);
 
   /**
-   * Calls the emission method in the deriving class for actor
-   *
-   * @param[in]  hitTestResults      The Hit Test Results.
-   *
-   * @note Uses the CheckGestureDetector() to check if the gesture matches the criteria of the given gesture detector
-   *       and EmitGestureSignal() to emit the signal.
-   * @pre Hit Testing should already be done.
-   */
-  void ProcessAndEmitActor(HitTestAlgorithm::Results& hitTestResults, GestureDetector* gestureDetector);
-
-  /**
    * Hit test the screen coordinates, and place the results in hitTestResults.
    * @param[in] scene Scene.
    * @param[in] screenCoordinates The screen coordinates to test.
@@ -228,10 +189,6 @@ private:                                             // Data
   Integration::Point mPoint;                         ///< The point of event touched.
   uint32_t           mEventTime;                     ///< The time the event occurred.
   bool               mGesturedActorDisconnected : 1; ///< Indicates whether the gestured actor has been disconnected from the scene
-  ActorObserver      mFeededActor;                   ///< The actor used to generate this touch event.
-  RenderTaskPtr      mRenderTask;                    ///< The render task used to generate this touch event.
-  GestureDetector*   mGestureDetector;               ///< The gesture detector which gesture want to recognize.
-
 };
 
 } // namespace Internal
index d2c5e93..0bc013d 100644 (file)
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/internal/event/events/actor-observer.h>
 #include <dali/internal/event/events/gesture-event.h>
-#include <dali/internal/event/render-tasks/render-task-impl.h>
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/events/gesture.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/object/ref-object.h>
-#include <dali/public-api/events/gesture-detector.h>
 
 namespace Dali
 {
@@ -165,11 +162,11 @@ protected:
   ~GestureRecognizer() override = default;
 
 protected:
-  Vector2                     mScreenSize;
-  GestureType::Value          mType;
-  Scene*                      mScene;
-  GestureSourceType           mSourceType; /// < Gesture input source type.
-  GestureSourceData           mSourceData; /// < Gesture input source data.
+  Vector2            mScreenSize;
+  GestureType::Value mType;
+  Scene*             mScene;
+  GestureSourceType  mSourceType; /// < Gesture input source type.
+  GestureSourceData  mSourceData; /// < Gesture input source data.
 };
 
 using GestureRecognizerPtr = IntrusivePtr<GestureRecognizer>;
index 19b772d..6b680ae 100644 (file)
@@ -135,11 +135,7 @@ void LongPressGestureProcessor::Process(Scene& scene, const LongPressGestureEven
       ResetActor();
 
       HitTestAlgorithm::Results hitTestResults;
-      if(GetFeededActor())
-      {
-        SetActor(GetFeededActor());
-      }
-      else if(HitTest(scene, longPressEvent.point, hitTestResults))
+      if(HitTest(scene, longPressEvent.point, hitTestResults))
       {
         SetActor(&GetImplementation(hitTestResults.actor));
       }
@@ -148,40 +144,20 @@ void LongPressGestureProcessor::Process(Scene& scene, const LongPressGestureEven
 
     case GestureState::STARTED:
     {
-      if(GetCurrentGesturedActor())
+      Actor* currentGesturedActor = GetCurrentGesturedActor();
+      if(currentGesturedActor)
       {
         HitTestAlgorithm::Results hitTestResults;
-        Actor* feededActor = GetFeededActor();
-        if(feededActor)
-        {
-          SetActor(feededActor);
-          hitTestResults.actor = Dali::Actor(feededActor);
-          hitTestResults.renderTask = GetFeededRenderTask();
+        HitTest(scene, longPressEvent.point, hitTestResults);
 
-          Vector2     actorCoords;
-          feededActor->ScreenToLocal(*hitTestResults.renderTask.Get(), actorCoords.x, actorCoords.y, longPressEvent.point.x, longPressEvent.point.y);
-          hitTestResults.actorCoordinates = actorCoords;
-        }
-        else
-        {
-          HitTest(scene, longPressEvent.point, hitTestResults);
-        }
-
-        if(hitTestResults.actor && (GetCurrentGesturedActor() == &GetImplementation(hitTestResults.actor)))
+        if(hitTestResults.actor && (currentGesturedActor == &GetImplementation(hitTestResults.actor)))
         {
           // Record the current render-task for Screen->Actor coordinate conversions
           mCurrentRenderTask = hitTestResults.renderTask;
 
           // Set mCurrentLongPressEvent to use inside overridden methods called from ProcessAndEmit()
           mCurrentLongPressEvent = &longPressEvent;
-          if(feededActor)
-          {
-            ProcessAndEmitActor(hitTestResults, GetFeededGestureDetector());
-          }
-          else
-          {
-            ProcessAndEmit(hitTestResults);
-          }
+          ProcessAndEmit(hitTestResults);
           mCurrentLongPressEvent = nullptr;
         }
         else
@@ -200,6 +176,7 @@ void LongPressGestureProcessor::Process(Scene& scene, const LongPressGestureEven
 
       // Only send subsequent long press gesture signals if we processed the gesture when it started.
       // Check if actor is still touchable.
+
       Actor* currentGesturedActor = GetCurrentGesturedActor();
       if(currentGesturedActor)
       {
index 85d10bb..eac654b 100644 (file)
@@ -66,6 +66,7 @@ void LongPressGestureRecognizer::SendEvent(const Integration::TouchEvent& event)
   unsigned int                            pointCount(event.GetPointCount());
   Dali::Integration::PlatformAbstraction& platformAbstraction = ThreadLocalStorage::Get().GetPlatformAbstraction();
   GestureRecognizerPtr                    ptr(this); // To keep us from being destroyed during the life-time of this method
+
   switch(mState)
   {
     // CLEAR: Wait till one point touches the screen before starting timer.
index a495995..4df4ee7 100644 (file)
@@ -163,12 +163,7 @@ void PanGestureProcessor::Process(Scene& scene, const PanGestureEvent& panEvent)
       ResetActor();
 
       HitTestAlgorithm::Results hitTestResults;
-      if(GetFeededActor())
-      {
-        SetActor(GetFeededActor());
-        mPossiblePanPosition = panEvent.currentPosition;
-      }
-      else if(HitTest(scene, panEvent.currentPosition, hitTestResults))
+      if(HitTest(scene, panEvent.currentPosition, hitTestResults))
       {
         SetActor(&GetImplementation(hitTestResults.actor));
         mPossiblePanPosition = panEvent.currentPosition;
@@ -185,19 +180,7 @@ void PanGestureProcessor::Process(Scene& scene, const PanGestureEvent& panEvent)
       // it can be told when the gesture ends as well.
 
       HitTestAlgorithm::Results hitTestResults;
-      if(GetFeededActor())
-      {
-        hitTestResults.actor = Dali::Actor(GetFeededActor());
-        hitTestResults.renderTask = GetFeededRenderTask();
-
-        Vector2 actorCoords;
-        GetFeededActor()->ScreenToLocal(*hitTestResults.renderTask.Get(), actorCoords.x, actorCoords.y, panEvent.currentPosition.x, panEvent.currentPosition.y);
-        hitTestResults.actorCoordinates = actorCoords;
-      }
-      else
-      {
-        HitTest(scene, panEvent.previousPosition, hitTestResults); // Hit Test previous position
-      }
+      HitTest(scene, panEvent.previousPosition, hitTestResults); // Hit Test previous position
 
       if(hitTestResults.actor)
       {
@@ -213,14 +196,7 @@ void PanGestureProcessor::Process(Scene& scene, const PanGestureEvent& panEvent)
 
         // Set mCurrentPanEvent to use inside overridden methods called in ProcessAndEmit()
         mCurrentPanEvent = &panEvent;
-        if(GetFeededActor())
-        {
-          ProcessAndEmitActor(hitTestResults, GetFeededGestureDetector());
-        }
-        else
-        {
-          ProcessAndEmit(hitTestResults);
-        }
+        ProcessAndEmit(hitTestResults);
         mCurrentPanEvent = nullptr;
       }
       else
@@ -235,32 +211,7 @@ void PanGestureProcessor::Process(Scene& scene, const PanGestureEvent& panEvent)
     {
       // Requires a core update
       mNeedsUpdate = true;
-      Actor* currentGesturedActor = GetCurrentGesturedActor();
-      if(GetFeededActor() && GetFeededActor() != currentGesturedActor && (mCurrentPanEmitters.empty() || (currentGesturedActor && currentGesturedActor->NeedGesturePropagation())) && GetFeededGestureDetector())
-      {
-        if(currentGesturedActor)
-        {
-          currentGesturedActor->SetNeedGesturePropagation(false);
-        }
-        mCurrentPanEvent = &panEvent;
-        if(GetFeededActor()->IsHittable() && CheckGestureDetector(GetFeededGestureDetector(), GetFeededActor()))
-        {
-          mCurrentPanEmitters.clear();
-          ResetActor();
 
-          // Record the current render-task for Screen->Actor coordinate conversions
-          mCurrentRenderTask = GetFeededRenderTask();
-
-          Vector2 actorCoords;
-          GetFeededActor()->ScreenToLocal(*mCurrentRenderTask.Get(), actorCoords.x, actorCoords.y, panEvent.currentPosition.x, panEvent.currentPosition.y);
-
-          mCurrentPanEmitters.push_back(GetFeededGestureDetector());
-          SetActor(GetFeededActor());
-          GetFeededGestureDetector()->SetDetected(true);
-          EmitPanSignal(GetFeededActor(), mCurrentPanEmitters, panEvent, actorCoords, GestureState::STARTED, mCurrentRenderTask);
-        }
-        mCurrentPanEvent = nullptr;
-      }
       DALI_FALLTHROUGH;
     }
 
@@ -269,6 +220,7 @@ void PanGestureProcessor::Process(Scene& scene, const PanGestureEvent& panEvent)
     {
       // Only send subsequent pan gesture signals if we processed the pan gesture when it started.
       // Check if actor is still touchable.
+
       Actor* currentGesturedActor = GetCurrentGesturedActor();
       if(currentGesturedActor)
       {
@@ -282,9 +234,11 @@ void PanGestureProcessor::Process(Scene& scene, const PanGestureEvent& panEvent)
           mCurrentPanEmitters.erase(endIter, mCurrentPanEmitters.end());
 
           Vector2 actorCoords;
+
           if(!outsideTouchesRangeEmitters.empty() || !mCurrentPanEmitters.empty())
           {
             currentGesturedActor->ScreenToLocal(*mCurrentRenderTask.Get(), actorCoords.x, actorCoords.y, panEvent.currentPosition.x, panEvent.currentPosition.y);
+
             // EmitPanSignal checks whether we have a valid actor and whether the container we are passing in has emitters before it emits the pan.
             EmitPanSignal(currentGesturedActor, outsideTouchesRangeEmitters, panEvent, actorCoords, GestureState::FINISHED, mCurrentRenderTask);
             EmitPanSignal(currentGesturedActor, mCurrentPanEmitters, panEvent, actorCoords, panEvent.state, mCurrentRenderTask);
index 6018eb5..73e8dcd 100644 (file)
@@ -189,24 +189,7 @@ void PinchGestureProcessor::Process(Scene& scene, const PinchGestureEvent& pinch
       ResetActor();
 
       HitTestAlgorithm::Results hitTestResults;
-      if(GetFeededActor())
-      {
-        hitTestResults.actor = Dali::Actor(GetFeededActor());
-        hitTestResults.renderTask = GetFeededRenderTask();
-
-        // Record the current render-task for Screen->Actor coordinate conversions
-        mCurrentRenderTask = hitTestResults.renderTask;
-
-        Vector2     actorCoords;
-        GetFeededActor()->ScreenToLocal(*mCurrentRenderTask.Get(), actorCoords.x, actorCoords.y, pinchEvent.centerPoint.x, pinchEvent.centerPoint.y);
-        hitTestResults.actorCoordinates = actorCoords;
-
-        // Set mCurrentPinchEvent to use inside overridden methods called from ProcessAndEmit()
-        mCurrentPinchEvent = &pinchEvent;
-        ProcessAndEmitActor(hitTestResults, GetFeededGestureDetector());
-        mCurrentPinchEvent = nullptr;
-      }
-      else if(HitTest(scene, pinchEvent.centerPoint, hitTestResults))
+      if(HitTest(scene, pinchEvent.centerPoint, hitTestResults))
       {
         // Record the current render-task for Screen->Actor coordinate conversions
         mCurrentRenderTask = hitTestResults.renderTask;
@@ -234,10 +217,6 @@ void PinchGestureProcessor::Process(Scene& scene, const PinchGestureEvent& pinch
           // Ensure actor is still attached to the emitters, if it is not then remove the emitter.
           GestureDetectorContainer::iterator endIter = std::remove_if(mCurrentPinchEmitters.begin(), mCurrentPinchEmitters.end(), IsNotAttachedFunctor(currentGesturedActor));
           mCurrentPinchEmitters.erase(endIter, mCurrentPinchEmitters.end());
-          if(GetFeededActor() && GetFeededGestureDetector())
-          {
-            mCurrentPinchEmitters.push_back(GetFeededGestureDetector());
-          }
 
           if(!mCurrentPinchEmitters.empty())
           {
index 7f4eaf1..a83b1b2 100644 (file)
@@ -135,25 +135,7 @@ void RotationGestureProcessor::Process(Scene& scene, const RotationGestureEvent&
       ResetActor();
 
       HitTestAlgorithm::Results hitTestResults;
-      if(GetFeededActor())
-      {
-        hitTestResults.actor = Dali::Actor(GetFeededActor());
-        hitTestResults.renderTask = GetFeededRenderTask();
-
-        // Record the current render-task for Screen->Actor coordinate conversions
-        mCurrentRenderTask = hitTestResults.renderTask;
-
-        Vector2     actorCoords;
-        GetFeededActor()->ScreenToLocal(*mCurrentRenderTask.Get(), actorCoords.x, actorCoords.y, rotationEvent.centerPoint.x, rotationEvent.centerPoint.y);
-        hitTestResults.actorCoordinates = actorCoords;
-
-        // Set mCurrentRotationEvent to use inside overridden methods called from ProcessAndEmit()
-        mCurrentRotationEvent = &rotationEvent;
-        ProcessAndEmitActor(hitTestResults, GetFeededGestureDetector());
-        mCurrentRotationEvent = nullptr;
-
-      }
-      else if(HitTest(scene, rotationEvent.centerPoint, hitTestResults))
+      if(HitTest(scene, rotationEvent.centerPoint, hitTestResults))
       {
         // Record the current render-task for Screen->Actor coordinate conversions
         mCurrentRenderTask = hitTestResults.renderTask;
@@ -182,11 +164,6 @@ void RotationGestureProcessor::Process(Scene& scene, const RotationGestureEvent&
           GestureDetectorContainer::iterator endIter = std::remove_if(mCurrentRotationEmitters.begin(), mCurrentRotationEmitters.end(), IsNotAttachedFunctor(currentGesturedActor));
           mCurrentRotationEmitters.erase(endIter, mCurrentRotationEmitters.end());
 
-          if(GetFeededActor() && GetFeededGestureDetector())
-          {
-            mCurrentRotationEmitters.push_back(GetFeededGestureDetector());
-          }
-
           if(!mCurrentRotationEmitters.empty())
           {
             Vector2     actorCoords;
index c2dc673..e15e4c7 100644 (file)
@@ -112,15 +112,7 @@ void TapGestureProcessor::Process(Scene& scene, const TapGestureEvent& tapEvent)
     {
       // Do a hit test and if an actor has been hit then save to see if tap event is still valid on a tap( same actor being hit )
       HitTestAlgorithm::Results hitTestResults;
-      if(GetFeededActor())
-      {
-        SetActor(GetFeededActor());
-        mCurrentTapActor.SetActor(GetCurrentGesturedActor());
-
-        // Indicate that we've processed a touch down. Bool should be sufficient as a change in actor will result in a cancellation
-        mPossibleProcessed = true;
-      }
-      else if(HitTest(scene, tapEvent.point, hitTestResults))
+      if(HitTest(scene, tapEvent.point, hitTestResults))
       {
         SetActor(&GetImplementation(hitTestResults.actor));
         mCurrentTapActor.SetActor(GetCurrentGesturedActor());
@@ -139,37 +131,16 @@ void TapGestureProcessor::Process(Scene& scene, const TapGestureEvent& tapEvent)
     {
       // Ensure that we're processing a hit on the current actor and that we've already processed a touch down
       HitTestAlgorithm::Results hitTestResults;
-      if(GetCurrentGesturedActor())
+      if(GetCurrentGesturedActor() && HitTest(scene, tapEvent.point, hitTestResults) && mPossibleProcessed)
       {
-        if(GetFeededActor())
-        {
-          hitTestResults.actor = Dali::Actor(GetFeededActor());
-          hitTestResults.renderTask = GetFeededRenderTask();
-
-          Vector2 actorCoords;
-          GetFeededActor()->ScreenToLocal(*hitTestResults.renderTask.Get(), actorCoords.x, actorCoords.y, tapEvent.point.x, tapEvent.point.y);
-          hitTestResults.actorCoordinates = actorCoords;
-
-          // Check that this actor is still the one that was used for the last touch down ?
-          if(mCurrentTapActor.GetActor() == &GetImplementation(hitTestResults.actor))
-          {
-            mCurrentTapEvent = &tapEvent;
-            ProcessAndEmitActor(hitTestResults, GetFeededGestureDetector());
-          }
-          mCurrentTapEvent   = nullptr;
-          mPossibleProcessed = false;
-        }
-        else if(HitTest(scene, tapEvent.point, hitTestResults) && mPossibleProcessed)
+        // Check that this actor is still the one that was used for the last touch down ?
+        if(mCurrentTapActor.GetActor() == &GetImplementation(hitTestResults.actor))
         {
-          // Check that this actor is still the one that was used for the last touch down ?
-          if(mCurrentTapActor.GetActor() == &GetImplementation(hitTestResults.actor))
-          {
-            mCurrentTapEvent = &tapEvent;
-            ProcessAndEmit(hitTestResults);
-          }
-          mCurrentTapEvent   = nullptr;
-          mPossibleProcessed = false;
+          mCurrentTapEvent = &tapEvent;
+          ProcessAndEmit(hitTestResults);
         }
+        mCurrentTapEvent   = nullptr;
+        mPossibleProcessed = false;
       }
       break;
     }
index 7e2c472..6c1abf3 100644 (file)
@@ -183,11 +183,6 @@ public:
     return mRenderTask;
   }
 
-  Dali::RenderTask& GetRenderTaskPtr()
-  {
-    return mRenderTask;
-  }
-
   // Setters
 
   /**