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
82 unsigned int minTouches; ///< The minimum number of touch points required for a pan gesture.
83 unsigned int maxTouches; ///< The maximum number of touch points required for a pan gesture.
87 * This is used by Core when a tap gesture is required.
89 struct TapGestureRequest : public GestureRequest
91 // Creation & Destruction
97 : GestureRequest(GestureType::TAP),
108 ~TapGestureRequest() override
114 unsigned int minTaps; ///< The minimum number of taps required.
115 unsigned int maxTaps; ///< The maximum number of taps required.
116 unsigned int minTouches; ///< The minimum number of touch points required for our tap gesture.
117 unsigned int maxTouches; ///< The maximum number of touch points required for our tap gesture.
121 * This is used by Core when a long press gesture is required.
123 struct LongPressGestureRequest : public GestureRequest
125 // Creation & Destruction
128 * Default Constructor
130 LongPressGestureRequest()
131 : GestureRequest(GestureType::LONG_PRESS),
140 ~LongPressGestureRequest() override
146 unsigned int minTouches; ///< The minimum number of touch points required for a long press gesture.
147 unsigned int maxTouches; ///< The maximum number of touch points required for a long press gesture.
150 } // namespace Internal
154 #endif // DALI_INTERNAL_GESTURE_REQUESTS_H