#define DALI_TAP_GESTURE_DETECTOR_H
/*
- * Copyright (c) 2020 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.
class DALI_CORE_API TapGestureDetector : public GestureDetector
{
public: // Typedefs
-
/**
* @brief Signal type for detected signal.
* @SINCE_1_0.0
*/
- using DetectedSignalType = Signal<void( Actor, const TapGesture& )>;
+ using DetectedSignalType = Signal<void(Actor, const TapGesture&)>;
public: // Creation & Destruction
-
/**
* @brief Creates an uninitialized TapGestureDetector; this can be initialized with TapGestureDetector::New().
*
* @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.
* @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.
*/
TapGestureDetector& operator=(const TapGestureDetector& rhs);
-public: // Setters
+ /**
+ * @brief This move constructor is required for (smart) pointer semantics.
+ *
+ * @SINCE_2_2.4
+ * @param[in] handle A reference to the moved handle
+ */
+ TapGestureDetector(TapGestureDetector&& handle) noexcept;
+
+ /**
+ * @brief This move assignment operator is required for (smart) pointer semantics.
+ *
+ * @SINCE_2_2.4
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ TapGestureDetector& operator=(TapGestureDetector&& rhs) noexcept;
+public: // Setters
/**
* @brief Sets the minimum number of taps required.
*
* @param[in] minimumTaps The minimum taps required
* @pre The gesture detector has been initialized.
* @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.
* @param[in] maximumTaps The maximum taps required
* @pre The gesture detector has been initialized.
* @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.
*
uint32_t GetMaximumTapsRequired() const;
public: // Signals
-
/**
* @brief This signal is emitted when the specified tap is detected on the attached actor.
*
DetectedSignalType& DetectedSignal();
public: // Not intended for Application developers
-
/// @cond internal
/**
* @brief This constructor is used by TapGestureDetector::New() methods.