1 #ifndef DALI_INTERNAL_GESTURE_REQUESTS_H
2 #define DALI_INTERNAL_GESTURE_REQUESTS_H
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 <dali/public-api/events/gesture.h>
31 * This structure specifies the gesture type required (or no longer required) by Core.
35 // Creation & Destruction
39 * @param[in] typeRequired The gesture type required
41 GestureRequest( GestureType::Value typeRequired )
42 : type( typeRequired )
49 virtual ~GestureRequest() = default;
53 GestureType::Value type; ///< The type of gesture required.
57 * This is used by Core when a pan gesture is required.
59 struct PanGestureRequest : public GestureRequest
61 // Creation & Destruction
67 : GestureRequest(GestureType::PAN),
76 ~PanGestureRequest() override = default;
80 unsigned int minTouches; ///< The minimum number of touch points required for a pan gesture.
81 unsigned int maxTouches; ///< The maximum number of touch points required for a pan gesture.
85 * This is used by Core when a tap gesture is required.
87 struct TapGestureRequest : public GestureRequest
89 // Creation & Destruction
95 : GestureRequest(GestureType::TAP),
106 ~TapGestureRequest() override = default;
110 unsigned int minTaps; ///< The minimum number of taps required.
111 unsigned int maxTaps; ///< The maximum number of taps required.
112 unsigned int minTouches; ///< The minimum number of touch points required for our tap gesture.
113 unsigned int maxTouches; ///< The maximum number of touch points required for our tap gesture.
117 * This is used by Core when a long press gesture is required.
119 struct LongPressGestureRequest : public GestureRequest
121 // Creation & Destruction
124 * Default Constructor
126 LongPressGestureRequest()
127 : GestureRequest(GestureType::LONG_PRESS),
136 ~LongPressGestureRequest() override = default;
140 unsigned int minTouches; ///< The minimum number of touch points required for a long press gesture.
141 unsigned int maxTouches; ///< The maximum number of touch points required for a long press gesture.
144 } // namespace Internal
148 #endif // DALI_INTERNAL_GESTURE_REQUESTS_H