X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fevents%2Ftap-gesture-detector.h;h=778223185512273b6b1bd1462472bd8fc427316d;hb=92b051cadd0db5d9f985aacbbbf832995fb55f53;hp=0d2b8295335962cd2da62c9c41b332a9b03ffe21;hpb=b7b2f4888233ac3ae4c7eea69d75d10cfabda475;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/events/tap-gesture-detector.h b/dali/public-api/events/tap-gesture-detector.h index 0d2b829..7782231 100644 --- a/dali/public-api/events/tap-gesture-detector.h +++ b/dali/public-api/events/tap-gesture-detector.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TAP_GESTURE_DETECTOR_H__ -#define __DALI_TAP_GESTURE_DETECTOR_H__ +#ifndef DALI_TAP_GESTURE_DETECTOR_H +#define DALI_TAP_GESTURE_DETECTOR_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -37,7 +37,7 @@ namespace Internal DALI_INTERNAL class TapGestureDetector; } -struct TapGesture; +class TapGesture; /** * @brief This class emits a signal when a tap gesture occurs that meets the requirements set by the @@ -70,15 +70,13 @@ struct TapGesture; class DALI_CORE_API TapGestureDetector : public GestureDetector { public: // Typedefs - /** * @brief Signal type for detected signal. * @SINCE_1_0.0 */ - typedef Signal< void ( Actor, const TapGesture& ) > DetectedSignalType; + using DetectedSignalType = Signal; public: // Creation & Destruction - /** * @brief Creates an uninitialized TapGestureDetector; this can be initialized with TapGestureDetector::New(). * @@ -103,7 +101,7 @@ public: // Creation & Destruction * @param[in] tapsRequired The minimum & maximum number of taps required * @return A handle to a newly allocated Dali resource */ - static TapGestureDetector New( uint32_t tapsRequired ); + static TapGestureDetector New(uint32_t tapsRequired); /** * @brief Downcasts a handle to TapGestureDetector handle. @@ -114,7 +112,7 @@ public: // Creation & Destruction * @param[in] handle Handle to an object * @return Handle to a TapGestureDetector object or an uninitialized handle */ - static TapGestureDetector DownCast( BaseHandle handle ); + static TapGestureDetector DownCast(BaseHandle handle); /** * @brief Destructor. @@ -142,7 +140,6 @@ public: // Creation & Destruction TapGestureDetector& operator=(const TapGestureDetector& rhs); public: // Setters - /** * @brief Sets the minimum number of taps required. * @@ -150,9 +147,10 @@ public: // Setters * @SINCE_1_0.0 * @param[in] minimumTaps The minimum taps required * @pre The gesture detector has been initialized. - * @note The default is '1'. + * @note The default is '1', the maximum is 2. + * @see ReceiveAllTapEvents */ - void SetMinimumTapsRequired( uint32_t minimumTaps ); + void SetMinimumTapsRequired(uint32_t minimumTaps); /** * @brief Sets the maximum number of taps required. @@ -161,12 +159,21 @@ public: // Setters * @SINCE_1_0.0 * @param[in] maximumTaps The maximum taps required * @pre The gesture detector has been initialized. - * @note The default is '1'. + * @note The default is '1', the maximum is 2. + * @see ReceiveAllTapEvents */ - void SetMaximumTapsRequired( uint32_t maximumTaps ); + void SetMaximumTapsRequired(uint32_t maximumTaps); -public: // Getters + /** + * @brief When set to true, all tap gestures will be received when multiple taps are supported by the gesture detector. + * + * @param[in] receive The receiving all tap events flag + * @pre The gesture detector has been initialized. + * @note The default is false. + */ + void ReceiveAllTapEvents(bool receive); +public: // Getters /** * @brief Retrieves the minimum number of taps required. * @@ -186,7 +193,6 @@ public: // Getters uint32_t GetMaximumTapsRequired() const; public: // Signals - /** * @brief This signal is emitted when the specified tap is detected on the attached actor. * @@ -201,7 +207,6 @@ public: // Signals DetectedSignalType& DetectedSignal(); public: // Not intended for Application developers - /// @cond internal /** * @brief This constructor is used by TapGestureDetector::New() methods. @@ -219,4 +224,4 @@ public: // Not intended for Application developers } // namespace Dali -#endif // __DALI_TAP_GESTURE_DETECTOR_H__ +#endif // DALI_TAP_GESTURE_DETECTOR_H