2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using Tizen.NUI.Binding;
23 /// Extents class describing the a collection of uint16_t.
25 /// <since_tizen> 4 </since_tizen>
26 [TypeConverter(typeof(ExtentsTypeConverter))]
27 public class Extents : Disposable
33 /// <since_tizen> 4 </since_tizen>
34 protected bool swigCMemOwn;
36 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
41 /// <since_tizen> 4 </since_tizen>
42 public Extents() : this(Interop.Extents.new_Extents__SWIG_0(), true)
44 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
50 /// <param name="copy">A reference to the copied Extents.</param>
51 /// <since_tizen> 4 </since_tizen>
52 public Extents(Extents copy) : this(Interop.Extents.new_Extents__SWIG_1(Extents.getCPtr(copy)), true)
54 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
59 /// <param name="start">Start extent.</param>
60 /// <param name="end">End extent.</param>
61 /// <param name="top">Top extent.</param>
62 /// <param name="bottom">Bottom extent.</param>
64 /// <since_tizen> 4 </since_tizen>
65 public Extents(ushort start, ushort end, ushort top, ushort bottom) : this(Interop.Extents.new_Extents__SWIG_2(start, end, top, bottom), true)
67 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70 internal Extents(global::System.IntPtr cPtr, bool cMemoryOwn)
72 swigCMemOwn = cMemoryOwn;
73 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
79 /// <since_tizen> 4 </since_tizen>
84 Interop.Extents.Extents_start_set(swigCPtr, value);
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89 ushort ret = Interop.Extents.Extents_start_get(swigCPtr);
90 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98 /// <since_tizen> 4 </since_tizen>
103 Interop.Extents.Extents_end_set(swigCPtr, value);
104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 ushort ret = Interop.Extents.Extents_end_get(swigCPtr);
109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 /// <since_tizen> 4 </since_tizen>
122 Interop.Extents.Extents_top_set(swigCPtr, value);
123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127 ushort ret = Interop.Extents.Extents_top_get(swigCPtr);
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134 /// The Bottom Extend.
136 /// <since_tizen> 4 </since_tizen>
141 Interop.Extents.Extents_bottom_set(swigCPtr, value);
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 ushort ret = Interop.Extents.Extents_bottom_get(swigCPtr);
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153 /// Equality operator.
155 /// <param name="rhs">The Extents to test against.</param>
156 /// <returns>True if the extents are not equal.</returns>
157 /// <since_tizen> 4 </since_tizen>
158 public bool EqualTo(Extents rhs)
160 bool ret = Interop.Extents.Extents_EqualTo(swigCPtr, Extents.getCPtr(rhs));
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 /// Inequality operator.
168 /// <param name="rhs">The Extents to test against.</param>
169 /// <returns>True if the extents are not equal.</returns>
170 /// <since_tizen> 4 </since_tizen>
171 public bool NotEqualTo(Extents rhs)
173 bool ret = Interop.Extents.Extents_NotEqualTo(swigCPtr, Extents.getCPtr(rhs));
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Extents obj)
180 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
183 internal Extents Assign(SWIGTYPE_p_uint16_t array)
185 Extents ret = new Extents(Interop.Extents.Extents_Assign__SWIG_1(swigCPtr, SWIGTYPE_p_uint16_t.getCPtr(array)), false);
186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190 internal Extents Assign(Extents copy)
192 Extents ret = new Extents(Interop.Extents.Extents_Assign__SWIG_0(swigCPtr, Extents.getCPtr(copy)), false);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198 /// To make a Extents instance be disposed.
200 /// <param name="type">Extents type</param>
201 /// <since_tizen> 4 </since_tizen>
202 protected override void Dispose(DisposeTypes type)
209 //Release your own unmanaged resources here.
210 //You should not access any managed member here except static instance.
211 //because the execution order of Finalizes is non-deterministic.
213 if (swigCPtr.Handle != global::System.IntPtr.Zero)
218 Interop.Extents.delete_Extents(swigCPtr);
220 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);