X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fevents%2Fgesture-processor.cpp;h=1cf4b26d8b90e1bc64b753524deade53a1ed372d;hb=d7775bfee328210d5b7300caf0fccfc2ec3dc2e8;hp=551acc1e82b18c32f8ccb42bfc4e6e92e2fcf114;hpb=ff57fc77e802eaa2909e4aa5fab5c82dd85159fc;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/events/gesture-processor.cpp b/dali/internal/event/events/gesture-processor.cpp index 551acc1..1cf4b26 100644 --- a/dali/internal/event/events/gesture-processor.cpp +++ b/dali/internal/event/events/gesture-processor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,6 +61,11 @@ struct GestureHitTestCheck : public HitTestAlgorithm::HitTestInterface return layer->IsTouchConsumed(); } + bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp) override + { + return actor->EmitHitTestResultSignal(point, hitPointLocal, timeStamp); + } + GestureType::Value mType; }; @@ -71,6 +76,8 @@ GestureProcessor::GestureProcessor(GestureType::Value type) mNeedsUpdate(false), mType(type), mCurrentGesturedActor(nullptr), + mPoint(), + mEventTime(0u), mGesturedActorDisconnected(false) { } @@ -84,6 +91,11 @@ void GestureProcessor::ProcessTouch(Scene& scene, const Integration::TouchEvent& { if(mGestureRecognizer) { + if(!event.points.empty()) + { + mPoint = event.points[0]; + mEventTime = event.time; + } mGestureRecognizer->SendEvent(scene, event); } } @@ -192,6 +204,8 @@ void GestureProcessor::ProcessAndEmit(HitTestAlgorithm::Results& hitTestResults) bool GestureProcessor::HitTest(Scene& scene, Vector2 screenCoordinates, HitTestAlgorithm::Results& hitTestResults) { GestureHitTestCheck hitCheck(mType); + hitTestResults.point = mPoint; + hitTestResults.eventTime = mEventTime; HitTestAlgorithm::HitTest(scene.GetSize(), scene.GetRenderTaskList(), scene.GetLayerList(), screenCoordinates, hitTestResults, hitCheck); return hitTestResults.renderTask && hitTestResults.actor; }