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.
22 [Obsolete("Please do not use! this will be deprecated")]
23 public class Uint16Pair : global::System.IDisposable
25 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26 protected bool swigCMemOwn;
28 internal Uint16Pair(global::System.IntPtr cPtr, bool cMemoryOwn)
30 swigCMemOwn = cMemoryOwn;
31 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Uint16Pair obj)
36 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
39 //A Flag to check who called Dispose(). (By User or DisposeQueue)
40 private bool isDisposeQueued = false;
41 //A Flat to check if it is already disposed.
42 protected bool disposed = false;
49 isDisposeQueued = true;
50 DisposeQueue.Instance.Add(this);
56 //Throw excpetion if Dispose() is called in separate thread.
57 if (!Window.IsInstalled())
59 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
64 Dispose(DisposeTypes.Implicit);
68 Dispose(DisposeTypes.Explicit);
69 System.GC.SuppressFinalize(this);
73 protected virtual void Dispose(DisposeTypes type)
80 if (type == DisposeTypes.Explicit)
83 //Release your own managed resources here.
84 //You should release all of your own disposable objects here.
88 //Release your own unmanaged resources here.
89 //You should not access any managed member here except static instance.
90 //because the execution order of Finalizes is non-deterministic.
92 if (swigCPtr.Handle != global::System.IntPtr.Zero)
97 NDalicPINVOKE.delete_Uint16Pair(swigCPtr);
99 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
106 public static bool operator <(Uint16Pair arg1, Uint16Pair arg2)
108 return arg1.LessThan(arg2);
111 public static bool operator >(Uint16Pair arg1, Uint16Pair arg2)
113 return arg1.GreaterThan(arg2);
116 public Uint16Pair() : this(NDalicPINVOKE.new_Uint16Pair__SWIG_0(), true)
118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 public Uint16Pair(uint width, uint height) : this(NDalicPINVOKE.new_Uint16Pair__SWIG_1(width, height), true)
123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126 public Uint16Pair(Uint16Pair rhs) : this(NDalicPINVOKE.new_Uint16Pair__SWIG_2(Uint16Pair.getCPtr(rhs)), true)
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131 public void SetWidth(ushort width)
133 NDalicPINVOKE.Uint16Pair_SetWidth(swigCPtr, width);
134 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137 public ushort GetWidth()
139 ushort ret = NDalicPINVOKE.Uint16Pair_GetWidth(swigCPtr);
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 public void SetHeight(ushort height)
146 NDalicPINVOKE.Uint16Pair_SetHeight(swigCPtr, height);
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 public ushort GetHeight()
152 ushort ret = NDalicPINVOKE.Uint16Pair_GetHeight(swigCPtr);
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157 public void SetX(ushort x)
159 NDalicPINVOKE.Uint16Pair_SetX(swigCPtr, x);
160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 ushort ret = NDalicPINVOKE.Uint16Pair_GetX(swigCPtr);
166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170 public void SetY(ushort y)
172 NDalicPINVOKE.Uint16Pair_SetY(swigCPtr, y);
173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178 ushort ret = NDalicPINVOKE.Uint16Pair_GetY(swigCPtr);
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183 public Uint16Pair Assign(Uint16Pair rhs)
185 Uint16Pair ret = new Uint16Pair(NDalicPINVOKE.Uint16Pair_Assign(swigCPtr, Uint16Pair.getCPtr(rhs)), false);
186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190 private bool EqualTo(Uint16Pair rhs)
192 bool ret = NDalicPINVOKE.Uint16Pair_EqualTo(swigCPtr, Uint16Pair.getCPtr(rhs));
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 private bool NotEqualTo(Uint16Pair rhs)
199 bool ret = NDalicPINVOKE.Uint16Pair_NotEqualTo(swigCPtr, Uint16Pair.getCPtr(rhs));
200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204 private bool LessThan(Uint16Pair rhs)
206 bool ret = NDalicPINVOKE.Uint16Pair_LessThan(swigCPtr, Uint16Pair.getCPtr(rhs));
207 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
211 private bool GreaterThan(Uint16Pair rhs)
213 bool ret = NDalicPINVOKE.Uint16Pair_GreaterThan(swigCPtr, Uint16Pair.getCPtr(rhs));
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();