Moved Gesture::State and -::Type to gesture-enumerations.h.
[platform/core/uifw/dali-core.git] / dali / public-api / events / gesture-enumerations.h
1 #ifndef DALI_GESTURE_ENUMERATIONS_H
2 #define DALI_GESTURE_ENUMERATIONS_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <cstdint>
23
24 namespace Dali
25 {
26
27 /**
28  * @brief Enumeration for type of gesture.
29  * @SINCE_1_9.28
30  */
31 namespace GestureType
32 {
33 enum Value : uint8_t
34 {
35   PINCH      = 1 << 0, ///< When two touch points move away or towards each other. @SINCE_1_9.28
36   PAN        = 1 << 1, ///< When the user drags their finger(s) in a particular direction. @SINCE_1_9.28
37   TAP        = 1 << 2, ///< When the user taps the screen. @SINCE_1_9.28
38   LONG_PRESS = 1 << 3, ///< When the user continues to touch the same area on the screen for the device configured time. @SINCE_1_9.28
39   ROTATION   = 1 << 4, ///< When the user rotates two fingers around a particular ares of the screen. @SINCE_1_9.28
40 };
41 } // namespace GestureType
42
43 /**
44  * @brief Enumeration for state of the gesture.
45  * @SINCE_1_9.28
46  */
47 enum class GestureState : uint8_t
48 {
49   CLEAR,      ///< There is no state associated with this gesture. @SINCE_1_9.28
50   STARTED,    ///< The touched points on the screen have moved enough to be considered a gesture. @SINCE_1_9.28
51   CONTINUING, ///< The gesture is continuing. @SINCE_1_9.28
52   FINISHED,   ///< The user has lifted a finger or touched an additional point on the screen. @SINCE_1_9.28
53   CANCELLED,  ///< The gesture has been cancelled. @SINCE_1_9.28
54   POSSIBLE    ///< A gesture is possible. @SINCE_1_9.28
55 };
56
57 } // namespace Dali
58
59 #endif // DALI_GESTURE_ENUMERATIONS_H