[dali_1.0.16] Merge branch 'tizen'
[platform/core/uifw/dali-core.git] / dali / public-api / events / tap-gesture.h
1 #ifndef __DALI_TAP_GESTURE_H__
2 #define __DALI_TAP_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
26 {
27
28 /**
29  * @brief A TapGesture is emitted when the user taps the screen with the stated number of fingers a stated number of times.
30  *
31  * This is a discrete gesture so does not have any state information.
32  * @see TapGestureDetector
33  */
34 struct DALI_IMPORT_API TapGesture : public Gesture
35 {
36   // Construction & Destruction
37
38   /**
39    * @brief Default Constructor
40    */
41   TapGesture();
42
43   /**
44    * @brief Copy constructor
45    */
46   TapGesture( const TapGesture& rhs );
47
48   /**
49    * @brief Assignment operator
50    */
51   TapGesture& operator=( const TapGesture& rhs );
52
53   /**
54    * @brief Virtual destructor
55    */
56   virtual ~TapGesture();
57
58   // Data
59
60   /**
61    * @brief The number of taps in this tap gesture.
62    */
63   unsigned int numberOfTaps;
64
65   /**
66    * @brief The number of touch points in this tap gesture, i.e. the number of fingers the user had on the
67    * screen to generate the tap gesture.
68    */
69   unsigned int numberOfTouches;
70
71   /**
72    * @brief This is the point, in screen coordinates, where the tap occurred.
73    *
74    * If a multi-touch tap, then this is the centroid of all the touch points.
75    */
76   Vector2 screenPoint;
77
78   /**
79    * @brief This is the point, in local actor coordinates, where the tap occurred.
80    *
81    * If a multi-touch tap, then this is the centroid of all the touch points.
82    * @return The point where tap has occurred (in local actor coordinates).
83    */
84   Vector2 localPoint;
85 };
86
87 } // namespace Dali
88
89 #endif // __DALI_TAP_GESTURE_H__