CAPI removal
[platform/core/uifw/dali-core.git] / dali / public-api / events / long-press-gesture.h
1 #ifndef __DALI_LONG_PRESS_GESTURE_H__
2 #define __DALI_LONG_PRESS_GESTURE_H__
3
4 /*
5  * Copyright (c) 2014 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 // INTERNAL INCLUDES
22 #include <dali/public-api/events/gesture.h>
23 #include <dali/public-api/math/vector2.h>
24
25 namespace Dali DALI_IMPORT_API
26 {
27
28 /**
29  * @brief A LongPressGesture is emitted when the user touches and holds the screen with the stated number of fingers.
30  *
31  * This gesture can be in one of two states, when the long-press gesture is first detected: "Started";
32  * and when the long-press gesture ends: "Finished".
33  *
34  * Long press gesture finishes when all touches have been released.
35  *
36  * @see LongPressGestureDetector
37  */
38 struct LongPressGesture : public Gesture
39 {
40   // Construction & Destruction
41
42   /**
43    * @brief Constructor
44    *
45    * @param[in] state  The state of the gesture
46    */
47   LongPressGesture(Gesture::State state);
48
49   /**
50    * @brief Copy constructor
51    */
52   LongPressGesture( const LongPressGesture& rhs );
53
54   /**
55    * @brief Assignment operator
56    */
57   LongPressGesture& operator=( const LongPressGesture& rhs );
58
59   /**
60    * @brief Virtual destructor
61    */
62   virtual ~LongPressGesture();
63
64   // Data
65
66   /**
67    * @brief The number of touch points in this long press gesture, i.e. the number of fingers the user had
68    * on the screen to generate the long press gesture.
69    */
70   unsigned int numberOfTouches;
71
72   /**
73    * @brief This is the point, in screen coordinates, where the long press occurred.
74    *
75    * If a multi-touch long press, then this is the centroid of all the touch points.
76    */
77   Vector2 screenPoint;
78
79   /**
80    * @brief This is the point, in local actor coordinates, where the long press occurred.
81    *
82    * If a multi-touch long press, then this is the centroid of all the touch points.
83    * @return The point where tap has occurred (in local actor coordinates).
84    */
85   Vector2 localPoint;
86 };
87
88 } // namespace Dali
89
90 #endif // __DALI_LONG_PRESS_GESTURE_H__