2 * Copyright(c) 2021 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.
19 using System.ComponentModel;
24 /// Simple class for window position pairs of integers.
25 /// Use this for integer position with window coordinates.
27 internal class IntPair : Disposable
29 internal IntPair(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
33 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
35 Interop.IntPair.DeleteIntPair(swigCPtr);
39 /// Default constructor for the(0, 0) tuple.
41 public IntPair() : this(Interop.IntPair.NewIntPair(), true)
43 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
47 /// Default constructor for the(0, 0) tuple.
49 /// <param name="x">The X dimension of the tuple.</param>
50 /// <param name="y">The Y dimension of the tuple.</param>
51 public IntPair(int x, int y) : this(Interop.IntPair.NewIntPair(x, y), true)
53 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57 /// Sets the x dimension.
59 /// <param name="x">The x dimension to be stored in this 2-tuple.</param>
60 public void SetX(int x)
62 Interop.IntPair.SetX(SwigCPtr, x);
63 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67 /// Get the x dimension.
70 /// The x dimension stored in this 2-tuple.
74 int ret = Interop.IntPair.GetX(SwigCPtr);
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 /// Sets the y dimension.
82 /// <param name="y">The y dimension to be stored in this 2-tuple.</param>
83 public void SetY(int y)
85 Interop.IntPair.SetY(SwigCPtr, y);
86 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90 /// Get the y dimension.
93 /// The y dimension stored in this 2-tuple.
97 int ret = Interop.IntPair.GetY(SwigCPtr);
98 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();