Merge "SVACE issue resolved" into devel/master
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / Vector2.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.10
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 Dali {
12
13 public class Vector2 : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16
17   internal Vector2(global::System.IntPtr cPtr, bool cMemoryOwn) {
18     swigCMemOwn = cMemoryOwn;
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21
22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector2 obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   ~Vector2() {
27     DisposeQueue.Instance.Add(this);
28   }
29
30   public virtual void Dispose() {
31     if (!Stage.IsInstalled()) {
32       DisposeQueue.Instance.Add(this);
33       return;
34     }
35
36     lock(this) {
37       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
38         if (swigCMemOwn) {
39           swigCMemOwn = false;
40           NDalicPINVOKE.delete_Vector2(swigCPtr);
41         }
42         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
43       }
44       global::System.GC.SuppressFinalize(this);
45     }
46   }
47
48
49   public static Vector2 operator+(Vector2 arg1, Vector2 arg2) {
50     return arg1.Add(arg2);
51   }
52
53   public static Vector2 operator-(Vector2 arg1, Vector2 arg2) {
54     return arg1.Subtract(arg2);
55   }
56
57   public static Vector2 operator-(Vector2 arg1) {
58     return arg1.Subtract();
59   }
60
61   public static Vector2 operator*(Vector2 arg1, Vector2 arg2) {
62     return arg1.Multiply(arg2);
63   }
64
65   public static Vector2 operator*(Vector2 arg1, float arg2) {
66     return arg1.Multiply(arg2);
67   }
68
69   public static Vector2 operator/(Vector2 arg1, Vector2 arg2) {
70     return arg1.Divide(arg2);
71   }
72
73   public static Vector2 operator/(Vector2 arg1, float arg2) {
74     return arg1.Divide(arg2);
75   }
76
77   public float this[uint index]
78   {
79     get
80     {
81       return ValueOfIndex(index);
82     }
83   }
84
85   public static Vector2 GetVector2FromPtr(global::System.IntPtr cPtr) {
86     Vector2 ret = new Vector2(cPtr, false);
87     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88        return ret;
89   }
90
91
92   public Vector2() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true) {
93     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94   }
95
96   public Vector2(float x, float y) : this(NDalicPINVOKE.new_Vector2__SWIG_1(x, y), true) {
97     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98   }
99
100   public Vector2(float[] array) : this(NDalicPINVOKE.new_Vector2__SWIG_2(array), true) {
101     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
102   }
103
104   public Vector2(Vector3 vec3) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Vector3.getCPtr(vec3)), true) {
105     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106   }
107
108   public Vector2(Vector4 vec4) : this(NDalicPINVOKE.new_Vector2__SWIG_4(Vector4.getCPtr(vec4)), true) {
109     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110   }
111
112   public static Vector2 ONE {
113     get {
114       global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_ONE_get();
115       Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
116       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117       return ret;
118     } 
119   }
120
121   public static Vector2 XAXIS {
122     get {
123       global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_XAXIS_get();
124       Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
125       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126       return ret;
127     } 
128   }
129
130   public static Vector2 YAXIS {
131     get {
132       global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_YAXIS_get();
133       Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
134       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135       return ret;
136     } 
137   }
138
139   public static Vector2 NEGATIVE_XAXIS {
140     get {
141       global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_NEGATIVE_XAXIS_get();
142       Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
143       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144       return ret;
145     } 
146   }
147
148   public static Vector2 NEGATIVE_YAXIS {
149     get {
150       global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_NEGATIVE_YAXIS_get();
151       Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
152       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153       return ret;
154     } 
155   }
156
157   public static Vector2 ZERO {
158     get {
159       global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_ZERO_get();
160       Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
161       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162       return ret;
163     } 
164   }
165
166   public Vector2 Assign(float[] array) {
167     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Assign__SWIG_0(swigCPtr, array), false);
168     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169     return ret;
170   }
171
172   public Vector2 Assign(Vector3 rhs) {
173     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Assign__SWIG_1(swigCPtr, Vector3.getCPtr(rhs)), false);
174     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175     return ret;
176   }
177
178   public Vector2 Assign(Vector4 rhs) {
179     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Assign__SWIG_2(swigCPtr, Vector4.getCPtr(rhs)), false);
180     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181     return ret;
182   }
183
184   public Vector2 Add(Vector2 rhs) {
185     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Add(swigCPtr, Vector2.getCPtr(rhs)), true);
186     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187     return ret;
188   }
189
190   public Vector2 AddAssign(Vector2 rhs) {
191     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_AddAssign(swigCPtr, Vector2.getCPtr(rhs)), false);
192     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193     return ret;
194   }
195
196   public Vector2 Subtract(Vector2 rhs) {
197     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), true);
198     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199     return ret;
200   }
201
202   public Vector2 SubtractAssign(Vector2 rhs) {
203     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_SubtractAssign(swigCPtr, Vector2.getCPtr(rhs)), false);
204     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205     return ret;
206   }
207
208   public Vector2 Multiply(Vector2 rhs) {
209     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), true);
210     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
211     return ret;
212   }
213
214   public Vector2 Multiply(float rhs) {
215     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, rhs), true);
216     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217     return ret;
218   }
219
220   public Vector2 MultiplyAssign(Vector2 rhs) {
221     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_MultiplyAssign__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), false);
222     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223     return ret;
224   }
225
226   public Vector2 MultiplyAssign(float rhs) {
227     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
228     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229     return ret;
230   }
231
232   public Vector2 Divide(Vector2 rhs) {
233     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), true);
234     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235     return ret;
236   }
237
238   public Vector2 Divide(float rhs) {
239     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, rhs), true);
240     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
241     return ret;
242   }
243
244   public Vector2 DivideAssign(Vector2 rhs) {
245     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_DivideAssign__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), false);
246     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
247     return ret;
248   }
249
250   public Vector2 DivideAssign(float rhs) {
251     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_DivideAssign__SWIG_1(swigCPtr, rhs), false);
252     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253     return ret;
254   }
255
256   public Vector2 Subtract() {
257     Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Subtract__SWIG_1(swigCPtr), true);
258     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259     return ret;
260   }
261
262   public bool EqualTo(Vector2 rhs) {
263     bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Vector2.getCPtr(rhs));
264     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
265     return ret;
266   }
267
268   public bool NotEqualTo(Vector2 rhs) {
269     bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, Vector2.getCPtr(rhs));
270     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271     return ret;
272   }
273
274   public float ValueOfIndex(uint index) {
275     float ret = NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index);
276     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
277     return ret;
278   }
279
280   public float Length() {
281     float ret = NDalicPINVOKE.Vector2_Length(swigCPtr);
282     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283     return ret;
284   }
285
286   public float LengthSquared() {
287     float ret = NDalicPINVOKE.Vector2_LengthSquared(swigCPtr);
288     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
289     return ret;
290   }
291
292   public void Normalize() {
293     NDalicPINVOKE.Vector2_Normalize(swigCPtr);
294     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295   }
296
297   public void Clamp(Vector2 min, Vector2 max) {
298     NDalicPINVOKE.Vector2_Clamp(swigCPtr, Vector2.getCPtr(min), Vector2.getCPtr(max));
299     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
300   }
301
302   public SWIGTYPE_p_float AsFloat() {
303     global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_AsFloat__SWIG_0(swigCPtr);
304     SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
305     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306     return ret;
307   }
308
309   public float X {
310     set {
311       NDalicPINVOKE.Vector2_X_set(swigCPtr, value);
312       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
313     } 
314     get {
315       float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr);
316       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317       return ret;
318     } 
319   }
320
321   public float Width {
322     set {
323       NDalicPINVOKE.Vector2_Width_set(swigCPtr, value);
324       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
325     } 
326     get {
327       float ret = NDalicPINVOKE.Vector2_Width_get(swigCPtr);
328       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329       return ret;
330     } 
331   }
332
333   public float Y {
334     set {
335       NDalicPINVOKE.Vector2_Y_set(swigCPtr, value);
336       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337     } 
338     get {
339       float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr);
340       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
341       return ret;
342     } 
343   }
344
345   public float Height {
346     set {
347       NDalicPINVOKE.Vector2_Height_set(swigCPtr, value);
348       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349     } 
350     get {
351       float ret = NDalicPINVOKE.Vector2_Height_get(swigCPtr);
352       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
353       return ret;
354     } 
355   }
356
357 }
358
359 }