5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <cstdint> // uint32_t
25 #include <dali/public-api/common/dali-common.h>
26 #include <dali/public-api/object/base-handle.h>
27 #include <dali/public-api/events/gesture-enumerations.h>
32 * @addtogroup dali_core_events
36 namespace Internal DALI_INTERNAL
42 * @brief Base structure for different gestures that an application can receive.
44 * A gesture is an event that is produced from a combination of
45 * several touch events in a particular order or within a certain time
48 * To receive a particular gesture, the application has to create and connect to the appropriate
52 * @note An instance of this class cannot be created.
53 * @see GestureDetector
56 class DALI_CORE_API Gesture : public BaseHandle
61 * @brief Creates an uninitialized Gesture handle.
63 * Calling member functions with an uninitialized Actor handle is not allowed.
69 * @brief Copy constructor.
71 * @param[in] rhs A reference to the copied handle
73 Gesture( const Gesture& rhs );
76 * @brief Move constructor.
78 * @param[in] rhs A reference to the handle to move
80 Gesture( Gesture&& rhs );
83 * @brief Assignment operator.
85 * @param[in] rhs A reference to the copied handle
86 * @return A reference to this
88 Gesture& operator=( const Gesture& rhs );
91 * @brief Move assignment operator.
93 * @param[in] rhs A reference to the handle to move
94 * @return A reference to this
96 Gesture& operator=( Gesture&& rhs );
99 * @brief Non virtual destructor.
105 * @brief The gesture type.
107 * @return The gesture type
109 GestureType::Value GetType() const;
112 * @brief The gesture state.
114 * Please see the description in the sub-classes to see the states
115 * used by the actual gesture.
117 * @return The state of the gesture
119 GestureState GetState() const;
122 * @brief The time the gesture took place.
124 * @return The time the gesture took place
126 uint32_t GetTime() const;
128 public: // Not intended for application developers
132 * @brief Internal constructor.
134 * @param[in] gesture Pointer to internal gesture
136 explicit DALI_INTERNAL Gesture(Internal::Gesture* gesture);
145 #endif // DALI_GESTURE_H