0a8797461e0375e26828f4209e93d47c2ba3ac13
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / PaddingType.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 PaddingType : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16
17   internal PaddingType(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(PaddingType obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   ~PaddingType() {
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_PaddingType(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 ==(PaddingType a, PaddingType 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 ( System.Math.Abs( a.Left - b.Left ) < NDalic.GetRangedEpsilon(a.Left, b.Left) )&&
65                ( System.Math.Abs( a.Right - b.Right ) < NDalic.GetRangedEpsilon(a.Right, b.Right) )&&
66                ( System.Math.Abs( a.Bottom - b.Bottom ) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom) )&&
67                ( System.Math.Abs( a.Top - b.Top ) < NDalic.GetRangedEpsilon(a.Top, b.Top) );
68     }
69
70     public static bool operator !=(PaddingType a, PaddingType b)
71     {
72         return !(a == b);
73     }
74
75     ///< The Left value
76     public float Left
77     {
78         set
79         {
80             left = value;
81         }
82         get
83         {
84             return left;
85         }
86     }
87
88     ///< The Right value
89     public float Right
90     {
91         set
92         {
93             right = value;
94         }
95         get
96         {
97             return right;
98         }
99     }
100
101     ///< The Bottom value
102     public float Bottom
103     {
104         set
105         {
106             bottom = value;
107         }
108         get
109         {
110             return bottom;
111         }
112     }
113
114     ///< The Top value
115     public float Top
116     {
117         set
118         {
119             top = value;
120         }
121         get
122         {
123             return top;
124         }
125     }
126
127
128   public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true) {
129     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130   }
131
132   public PaddingType(float x, float y, float width, float height) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(x, y, width, height), true) {
133     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134   }
135
136   public PaddingType(PaddingType rhs) : this(NDalicPINVOKE.new_PaddingType__SWIG_2(PaddingType.getCPtr(rhs)), true) {
137     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138   }
139
140   public PaddingType Assign(PaddingType rhs) {
141     PaddingType ret = new PaddingType(NDalicPINVOKE.PaddingType_Assign(swigCPtr, PaddingType.getCPtr(rhs)), false);
142     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143     return ret;
144   }
145
146   public void Set(float newX, float newY, float newWidth, float newHeight) {
147     NDalicPINVOKE.PaddingType_Set(swigCPtr, newX, newY, newWidth, newHeight);
148     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149   }
150
151   private float x {
152     set {
153       NDalicPINVOKE.PaddingType_x_set(swigCPtr, value);
154       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155     } 
156     get {
157       float ret = NDalicPINVOKE.PaddingType_x_get(swigCPtr);
158       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159       return ret;
160     } 
161   }
162
163   private float left {
164     set {
165       NDalicPINVOKE.PaddingType_left_set(swigCPtr, value);
166       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167     } 
168     get {
169       float ret = NDalicPINVOKE.PaddingType_left_get(swigCPtr);
170       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171       return ret;
172     } 
173   }
174
175   private float y {
176     set {
177       NDalicPINVOKE.PaddingType_y_set(swigCPtr, value);
178       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179     } 
180     get {
181       float ret = NDalicPINVOKE.PaddingType_y_get(swigCPtr);
182       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183       return ret;
184     } 
185   }
186
187   private float right {
188     set {
189       NDalicPINVOKE.PaddingType_right_set(swigCPtr, value);
190       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191     } 
192     get {
193       float ret = NDalicPINVOKE.PaddingType_right_get(swigCPtr);
194       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195       return ret;
196     } 
197   }
198
199   private float width {
200     set {
201       NDalicPINVOKE.PaddingType_width_set(swigCPtr, value);
202       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203     } 
204     get {
205       float ret = NDalicPINVOKE.PaddingType_width_get(swigCPtr);
206       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207       return ret;
208     } 
209   }
210
211   private float bottom {
212     set {
213       NDalicPINVOKE.PaddingType_bottom_set(swigCPtr, value);
214       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215     } 
216     get {
217       float ret = NDalicPINVOKE.PaddingType_bottom_get(swigCPtr);
218       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219       return ret;
220     } 
221   }
222
223   private float height {
224     set {
225       NDalicPINVOKE.PaddingType_height_set(swigCPtr, value);
226       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227     } 
228     get {
229       float ret = NDalicPINVOKE.PaddingType_height_get(swigCPtr);
230       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231       return ret;
232     } 
233   }
234
235   private float top {
236     set {
237       NDalicPINVOKE.PaddingType_top_set(swigCPtr, value);
238       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239     } 
240     get {
241       float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr);
242       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243       return ret;
244     } 
245   }
246
247 }
248
249 }