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