1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
18 using System.ComponentModel;
23 //"Please do not use! this will be deprecated"
24 [EditorBrowsable(EditorBrowsableState.Never)]
25 public class Uint16Pair : global::System.IDisposable
27 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
28 protected bool swigCMemOwn;
30 internal Uint16Pair(global::System.IntPtr cPtr, bool cMemoryOwn)
32 swigCMemOwn = cMemoryOwn;
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Uint16Pair obj)
38 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 //A Flag to check who called Dispose(). (By User or DisposeQueue)
42 private bool isDisposeQueued = false;
43 //A Flat to check if it is already disposed.
44 protected bool disposed = false;
51 isDisposeQueued = true;
52 DisposeQueue.Instance.Add(this);
58 //Throw excpetion if Dispose() is called in separate thread.
59 if (!Window.IsInstalled())
61 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
66 Dispose(DisposeTypes.Implicit);
70 Dispose(DisposeTypes.Explicit);
71 System.GC.SuppressFinalize(this);
75 protected virtual void Dispose(DisposeTypes type)
82 if (type == DisposeTypes.Explicit)
85 //Release your own managed resources here.
86 //You should release all of your own disposable objects here.
90 //Release your own unmanaged resources here.
91 //You should not access any managed member here except static instance.
92 //because the execution order of Finalizes is non-deterministic.
94 if (swigCPtr.Handle != global::System.IntPtr.Zero)
99 NDalicPINVOKE.delete_Uint16Pair(swigCPtr);
101 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
108 public static bool operator <(Uint16Pair arg1, Uint16Pair arg2)
110 return arg1.LessThan(arg2);
113 public static bool operator >(Uint16Pair arg1, Uint16Pair arg2)
115 return arg1.GreaterThan(arg2);
118 public Uint16Pair() : this(NDalicPINVOKE.new_Uint16Pair__SWIG_0(), true)
120 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123 public Uint16Pair(uint width, uint height) : this(NDalicPINVOKE.new_Uint16Pair__SWIG_1(width, height), true)
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 public Uint16Pair(Uint16Pair rhs) : this(NDalicPINVOKE.new_Uint16Pair__SWIG_2(Uint16Pair.getCPtr(rhs)), true)
130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 public void SetWidth(ushort width)
135 NDalicPINVOKE.Uint16Pair_SetWidth(swigCPtr, width);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139 public ushort GetWidth()
141 ushort ret = NDalicPINVOKE.Uint16Pair_GetWidth(swigCPtr);
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 public void SetHeight(ushort height)
148 NDalicPINVOKE.Uint16Pair_SetHeight(swigCPtr, height);
149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 public ushort GetHeight()
154 ushort ret = NDalicPINVOKE.Uint16Pair_GetHeight(swigCPtr);
155 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159 public void SetX(ushort x)
161 NDalicPINVOKE.Uint16Pair_SetX(swigCPtr, x);
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 ushort ret = NDalicPINVOKE.Uint16Pair_GetX(swigCPtr);
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 public void SetY(ushort y)
174 NDalicPINVOKE.Uint16Pair_SetY(swigCPtr, y);
175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180 ushort ret = NDalicPINVOKE.Uint16Pair_GetY(swigCPtr);
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185 public Uint16Pair Assign(Uint16Pair rhs)
187 Uint16Pair ret = new Uint16Pair(NDalicPINVOKE.Uint16Pair_Assign(swigCPtr, Uint16Pair.getCPtr(rhs)), false);
188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
192 private bool EqualTo(Uint16Pair rhs)
194 bool ret = NDalicPINVOKE.Uint16Pair_EqualTo(swigCPtr, Uint16Pair.getCPtr(rhs));
195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 private bool NotEqualTo(Uint16Pair rhs)
201 bool ret = NDalicPINVOKE.Uint16Pair_NotEqualTo(swigCPtr, Uint16Pair.getCPtr(rhs));
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 private bool LessThan(Uint16Pair rhs)
208 bool ret = NDalicPINVOKE.Uint16Pair_LessThan(swigCPtr, Uint16Pair.getCPtr(rhs));
209 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213 private bool GreaterThan(Uint16Pair rhs)
215 bool ret = NDalicPINVOKE.Uint16Pair_GreaterThan(swigCPtr, Uint16Pair.getCPtr(rhs));
216 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();