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 PinchGesture is emitted when the user moves two fingers towards or away from each other.
16 /// A pinch gesture will continue to be sent to the actor under the center point of the pinch until the pinch ends.
18 public class PinchGesture : Gesture
20 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22 internal PinchGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PinchGesture_SWIGUpcast(cPtr), cMemoryOwn)
24 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
27 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PinchGesture obj)
29 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
34 DisposeQueue.Instance.Add(this);
37 public override void Dispose()
39 if (!Stage.IsInstalled())
41 DisposeQueue.Instance.Add(this);
47 if (swigCPtr.Handle != global::System.IntPtr.Zero)
52 NDalicPINVOKE.delete_PinchGesture(swigCPtr);
54 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56 global::System.GC.SuppressFinalize(this);
62 internal static PinchGesture GetPinchGestureFromPtr(global::System.IntPtr cPtr)
64 PinchGesture ret = new PinchGesture(cPtr, false);
65 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70 /// The scale factor from the start of the pinch gesture till the latest pinch gesture.
71 /// If the user is moving their fingers away from each other, then
72 /// this value increases. Conversely, if the user is moving their
73 /// fingers towards each other, this value will decrease.
84 /// The speed at which the user is moving their fingers.
85 /// This is the pixel movement per second.
96 /// The center point of the two points that caused the pinch gesture in screen coordinates.
98 public Vector2 ScreenCenterPoint
102 return screenCenterPoint;
107 /// The center point of the two points that caused the pinch gesture in local actor coordinates.
109 public Vector2 LocalCenterPoint
113 return localCenterPoint;
118 /// Default Constructor.
120 /// <param name="state">The state of the gesture</param>
121 public PinchGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_PinchGesture__SWIG_0((int)state), true)
123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127 /// Copy constructor.
129 /// <param name="rhs">A reference to the copied handle</param>
130 public PinchGesture(PinchGesture rhs) : this(NDalicPINVOKE.new_PinchGesture__SWIG_1(PinchGesture.getCPtr(rhs)), true)
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136 /// Assignment operator.
138 /// <param name="rhs">A reference to the copied handle</param>
139 /// <returns>A reference to this</returns>
140 public PinchGesture Assign(PinchGesture rhs)
142 PinchGesture ret = new PinchGesture(NDalicPINVOKE.PinchGesture_Assign(swigCPtr, PinchGesture.getCPtr(rhs)), false);
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151 NDalicPINVOKE.PinchGesture_scale_set(swigCPtr, value);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156 float ret = NDalicPINVOKE.PinchGesture_scale_get(swigCPtr);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 NDalicPINVOKE.PinchGesture_speed_set(swigCPtr, value);
167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171 float ret = NDalicPINVOKE.PinchGesture_speed_get(swigCPtr);
172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177 private Vector2 screenCenterPoint
181 NDalicPINVOKE.PinchGesture_screenCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186 global::System.IntPtr cPtr = NDalicPINVOKE.PinchGesture_screenCenterPoint_get(swigCPtr);
187 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 private Vector2 localCenterPoint
197 NDalicPINVOKE.PinchGesture_localCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
198 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202 global::System.IntPtr cPtr = NDalicPINVOKE.PinchGesture_localCenterPoint_get(swigCPtr);
203 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();