Added integration API to retrieve which Scene a given actor belongs to
[platform/core/uifw/dali-core.git] / dali / integration-api / events / gesture-requests.h
1 #ifndef __DALI_INTEGRATION_GESTURE_REQUESTS_H__
2 #define __DALI_INTEGRATION_GESTURE_REQUESTS_H__
3
4 /*
5  * Copyright (c) 2018 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
24 namespace Dali
25 {
26
27 namespace Integration
28 {
29
30 /**
31  * This structure specifies the gesture type required (or no longer required) by Core.
32  */
33 struct DALI_CORE_API GestureRequest
34 {
35   // Creation & Destruction
36
37   /**
38    * Default Constructor
39    * @param[in]  typeRequired  The gesture type required
40    */
41   GestureRequest(Gesture::Type typeRequired) : type(typeRequired)
42   {
43   }
44
45   /**
46    * Virtual destructor
47    */
48   virtual ~GestureRequest()
49   {
50   }
51
52   // Data Members
53
54   Gesture::Type type; ///< The type of gesture required.
55 };
56
57 /**
58  * This is used by Core when a pan gesture is required.
59  */
60 struct DALI_CORE_API PanGestureRequest : public GestureRequest
61 {
62   // Creation & Destruction
63
64   /**
65    * Default Constructor
66    */
67   PanGestureRequest()
68   : GestureRequest(Gesture::Pan),
69     minTouches(1),
70     maxTouches(1)
71   {
72   }
73
74   /**
75    * Virtual destructor
76    */
77   virtual ~PanGestureRequest()
78   {
79   }
80
81   // Data Members
82
83   unsigned int minTouches; ///< The minimum number of touch points required for a pan gesture.
84   unsigned int maxTouches; ///< The maximum number of touch points required for a pan gesture.
85 };
86
87 /**
88  * This is used by Core when a pinch gesture is required.
89  */
90 struct DALI_CORE_API PinchGestureRequest : public GestureRequest
91 {
92   // Creation & Destruction
93
94   /**
95    * Default Constructor
96    */
97   PinchGestureRequest()
98   : GestureRequest(Gesture::Pinch)
99   {
100   }
101
102   /**
103    * Virtual destructor
104    */
105   virtual ~PinchGestureRequest()
106   {
107   }
108 };
109
110 /**
111  * This is used by Core when a tap gesture is required.
112  */
113 struct DALI_CORE_API TapGestureRequest : public GestureRequest
114 {
115   // Creation & Destruction
116
117   /**
118    * Default Constructor
119    */
120   TapGestureRequest()
121   : GestureRequest(Gesture::Tap),
122     minTaps(1),
123     maxTaps(1),
124     minTouches(1),
125     maxTouches(1)
126   {
127   }
128
129   /**
130    * Virtual destructor
131    */
132   virtual ~TapGestureRequest()
133   {
134   }
135
136   // Data Members
137
138   unsigned int minTaps;    ///< The minimum number of taps required.
139   unsigned int maxTaps;    ///< The maximum number of taps required.
140   unsigned int minTouches; ///< The minimum number of touch points required for our tap gesture.
141   unsigned int maxTouches; ///< The maximum number of touch points required for our tap gesture.
142 };
143
144 /**
145  * This is used by Core when a long press gesture is required.
146  */
147 struct DALI_CORE_API LongPressGestureRequest : public GestureRequest
148 {
149   // Creation & Destruction
150
151   /**
152    * Default Constructor
153    */
154   LongPressGestureRequest()
155   : GestureRequest(Gesture::LongPress),
156     minTouches(1),
157     maxTouches(1)
158   {
159   }
160
161   /**
162    * Virtual destructor
163    */
164   virtual ~LongPressGestureRequest()
165   {
166   }
167
168   // Data Members
169
170   unsigned int minTouches; ///< The minimum number of touch points required for a long press gesture.
171   unsigned int maxTouches; ///< The maximum number of touch points required for a long press gesture.
172 };
173
174 } // namespace Integration
175
176 } // namespace Dali
177
178 #endif // __DALI_INTEGRATION_GESTURE_REQUESTS_H__