From: joogab.yun Date: Tue, 25 Jun 2024 01:24:26 +0000 (+0900) Subject: [Tizen] Add TouchPropagationType enum. X-Git-Tag: accepted/tizen/8.0/unified/20240704.174815~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ee6fcf5488b373a1b0289810a6dddcf4f7cc164;p=platform%2Fcore%2Fuifw%2Fdali-core.git [Tizen] Add TouchPropagationType enum. PARENT events are propagated to parents in the traditional way. GEOMETRY is a new way in which events are propagated based on geometry. Change-Id: I3a717d5433e73f22e835ed3e6cd384a337160688 --- diff --git a/automated-tests/src/dali/utc-Dali-GeoHitTestAlgorithm.cpp b/automated-tests/src/dali/utc-Dali-GeoHitTestAlgorithm.cpp index e122a5b..941cb94 100644 --- a/automated-tests/src/dali/utc-Dali-GeoHitTestAlgorithm.cpp +++ b/automated-tests/src/dali/utc-Dali-GeoHitTestAlgorithm.cpp @@ -130,7 +130,7 @@ int UtcDaliGeoHitTestAlgorithmWithFunctor(void) // Perform a hit-test at the given screen coordinates Dali::HitTestAlgorithm::Results results; - Dali::HitTestAlgorithm::HitTest(stage, screenCoordinates, results, IsActorHittableFunction, true); + Dali::HitTestAlgorithm::HitTest(stage, screenCoordinates, results, IsActorHittableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor != actor); actor.SetProperty(Actor::Property::NAME, "HittableActor"); @@ -139,7 +139,7 @@ int UtcDaliGeoHitTestAlgorithmWithFunctor(void) results.actorCoordinates = Vector2::ZERO; // Perform a hit-test at the given screen coordinates - Dali::HitTestAlgorithm::HitTest(stage, screenCoordinates, results, IsActorHittableFunction, true); + Dali::HitTestAlgorithm::HitTest(stage, screenCoordinates, results, IsActorHittableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == actor); DALI_TEST_EQUALS(localCoordinates, results.actorCoordinates, 0.1f, TEST_LOCATION); END_TEST; @@ -186,15 +186,15 @@ int UtcDaliGeoHitTestAlgorithmOrtho01(void) application.Render(10); HitTestAlgorithm::Results results; - HitTest(stage, stageSize / 2.0f, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize / 2.0f, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == green); DALI_TEST_EQUALS(results.actorCoordinates, actorSize * 1.0f / 6.0f, TEST_LOCATION); - HitTest(stage, stageSize / 3.0f, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize / 3.0f, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == blue); DALI_TEST_EQUALS(results.actorCoordinates, actorSize * 0.5f, TEST_LOCATION); - HitTest(stage, stageSize * 2.0f / 3.0f, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize * 2.0f / 3.0f, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == green); DALI_TEST_EQUALS(results.actorCoordinates, actorSize * 0.5f, TEST_LOCATION); END_TEST; @@ -246,21 +246,21 @@ int UtcDaliGeoHitTestAlgorithmOrtho02(void) { HitTestAlgorithm::Results results; - HitTest(stage, Vector2(240.0f, 400.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(240.0f, 400.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == green); DALI_TEST_EQUALS(results.actorCoordinates, actorSize * 0.6f, 0.01f, TEST_LOCATION); } { HitTestAlgorithm::Results results; - HitTest(stage, Vector2(0.001f, 0.001f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(0.001f, 0.001f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == blue); DALI_TEST_EQUALS(results.actorCoordinates, Vector2(0.001f, 0.001f), 0.001f, TEST_LOCATION); } { HitTestAlgorithm::Results results; - HitTest(stage, stageSize, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(!results.actor); DALI_TEST_EQUALS(results.actorCoordinates, Vector2::ZERO, TEST_LOCATION); } @@ -268,7 +268,7 @@ int UtcDaliGeoHitTestAlgorithmOrtho02(void) // Just inside green { HitTestAlgorithm::Results results; - HitTest(stage, stageSize * 0.69f, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize * 0.69f, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == green); DALI_TEST_EQUALS(results.actorCoordinates, actorSize * 0.98f, 0.01f, TEST_LOCATION); } @@ -317,12 +317,12 @@ int UtcDaliGeoHitTestAlgorithmClippingActor(void) // Hit within clippingActor and childActor. HitTestAlgorithm::Results results; - HitTest(stage, Vector2(10.0f, 10.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(10.0f, 10.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == childActor); tet_printf("Hit: %s\n", (results.actor ? results.actor.GetProperty(Actor::Property::NAME).c_str() : "NULL")); // Hit within childActor but outside of clippingActor, should hit the root-layer instead. - HitTest(stage, Vector2(60.0f, 60.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(60.0f, 60.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == rootLayer); tet_printf("Hit: %s\n", (results.actor ? results.actor.GetProperty(Actor::Property::NAME).c_str() : "NULL")); @@ -383,12 +383,12 @@ int UtcDaliGeoHitTestAlgorithmClippingActorStress(void) // Hit within clippingActor and latestActor. HitTestAlgorithm::Results results; - HitTest(stage, Vector2(201.0f, 201.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(201.0f, 201.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("Hit: %s\n", (results.actor ? results.actor.GetProperty(Actor::Property::NAME).c_str() : "NULL")); DALI_TEST_CHECK(results.actor == latestActor); // Hit within childActor but outside of clippingActor, should hit the root-layer instead. - HitTest(stage, Vector2(221.0f, 221.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(221.0f, 221.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("Hit: %s\n", (results.actor ? results.actor.GetProperty(Actor::Property::NAME).c_str() : "NULL")); DALI_TEST_CHECK(results.actor == rootLayer); @@ -439,17 +439,17 @@ int UtcDaliGeoHitTestAlgorithmOverlay(void) HitTestAlgorithm::Results results; //Hit in the intersection. Should pick the blue actor since it is an overlay. - HitTest(stage, stageSize / 2.0f, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize / 2.0f, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == blue); DALI_TEST_EQUALS(results.actorCoordinates, actorSize * 5.0f / 6.0f, TEST_LOCATION); //Hit in the blue actor - HitTest(stage, stageSize / 3.0f, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize / 3.0f, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == blue); DALI_TEST_EQUALS(results.actorCoordinates, actorSize * 0.5f, TEST_LOCATION); //Hit in the green actor - HitTest(stage, stageSize * 2.0f / 3.0f, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize * 2.0f / 3.0f, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == green); DALI_TEST_EQUALS(results.actorCoordinates, actorSize * 0.5f, TEST_LOCATION); @@ -469,25 +469,25 @@ int UtcDaliGeoHitTestAlgorithmOverlay(void) application.Render(10); //Hit in the intersection red, green, blue. Should pick the red actor since it is an child of overlay. - HitTest(stage, Vector2(stageSize.x * 13.0f / 24.0f, stageSize.y * 11.0f / 24.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(stageSize.x * 13.0f / 24.0f, stageSize.y * 11.0f / 24.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("%d %d %d , %f %f\n", results.actor == red ? 1 : 0, results.actor == green ? 1 : 0, results.actor == blue ? 1 : 0, results.actorCoordinates.x, results.actorCoordinates.y); DALI_TEST_CHECK(results.actor == red); DALI_TEST_EQUALS(results.actorCoordinates, Vector2(actorSize.x * 1.0f / 12.0f, actorSize.y * 11.0f / 12.0f), TEST_LOCATION); //Hit in the intersection red, blue. Should pick the red actor since it is an child of blue. - HitTest(stage, Vector2(stageSize.x * 13.0f / 24.0f, stageSize.y * 9.0f / 24.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(stageSize.x * 13.0f / 24.0f, stageSize.y * 9.0f / 24.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("%d %d %d , %f %f\n", results.actor == red ? 1 : 0, results.actor == green ? 1 : 0, results.actor == blue ? 1 : 0, results.actorCoordinates.x, results.actorCoordinates.y); DALI_TEST_CHECK(results.actor == red); DALI_TEST_EQUALS(results.actorCoordinates, Vector2(actorSize.x * 1.0f / 12.0f, actorSize.y * 9.0f / 12.0f), TEST_LOCATION); //Hit in the intersection red, green. Should pick the red actor since it is an child of overlay. - HitTest(stage, Vector2(stageSize.x * 15.0f / 24.0f, stageSize.y * 11.0f / 24.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(stageSize.x * 15.0f / 24.0f, stageSize.y * 11.0f / 24.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("%d %d %d , %f %f\n", results.actor == red ? 1 : 0, results.actor == green ? 1 : 0, results.actor == blue ? 1 : 0, results.actorCoordinates.x, results.actorCoordinates.y); DALI_TEST_CHECK(results.actor == red); DALI_TEST_EQUALS(results.actorCoordinates, Vector2(actorSize.x * 3.0f / 12.0f, actorSize.y * 11.0f / 12.0f), TEST_LOCATION); //Hit in the intersection blue, green. Should pick the blue actor since it is an overlay. - HitTest(stage, Vector2(stageSize.x * 11.0f / 24.0f, stageSize.y * 13.0f / 24.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(stageSize.x * 11.0f / 24.0f, stageSize.y * 13.0f / 24.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("%d %d %d , %f %f\n", results.actor == red ? 1 : 0, results.actor == green ? 1 : 0, results.actor == blue ? 1 : 0, results.actorCoordinates.x, results.actorCoordinates.y); DALI_TEST_CHECK(results.actor == blue); DALI_TEST_EQUALS(results.actorCoordinates, Vector2(actorSize.x * 9.0f / 12.0f, actorSize.y * 11.0f / 12.0f), TEST_LOCATION); @@ -501,25 +501,25 @@ int UtcDaliGeoHitTestAlgorithmOverlay(void) application.Render(10); //Hit in the intersection red, green, blue. Should pick the green actor since it is latest ordered actor. - HitTest(stage, Vector2(stageSize.x * 13.0f / 24.0f, stageSize.y * 11.0f / 24.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(stageSize.x * 13.0f / 24.0f, stageSize.y * 11.0f / 24.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("%d %d %d , %f %f\n", results.actor == red ? 1 : 0, results.actor == green ? 1 : 0, results.actor == blue ? 1 : 0, results.actorCoordinates.x, results.actorCoordinates.y); DALI_TEST_CHECK(results.actor == green); DALI_TEST_EQUALS(results.actorCoordinates, Vector2(actorSize.x * 3.0f / 12.0f, actorSize.y * 1.0f / 12.0f), TEST_LOCATION); //Hit in the intersection red, blue. Should pick the red actor since it is an child of blue. - HitTest(stage, Vector2(stageSize.x * 13.0f / 24.0f, stageSize.y * 9.0f / 24.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(stageSize.x * 13.0f / 24.0f, stageSize.y * 9.0f / 24.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("%d %d %d , %f %f\n", results.actor == red ? 1 : 0, results.actor == green ? 1 : 0, results.actor == blue ? 1 : 0, results.actorCoordinates.x, results.actorCoordinates.y); DALI_TEST_CHECK(results.actor == red); DALI_TEST_EQUALS(results.actorCoordinates, Vector2(actorSize.x * 1.0f / 12.0f, actorSize.y * 9.0f / 12.0f), TEST_LOCATION); //Hit in the intersection red, green. Should pick the green actor since it is latest ordered actor. - HitTest(stage, Vector2(stageSize.x * 15.0f / 24.0f, stageSize.y * 11.0f / 24.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(stageSize.x * 15.0f / 24.0f, stageSize.y * 11.0f / 24.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("%d %d %d , %f %f\n", results.actor == red ? 1 : 0, results.actor == green ? 1 : 0, results.actor == blue ? 1 : 0, results.actorCoordinates.x, results.actorCoordinates.y); DALI_TEST_CHECK(results.actor == green); DALI_TEST_EQUALS(results.actorCoordinates, Vector2(actorSize.x * 5.0f / 12.0f, actorSize.y * 1.0f / 12.0f), TEST_LOCATION); //Hit in the intersection blue, green. Should pick the green actor since it is latest ordered actor. - HitTest(stage, Vector2(stageSize.x * 11.0f / 24.0f, stageSize.y * 13.0f / 24.0f), results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, Vector2(stageSize.x * 11.0f / 24.0f, stageSize.y * 13.0f / 24.0f), results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); tet_printf("%d %d %d , %f %f\n", results.actor == red ? 1 : 0, results.actor == green ? 1 : 0, results.actor == blue ? 1 : 0, results.actorCoordinates.x, results.actorCoordinates.y); DALI_TEST_CHECK(results.actor == green); DALI_TEST_EQUALS(results.actorCoordinates, Vector2(actorSize.x * 1.0f / 12.0f, actorSize.y * 3.0f / 12.0f), TEST_LOCATION); @@ -577,7 +577,7 @@ int UtcDaliGeoHitTestAlgorithmOrder(void) application.Render(10); HitTestAlgorithm::Results results; - HitTest(stage, stageSize / 2.0f, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize / 2.0f, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == green); END_TEST; @@ -642,7 +642,7 @@ int UtcDaliGeoHitTestAlgorithmExclusiveMultiple(void) application.Render(10); HitTestAlgorithm::Results results; - HitTest(stage, stageSize / 2.0f, results, &DefaultIsActorTouchableFunction, true); + HitTest(stage, stageSize / 2.0f, results, &DefaultIsActorTouchableFunction, Integration::Scene::TouchPropagationType::GEOMETRY); DALI_TEST_CHECK(results.actor == green); END_TEST; diff --git a/automated-tests/src/dali/utc-Dali-Scene.cpp b/automated-tests/src/dali/utc-Dali-Scene.cpp index d98c869..367d617 100644 --- a/automated-tests/src/dali/utc-Dali-Scene.cpp +++ b/automated-tests/src/dali/utc-Dali-Scene.cpp @@ -2977,6 +2977,7 @@ int UtcDaliSceneGeoTouchedEnabledDisabled(void) TestApplication application; Dali::Integration::Scene scene = application.GetScene(); DALI_TEST_EQUALS(scene.IsGeometryHittestEnabled(), false, TEST_LOCATION); + DALI_TEST_EQUALS(scene.GetTouchPropagationType(), Dali::Integration::Scene::TouchPropagationType::PARENT, TEST_LOCATION); TouchedSignalData data; TouchFunctor functor(data); @@ -3050,6 +3051,7 @@ int UtcDaliSceneGeoTouchedEnabledDisabled(void) scene.SetGeometryHittestEnabled(true); DALI_TEST_EQUALS(scene.IsGeometryHittestEnabled(), true, TEST_LOCATION); + DALI_TEST_EQUALS(scene.GetTouchPropagationType(), Dali::Integration::Scene::TouchPropagationType::GEOMETRY, TEST_LOCATION); { GenerateTouch(application, PointState::DOWN, Vector2(10.0f, 10.0f)); diff --git a/dali/devel-api/events/hit-test-algorithm.cpp b/dali/devel-api/events/hit-test-algorithm.cpp index 9609a1b..5fa205f 100644 --- a/dali/devel-api/events/hit-test-algorithm.cpp +++ b/dali/devel-api/events/hit-test-algorithm.cpp @@ -29,10 +29,10 @@ namespace Dali { namespace HitTestAlgorithm { -bool HitTest(Stage stage, const Vector2& screenCoordinates, Results& results, HitTestFunction func, bool isGeometry) +bool HitTest(Stage stage, const Vector2& screenCoordinates, Results& results, HitTestFunction func, const Integration::Scene::TouchPropagationType propagationType) { Internal::Stage& stageImpl = GetImplementation(stage); - return Internal::HitTestAlgorithm::HitTest(stageImpl.GetSize(), stageImpl.GetRenderTaskList(), stageImpl.GetLayerList(), screenCoordinates, results, func, isGeometry); + return Internal::HitTestAlgorithm::HitTest(stageImpl.GetSize(), stageImpl.GetRenderTaskList(), stageImpl.GetLayerList(), screenCoordinates, results, func, propagationType); } bool BuildPickingRay(RenderTask renderTask, const Vector2& screenCoordinates, Vector3& origin, Vector3& direction) diff --git a/dali/devel-api/events/hit-test-algorithm.h b/dali/devel-api/events/hit-test-algorithm.h index 6481e9e..426e5c0 100644 --- a/dali/devel-api/events/hit-test-algorithm.h +++ b/dali/devel-api/events/hit-test-algorithm.h @@ -139,10 +139,10 @@ using HitTestFunction = bool (*)(Actor, TraverseType); * @param[in] screenCoordinates The screen coordinates. * @param[out] results The results of the hit-test, only modified if something is hit * @param[in] func The function to use in the hit-test algorithm. - * @param[in] isGeometry If true, hittest works in a geometry way. + * @param[in] propagationType If Integration::Scene::TouchPropagationType::GEOMETRY, hittest works in a geometry way. * @return true if something was hit */ -DALI_CORE_API bool HitTest(Stage stage, const Vector2& screenCoordinates, Results& results, HitTestFunction func, bool isGeometry = false); +DALI_CORE_API bool HitTest(Stage stage, const Vector2& screenCoordinates, Results& results, HitTestFunction func, const Integration::Scene::TouchPropagationType propagationType = Integration::Scene::TouchPropagationType::PARENT); /** * @brief Given screen coordinates, this method returns the camera origin in world coordinates and the direction of the picking ray in world-space. diff --git a/dali/integration-api/scene.cpp b/dali/integration-api/scene.cpp index 64e49b0..f572e40 100644 --- a/dali/integration-api/scene.cpp +++ b/dali/integration-api/scene.cpp @@ -238,6 +238,11 @@ bool Scene::IsGeometryHittestEnabled() return GetImplementation(*this).IsGeometryHittestEnabled(); } +Scene::TouchPropagationType Scene::GetTouchPropagationType() +{ + return GetImplementation(*this).GetTouchPropagationType(); +} + void Scene::SetNativeId(int32_t nativeId) { return GetImplementation(*this).SetNativeId(nativeId); diff --git a/dali/integration-api/scene.h b/dali/integration-api/scene.h index be7e1ff..e6ef8ce 100644 --- a/dali/integration-api/scene.h +++ b/dali/integration-api/scene.h @@ -60,7 +60,18 @@ struct Event; */ class DALI_CORE_API Scene : public BaseHandle { + public: + + /** + * @brief Touch event propagation way + */ + enum TouchPropagationType + { + PARENT, ///< events are propagated to parents in the traditional way + GEOMETRY ///< events are propagated based on geometry. + }; + using EventProcessingFinishedSignalType = Signal; ///< Event Processing finished signal type using KeyEventSignalType = Signal; ///< Key event signal type using KeyEventGeneratedSignalType = Signal; ///< key event generated signal type @@ -431,6 +442,13 @@ public: bool IsGeometryHittestEnabled(); /** + * @brief Get the Touch Propagation Type + * + * @return TouchPropagationType + */ + TouchPropagationType GetTouchPropagationType(); + + /** * @brief Sets the native window id * * @param nativeId The native window id diff --git a/dali/internal/event/common/scene-impl.cpp b/dali/internal/event/common/scene-impl.cpp index 7fab6c9..25655de 100644 --- a/dali/internal/event/common/scene-impl.cpp +++ b/dali/internal/event/common/scene-impl.cpp @@ -512,6 +512,11 @@ bool Scene::IsGeometryHittestEnabled() const return mGeometryHittest; } +Dali::Integration::Scene::TouchPropagationType Scene::GetTouchPropagationType() const +{ + return mGeometryHittest ? Dali::Integration::Scene::TouchPropagationType::GEOMETRY : Dali::Integration::Scene::TouchPropagationType::PARENT; +} + void Scene::SetNativeId(int32_t nativeId) { mNativeId = nativeId; diff --git a/dali/internal/event/common/scene-impl.h b/dali/internal/event/common/scene-impl.h index 7846452..72d8434 100644 --- a/dali/internal/event/common/scene-impl.h +++ b/dali/internal/event/common/scene-impl.h @@ -253,6 +253,11 @@ public: bool IsGeometryHittestEnabled() const; /** + * @copydoc Dali::Integration::Scene::GetTouchPropagationType + */ + Dali::Integration::Scene::TouchPropagationType GetTouchPropagationType() const; + + /** * @copydoc Dali::Integration::Scene::SetNativeId */ void SetNativeId(int32_t nativeId); diff --git a/dali/internal/event/events/event-processor.cpp b/dali/internal/event/events/event-processor.cpp index abc3956..b186140 100644 --- a/dali/internal/event/events/event-processor.cpp +++ b/dali/internal/event/events/event-processor.cpp @@ -154,7 +154,7 @@ void EventProcessor::ProcessEvents() { Integration::TouchEvent& touchEvent = static_cast(*event); - if(mScene.IsGeometryHittestEnabled()) + if(mScene.GetTouchPropagationType() == Integration::Scene::TouchPropagationType::GEOMETRY) { DALI_ASSERT_ALWAYS(!touchEvent.points.empty() && "Empty TouchEvent sent from Integration\n"); @@ -169,7 +169,7 @@ void EventProcessor::ProcessEvents() hitTestResults.point = touchEvent.GetPoint(i); hitTestResults.eventTime = touchEvent.time; - HitTestAlgorithm::HitTest(mScene.GetSize(), mScene.GetRenderTaskList(), mScene.GetLayerList(), touchEvent.GetPoint(i).GetScreenPosition(), hitTestResults, nullptr, false); + HitTestAlgorithm::HitTest(mScene.GetSize(), mScene.GetRenderTaskList(), mScene.GetLayerList(), touchEvent.GetPoint(i).GetScreenPosition(), hitTestResults, nullptr, Integration::Scene::TouchPropagationType::GEOMETRY); if(hitTestResults.actor) { diff --git a/dali/internal/event/events/gesture-processor.cpp b/dali/internal/event/events/gesture-processor.cpp index a2d581c..bb69145 100644 --- a/dali/internal/event/events/gesture-processor.cpp +++ b/dali/internal/event/events/gesture-processor.cpp @@ -61,7 +61,7 @@ struct GestureHitTestCheck : public HitTestAlgorithm::HitTestInterface return layer->IsTouchConsumed(); } - bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, bool isGeometry) override + bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, const Integration::Scene::TouchPropagationType propagationType) override { return actor->EmitHitTestResultSignal(point, hitPointLocal, timeStamp); } diff --git a/dali/internal/event/events/hit-test-algorithm-impl.cpp b/dali/internal/event/events/hit-test-algorithm-impl.cpp index 9f566d3..9423b63 100644 --- a/dali/internal/event/events/hit-test-algorithm-impl.cpp +++ b/dali/internal/event/events/hit-test-algorithm-impl.cpp @@ -85,10 +85,10 @@ struct HitTestFunctionWrapper : public HitTestInterface return false; } - bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, bool isGeometry) override + bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, const Integration::Scene::TouchPropagationType propagationType) override { // Geometry way does not require Hittest from the client. - if(!isGeometry) + if(propagationType == Integration::Scene::TouchPropagationType::PARENT) { return actor->EmitHitTestResultSignal(point, hitPointLocal, timeStamp); } @@ -121,15 +121,15 @@ struct ActorTouchableCheck : public HitTestInterface return layer->IsTouchConsumed(); } - bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, bool isGeometry) override + bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, const Integration::Scene::TouchPropagationType propagationType) override { // The Geometry way behaves like AllowedOnlyOwnTouch is enabled. - if(point.GetState() != PointState::STARTED && (isGeometry || actor->IsAllowedOnlyOwnTouch()) && ownActor != actor) + if(point.GetState() != PointState::STARTED && (propagationType == Integration::Scene::TouchPropagationType::GEOMETRY || actor->IsAllowedOnlyOwnTouch()) && ownActor != actor) { return false; } // Geometry way does not require Hittest from the client. - if(!isGeometry) + if(propagationType == Integration::Scene::TouchPropagationType::PARENT) { return actor->EmitHitTestResultSignal(point, hitPointLocal, timeStamp); } @@ -195,23 +195,24 @@ inline bool IsOnOverlay(Actor* actor, Actor* currentActor) /** * Hit tests the given actor and updates the in/out variables appropriately */ -bool HitTestActor(const RenderTask& renderTask, - const Vector4& rayOrigin, - const Vector4& rayDir, - const float& nearClippingPlane, - const float& farClippingPlane, - HitTestInterface& hitCheck, - const RayTest& rayTest, - const Integration::Point& point, - const uint32_t eventTime, - bool clippingActor, - bool overlayedActor, - Actor& actor, - bool& overlayHit, - HitActor& hit, - bool isGeometry) +bool HitTestActor(const RenderTask& renderTask, + const Vector4& rayOrigin, + const Vector4& rayDir, + const float& nearClippingPlane, + const float& farClippingPlane, + HitTestInterface& hitCheck, + const RayTest& rayTest, + const Integration::Point& point, + const uint32_t eventTime, + bool clippingActor, + bool overlayedActor, + Actor& actor, + bool& overlayHit, + HitActor& hit, + const Integration::Scene::TouchPropagationType propagationType) { bool isClippingOrHittable = clippingActor || hitCheck.IsActorHittable(&actor); + bool isGeometry = propagationType == Integration::Scene::TouchPropagationType::GEOMETRY; if(isClippingOrHittable || isGeometry) { Vector3 size(actor.GetCurrentSize()); @@ -261,7 +262,7 @@ bool HitTestActor(const RenderTask& renderTask, } // If the hit actor does not want to hit, the hit-test continues. - if(isClippingOrHittable && hitCheck.ActorRequiresHitResultCheck(&actor, point, hitPointLocal, eventTime, isGeometry)) + if(isClippingOrHittable && hitCheck.ActorRequiresHitResultCheck(&actor, point, hitPointLocal, eventTime, propagationType)) { hit.actor = &actor; hit.hitPosition = hitPointLocal; @@ -329,22 +330,22 @@ void UpdateChildHitData(const HitActor& hit, const HitActor& currentHit, const b * - When comparing against renderable parents, if Actor is the same distance * or closer than it's renderable parent, then it takes priority. */ -HitActor HitTestWithinLayer(Actor& actor, - const RenderTask& renderTask, - const RenderTaskList::ExclusivesContainer& exclusives, - const Vector4& rayOrigin, - const Vector4& rayDir, - const float& nearClippingPlane, - const float& farClippingPlane, - HitTestInterface& hitCheck, - const bool& overlayed, - bool& overlayHit, - bool layerIs3d, - const RayTest& rayTest, - const Integration::Point& point, - const uint32_t eventTime, - std::list& actorLists, - bool isGeometry) +HitActor HitTestWithinLayer(Actor& actor, + const RenderTask& renderTask, + const RenderTaskList::ExclusivesContainer& exclusives, + const Vector4& rayOrigin, + const Vector4& rayDir, + const float& nearClippingPlane, + const float& farClippingPlane, + HitTestInterface& hitCheck, + const bool& overlayed, + bool& overlayHit, + bool layerIs3d, + const RayTest& rayTest, + const Integration::Point& point, + const uint32_t eventTime, + std::list& actorLists, + const Integration::Scene::TouchPropagationType propagationType) { HitActor hit; @@ -361,7 +362,7 @@ HitActor HitTestWithinLayer(Actor& actor, bool overlayedActor = overlayed || actor.IsOverlay(); // If we are a clipping actor or hittable... - if(!HitTestActor(renderTask, rayOrigin, rayDir, nearClippingPlane, farClippingPlane, hitCheck, rayTest, point, eventTime, clippingActor, overlayedActor, actor, overlayHit, hit, isGeometry)) + if(!HitTestActor(renderTask, rayOrigin, rayDir, nearClippingPlane, farClippingPlane, hitCheck, rayTest, point, eventTime, clippingActor, overlayedActor, actor, overlayHit, hit, propagationType)) { return hit; } @@ -372,7 +373,7 @@ HitActor HitTestWithinLayer(Actor& actor, { return hit; } - else if(isGeometry && hit.actor) + else if(propagationType == Integration::Scene::TouchPropagationType::GEOMETRY && hit.actor) { // Saves the actors that can be hit as a list actorLists.push_back(hit.actor); @@ -410,7 +411,7 @@ HitActor HitTestWithinLayer(Actor& actor, point, eventTime, actorLists, - isGeometry)); + propagationType)); // Make sure the set hit actor is actually hittable. This is usually required when we have some // clipping as we need to hit-test all actors as we descend the tree regardless of whether they // are hittable or not. @@ -600,7 +601,7 @@ void GeoHitTestRenderTask(const RenderTaskList::ExclusivesContainer& exclusives, results.point, results.eventTime, results.actorLists, - true); + Integration::Scene::TouchPropagationType::GEOMETRY); } else if(IsWithinSourceActors(*sourceActor, *layer)) { @@ -620,7 +621,7 @@ void GeoHitTestRenderTask(const RenderTaskList::ExclusivesContainer& exclusives, results.point, results.eventTime, results.actorLists, - true); + Integration::Scene::TouchPropagationType::GEOMETRY); } } @@ -737,7 +738,7 @@ bool HitTestRenderTask(const RenderTaskList::ExclusivesContainer& exclusives, results.point, results.eventTime, results.actorLists, - false); + Integration::Scene::TouchPropagationType::PARENT); } else if(IsWithinSourceActors(*sourceActor, *layer)) { @@ -758,7 +759,7 @@ bool HitTestRenderTask(const RenderTaskList::ExclusivesContainer& exclusives, results.point, results.eventTime, results.actorLists, - false); + Integration::Scene::TouchPropagationType::PARENT); } // If this layer is set to consume the hit, then do not check any layers behind it @@ -868,18 +869,18 @@ Dali::Actor FindPriorActorInLayers(const LayerList& layers, Dali::Actor rootActo * @param[in] taskList The list of render tasks * @param[out] results Ray information calculated by the camera * @param[in] hitCheck The hit testing interface object to use - * @param[in] isGeometry Whether the scene using geometry event propagation touch and hover events. + * @param[in] propagationType Whether the scene using geometry event propagation touch and hover events. * @return True if we have a hit, false otherwise */ -bool HitTestRenderTaskList(const Vector2& sceneSize, - LayerList& layers, - RenderTaskList& taskList, - const Vector2& screenCoordinates, - Results& results, - HitTestInterface& hitCheck, - bool isGeometry) +bool HitTestRenderTaskList(const Vector2& sceneSize, + LayerList& layers, + RenderTaskList& taskList, + const Vector2& screenCoordinates, + Results& results, + HitTestInterface& hitCheck, + const Integration::Scene::TouchPropagationType propagationType) { - if(isGeometry) + if(propagationType == Integration::Scene::TouchPropagationType::GEOMETRY) { RenderTaskList::RenderTaskContainer& tasks = taskList.GetTasks(); RenderTaskList::RenderTaskContainer::iterator endIter = tasks.end(); @@ -974,20 +975,20 @@ bool HitTestRenderTaskList(const Vector2& sceneSize, * @param[in] taskList The list of render tasks * @param[out] results Ray information calculated by the camera * @param[in] hitCheck The hit testing interface object to use - * @param[in] isGeometry Whether the scene using geometry event propagation touch and hover events. + * @param[in] propagationType Whether the scene using geometry event propagation touch and hover events. * @return True if we have a hit, false otherwise */ -bool HitTestForEachRenderTask(const Vector2& sceneSize, - LayerList& layers, - RenderTaskList& taskList, - const Vector2& screenCoordinates, - Results& results, - HitTestInterface& hitCheck, - bool isGeometry) +bool HitTestForEachRenderTask(const Vector2& sceneSize, + LayerList& layers, + RenderTaskList& taskList, + const Vector2& screenCoordinates, + Results& results, + HitTestInterface& hitCheck, + const Integration::Scene::TouchPropagationType propagationType) { bool result = false; - if(HitTestRenderTaskList(sceneSize, layers, taskList, screenCoordinates, results, hitCheck, isGeometry)) + if(HitTestRenderTaskList(sceneSize, layers, taskList, screenCoordinates, results, hitCheck, propagationType)) { // Found hit. result = true; @@ -1000,13 +1001,13 @@ bool HitTestForEachRenderTask(const Vector2& sceneSize, HitTestInterface::~HitTestInterface() = default; -bool HitTest(const Vector2& sceneSize, RenderTaskList& taskList, LayerList& layerList, const Vector2& screenCoordinates, Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func, bool isGeometry) +bool HitTest(const Vector2& sceneSize, RenderTaskList& taskList, LayerList& layerList, const Vector2& screenCoordinates, Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func, const Integration::Scene::TouchPropagationType propagationType) { bool wasHit(false); // Hit-test the regular on-scene actors Results hitTestResults; HitTestFunctionWrapper hitTestFunctionWrapper(func); - if(HitTestForEachRenderTask(sceneSize, layerList, taskList, screenCoordinates, hitTestResults, hitTestFunctionWrapper, isGeometry)) + if(HitTestForEachRenderTask(sceneSize, layerList, taskList, screenCoordinates, hitTestResults, hitTestFunctionWrapper, propagationType)) { results.actor = hitTestResults.actor; results.actorCoordinates = hitTestResults.actorCoordinates; @@ -1015,23 +1016,23 @@ bool HitTest(const Vector2& sceneSize, RenderTaskList& taskList, LayerList& laye return wasHit; } -bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, HitTestInterface& hitTestInterface, bool isGeometry) +bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, HitTestInterface& hitTestInterface, const Integration::Scene::TouchPropagationType propagationType) { bool wasHit(false); // Hit-test the regular on-scene actors if(!wasHit) { - wasHit = HitTestForEachRenderTask(sceneSize, layerList, renderTaskList, screenCoordinates, results, hitTestInterface, isGeometry); + wasHit = HitTestForEachRenderTask(sceneSize, layerList, renderTaskList, screenCoordinates, results, hitTestInterface, propagationType); } return wasHit; } -bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, const Actor* ownActor, bool isGeometry) +bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, const Actor* ownActor, const Integration::Scene::TouchPropagationType propagationType) { ActorTouchableCheck actorTouchableCheck; actorTouchableCheck.SetOwnActor(ownActor); - return HitTest(sceneSize, renderTaskList, layerList, screenCoordinates, results, actorTouchableCheck, isGeometry); + return HitTest(sceneSize, renderTaskList, layerList, screenCoordinates, results, actorTouchableCheck, propagationType); } } // namespace Dali::Internal::HitTestAlgorithm diff --git a/dali/internal/event/events/hit-test-algorithm-impl.h b/dali/internal/event/events/hit-test-algorithm-impl.h index 7a37204..ccb023f 100644 --- a/dali/internal/event/events/hit-test-algorithm-impl.h +++ b/dali/internal/event/events/hit-test-algorithm-impl.h @@ -95,11 +95,11 @@ struct HitTestInterface * @param[in] point The point of event touched. * @param[in] hitPointLocal The hit point in the Actor's local reference system. * @param[in] timeStamp The time the event occurred. - * @param[in] isGeometry If true, hittest works in a geometry way. + * @param[in] propagationType If Integration::Scene::TouchPropagationType::GEOMETRY, hittest works in a geometry way. * * @return true if the actor should be the hit, false otherwise. */ - virtual bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, bool isGeometry) = 0; + virtual bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, const Integration::Scene::TouchPropagationType propagationType) = 0; protected: /** @@ -117,12 +117,12 @@ protected: * @param[in] screenCoordinates The screen coordinates. * @param[out] results The results of the hit-test. * @param[in] func The function to use in the hit-test algorithm. - * @param[in] isGeometry If true, hittest works in a geometry way. + * @param[in] propagationType If Integration::Scene::TouchPropagationType::GEOMETRY, hittest works in a geometry way. * @return true if something was hit * * @see HitTest(Stage&, const Vector2&, Results&, HitTestInterface&) */ -bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func, bool isGeometry = false); +bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func, const Integration::Scene::TouchPropagationType propagationType = Integration::Scene::TouchPropagationType::PARENT); /** * Given screen coordinates, this method returns the hit actor & the local coordinates relative to the actor etc. @@ -132,7 +132,7 @@ bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList * @param[in] screenCoordinates The screen coordinates. * @param[out] results The results of the hit-test. * @param[in] hitTestInterface Used to determine whether the actor is hit or whether we walk down its hierarchy - * @param[in] isGeometry If true, hittest works in a geometry way. + * @param[in] propagationType If Integration::Scene::TouchPropagationType::GEOMETRY, hittest works in a geometry way. * @return true if something was hit * *

Hit Test Algorithm:

@@ -149,7 +149,7 @@ bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList * @note Currently, we prefer a child hit over a parent (regardless of the distance from the * camera) unless the parent is a RenderableActor but this is subject to change. */ -bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, HitTestInterface& hitTestInterface, bool isGeometry = false); +bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, HitTestInterface& hitTestInterface, const Integration::Scene::TouchPropagationType propagationType = Integration::Scene::TouchPropagationType::PARENT); /** * Default HitTest where we check if a touch is required. @@ -160,12 +160,12 @@ bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList * @param[in] screenCoordinates The screen coordinates. * @param[out] results The results of the hit-test. * @param[in] ownActor The actor from which the touch down was started. - * @param[in] isGeometry If true, hittest works in a geometry way. + * @param[in] propagationType If Integration::Scene::TouchPropagationType::GEOMETRY, hittest works in a geometry way. * @return true if something was hit * * @see HitTest(Stage&, const Vector2&, Results&, HitTestInterface&) */ -bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, const Actor* ownActor = nullptr, bool isGeometry = false); +bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, const Actor* ownActor = nullptr, const Integration::Scene::TouchPropagationType propagationType = Integration::Scene::TouchPropagationType::PARENT); } // namespace HitTestAlgorithm diff --git a/dali/internal/event/events/hover-event-processor.cpp b/dali/internal/event/events/hover-event-processor.cpp index afe0fa1..94ad8d2 100644 --- a/dali/internal/event/events/hover-event-processor.cpp +++ b/dali/internal/event/events/hover-event-processor.cpp @@ -248,7 +248,7 @@ struct ActorHoverableCheck : public HitTestAlgorithm::HitTestInterface return layer->IsHoverConsumed(); } - bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, bool isGeometry) override + bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp, const Integration::Scene::TouchPropagationType propagationType) override { // Hover event is always hit. return true; @@ -354,7 +354,7 @@ struct HoverEventProcessor::Impl HitTestAlgorithm::Results hitTestResults; hitTestResults.eventTime = event.time; ActorHoverableCheck actorHoverableCheck; - HitTestAlgorithm::HitTest(processor.mScene.GetSize(), processor.mScene.GetRenderTaskList(), processor.mScene.GetLayerList(), currentPoint.GetScreenPosition(), hitTestResults, actorHoverableCheck, localVars.isGeometry); + HitTestAlgorithm::HitTest(processor.mScene.GetSize(), processor.mScene.GetRenderTaskList(), processor.mScene.GetLayerList(), currentPoint.GetScreenPosition(), hitTestResults, actorHoverableCheck, localVars.isGeometry ? Integration::Scene::TouchPropagationType::GEOMETRY : Integration::Scene::TouchPropagationType::PARENT); Integration::Point newPoint(currentPoint); newPoint.SetHitActor(hitTestResults.actor); @@ -645,7 +645,7 @@ void HoverEventProcessor::SendInterruptedHoverEvent(Dali::Internal::Actor* actor Integration::Point point; point.SetState(PointState::INTERRUPTED); point.SetHitActor(Dali::Actor(actor)); - if(mScene.IsGeometryHittestEnabled()) + if(mScene.GetTouchPropagationType() == Integration::Scene::TouchPropagationType::GEOMETRY) { std::list actorLists; actorLists.push_back(actor); diff --git a/dali/internal/event/events/touch-event-processor.cpp b/dali/internal/event/events/touch-event-processor.cpp index 44792ef..8dbd913 100644 --- a/dali/internal/event/events/touch-event-processor.cpp +++ b/dali/internal/event/events/touch-event-processor.cpp @@ -312,7 +312,7 @@ void ParsePrimaryTouchPoint( else { Actor* ownTouchActor = ownTouchActorObserver.GetActor(); - HitTestAlgorithm::HitTest(scene.GetSize(), scene.GetRenderTaskList(), scene.GetLayerList(), currentPoint.GetScreenPosition(), hitTestResults, ownTouchActor, scene.IsGeometryHittestEnabled()); + HitTestAlgorithm::HitTest(scene.GetSize(), scene.GetRenderTaskList(), scene.GetLayerList(), currentPoint.GetScreenPosition(), hitTestResults, ownTouchActor, scene.GetTouchPropagationType()); if(currentPoint.GetState() == PointState::STARTED && hitTestResults.actor) { @@ -912,7 +912,7 @@ bool TouchEventProcessor::ProcessTouchEvent(const Integration::TouchEvent& event } else { - HitTestAlgorithm::HitTest(mScene.GetSize(), mScene.GetRenderTaskList(), mScene.GetLayerList(), currentPoint.GetScreenPosition(), hitTestResults, nullptr, localVars.isGeometry); + HitTestAlgorithm::HitTest(mScene.GetSize(), mScene.GetRenderTaskList(), mScene.GetLayerList(), currentPoint.GetScreenPosition(), hitTestResults, nullptr, localVars.isGeometry ? Integration::Scene::TouchPropagationType::GEOMETRY : Integration::Scene::TouchPropagationType::PARENT); } }