1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
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>
23 public class PanGesture : Gesture
25 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27 internal PanGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PanGesture_SWIGUpcast(cPtr), cMemoryOwn)
29 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
32 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PanGesture obj)
34 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
37 protected override void Dispose(DisposeTypes type)
44 if(type == DisposeTypes.Explicit)
47 //Release your own managed resources here.
48 //You should release all of your own disposable objects here.
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.
55 if (swigCPtr.Handle != global::System.IntPtr.Zero)
60 NDalicPINVOKE.delete_PanGesture(swigCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69 internal static PanGesture GetPanGestureFromPtr(global::System.IntPtr cPtr)
71 PanGesture ret = new PanGesture(cPtr, false);
72 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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>
82 public Vector2 Velocity
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>
96 public Vector2 Displacement
105 /// This current touch position of the primary touch point in local actor coordinates.
107 public Vector2 Position
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>
122 public Vector2 ScreenVelocity
126 return screenVelocity;
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>
137 public Vector2 ScreenDisplacement
141 return screenDisplacement;
146 /// This current touch position of the primary touch point in screen coordinates.
148 public Vector2 ScreenPosition
152 return screenPosition;
157 /// The total number of fingers touching the screen in a pan gesture.
159 public uint NumberOfTouches
163 return numberOfTouches;
168 /// Default Constructor.
170 public PanGesture() : this(NDalicPINVOKE.new_PanGesture__SWIG_0(), true)
172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178 /// <param name="state">The state of the gesture</param>
179 public PanGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_PanGesture__SWIG_1((int)state), true)
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185 /// Copy constructor.
187 /// <param name="rhs">A reference to the copied handle</param>
188 public PanGesture(PanGesture rhs) : this(NDalicPINVOKE.new_PanGesture__SWIG_2(PanGesture.getCPtr(rhs)), true)
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 /// Assignment operator.
196 /// <param name="rhs">A reference to the copied handle</param>
197 /// <returns>A reference to this</returns>
198 public PanGesture Assign(PanGesture rhs)
200 PanGesture ret = new PanGesture(NDalicPINVOKE.PanGesture_Assign(swigCPtr, PanGesture.getCPtr(rhs)), false);
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205 private Vector2 velocity
209 NDalicPINVOKE.PanGesture_velocity_set(swigCPtr, Vector2.getCPtr(value));
210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
214 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_velocity_get(swigCPtr);
215 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
216 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221 private Vector2 displacement
225 NDalicPINVOKE.PanGesture_displacement_set(swigCPtr, Vector2.getCPtr(value));
226 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
230 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_displacement_get(swigCPtr);
231 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
232 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 private Vector2 position
241 NDalicPINVOKE.PanGesture_position_set(swigCPtr, Vector2.getCPtr(value));
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_position_get(swigCPtr);
247 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
248 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253 private Vector2 screenVelocity
257 NDalicPINVOKE.PanGesture_screenVelocity_set(swigCPtr, Vector2.getCPtr(value));
258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
262 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_screenVelocity_get(swigCPtr);
263 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
264 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
269 private Vector2 screenDisplacement
273 NDalicPINVOKE.PanGesture_screenDisplacement_set(swigCPtr, Vector2.getCPtr(value));
274 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_screenDisplacement_get(swigCPtr);
279 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
280 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285 private Vector2 screenPosition
289 NDalicPINVOKE.PanGesture_screenPosition_set(swigCPtr, Vector2.getCPtr(value));
290 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
294 global::System.IntPtr cPtr = NDalicPINVOKE.PanGesture_screenPosition_get(swigCPtr);
295 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301 private uint numberOfTouches
305 NDalicPINVOKE.PanGesture_numberOfTouches_set(swigCPtr, value);
306 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
310 uint ret = NDalicPINVOKE.PanGesture_numberOfTouches_get(swigCPtr);
311 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 /// Returns the speed at which the user is moving their fingers.<br>
318 /// This is the pixel movement per millisecond.<br>
320 /// <returns>The speed of the pan (in pixels per millisecond)</returns>
321 public float GetSpeed()
323 float ret = NDalicPINVOKE.PanGesture_GetSpeed(swigCPtr);
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329 /// This returns the distance the user has panned (dragged) since the last pan gesture or,
330 /// if the gesture has just started, then the distance moved since the user touched the screen.<br>
331 /// This is always a positive value.<br>
333 /// <returns>The distance, as a float, a user's finger has panned</returns>
334 public float GetDistance()
336 float ret = NDalicPINVOKE.PanGesture_GetDistance(swigCPtr);
337 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
342 /// Returns the speed at which the user is moving their fingers relative to screen coordinates.<br>
343 /// This is the pixel movement per millisecond.<br>
345 /// <returns>The speed of the pan (in pixels per millisecond)</returns>
346 public float GetScreenSpeed()
348 float ret = NDalicPINVOKE.PanGesture_GetScreenSpeed(swigCPtr);
349 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354 /// This returns the distance the user has panned (dragged) since the last pan gesture in screen
355 /// coordinates or, if the gesture has just started, then the distance in screen coordinates moved
356 /// since the user touched the screen.<br>
357 /// This is always a positive value.<br>
359 /// <returns>The distance, as a float, a user's finger has panned</returns>
360 public float GetScreenDistance()
362 float ret = NDalicPINVOKE.PanGesture_GetScreenDistance(swigCPtr);
363 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();