nui 0.2.32 manual merge, mapping to dali 1.2.32
[platform/core/csapi/tizenfx.git] / NUISamples / Tizen.NUI / src / public / Rectangle.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     /// Rectangle class
16     /// </summary>
17     public class Rectangle : global::System.IDisposable
18     {
19         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20         protected bool swigCMemOwn;
21
22         internal Rectangle(global::System.IntPtr cPtr, bool cMemoryOwn)
23         {
24             swigCMemOwn = cMemoryOwn;
25             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26         }
27
28         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Rectangle obj)
29         {
30             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
31         }
32
33         ~Rectangle()
34         {
35             DisposeQueue.Instance.Add(this);
36         }
37
38         public virtual void Dispose()
39         {
40             if (!Stage.IsInstalled())
41             {
42                 DisposeQueue.Instance.Add(this);
43                 return;
44             }
45
46             lock (this)
47             {
48                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
49                 {
50                     if (swigCMemOwn)
51                     {
52                         swigCMemOwn = false;
53                         NDalicPINVOKE.delete_Rectangle(swigCPtr);
54                     }
55                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56                 }
57                 global::System.GC.SuppressFinalize(this);
58             }
59         }
60
61         /// <summary>
62         /// Equality operator.
63         /// </summary>
64         /// <param name="a">First operand</param>
65         /// <param name="b">Second operand</param>
66         /// <returns>True if boxes are exactly same</returns>
67         public static bool operator ==(Rectangle a, Rectangle b)
68         {
69             // If both are null, or both are same instance, return true.
70             if (System.Object.ReferenceEquals(a, b))
71             {
72                 return true;
73             }
74
75             // If one is null, but not both, return false.
76             if (((object)a == null) || ((object)b == null))
77             {
78                 return false;
79             }
80
81             // Return true if the fields match:
82             return a.X == b.X && a.Y == b.Y && a.Width == b.Width && a.Height == b.Height;
83         }
84
85         /// <summary>
86         /// Inequality operator.
87         /// </summary>
88         /// <param name="a">The first rectangle</param>
89         /// <param name="b">The second rectangle</param>
90         /// <returns>True if rectangles are not identical</returns>
91         public static bool operator !=(Rectangle a, Rectangle b)
92         {
93             return !(a == b);
94         }
95
96         /// <summary>
97         /// X position of the rectangle
98         /// </summary>
99         public int X
100         {
101             set
102             {
103                 x = value;
104             }
105             get
106             {
107                 return x;
108             }
109         }
110
111         /// <summary>
112         /// Y position of the rectangle
113         /// </summary>
114         public int Y
115         {
116             set
117             {
118                 y = value;
119             }
120             get
121             {
122                 return y;
123             }
124         }
125
126         /// <summary>
127         /// Width of the rectangle
128         /// </summary>
129         public int Width
130         {
131             set
132             {
133                 width = value;
134             }
135             get
136             {
137                 return width;
138             }
139         }
140
141         /// <summary>
142         /// Height of the rectangle
143         /// </summary>
144         public int Height
145         {
146             set
147             {
148                 height = value;
149             }
150             get
151             {
152                 return height;
153             }
154         }
155
156         /// <summary>
157         /// Constructor.
158         /// </summary>
159         public Rectangle() : this(NDalicPINVOKE.new_Rectangle__SWIG_0(), true)
160         {
161             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162         }
163
164         /// <summary>
165         /// Constructor.
166         /// </summary>
167         /// <param name="x">X coordinate (or left)</param>
168         /// <param name="y">Y coordinate (or right)</param>
169         /// <param name="width">Width (or bottom)</param>
170         /// <param name="height">Height (or top)</param>
171         public Rectangle(int x, int y, int width, int height) : this(NDalicPINVOKE.new_Rectangle__SWIG_1(x, y, width, height), true)
172         {
173             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174         }
175
176         /// <summary>
177         /// Copy constructor.
178         /// </summary>
179         /// <param name="rhs">The original object</param>
180         public Rectangle(Rectangle rhs) : this(NDalicPINVOKE.new_Rectangle__SWIG_2(Rectangle.getCPtr(rhs)), true)
181         {
182             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183         }
184
185         /// <summary>
186         /// Make reference of original Rectangle object.
187         /// </summary>
188         /// <param name="rhs">The original object</param>
189         /// <returns>Reference to this</returns>
190         public Rectangle Assign(Rectangle rhs)
191         {
192             Rectangle ret = new Rectangle(NDalicPINVOKE.Rectangle_Assign(swigCPtr, Rectangle.getCPtr(rhs)), false);
193             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194             return ret;
195         }
196
197         /// <summary>
198         /// Assignment from individual values.
199         /// </summary>
200         /// <param name="newX">X coordinate</param>
201         /// <param name="newY">Y coordinate</param>
202         /// <param name="newWidth">Width</param>
203         /// <param name="newHeight">Height</param>
204         public void Set(int newX, int newY, int newWidth, int newHeight)
205         {
206             NDalicPINVOKE.Rectangle_Set(swigCPtr, newX, newY, newWidth, newHeight);
207             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208         }
209
210         /// <summary>
211         /// Determines whether or not this Rectangle is empty.
212         /// </summary>
213         /// <returns>True if width or height are zero</returns>
214         public bool IsEmpty()
215         {
216             bool ret = NDalicPINVOKE.Rectangle_IsEmpty(swigCPtr);
217             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218             return ret;
219         }
220
221         /// <summary>
222         /// Gets the left of the rectangle.
223         /// </summary>
224         /// <returns>The left edge of the rectangle</returns>
225         public int Left()
226         {
227             int ret = NDalicPINVOKE.Rectangle_Left(swigCPtr);
228             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229             return ret;
230         }
231
232         /// <summary>
233         /// Gets the right of the rectangle.
234         /// </summary>
235         /// <returns>The right edge of the rectangle</returns>
236         public int Right()
237         {
238             int ret = NDalicPINVOKE.Rectangle_Right(swigCPtr);
239             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240             return ret;
241         }
242
243         /// <summary>
244         /// Gets the top of the rectangle.
245         /// </summary>
246         /// <returns>The top of the rectangle</returns>
247         public int Top()
248         {
249             int ret = NDalicPINVOKE.Rectangle_Top(swigCPtr);
250             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251             return ret;
252         }
253
254         /// <summary>
255         /// Gets the bottom of the rectangle.
256         /// </summary>
257         /// <returns>The bottom of the rectangle</returns>
258         public int Bottom()
259         {
260             int ret = NDalicPINVOKE.Rectangle_Bottom(swigCPtr);
261             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
262             return ret;
263         }
264
265         /// <summary>
266         /// Gets the area of the rectangle.
267         /// </summary>
268         /// <returns>The area of the rectangle</returns>
269         public int Area()
270         {
271             int ret = NDalicPINVOKE.Rectangle_Area(swigCPtr);
272             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
273             return ret;
274         }
275
276         /// <summary>
277         /// Determines whether or not this rectangle and the specified rectangle intersect.
278         /// </summary>
279         /// <param name="other">The other rectangle to test against this rectangle</param>
280         /// <returns>True if the rectangles intersect</returns>
281         public bool Intersects(Rectangle other)
282         {
283             bool ret = NDalicPINVOKE.Rectangle_Intersects(swigCPtr, Rectangle.getCPtr(other));
284             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285             return ret;
286         }
287
288         /// <summary>
289         /// Determines whether or not this Rectangle contains the specified rectangle.
290         /// </summary>
291         /// <param name="other">The other rectangle to test against this rectangle</param>
292         /// <returns>True if the specified rectangle is contained</returns>
293         public bool Contains(Rectangle other)
294         {
295             bool ret = NDalicPINVOKE.Rectangle_Contains(swigCPtr, Rectangle.getCPtr(other));
296             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297             return ret;
298         }
299
300         private int x
301         {
302             set
303             {
304                 NDalicPINVOKE.Rectangle_x_set(swigCPtr, value);
305                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306             }
307             get
308             {
309                 int ret = NDalicPINVOKE.Rectangle_x_get(swigCPtr);
310                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311                 return ret;
312             }
313         }
314
315         private int left
316         {
317             set
318             {
319                 NDalicPINVOKE.Rectangle_left_set(swigCPtr, value);
320                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321             }
322             get
323             {
324                 int ret = NDalicPINVOKE.Rectangle_left_get(swigCPtr);
325                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
326                 return ret;
327             }
328         }
329
330         private int y
331         {
332             set
333             {
334                 NDalicPINVOKE.Rectangle_y_set(swigCPtr, value);
335                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
336             }
337             get
338             {
339                 int ret = NDalicPINVOKE.Rectangle_y_get(swigCPtr);
340                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
341                 return ret;
342             }
343         }
344
345         private int right
346         {
347             set
348             {
349                 NDalicPINVOKE.Rectangle_right_set(swigCPtr, value);
350                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351             }
352             get
353             {
354                 int ret = NDalicPINVOKE.Rectangle_right_get(swigCPtr);
355                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356                 return ret;
357             }
358         }
359
360         private int width
361         {
362             set
363             {
364                 NDalicPINVOKE.Rectangle_width_set(swigCPtr, value);
365                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
366             }
367             get
368             {
369                 int ret = NDalicPINVOKE.Rectangle_width_get(swigCPtr);
370                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
371                 return ret;
372             }
373         }
374
375         private int bottom
376         {
377             set
378             {
379                 NDalicPINVOKE.Rectangle_bottom_set(swigCPtr, value);
380                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
381             }
382             get
383             {
384                 int ret = NDalicPINVOKE.Rectangle_bottom_get(swigCPtr);
385                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
386                 return ret;
387             }
388         }
389
390         private int height
391         {
392             set
393             {
394                 NDalicPINVOKE.Rectangle_height_set(swigCPtr, value);
395                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396             }
397             get
398             {
399                 int ret = NDalicPINVOKE.Rectangle_height_get(swigCPtr);
400                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
401                 return ret;
402             }
403         }
404
405         private int top
406         {
407             set
408             {
409                 NDalicPINVOKE.Rectangle_top_set(swigCPtr, value);
410                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
411             }
412             get
413             {
414                 int ret = NDalicPINVOKE.Rectangle_top_get(swigCPtr);
415                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
416                 return ret;
417             }
418         }
419
420     }
421
422 }