manual nui merge 0.2.38
[platform/core/csapi/tizenfx.git] / src / 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.<br>
16     /// A pinch gesture will continue to be sent to the actor under the center point of the pinch until the pinch ends.<br>
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         public override void Dispose()
33         {
34             if (!Window.IsInstalled())
35             {
36                 DisposeQueue.Instance.Add(this);
37                 return;
38             }
39
40             lock (this)
41             {
42                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
43                 {
44                     if (swigCMemOwn)
45                     {
46                         swigCMemOwn = false;
47                         NDalicPINVOKE.delete_PinchGesture(swigCPtr);
48                     }
49                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
50                 }
51                 global::System.GC.SuppressFinalize(this);
52                 base.Dispose();
53             }
54         }
55
56
57         internal static PinchGesture GetPinchGestureFromPtr(global::System.IntPtr cPtr)
58         {
59             PinchGesture ret = new PinchGesture(cPtr, false);
60             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
61             return ret;
62         }
63
64         /// <summary>
65         /// The scale factor from the start of the pinch gesture till the latest pinch gesture.<br>
66         /// If the user is moving their fingers away from each other, then
67         /// this value increases.  Conversely, if the user is moving their
68         /// fingers towards each other, this value will decrease.<br>
69         /// </summary>
70         public float Scale
71         {
72             get
73             {
74                 return scale;
75             }
76         }
77
78         /// <summary>
79         /// The speed at which the user is moving their fingers.<br>
80         /// This is the pixel movement per second.<br>
81         /// </summary>
82         public float Speed
83         {
84             get
85             {
86                 return speed;
87             }
88         }
89
90         /// <summary>
91         /// The center point of the two points that caused the pinch gesture in screen coordinates.
92         /// </summary>
93         public Vector2 ScreenCenterPoint
94         {
95             get
96             {
97                 return screenCenterPoint;
98             }
99         }
100
101         /// <summary>
102         /// The center point of the two points that caused the pinch gesture in local actor coordinates.
103         /// </summary>
104         public Vector2 LocalCenterPoint
105         {
106             get
107             {
108                 return localCenterPoint;
109             }
110         }
111
112         /// <summary>
113         /// Default Constructor.
114         /// </summary>
115         /// <param name="state">The state of the gesture</param>
116         public PinchGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_PinchGesture__SWIG_0((int)state), true)
117         {
118             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119         }
120
121         /// <summary>
122         /// Copy constructor.
123         /// </summary>
124         /// <param name="rhs">A reference to the copied handle</param>
125         public PinchGesture(PinchGesture rhs) : this(NDalicPINVOKE.new_PinchGesture__SWIG_1(PinchGesture.getCPtr(rhs)), true)
126         {
127             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128         }
129
130         /// <summary>
131         /// Assignment operator.
132         /// </summary>
133         /// <param name="rhs">A reference to the copied handle</param>
134         /// <returns>A reference to this</returns>
135         public PinchGesture Assign(PinchGesture rhs)
136         {
137             PinchGesture ret = new PinchGesture(NDalicPINVOKE.PinchGesture_Assign(swigCPtr, PinchGesture.getCPtr(rhs)), false);
138             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139             return ret;
140         }
141
142         private float scale
143         {
144             set
145             {
146                 NDalicPINVOKE.PinchGesture_scale_set(swigCPtr, value);
147                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148             }
149             get
150             {
151                 float ret = NDalicPINVOKE.PinchGesture_scale_get(swigCPtr);
152                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153                 return ret;
154             }
155         }
156
157         private float speed
158         {
159             set
160             {
161                 NDalicPINVOKE.PinchGesture_speed_set(swigCPtr, value);
162                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163             }
164             get
165             {
166                 float ret = NDalicPINVOKE.PinchGesture_speed_get(swigCPtr);
167                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168                 return ret;
169             }
170         }
171
172         private Vector2 screenCenterPoint
173         {
174             set
175             {
176                 NDalicPINVOKE.PinchGesture_screenCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
177                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178             }
179             get
180             {
181                 global::System.IntPtr cPtr = NDalicPINVOKE.PinchGesture_screenCenterPoint_get(swigCPtr);
182                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
183                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184                 return ret;
185             }
186         }
187
188         private Vector2 localCenterPoint
189         {
190             set
191             {
192                 NDalicPINVOKE.PinchGesture_localCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
193                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194             }
195             get
196             {
197                 global::System.IntPtr cPtr = NDalicPINVOKE.PinchGesture_localCenterPoint_get(swigCPtr);
198                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
199                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200                 return ret;
201             }
202         }
203
204     }
205
206 }