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