1 #ifndef __DALI_LONG_PRESS_GESTURE_H__
2 #define __DALI_LONG_PRESS_GESTURE_H__
5 * Copyright (c) 2014 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 * @addtogroup CAPI_DALI_EVENTS_MODULE
27 #include <dali/public-api/events/gesture.h>
28 #include <dali/public-api/math/vector2.h>
30 namespace Dali DALI_IMPORT_API
34 * @brief A LongPressGesture is emitted when the user touches and holds the screen with the stated number of fingers.
36 * This gesture can be in one of two states, when the long-press gesture is first detected: "Started";
37 * and when the long-press gesture ends: "Finished".
39 * Long press gesture finishes when all touches have been released.
41 * @see LongPressGestureDetector
43 struct LongPressGesture : public Gesture
45 // Construction & Destruction
50 * @param[in] state The state of the gesture
52 LongPressGesture(Gesture::State state);
55 * @brief Copy constructor
57 LongPressGesture( const LongPressGesture& rhs );
60 * @brief Assignment operator
62 LongPressGesture& operator=( const LongPressGesture& rhs );
65 * @brief Virtual destructor
67 virtual ~LongPressGesture();
72 * @brief The number of touch points in this long press gesture, i.e. the number of fingers the user had
73 * on the screen to generate the long press gesture.
75 unsigned int numberOfTouches;
78 * @brief This is the point, in screen coordinates, where the long press occurred.
80 * If a multi-touch long press, then this is the centroid of all the touch points.
85 * @brief This is the point, in local actor coordinates, where the long press occurred.
87 * If a multi-touch long press, then this is the centroid of all the touch points.
88 * @return The point where tap has occurred (in local actor coordinates).
98 #endif // __DALI_LONG_PRESS_GESTURE_H__