X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fevents%2Ftap-gesture%2Ftap-gesture-processor.h;h=726d77ee0060084a0b7aa895845ac70371a3762a;hb=e906745d91830223a609859b4acfeb26102f4255;hp=b15e0feeb4b87509ad6ba73763cf0bada17ca7c8;hpb=a189f50d1870b7a2b26969cebbe06aba38dbbe97;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/events/tap-gesture/tap-gesture-processor.h b/dali/internal/event/events/tap-gesture/tap-gesture-processor.h index b15e0fe..726d77e 100644 --- a/dali/internal/event/events/tap-gesture/tap-gesture-processor.h +++ b/dali/internal/event/events/tap-gesture/tap-gesture-processor.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_TAP_GESTURE_EVENT_PROCESSOR_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -19,16 +19,14 @@ */ // INTERNAL INCLUDES -#include -#include #include +#include +#include namespace Dali { - namespace Internal { - class Scene; class Stage; class Actor; @@ -46,7 +44,6 @@ struct TapGestureEvent; class TapGestureProcessor : public GestureProcessor, public RecognizerObserver { public: - /** * Create a tap gesture processor. */ @@ -58,13 +55,12 @@ public: ~TapGestureProcessor() override; public: // To be called by GestureEventProcessor - /** * This method is called whenever a tap gesture event occurs. * @param[in] scene The scene the tap gesture event occurs in. * @param[in] tapEvent The event that has occurred. */ - void Process( Scene& scene, const TapGestureEvent& event) override; + void Process(Scene& scene, const TapGestureEvent& event) override; /** * Adds a gesture detector to this gesture processor. @@ -88,14 +84,28 @@ public: // To be called by GestureEventProcessor */ void GestureDetectorUpdated(TapGestureDetector* gestureDetector); -private: + /** + * @brief This method sets the maximum allowed time required to be recognized as a multi tap gesture (millisecond) + * + * @param[in] time The time value in milliseconds + */ + void SetMaximumAllowedTime(uint32_t time); + + /** + * @brief This method sets the recognizer time required to be recognized as a tap gesture (millisecond) + * + * This time is from touch down to touch up to recognize the tap gesture. + * + * @param[in] time The time value in milliseconds + */ + void SetRecognizerTime(uint32_t time); +private: // Undefined TapGestureProcessor(const TapGestureProcessor&); TapGestureProcessor& operator=(const TapGestureProcessor& rhs); private: - /** * Iterates through our GestureDetectors and determines if we need to ask the adaptor to update * its detection policy. If it does, it sends the appropriate gesture update request to adaptor. @@ -107,20 +117,21 @@ private: /** * @copydoc GestureProcessor::OnGesturedActorStageDisconnection() */ - void OnGesturedActorStageDisconnection() override { /* Nothing to do */ } + void OnGesturedActorStageDisconnection() override + { /* Nothing to do */ + } /** * @copydoc GestureProcessor::CheckGestureDetector() */ - bool CheckGestureDetector( GestureDetector* detector, Actor* actor ) override; + bool CheckGestureDetector(GestureDetector* detector, Actor* actor) override; /** * @copydoc GestureProcessor::EmitGestureSignal() */ - void EmitGestureSignal( Actor* actor, const GestureDetectorContainer& gestureDetectors, Vector2 actorCoordinates ) override; + void EmitGestureSignal(Actor* actor, const GestureDetectorContainer& gestureDetectors, Vector2 actorCoordinates) override; private: - TapGestureDetectorContainer mTapGestureDetectors; unsigned int mMinTapsRequired; @@ -128,9 +139,12 @@ private: unsigned int mMinTouchesRequired; unsigned int mMaxTouchesRequired; - ActorObserver mCurrentTapActor; ///< Observer for the current gesture actor - const TapGestureEvent* mCurrentTapEvent; ///< Pointer to current TapEvent, used when calling ProcessAndEmit() - bool mPossibleProcessed; ///< Indication of whether we've processed a touch down for this gestuee + ActorObserver mCurrentTapActor; ///< Observer for the current gesture actor + const TapGestureEvent* mCurrentTapEvent; ///< Pointer to current TapEvent, used when calling ProcessAndEmit() + bool mPossibleProcessed; ///< Indication of whether we've processed a touch down for this gestuee + + uint32_t mMaximumAllowedTime; ///< The maximum allowed time required to be recognized as a multi tap gesture (millisecond) + uint32_t mRecognizerTime; ///< The recognizer time required to be recognized as a tap gesture (millisecond) }; } // namespace Internal