Syncing dali_sharp with NUI
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / PanGesture.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Tizen.NUI
12 {
13
14     /// <summary>
15     /// A PanGesture is emitted when the user moves one or more fingers in a particular direction.<br>
16     /// A pan gesture will end in the following ways:<br>
17     /// - User releases the primary finger (the first touch).<br>
18     /// - User has more fingers on the screen than the maximum specified.<br>
19     /// - User has less fingers on the screen than the minimum specified.<br>
20     /// - Cancelled by the system.<br>
21     /// A pan gesture will continue to be sent to the actor under than initial pan until it ends.<br>
22     /// </summary>
23     public class PanGesture : Gesture
24     {
25         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26
27         internal PanGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PanGesture_SWIGUpcast(cPtr), cMemoryOwn)
28         {
29             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30         }
31
32         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PanGesture obj)
33         {
34             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35         }
36
37         protected override void Dispose(DisposeTypes type)
38         {
39             if(disposed)
40             {
41                 return;
42             }
43
44             if(type == DisposeTypes.Explicit)
45             {
46                 //Called by User
47                 //Release your own managed resources here.
48                 //You should release all of your own disposable objects here.
49             }
50
51             //Release your own unmanaged resources here.
52             //You should not access any managed member here except static instance.
53             //because the execution order of Finalizes is non-deterministic.
54
55             if (swigCPtr.Handle != global::System.IntPtr.Zero)
56             {
57                 if (swigCMemOwn)
58                 {
59                     swigCMemOwn = false;
60                     NDalicPINVOKE.delete_PanGesture(swigCPtr);
61                 }
62                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
63             }
64
65             base.Dispose(type);
66         }
67
68
69         internal static PanGesture GetPanGestureFromPtr(global::System.IntPtr cPtr)
70         {
71             PanGesture ret = new PanGesture(cPtr, false);
72             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
73             return ret;
74         }
75
76         /// <summary>
77         /// The velocity at which the user is moving their fingers.<br>
78         /// This is represented as a Vector2 and is the pixel movement per millisecond.<br>
79         /// A positive x value shows that the user is panning to the right, a negative x value means the opposite.<br>
80         /// A positive y value shows that the user is panning downwards, a negative y values means upwards.<br>
81         /// </summary>
82         public Vector2 Velocity
83         {
84             get
85             {
86                 return velocity;
87             }
88         }
89
90         /// <summary>
91         /// This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or,
92         /// if the gesture has just started, then the amount panned since the user touched the screen.<br>
93         /// A positive x value shows that the user is panning to the right, a negative x value means the opposite.<br>
94         /// A positive y value shows that the user is panning downwards, a negative y value means upwards.<br>
95         /// </summary>
96         public Vector2 Displacement
97         {
98             get
99             {
100                 return displacement;
101             }
102         }
103
104         /// <summary>
105         /// This current touch position of the primary touch point in local actor coordinates.
106         /// </summary>
107         public Vector2 Position
108         {
109             get
110             {
111                 return position;
112             }
113         }
114
115         /// <summary>
116         /// The velocity at which the user is moving their fingers.<br>
117         /// This is represented as a Vector2 and is the pixel movement per millisecond.<br>
118         /// A positive x value shows that the user is panning to the right, a negative x value means the opposite.<br>
119         /// A positive y value shows that the user is panning downwards, a negative y values means upwards.<br>
120         /// This value represents the screen coordinates.<br>
121         /// </summary>
122         public Vector2 ScreenVelocity
123         {
124             get
125             {
126                 return screenVelocity;
127             }
128         }
129
130         /// <summary>
131         /// This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or,
132         /// if the gesture has just started, then the amount panned since the user touched the screen.<br>
133         /// A positive x value shows that the user is panning to the right, a negative x value means the opposite.<br>
134         /// A positive y value shows that the user is panning downwards, a negative y value means upwards.<br>
135         /// This value is in screen coordinates.<br>
136         /// </summary>
137         public Vector2 ScreenDisplacement
138         {
139             get
140             {
141                 return screenDisplacement;
142             }
143         }
144
145         /// <summary>
146         /// This current touch position of the primary touch point in screen coordinates.
147         /// </summary>
148         public Vector2 ScreenPosition
149         {
150             get
151             {
152                 return screenPosition;
153             }
154         }
155
156         /// <summary>
157         /// The total number of fingers touching the screen in a pan gesture.
158         /// </summary>
159         public uint NumberOfTouches
160         {
161             get
162             {
163                 return numberOfTouches;
164             }
165         }
166
167         /// <summary>
168         /// Default Constructor.
169         /// </summary>
170         public PanGesture() : this(NDalicPINVOKE.new_PanGesture__SWIG_0(), true)
171         {
172             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173         }
174
175         /// <summary>
176         /// Constructor.
177         /// </summary>
178         /// <param name="state">The state of the gesture</param>
179         internal PanGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_PanGesture__SWIG_1((int)state), true)
180         {
181             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182         }
183
184
185         private Vector2 velocity
186         {
187             set
188             {
189                 NDalicPINVOKE.PanGesture_velocity_set(swigCPtr, Vector2.getCPtr(value));
190                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191             }
192             get
193             {
194                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_velocity_get(swigCPtr);
195                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
196                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197                 return ret;
198             }
199         }
200
201         private Vector2 displacement
202         {
203             set
204             {
205                 NDalicPINVOKE.PanGesture_displacement_set(swigCPtr, Vector2.getCPtr(value));
206                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207             }
208             get
209             {
210                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_displacement_get(swigCPtr);
211                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
212                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213                 return ret;
214             }
215         }
216
217         private Vector2 position
218         {
219             set
220             {
221                 NDalicPINVOKE.PanGesture_position_set(swigCPtr, Vector2.getCPtr(value));
222                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223             }
224             get
225             {
226                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_position_get(swigCPtr);
227                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
228                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229                 return ret;
230             }
231         }
232
233         private Vector2 screenVelocity
234         {
235             set
236             {
237                 NDalicPINVOKE.PanGesture_screenVelocity_set(swigCPtr, Vector2.getCPtr(value));
238                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239             }
240             get
241             {
242                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_screenVelocity_get(swigCPtr);
243                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
244                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245                 return ret;
246             }
247         }
248
249         private Vector2 screenDisplacement
250         {
251             set
252             {
253                 NDalicPINVOKE.PanGesture_screenDisplacement_set(swigCPtr, Vector2.getCPtr(value));
254                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
255             }
256             get
257             {
258                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_screenDisplacement_get(swigCPtr);
259                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
260                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261                 return ret;
262             }
263         }
264
265         private Vector2 screenPosition
266         {
267             set
268             {
269                 NDalicPINVOKE.PanGesture_screenPosition_set(swigCPtr, Vector2.getCPtr(value));
270                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271             }
272             get
273             {
274                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_screenPosition_get(swigCPtr);
275                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
276                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
277                 return ret;
278             }
279         }
280
281         private uint numberOfTouches
282         {
283             set
284             {
285                 NDalicPINVOKE.PanGesture_numberOfTouches_set(swigCPtr, value);
286                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287             }
288             get
289             {
290                 uint ret = NDalicPINVOKE.PanGesture_numberOfTouches_get(swigCPtr);
291                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
292                 return ret;
293             }
294         }
295
296         /// <summary>
297         /// Returns the speed at which the user is moving their fingers.<br>
298         /// This is the pixel movement per millisecond.<br>
299         /// </summary>
300         /// <returns>The speed of the pan (in pixels per millisecond)</returns>
301         public float GetSpeed()
302         {
303             float ret = NDalicPINVOKE.PanGesture_GetSpeed(swigCPtr);
304             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305             return ret;
306         }
307
308         /// <summary>
309         /// This returns the distance the user has panned (dragged) since the last pan gesture or,
310         /// if the gesture has just started, then the distance moved since the user touched the screen.<br>
311         /// This is always a positive value.<br>
312         /// </summary>
313         /// <returns>The distance, as a float, a user's finger has panned</returns>
314         public float GetDistance()
315         {
316             float ret = NDalicPINVOKE.PanGesture_GetDistance(swigCPtr);
317             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
318             return ret;
319         }
320
321         /// <summary>
322         /// Returns the speed at which the user is moving their fingers relative to screen coordinates.<br>
323         /// This is the pixel movement per millisecond.<br>
324         /// </summary>
325         /// <returns>The speed of the pan (in pixels per millisecond)</returns>
326         public float GetScreenSpeed()
327         {
328             float ret = NDalicPINVOKE.PanGesture_GetScreenSpeed(swigCPtr);
329             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330             return ret;
331         }
332
333         /// <summary>
334         /// This returns the distance the user has panned (dragged) since the last pan gesture in screen
335         /// coordinates or, if the gesture has just started, then the distance in screen coordinates moved
336         /// since the user touched the screen.<br>
337         /// This is always a positive value.<br>
338         /// </summary>
339         /// <returns>The distance, as a float, a user's finger has panned</returns>
340         public float GetScreenDistance()
341         {
342             float ret = NDalicPINVOKE.PanGesture_GetScreenDistance(swigCPtr);
343             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344             return ret;
345         }
346
347     }
348
349 }