to resolve TCT issues
[platform/core/csapi/nui.git] / 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.
16     /// A pan gesture will end in the following ways:
17     /// - User releases the primary finger (the first touch).
18     /// - User has more fingers on the screen than the maximum specified.
19     /// - User has less fingers on the screen than the minimum specified.
20     /// - Cancelled by the system.
21     /// A pan gesture will continue to be sent to the actor under than initial pan until it ends.
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         ~PanGesture()
38         {
39             DisposeQueue.Instance.Add(this);
40         }
41
42         public override void Dispose()
43         {
44             if (!Stage.IsInstalled())
45             {
46                 DisposeQueue.Instance.Add(this);
47                 return;
48             }
49
50             lock (this)
51             {
52                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
53                 {
54                     if (swigCMemOwn)
55                     {
56                         swigCMemOwn = false;
57                         NDalicPINVOKE.delete_PanGesture(swigCPtr);
58                     }
59                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
60                 }
61                 global::System.GC.SuppressFinalize(this);
62                 base.Dispose();
63             }
64         }
65
66
67         internal static PanGesture GetPanGestureFromPtr(global::System.IntPtr cPtr)
68         {
69             PanGesture ret = new PanGesture(cPtr, false);
70             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71             return ret;
72         }
73
74         /// <summary>
75         /// The velocity at which the user is moving their fingers.
76         /// This is represented as a Vector2 and is the pixel movement per millisecond.
77         /// A positive x value shows that the user is panning to the right, a negative x value means the opposite.
78         /// A positive y value shows that the user is panning downwards, a negative y values means upwards.
79         /// </summary>
80         public Vector2 Velocity
81         {
82             get
83             {
84                 return velocity;
85             }
86         }
87
88         /// <summary>
89         /// This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or,
90         /// if the gesture has just started, then the amount panned since the user touched the screen.
91         /// A positive x value shows that the user is panning to the right, a negative x value means the opposite.
92         /// A positive y value shows that the user is panning downwards, a negative y value means upwards.
93         /// </summary>
94         public Vector2 Displacement
95         {
96             get
97             {
98                 return displacement;
99             }
100         }
101
102         /// <summary>
103         /// This current touch position of the primary touch point in local actor coordinates.
104         /// </summary>
105         public Vector2 Position
106         {
107             get
108             {
109                 return position;
110             }
111         }
112
113         /// <summary>
114         /// The velocity at which the user is moving their fingers.
115         /// This is represented as a Vector2 and is the pixel movement per millisecond.
116         /// A positive x value shows that the user is panning to the right, a negative x value means the opposite.
117         /// A positive y value shows that the user is panning downwards, a negative y values means upwards.
118         /// This value represents the screen coordinates.
119         /// </summary>
120         public Vector2 ScreenVelocity
121         {
122             get
123             {
124                 return screenVelocity;
125             }
126         }
127
128         /// <summary>
129         /// This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or,
130         /// if the gesture has just started, then the amount panned since the user touched the screen.
131         /// A positive x value shows that the user is panning to the right, a negative x value means the opposite.
132         /// A positive y value shows that the user is panning downwards, a negative y value means upwards.
133         /// This value is in screen coordinates.
134         /// </summary>
135         public Vector2 ScreenDisplacement
136         {
137             get
138             {
139                 return screenDisplacement;
140             }
141         }
142
143         /// <summary>
144         /// This current touch position of the primary touch point in screen coordinates.
145         /// </summary>
146         public Vector2 ScreenPosition
147         {
148             get
149             {
150                 return screenPosition;
151             }
152         }
153
154         /// <summary>
155         /// The total number of fingers touching the screen in a pan gesture.
156         /// </summary>
157         public uint NumberOfTouches
158         {
159             get
160             {
161                 return numberOfTouches;
162             }
163         }
164
165         /// <summary>
166         /// Default Constructor.
167         /// </summary>
168         public PanGesture() : this(NDalicPINVOKE.new_PanGesture__SWIG_0(), true)
169         {
170             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171         }
172
173         /// <summary>
174         /// Constructor.
175         /// </summary>
176         /// <param name="state">The state of the gesture</param>
177         public PanGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_PanGesture__SWIG_1((int)state), true)
178         {
179             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180         }
181
182         /// <summary>
183         /// Copy constructor.
184         /// </summary>
185         /// <param name="rhs">A reference to the copied handle</param>
186         public PanGesture(PanGesture rhs) : this(NDalicPINVOKE.new_PanGesture__SWIG_2(PanGesture.getCPtr(rhs)), true)
187         {
188             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189         }
190
191         /// <summary>
192         /// Assignment operator.
193         /// </summary>
194         /// <param name="rhs">A reference to the copied handle</param>
195         /// <returns>A reference to this</returns>
196         public PanGesture Assign(PanGesture rhs)
197         {
198             PanGesture ret = new PanGesture(NDalicPINVOKE.PanGesture_Assign(swigCPtr, PanGesture.getCPtr(rhs)), false);
199             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200             return ret;
201         }
202
203         private Vector2 velocity
204         {
205             set
206             {
207                 NDalicPINVOKE.PanGesture_velocity_set(swigCPtr, Vector2.getCPtr(value));
208                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
209             }
210             get
211             {
212                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_velocity_get(swigCPtr);
213                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
214                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215                 return ret;
216             }
217         }
218
219         private Vector2 displacement
220         {
221             set
222             {
223                 NDalicPINVOKE.PanGesture_displacement_set(swigCPtr, Vector2.getCPtr(value));
224                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
225             }
226             get
227             {
228                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_displacement_get(swigCPtr);
229                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
230                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231                 return ret;
232             }
233         }
234
235         private Vector2 position
236         {
237             set
238             {
239                 NDalicPINVOKE.PanGesture_position_set(swigCPtr, Vector2.getCPtr(value));
240                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
241             }
242             get
243             {
244                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_position_get(swigCPtr);
245                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
246                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
247                 return ret;
248             }
249         }
250
251         private Vector2 screenVelocity
252         {
253             set
254             {
255                 NDalicPINVOKE.PanGesture_screenVelocity_set(swigCPtr, Vector2.getCPtr(value));
256                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
257             }
258             get
259             {
260                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_screenVelocity_get(swigCPtr);
261                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
262                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263                 return ret;
264             }
265         }
266
267         private Vector2 screenDisplacement
268         {
269             set
270             {
271                 NDalicPINVOKE.PanGesture_screenDisplacement_set(swigCPtr, Vector2.getCPtr(value));
272                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
273             }
274             get
275             {
276                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_screenDisplacement_get(swigCPtr);
277                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
278                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279                 return ret;
280             }
281         }
282
283         private Vector2 screenPosition
284         {
285             set
286             {
287                 NDalicPINVOKE.PanGesture_screenPosition_set(swigCPtr, Vector2.getCPtr(value));
288                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
289             }
290             get
291             {
292                 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_screenPosition_get(swigCPtr);
293                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
294                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295                 return ret;
296             }
297         }
298
299         private uint numberOfTouches
300         {
301             set
302             {
303                 NDalicPINVOKE.PanGesture_numberOfTouches_set(swigCPtr, value);
304                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305             }
306             get
307             {
308                 uint ret = NDalicPINVOKE.PanGesture_numberOfTouches_get(swigCPtr);
309                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
310                 return ret;
311             }
312         }
313
314         /// <summary>
315         /// Returns the speed at which the user is moving their fingers.
316         /// This is the pixel movement per millisecond.
317         /// </summary>
318         /// <returns>The speed of the pan (in pixels per millisecond)</returns>
319         public float GetSpeed()
320         {
321             float ret = NDalicPINVOKE.PanGesture_GetSpeed(swigCPtr);
322             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323             return ret;
324         }
325
326         /// <summary>
327         /// This returns the distance the user has panned (dragged) since the last pan gesture or,
328         /// if the gesture has just started, then the distance moved since the user touched the screen.
329         /// This is always a positive value.
330         /// </summary>
331         /// <returns>The distance, as a float, a user's finger has panned</returns>
332         public float GetDistance()
333         {
334             float ret = NDalicPINVOKE.PanGesture_GetDistance(swigCPtr);
335             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
336             return ret;
337         }
338
339         /// <summary>
340         /// Returns the speed at which the user is moving their fingers relative to screen coordinates.
341         /// This is the pixel movement per millisecond.
342         /// </summary>
343         /// <returns>The speed of the pan (in pixels per millisecond)</returns>
344         public float GetScreenSpeed()
345         {
346             float ret = NDalicPINVOKE.PanGesture_GetScreenSpeed(swigCPtr);
347             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
348             return ret;
349         }
350
351         /// <summary>
352         /// This returns the distance the user has panned (dragged) since the last pan gesture in screen
353         /// coordinates or, if the gesture has just started, then the distance in screen coordinates moved
354         /// since the user touched the screen.
355         /// This is always a positive value.
356         /// </summary>
357         /// <returns>The distance, as a float, a user's finger has panned</returns>
358         public float GetScreenDistance()
359         {
360             float ret = NDalicPINVOKE.PanGesture_GetScreenDistance(swigCPtr);
361             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
362             return ret;
363         }
364
365     }
366
367 }