+ Dali::Integration::PlatformAbstraction& platformAbstraction = ThreadLocalStorage::Get().GetPlatformAbstraction();
+ if(mTimerId != 0)
+ {
+ platformAbstraction.CancelTimer(mTimerId);
+ mTimerId = 0;
+ }
+ if(mMaximumTapsRequired > tap.GetNumberOfTaps() && !mReceiveAllTapEvents)
+ {
+ mTappedActor = tappedActor;
+
+ Internal::TapGesturePtr internalTap(new Internal::TapGesture(tap.GetState()));
+ internalTap->SetTime(tap.GetTime());
+ internalTap->SetNumberOfTaps(tap.GetNumberOfTaps());
+ internalTap->SetNumberOfTouches(tap.GetNumberOfTouches());
+ internalTap->SetScreenPoint(tap.GetScreenPoint());
+ internalTap->SetLocalPoint(tap.GetLocalPoint());
+ internalTap->SetGestureSourceType(tap.GetSourceType());
+ mTap = Dali::TapGesture(internalTap.Get());
+
+ mTimerId = platformAbstraction.StartTimer(DEFAULT_TAP_WAIT_TIME, MakeCallback(this, &TapGestureDetector::TimerCallback));
+ }
+ else
+ {
+ // Guard against destruction during signal emission
+ Dali::TapGestureDetector handle(this);
+
+ mDetectedSignal.Emit(tappedActor, tap);
+ }
+}
+
+bool TapGestureDetector::TimerCallback()
+{