eb5f26c28d3d59da0d4c2414670d41610c729443
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / PinchGesture.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 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.
17     /// </summary>
18     public class PinchGesture : Gesture
19     {
20         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21
22         internal PinchGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PinchGesture_SWIGUpcast(cPtr), cMemoryOwn)
23         {
24             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
25         }
26
27         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PinchGesture obj)
28         {
29             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
30         }
31
32         ~PinchGesture()
33         {
34             DisposeQueue.Instance.Add(this);
35         }
36
37         public override void Dispose()
38         {
39             if (!Stage.IsInstalled())
40             {
41                 DisposeQueue.Instance.Add(this);
42                 return;
43             }
44
45             lock (this)
46             {
47                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
48                 {
49                     if (swigCMemOwn)
50                     {
51                         swigCMemOwn = false;
52                         NDalicPINVOKE.delete_PinchGesture(swigCPtr);
53                     }
54                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
55                 }
56                 global::System.GC.SuppressFinalize(this);
57                 base.Dispose();
58             }
59         }
60
61
62         public static PinchGesture GetPinchGestureFromPtr(global::System.IntPtr cPtr)
63         {
64             PinchGesture ret = new PinchGesture(cPtr, false);
65             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66             return ret;
67         }
68
69         /// <summary>
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.
74         /// </summary>
75         public float Scale
76         {
77             get
78             {
79                 return scale;
80             }
81         }
82
83         /// <summary>
84         /// The speed at which the user is moving their fingers.
85         /// This is the pixel movement per second.
86         /// </summary>
87         public float Speed
88         {
89             get
90             {
91                 return speed;
92             }
93         }
94
95         /// <summary>
96         /// The center point of the two points that caused the pinch gesture in screen coordinates.
97         /// </summary>
98         public Vector2 ScreenCenterPoint
99         {
100             get
101             {
102                 return screenCenterPoint;
103             }
104         }
105
106         /// <summary>
107         /// The center point of the two points that caused the pinch gesture in local actor coordinates.
108         /// </summary>
109         public Vector2 LocalCenterPoint
110         {
111             get
112             {
113                 return localCenterPoint;
114             }
115         }
116
117         /// <summary>
118         /// Default Constructor.
119         /// </summary>
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)
122         {
123             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124         }
125
126         /// <summary>
127         /// Copy constructor.
128         /// </summary>
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)
131         {
132             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133         }
134
135         /// <summary>
136         /// Assignment operator.
137         /// </summary>
138         /// <param name="rhs">A reference to the copied handle</param>
139         /// <returns>A reference to this</returns>
140         public PinchGesture Assign(PinchGesture rhs)
141         {
142             PinchGesture ret = new PinchGesture(NDalicPINVOKE.PinchGesture_Assign(swigCPtr, PinchGesture.getCPtr(rhs)), false);
143             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144             return ret;
145         }
146
147         private float scale
148         {
149             set
150             {
151                 NDalicPINVOKE.PinchGesture_scale_set(swigCPtr, value);
152                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153             }
154             get
155             {
156                 float ret = NDalicPINVOKE.PinchGesture_scale_get(swigCPtr);
157                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158                 return ret;
159             }
160         }
161
162         private float speed
163         {
164             set
165             {
166                 NDalicPINVOKE.PinchGesture_speed_set(swigCPtr, value);
167                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168             }
169             get
170             {
171                 float ret = NDalicPINVOKE.PinchGesture_speed_get(swigCPtr);
172                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173                 return ret;
174             }
175         }
176
177         private Vector2 screenCenterPoint
178         {
179             set
180             {
181                 NDalicPINVOKE.PinchGesture_screenCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
182                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183             }
184             get
185             {
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();
189                 return ret;
190             }
191         }
192
193         private Vector2 localCenterPoint
194         {
195             set
196             {
197                 NDalicPINVOKE.PinchGesture_localCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
198                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199             }
200             get
201             {
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();
205                 return ret;
206             }
207         }
208
209     }
210
211 }