// 3) Recursively deliver events to the actor and its parents, until the event is consumed or the stage is reached.
+ Integration::Point primaryPoint = hoverEvent->GetPoint(0);
+ Dali::Actor primaryHitActor = primaryPoint.GetHitActor();
+ PointState::Type primaryPointState = primaryPoint.GetState();
+
// Emit the touch signal
Dali::Actor consumedActor;
if(currentRenderTask)
}
}
consumedActor = EmitHoverSignals(hitActor, hoverEventHandle);
- }
-
- Integration::Point primaryPoint = hoverEvent->GetPoint(0);
- Dali::Actor primaryHitActor = primaryPoint.GetHitActor();
- PointState::Type primaryPointState = primaryPoint.GetState();
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? reinterpret_cast<void*>(&primaryHitActor.GetBaseObject()) : NULL, primaryHitActor ? primaryHitActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "");
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast<void*>(&consumedActor.GetBaseObject()) : NULL, consumedActor ? consumedActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "");
+ if(hoverEvent->GetPoint(0).GetState() != PointState::MOTION)
+ {
+ DALI_LOG_DEBUG_INFO("PrimaryHitActor:(%p), id(%d), name(%s), state(%d)\n", primaryHitActor ? reinterpret_cast<void*>(&primaryHitActor.GetBaseObject()) : NULL, primaryHitActor ? primaryHitActor.GetProperty<int32_t>(Dali::Actor::Property::ID) : -1, primaryHitActor ? primaryHitActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "", hoverEvent->GetPoint(0).GetState());
+ DALI_LOG_DEBUG_INFO("ConsumedActor: (%p), id(%d), name(%s), state(%d)\n", consumedActor ? reinterpret_cast<void*>(&consumedActor.GetBaseObject()) : NULL, consumedActor ? consumedActor.GetProperty<int32_t>(Dali::Actor::Property::ID) : -1, consumedActor ? consumedActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "", hoverEvent->GetPoint(0).GetState());
+ }
+ }
if((primaryPointState == PointState::STARTED) &&
(hoverEvent->GetPointCount() == 1) &&
{
if(lastPrimaryHitActor->GetLeaveRequired())
{
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "LeaveActor(Hit): (%p) %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetName().data());
+ DALI_LOG_DEBUG_INFO("LeaveActor(Hit): (%p) %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetName().data());
leaveEventConsumer = EmitHoverSignals(mLastPrimaryHitActor.GetActor(), lastRenderTaskImpl, hoverEvent, PointState::LEAVE);
}
}
{
// At this point mLastPrimaryHitActor was touchable and sensitive in the previous touch event process but is not in the current one.
// An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "InterruptedActor(Hit): (%p) %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetName().data());
+ DALI_LOG_DEBUG_INFO("InterruptedActor(Hit): (%p) %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetName().data());
leaveEventConsumer = EmitHoverSignals(mLastPrimaryHitActor.GetActor(), lastRenderTaskImpl, hoverEvent, PointState::INTERRUPTED);
}
}
{
if(lastConsumedActor->GetLeaveRequired())
{
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "LeaveActor(Consume): (%p) %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetName().data());
+ DALI_LOG_DEBUG_INFO("LeaveActor(Consume): (%p) %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetName().data());
EmitHoverSignals(lastConsumedActor, lastRenderTaskImpl, hoverEvent, PointState::LEAVE);
}
}
{
// At this point mLastConsumedActor was touchable and sensitive in the previous touch event process but is not in the current one.
// An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "InterruptedActor(Consume): (%p) %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetName().data());
+ DALI_LOG_DEBUG_INFO("InterruptedActor(Consume): (%p) %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetName().data());
EmitHoverSignals(mLastConsumedActor.GetActor(), lastRenderTaskImpl, hoverEvent, PointState::INTERRUPTED);
}
}
{
namespace
{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_LONG_PRESS_GESTURE_DETECTOR");
+#endif // defined(DEBUG_ENABLED)
+
// Signals
const char* const SIGNAL_LONG_PRESS_DETECTED = "longPressDetected";
{
// Guard against destruction during signal emission
Dali::LongPressGestureDetector handle(this);
-
+ DALI_LOG_DEBUG_INFO("emitting longPress gesture actor id(%d)\n", pressedActor.GetProperty<int32_t>(Dali::Actor::Property::ID));
mDetectedSignal.Emit(pressedActor, longPress);
}
void LongPressGestureDetector::OnActorAttach(Actor& actor)
{
- // Do nothing
+ DALI_LOG_INFO(gLogFilter, Debug::General, "LongPressGestureDetector attach actor(%d)\n", actor.GetId());
}
void LongPressGestureDetector::OnActorDetach(Actor& actor)
{
- // Do nothing
+ DALI_LOG_INFO(gLogFilter, Debug::General, "LongPressGestureDetector detach actor(%d)\n", actor.GetId());
}
void LongPressGestureDetector::OnActorDestroyed(Object& object)
Dali::PanGestureDetector handle(this);
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "Emitting Signal (%p)\n", this);
-
+ if(pan.GetState() != GestureState::CONTINUING)
+ {
+ DALI_LOG_DEBUG_INFO("emitting pan gesture actor id(%d) state(%d)\n", actor.GetProperty<int32_t>(Dali::Actor::Property::ID), pan.GetState());
+ }
mDetectedSignal.Emit(actor, pan);
}
}
void PanGestureDetector::OnActorAttach(Actor& actor)
{
- // Do nothing
+ DALI_LOG_INFO(gLogFilter, Debug::General, "PanGestureDetector attach actor(%d)\n", actor.GetId());
}
void PanGestureDetector::OnActorDetach(Actor& actor)
{
- // Do nothing
+ DALI_LOG_INFO(gLogFilter, Debug::General, "PanGestureDetector detach actor(%d)\n", actor.GetId());
}
void PanGestureDetector::OnActorDestroyed(Object& object)
{
namespace
{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_PINCH_GESTURE_DETECTOR");
+#endif // defined(DEBUG_ENABLED)
+
// Signals
const char* const SIGNAL_PINCH_DETECTED = "pinchDetected";
{
// Guard against destruction during signal emission
Dali::PinchGestureDetector handle(this);
-
+ if(pinch.GetState() != GestureState::CONTINUING)
+ {
+ DALI_LOG_DEBUG_INFO("emitting pinch gesture actor id(%d) state(%d)\n", actor.GetProperty<int32_t>(Dali::Actor::Property::ID), pinch.GetState());
+ }
mDetectedSignal.Emit(actor, pinch);
}
void PinchGestureDetector::OnActorAttach(Actor& actor)
{
- // Do nothing
+ DALI_LOG_INFO(gLogFilter, Debug::General, "PinchGestureDetector attach actor(%d)\n", actor.GetId());
}
void PinchGestureDetector::OnActorDetach(Actor& actor)
{
- // Do nothing
+ DALI_LOG_INFO(gLogFilter, Debug::General, "PinchGestureDetector detach actor(%d)\n", actor.GetId());
}
void PinchGestureDetector::OnActorDestroyed(Object& object)
{
namespace
{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ROTATION_GESTURE_DETECTOR");
+#endif // defined(DEBUG_ENABLED)
+
// Signals
const char* const SIGNAL_ROTATION_DETECTED = "rotationDetected";
{
// Guard against destruction during signal emission
Dali::RotationGestureDetector handle(this);
-
+ if(rotation.GetState() != GestureState::CONTINUING)
+ {
+ DALI_LOG_DEBUG_INFO("emitting rotation gesture actor id(%d) state(%d)\n", actor.GetProperty<int32_t>(Dali::Actor::Property::ID), rotation.GetState());
+ }
mDetectedSignal.Emit(actor, rotation);
}
return connected;
}
+void RotationGestureDetector::OnActorAttach(Actor& actor)
+{
+ DALI_LOG_INFO(gLogFilter, Debug::General, "RotationGestureDetector attach actor(%d)\n", actor.GetId());
+}
+
+void RotationGestureDetector::OnActorDetach(Actor& actor)
+{
+ DALI_LOG_INFO(gLogFilter, Debug::General, "RotationGestureDetector detach actor(%d)\n", actor.GetId());
+}
+
} // namespace Internal
} // namespace Dali
/**
* @copydoc Dali::Internal::GestureDetector::OnActorAttach(Actor&)
*/
- void OnActorAttach(Actor& actor) override
- { /* Nothing to do */
- }
+ void OnActorAttach(Actor& actor) override;
/**
* @copydoc Dali::Internal::GestureDetector::OnActorDetach(Actor&)
*/
- void OnActorDetach(Actor& actor) override
- { /* Nothing to do */
- }
+ void OnActorDetach(Actor& actor) override;
/**
* @copydoc Dali::Internal::GestureDetector::OnActorDestroyed(Object&)
{
namespace
{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_TAP_GESTURE_DETECTOR");
+#endif // defined(DEBUG_ENABLED)
+
constexpr uint32_t DEFAULT_TAPS_REQUIRED = 1u;
constexpr uint32_t DEFAULT_TOUCHES_REQUIRED = 1u;
constexpr uint32_t DEFAULT_TAP_WAIT_TIME = 330u;
{
// Guard against destruction during signal emission
Dali::TapGestureDetector handle(this);
-
+ DALI_LOG_DEBUG_INFO("emitting tap gesture actor id(%d)\n", tappedActor.GetProperty<int32_t>(Dali::Actor::Property::ID));
mDetectedSignal.Emit(tappedActor, mTap);
}
else
{
// Guard against destruction during signal emission
Dali::TapGestureDetector handle(this);
-
+ DALI_LOG_DEBUG_INFO("emitting tap gesture actor id(%d)\n", mTappedActor.GetProperty<int32_t>(Dali::Actor::Property::ID));
mDetectedSignal.Emit(mTappedActor, mTap);
mTimerId = 0;
{
CheckMinMaxTapsRequired();
mWaitTime = mGestureEventProcessor.GetTapGestureProcessor().GetMaximumAllowedTime();
+ DALI_LOG_INFO(gLogFilter, Debug::General, "TapGestureDetector attach actor(%d)\n", actor.GetId());
}
void TapGestureDetector::OnActorDetach(Actor& actor)
{
- // Do nothing
+ DALI_LOG_INFO(gLogFilter, Debug::General, "TapGestureDetector detector actor(%d)\n", actor.GetId());
}
void TapGestureDetector::OnActorDestroyed(Object& object)
else // Clear if the time between touch down and touch up is long.
{
mState = CLEAR;
+ DALI_LOG_DEBUG_INFO("time between touch down and touch up is long. (%dms > %dms)\n", mDeltaBetweenTouchDownTouchUp, mRecognizerTime);
}
}
else if(pointState == PointState::INTERRUPTED)
else // Clear if the time between touch down and touch up is long.
{
mState = CLEAR;
+ DALI_LOG_DEBUG_INFO("time between touch down and touch up is long. (%dms > %dms)\n", mDeltaBetweenTouchDownTouchUp, mRecognizerTime);
}
}
else if(pointState == PointState::DOWN)
}
}
consumed = consumedActor ? true : false;
- }
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? reinterpret_cast<void*>(&primaryHitActor.GetBaseObject()) : NULL, primaryHitActor ? primaryHitActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "");
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast<void*>(&consumedActor.GetBaseObject()) : NULL, consumedActor ? consumedActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "");
+ if(primaryPointState != PointState::MOTION)
+ {
+ DALI_LOG_DEBUG_INFO("PrimaryHitActor:(%p), id(%d), name(%s), state(%d)\n", primaryHitActor ? reinterpret_cast<void*>(&primaryHitActor.GetBaseObject()) : NULL, primaryHitActor ? primaryHitActor.GetProperty<int32_t>(Dali::Actor::Property::ID) : -1, primaryHitActor ? primaryHitActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "", primaryPointState);
+ DALI_LOG_DEBUG_INFO("ConsumedActor: (%p), id(%d), name(%s), state(%d)\n", consumedActor ? reinterpret_cast<void*>(&consumedActor.GetBaseObject()) : NULL, consumedActor ? consumedActor.GetProperty<int32_t>(Dali::Actor::Property::ID) : -1, consumedActor ? consumedActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "", primaryPointState);
+ }
+ }
if((primaryPointState == PointState::DOWN) &&
(touchEventImpl->GetPointCount() == 1) &&
{
if(lastPrimaryHitActor->GetLeaveRequired())
{
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "LeaveActor(Hit): (%p) %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetName().data());
+ DALI_LOG_DEBUG_INFO("LeaveActor(Hit): (%p) %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetName().data());
leaveEventConsumer = EmitTouchSignals(lastPrimaryHitActor, lastRenderTaskImpl, touchEventImpl, PointState::LEAVE);
}
}
{
// At this point mLastPrimaryHitActor was touchable and sensitive in the previous touch event process but is not in the current one.
// An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "InterruptedActor(Hit): (%p) %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetName().data());
+ DALI_LOG_DEBUG_INFO("InterruptedActor(Hit): (%p) %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetName().data());
leaveEventConsumer = EmitTouchSignals(lastPrimaryHitActor, lastRenderTaskImpl, touchEventImpl, PointState::INTERRUPTED);
}
}
{
if(lastConsumedActor->GetLeaveRequired())
{
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "LeaveActor(Consume): (%p) %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetName().data());
+ DALI_LOG_DEBUG_INFO("LeaveActor(Consume): (%p) %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetName().data());
EmitTouchSignals(lastConsumedActor, lastRenderTaskImpl, touchEventImpl, PointState::LEAVE);
}
}
{
// At this point mLastConsumedActor was touchable and sensitive in the previous touch event process but is not in the current one.
// An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
- DALI_LOG_INFO(gLogFilter, Debug::Concise, "InterruptedActor(Consume): (%p) %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetName().data());
+ DALI_LOG_DEBUG_INFO("InterruptedActor(Consume): (%p) %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetName().data());
EmitTouchSignals(mLastConsumedActor.GetActor(), lastRenderTaskImpl, touchEventImpl, PointState::INTERRUPTED);
}
}