Updated CAPI documentation style.
[platform/core/uifw/dali-core.git] / capi / dali / public-api / events / pinch-gesture.h
1 #ifndef __DALI_PINCH_GESTURE_H__
2 #define __DALI_PINCH_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 PinchGesture is emitted when the user moves two fingers towards or away from each other.
34  *
35  * This gesture can be in one of three states; when the pinch gesture is first detected, its
36  * state is set to "Started".  After this, if there is change in the gesture, the state will
37  * be "Continuing".  Finally, when the gesture ends, the state of the gesture changes to
38  * "Finished".
39  *
40  * A pinch gesture will continue to be sent to the actor under the center point of the pinch
41  * until the pinch ends.
42  */
43 struct PinchGesture: public Gesture
44 {
45   // Construction & Destruction
46
47   /**
48    * @brief Default Constructor.
49    *
50    * @param[in]  state  The state of the gesture
51    */
52   PinchGesture(Gesture::State state);
53
54   /**
55    * @brief Copy constructor.
56    */
57   PinchGesture( const PinchGesture& rhs );
58
59   /**
60    * @brief Assignment operator.
61    */
62   PinchGesture& operator=( const PinchGesture& rhs );
63
64   /**
65    * @brief Virtual destructor.
66    */
67   virtual ~PinchGesture();
68
69   // Data
70
71   /**
72    * @brief The scale factor from the start of the pinch gesture till the latest pinch gesture.
73    *
74    * If the user is moving their fingers away from each other, then
75    * this value increases.  Conversely, if the user is moving their
76    * fingers towards each other, this value will decrease.
77    */
78   float scale;
79
80   /**
81    * @brief The speed at which the user is moving their fingers.
82    *
83    * This is the pixel movement per second.
84    */
85   float speed;
86
87   /**
88    * @brief The center point of the two points that caused the pinch gesture in screen coordinates.
89    */
90   Vector2 screenCenterPoint;
91
92   /**
93    * @brief The center point of the two points that caused the pinch gesture in local actor coordinates.
94    */
95   Vector2 localCenterPoint;
96 };
97
98 } // namespace Dali
99
100 /**
101  * @}
102  */
103 #endif // __DALI_PINCH_GESTURE_H__