dali 1.2.28 version upgrade
[platform/core/csapi/nui.git] / 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 public class Rectangle : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16
17   internal Rectangle(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(Rectangle obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   ~Rectangle() {
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_Rectangle(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 bool operator ==(Rectangle a, Rectangle b)
50     {
51         // If both are null, or both are same instance, return true.
52         if (System.Object.ReferenceEquals(a, b))
53         {
54             return true;
55         }
56
57         // If one is null, but not both, return false.
58         if (((object)a == null) || ((object)b == null))
59         {
60             return false;
61         }
62
63         // Return true if the fields match:
64         return a.X == b.X && a.Y == b.Y && a.Width == b.Width && a.Height == b.Height;
65     }
66
67     public static bool operator !=(Rectangle a, Rectangle b)
68     {
69         return !(a == b);
70     }
71
72     ///< X position of the rectangle
73     public int X
74     {
75         set
76         {
77             x = value;
78         }
79         get
80         {
81             return x;
82         }
83     }
84
85     ///< Y position of the rectangle
86     public int Y
87     {
88         set
89         {
90             y = value;
91         }
92         get
93         {
94             return y;
95         }
96     }
97
98     ///< Width of the rectangle
99     public int Width
100     {
101         set
102         {
103             width = value;
104         }
105         get
106         {
107             return width;
108         }
109     }
110
111     ///< Height of the rectangle
112     public int Height
113     {
114         set
115         {
116             height = value;
117         }
118         get
119         {
120             return height;
121         }
122     }
123
124   public Rectangle() : this(NDalicPINVOKE.new_Rectangle__SWIG_0(), true) {
125     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126   }
127
128   public Rectangle(int x, int y, int width, int height) : this(NDalicPINVOKE.new_Rectangle__SWIG_1(x, y, width, height), true) {
129     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130   }
131
132   public Rectangle(Rectangle rhs) : this(NDalicPINVOKE.new_Rectangle__SWIG_2(Rectangle.getCPtr(rhs)), true) {
133     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134   }
135
136   public Rectangle Assign(Rectangle rhs) {
137     Rectangle ret = new Rectangle(NDalicPINVOKE.Rectangle_Assign(swigCPtr, Rectangle.getCPtr(rhs)), false);
138     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139     return ret;
140   }
141
142   public void Set(int newX, int newY, int newWidth, int newHeight) {
143     NDalicPINVOKE.Rectangle_Set(swigCPtr, newX, newY, newWidth, newHeight);
144     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145   }
146
147   public bool IsEmpty() {
148     bool ret = NDalicPINVOKE.Rectangle_IsEmpty(swigCPtr);
149     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150     return ret;
151   }
152
153   public int Left() {
154     int ret = NDalicPINVOKE.Rectangle_Left(swigCPtr);
155     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156     return ret;
157   }
158
159   public int Right() {
160     int ret = NDalicPINVOKE.Rectangle_Right(swigCPtr);
161     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162     return ret;
163   }
164
165   public int Top() {
166     int ret = NDalicPINVOKE.Rectangle_Top(swigCPtr);
167     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168     return ret;
169   }
170
171   public int Bottom() {
172     int ret = NDalicPINVOKE.Rectangle_Bottom(swigCPtr);
173     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174     return ret;
175   }
176
177   public int Area() {
178     int ret = NDalicPINVOKE.Rectangle_Area(swigCPtr);
179     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180     return ret;
181   }
182
183   public bool Intersects(Rectangle other) {
184     bool ret = NDalicPINVOKE.Rectangle_Intersects(swigCPtr, Rectangle.getCPtr(other));
185     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186     return ret;
187   }
188
189   public bool Contains(Rectangle other) {
190     bool ret = NDalicPINVOKE.Rectangle_Contains(swigCPtr, Rectangle.getCPtr(other));
191     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
192     return ret;
193   }
194
195   private int x {
196     set {
197       NDalicPINVOKE.Rectangle_x_set(swigCPtr, value);
198       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199     } 
200     get {
201       int ret = NDalicPINVOKE.Rectangle_x_get(swigCPtr);
202       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203       return ret;
204     } 
205   }
206
207   private int left {
208     set {
209       NDalicPINVOKE.Rectangle_left_set(swigCPtr, value);
210       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
211     } 
212     get {
213       int ret = NDalicPINVOKE.Rectangle_left_get(swigCPtr);
214       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215       return ret;
216     } 
217   }
218
219   private int y {
220     set {
221       NDalicPINVOKE.Rectangle_y_set(swigCPtr, value);
222       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223     } 
224     get {
225       int ret = NDalicPINVOKE.Rectangle_y_get(swigCPtr);
226       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227       return ret;
228     } 
229   }
230
231   private int right {
232     set {
233       NDalicPINVOKE.Rectangle_right_set(swigCPtr, value);
234       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235     } 
236     get {
237       int ret = NDalicPINVOKE.Rectangle_right_get(swigCPtr);
238       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239       return ret;
240     } 
241   }
242
243   private int width {
244     set {
245       NDalicPINVOKE.Rectangle_width_set(swigCPtr, value);
246       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
247     } 
248     get {
249       int ret = NDalicPINVOKE.Rectangle_width_get(swigCPtr);
250       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251       return ret;
252     } 
253   }
254
255   private int bottom {
256     set {
257       NDalicPINVOKE.Rectangle_bottom_set(swigCPtr, value);
258       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259     } 
260     get {
261       int ret = NDalicPINVOKE.Rectangle_bottom_get(swigCPtr);
262       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263       return ret;
264     } 
265   }
266
267   private int height {
268     set {
269       NDalicPINVOKE.Rectangle_height_set(swigCPtr, value);
270       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271     } 
272     get {
273       int ret = NDalicPINVOKE.Rectangle_height_get(swigCPtr);
274       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
275       return ret;
276     } 
277   }
278
279   private int top {
280     set {
281       NDalicPINVOKE.Rectangle_top_set(swigCPtr, value);
282       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283     } 
284     get {
285       int ret = NDalicPINVOKE.Rectangle_top_get(swigCPtr);
286       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287       return ret;
288     } 
289   }
290
291 }
292
293 }