X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fevents%2Fpinch-gesture-detector.h;h=0fbcadc40b166ac4be8d7d35811e56cbe4905e94;hb=c4750afbf79f15bf71e2aa8ef54f84750463aae2;hp=e9974e1a5463ade8229f6b0fd0aeb14b895e124a;hpb=078a5eebcf26d61076abde02f25b087c06419f67;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/events/pinch-gesture-detector.h b/dali/public-api/events/pinch-gesture-detector.h index e9974e1..0fbcadc 100644 --- a/dali/public-api/events/pinch-gesture-detector.h +++ b/dali/public-api/events/pinch-gesture-detector.h @@ -1,8 +1,8 @@ -#ifndef __DALI_PINCH_GESTURE_DETECTOR_H__ -#define __DALI_PINCH_GESTURE_DETECTOR_H__ +#ifndef DALI_PINCH_GESTURE_DETECTOR_H +#define DALI_PINCH_GESTURE_DETECTOR_H /* - * Copyright (c) 2014 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. @@ -20,17 +20,21 @@ // INTERNAL INCLUDES #include -#include +#include namespace Dali { +/** + * @addtogroup dali_core_events + * @{ + */ namespace Internal DALI_INTERNAL { class PinchGestureDetector; } -struct PinchGesture; +class PinchGesture; /** * @brief This class looks for pinching gestures involving two touches. @@ -46,93 +50,122 @@ struct PinchGesture; * detector.DetectedSignal().Connect(this, &MyApplication::OnPinch); * @endcode * + * @SINCE_1_0.0 * @see PinchGesture + * + * Signals + * | %Signal Name | Method | + * |----------------|-----------------------| + * | pinchDetected | @ref DetectedSignal() | */ -class DALI_IMPORT_API PinchGestureDetector : public GestureDetector +class DALI_CORE_API PinchGestureDetector : public GestureDetector { public: // Typedefs - /** * @brief Signal type. + * @SINCE_1_0.0 */ - typedef SignalV2< void (Actor, PinchGesture) > DetectedSignalV2; - - //Signal Names - static const char* const SIGNAL_PINCH_DETECTED; ///< name "pinch-detected" + using DetectedSignalType = Signal; public: // Creation & Destruction - /** - * @brief Create an uninitialized PinchGestureDetector; this can be initialized with PinchGestureDetector::New(). + * @brief Creates an uninitialized PinchGestureDetector; this can be initialized with PinchGestureDetector::New(). * - * Calling member functions with an uninitialized Dali::Object is not allowed. + * Calling member functions with an uninitialized PinchGestureDetector handle is not allowed. + * @SINCE_1_0.0 */ PinchGestureDetector(); /** - * @brief Create an initialized PinchGestureDetector. + * @brief Creates an initialized PinchGestureDetector. * - * @return A handle to a newly allocated Dali resource. + * @SINCE_1_0.0 + * @return A handle to a newly allocated Dali resource */ static PinchGestureDetector New(); /** - * @brief Downcast an Object handle to PinchGestureDetector handle. + * @brief Downcasts a handle to PinchGestureDetector handle. * - * If handle points to a PinchGestureDetector object the - * downcast produces valid handle. If not the returned handle is left uninitialized. - * @param[in] handle to An object - * @return handle to a PinchGestureDetector object or an uninitialized handle + * If handle points to a PinchGestureDetector object, the + * downcast produces valid handle. If not, the returned handle is left uninitialized. + * @SINCE_1_0.0 + * @param[in] handle Handle to an object + * @return Handle to a PinchGestureDetector object or an uninitialized handle */ - static PinchGestureDetector DownCast( BaseHandle handle ); + static PinchGestureDetector DownCast(BaseHandle handle); /** - * @brief Destructor + * @brief Destructor. * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~PinchGestureDetector(); /** * @brief This copy constructor is required for (smart) pointer semantics. * - * @param [in] handle A reference to the copied handle + * @SINCE_1_0.0 + * @param[in] handle A reference to the copied handle */ PinchGestureDetector(const PinchGestureDetector& handle); /** * @brief This assignment operator is required for (smart) pointer semantics. * - * @param [in] rhs A reference to the copied handle + * @SINCE_1_0.0 + * @param[in] rhs A reference to the copied handle * @return A reference to this */ PinchGestureDetector& operator=(const PinchGestureDetector& rhs); -public: // Signals + /** + * @brief This move constructor is required for (smart) pointer semantics. + * + * @SINCE_2_2.4 + * @param[in] handle A reference to the moved handle + */ + PinchGestureDetector(PinchGestureDetector&& 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 + */ + PinchGestureDetector& operator=(PinchGestureDetector&& rhs) noexcept; + +public: // Signals + /** * @brief This signal is emitted when the pinch gesture is detected on the attached actor. * * A callback of the following type may be connected: * @code - * void YourCallbackName(Actor actor, PinchGesture gesture); + * void YourCallbackName( Actor actor, const PinchGesture& gesture ); * @endcode + * @SINCE_1_0.0 + * @return The signal to connect to * @pre The gesture detector has been initialized. - * @return The signal to connect to. */ - DetectedSignalV2& DetectedSignal(); + DetectedSignalType& DetectedSignal(); public: // Not intended for Application developers - + /// @cond internal /** - * @brief This constructor is used by Dali New() methods. + * @brief This constructor is used by PinchGestureDetector::New() methods. * - * @param [in] internal A pointer to a newly allocated Dali resource. + * @SINCE_1_0.0 + * @param[in] internal A pointer to a newly allocated Dali resource */ explicit DALI_INTERNAL PinchGestureDetector(Internal::PinchGestureDetector* internal); - + /// @endcond }; +/** + * @} + */ } // namespace Dali -#endif // __DALI_PINCH_GESTURE_DETECTOR_H__ +#endif // DALI_PINCH_GESTURE_DETECTOR_H