Calculate a new height when text was changed.
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / public / BaseHandle.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 BaseHandle : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16
17   internal BaseHandle(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(BaseHandle obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   ~BaseHandle() {
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_BaseHandle(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
50   // Returns the bool value true to indicate that an operand is true and returns false otherwise.
51   public static bool operator true(BaseHandle handle)
52   {
53     // if the C# object is null, return false
54     if( BaseHandle.ReferenceEquals( handle, null ) )
55     {
56       return false;
57     }
58     // returns true if the handle has a body, false otherwise
59     return handle.HasBody();
60   }
61
62   // Returns the bool false  to indicate that an operand is false and returns true otherwise.
63   public static bool operator false(BaseHandle  handle)
64   {
65     // if the C# object is null, return true
66     if( BaseHandle.ReferenceEquals( handle, null ) )
67     {
68       return true;
69     }
70     return !handle.HasBody();
71   }
72
73   // Explicit conversion from Handle to bool.
74   public static explicit operator bool(BaseHandle handle)
75   {
76      // if the C# object is null, return false
77     if( BaseHandle.ReferenceEquals( handle, null ) )
78     {
79       return false;
80     }
81     // returns true if the handle has a body, false otherwise
82     return handle.HasBody();
83   }
84
85   // Equality operator
86   public static bool operator == (BaseHandle x, BaseHandle y)
87   {
88     // if the C# objects are the same return true
89     if(  BaseHandle.ReferenceEquals( x, y ) )
90     {
91       return true;
92     }
93     if ( !BaseHandle.ReferenceEquals( x, null ) && !BaseHandle.ReferenceEquals( y, null ) )
94     {
95       // drop into native code to see if both handles point to the same body
96       return x.IsEqual( y) ;
97     }
98     return false;
99
100   }
101
102   // Inequality operator. Returns Null if either operand is Null
103   public static bool operator !=(BaseHandle x, BaseHandle y)
104   {
105     return !(x==y);
106   }
107
108   // Logical AND operator for &&
109   // It's possible when doing a && this function (opBitwiseAnd) is never called due
110   // to short circuiting. E.g.
111   // If you perform x && y What actually is called is
112   // BaseHandle.op_False( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseAnd(x,y) )
113   //
114   public static BaseHandle operator &(BaseHandle x, BaseHandle y)
115   {
116     if( x == y )
117     {
118       return x;
119     }
120     return null;
121   }
122
123   // Logical OR operator for ||
124   // It's possible when doing a || this function (opBitwiseOr) is never called due
125   // to short circuiting. E.g.
126   // If you perform x || y What actually is called is
127   // BaseHandle.op_True( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseOr(x,y) )
128   public static BaseHandle operator |(BaseHandle x, BaseHandle y)
129   {
130     if ( !BaseHandle.ReferenceEquals( x, null ) || !BaseHandle.ReferenceEquals( y, null ) )
131     {
132        if( x.HasBody() )
133        {
134          return x;
135        }
136        if( y.HasBody() )
137        {
138          return y;
139        }
140        return null;
141     }
142     return null;
143   }
144
145   // Logical ! operator
146   public static bool operator !(BaseHandle x)
147   {
148     // if the C# object is null, return true
149     if( BaseHandle.ReferenceEquals( x, null ) )
150     {
151       return true;
152     }
153     if( x.HasBody() )
154     {
155       return false;
156     }
157     return true;
158   }
159
160   public BaseHandle() : this(NDalicPINVOKE.new_BaseHandle__SWIG_1(), true) {
161     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162   }
163
164   public BaseHandle(BaseHandle handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_2(BaseHandle.getCPtr(handle)), true) {
165     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166   }
167
168   public bool DoAction(string actionName, Property.Map attributes) {
169     bool ret = NDalicPINVOKE.BaseHandle_DoAction(swigCPtr, actionName, Property.Map.getCPtr(attributes));
170     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171     return ret;
172   }
173
174   public string GetTypeName() {
175     string ret = NDalicPINVOKE.BaseHandle_GetTypeName(swigCPtr);
176     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177     return ret;
178   }
179
180   public bool GetTypeInfo(TypeInfo info) {
181     bool ret = NDalicPINVOKE.BaseHandle_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info));
182     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183     return ret;
184   }
185
186   public void Reset() {
187     NDalicPINVOKE.BaseHandle_Reset(swigCPtr);
188     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189   }
190
191   public bool EqualTo(BaseHandle rhs) {
192     bool ret = NDalicPINVOKE.BaseHandle_EqualTo(swigCPtr, BaseHandle.getCPtr(rhs));
193     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194     return ret;
195   }
196
197   public bool NotEqualTo(BaseHandle rhs) {
198     bool ret = NDalicPINVOKE.BaseHandle_NotEqualTo(swigCPtr, BaseHandle.getCPtr(rhs));
199     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200     return ret;
201   }
202
203   internal RefObject GetObjectPtr() {
204     global::System.IntPtr cPtr = NDalicPINVOKE.BaseHandle_GetObjectPtr(swigCPtr);
205     RefObject ret = (cPtr == global::System.IntPtr.Zero) ? null : new RefObject(cPtr, false);
206     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207     return ret;
208   }
209
210   public bool HasBody() {
211     bool ret = NDalicPINVOKE.BaseHandle_HasBody(swigCPtr);
212     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213     return ret;
214   }
215
216   public bool IsEqual(BaseHandle rhs) {
217     bool ret = NDalicPINVOKE.BaseHandle_IsEqual(swigCPtr, BaseHandle.getCPtr(rhs));
218     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219     return ret;
220   }
221
222 }
223
224 }