Clean up the code to build successfully on macOS
[platform/core/uifw/dali-core.git] / dali / internal / event / events / gesture-requests.h
1 #ifndef DALI_INTERNAL_GESTURE_REQUESTS_H
2 #define DALI_INTERNAL_GESTURE_REQUESTS_H
3
4 /*
5  * Copyright (c) 2020 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 Internal
28 {
29
30 /**
31  * This structure specifies the gesture type required (or no longer required) by Core.
32  */
33 struct GestureRequest
34 {
35   // Creation & Destruction
36
37   /**
38    * Default Constructor
39    * @param[in]  typeRequired  The gesture type required
40    */
41   GestureRequest( GestureType::Value typeRequired )
42   : type( typeRequired )
43   {
44   }
45
46   /**
47    * Virtual destructor
48    */
49   virtual ~GestureRequest() = default;
50
51   // Data Members
52
53   GestureType::Value type; ///< The type of gesture required.
54 };
55
56 /**
57  * This is used by Core when a pan gesture is required.
58  */
59 struct PanGestureRequest : public GestureRequest
60 {
61   // Creation & Destruction
62
63   /**
64    * Default Constructor
65    */
66   PanGestureRequest()
67   : GestureRequest(GestureType::PAN),
68     minTouches(1),
69     maxTouches(1)
70   {
71   }
72
73   /**
74    * Virtual destructor
75    */
76   ~PanGestureRequest() override
77   {
78   }
79
80   // Data Members
81
82   unsigned int minTouches; ///< The minimum number of touch points required for a pan gesture.
83   unsigned int maxTouches; ///< The maximum number of touch points required for a pan gesture.
84 };
85
86 /**
87  * This is used by Core when a tap gesture is required.
88  */
89 struct TapGestureRequest : public GestureRequest
90 {
91   // Creation & Destruction
92
93   /**
94    * Default Constructor
95    */
96   TapGestureRequest()
97   : GestureRequest(GestureType::TAP),
98     minTaps(1),
99     maxTaps(1),
100     minTouches(1),
101     maxTouches(1)
102   {
103   }
104
105   /**
106    * Virtual destructor
107    */
108   ~TapGestureRequest() override
109   {
110   }
111
112   // Data Members
113
114   unsigned int minTaps;    ///< The minimum number of taps required.
115   unsigned int maxTaps;    ///< The maximum number of taps required.
116   unsigned int minTouches; ///< The minimum number of touch points required for our tap gesture.
117   unsigned int maxTouches; ///< The maximum number of touch points required for our tap gesture.
118 };
119
120 /**
121  * This is used by Core when a long press gesture is required.
122  */
123 struct LongPressGestureRequest : public GestureRequest
124 {
125   // Creation & Destruction
126
127   /**
128    * Default Constructor
129    */
130   LongPressGestureRequest()
131   : GestureRequest(GestureType::LONG_PRESS),
132     minTouches(1),
133     maxTouches(1)
134   {
135   }
136
137   /**
138    * Virtual destructor
139    */
140   ~LongPressGestureRequest() override
141   {
142   }
143
144   // Data Members
145
146   unsigned int minTouches; ///< The minimum number of touch points required for a long press gesture.
147   unsigned int maxTouches; ///< The maximum number of touch points required for a long press gesture.
148 };
149
150 } // namespace Internal
151
152 } // namespace Dali
153
154 #endif // DALI_INTERNAL_GESTURE_REQUESTS_H