/*
- * 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.
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;
};
mNeedsUpdate(false),
mType(type),
mCurrentGesturedActor(nullptr),
+ mPoint(),
+ mEventTime(0u),
mGesturedActorDisconnected(false)
{
}
{
if(mGestureRecognizer)
{
+ if(!event.points.empty())
+ {
+ mPoint = event.points[0];
+ mEventTime = event.time;
+ }
mGestureRecognizer->SendEvent(scene, event);
}
}
{
// Our gesture detector's attached actor WAS the hit actor so we can can emit the signal.
EmitGestureSignal(actor, gestureDetectors, hitTestResults.actorCoordinates);
- break; // We have found AND emitted a signal on the gestured actor, break out.
+ // If NeedGesturePropagation is true, it passes the gesture to the parent.
+ if(!actor->NeedGesturePropagation())
+ {
+ break; // We have found AND emitted a signal on the gestured actor, break out.
+ }
+ actor->SetNeedGesturePropagation(false);
}
else
{
{
// One of the parents was the gestured actor so we can emit the signal for that actor.
EmitGestureSignal(actor, gestureDetectors, hitPointLocal);
- break; // We have found AND emitted a signal on the gestured actor, break out.
+ // If NeedGesturePropagation is true, it passes the gesture to the parent.
+ if(!actor->NeedGesturePropagation())
+ {
+ break; // We have found AND emitted a signal on the gestured actor, break out.
+ }
+ actor->SetNeedGesturePropagation(false);
}
}
}
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;
}