[NUI] Change WindowPosition from IntPair to Int32Pair (#4702)
authorEunki Hong <h.pichulia@gmail.com>
Wed, 2 Nov 2022 08:16:42 +0000 (17:16 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 2 Nov 2022 09:06:47 +0000 (18:06 +0900)
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Co-authored-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/internal/Common/Int32Pair.cs [moved from src/Tizen.NUI/src/internal/Window/WindowIntPair.cs with 83% similarity]
src/Tizen.NUI/src/internal/Interop/Interop.Int32Pair.cs [moved from src/Tizen.NUI/src/internal/Interop/Interop.WindowIntPair.cs with 67% similarity]
src/Tizen.NUI/src/public/Window/Window.cs

@@ -24,21 +24,21 @@ namespace Tizen.NUI
     /// Simple class for window position pairs of  integers.
     /// Use this for integer position with window coordinates.
     /// </summary>
-    internal class IntPair : Disposable
+    internal class Int32Pair : Disposable
     {
-        internal IntPair(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+        internal Int32Pair(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
         {
         }
 
         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
         {
-            Interop.IntPair.DeleteIntPair(swigCPtr);
+            Interop.Int32Pair.DeleteInt32Pair(swigCPtr);
         }
 
         /// <summary>
         /// Default constructor for the(0, 0) tuple.
         /// </summary>
-        public IntPair() : this(Interop.IntPair.NewIntPair(), true)
+        public Int32Pair() : this(Interop.Int32Pair.NewInt32Pair(), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
@@ -48,7 +48,7 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="x">The X dimension of the tuple.</param>
         /// <param name="y">The Y dimension of the tuple.</param>
-        public IntPair(int x, int y) : this(Interop.IntPair.NewIntPair(x, y), true)
+        public Int32Pair(int x, int y) : this(Interop.Int32Pair.NewInt32Pair(x, y), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
@@ -59,7 +59,7 @@ namespace Tizen.NUI
         /// <param name="x">The x dimension to be stored in this 2-tuple.</param>
         public void SetX(int x)
         {
-            Interop.IntPair.SetX(SwigCPtr, x);
+            Interop.Int32Pair.SetX(SwigCPtr, x);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -71,7 +71,7 @@ namespace Tizen.NUI
         /// </return>
         public int GetX()
         {
-            int ret = Interop.IntPair.GetX(SwigCPtr);
+            int ret = Interop.Int32Pair.GetX(SwigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -82,7 +82,7 @@ namespace Tizen.NUI
         /// <param name="y">The y dimension to be stored in this 2-tuple.</param>
         public void SetY(int y)
         {
-            Interop.IntPair.SetY(SwigCPtr, y);
+            Interop.Int32Pair.SetY(SwigCPtr, y);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -94,7 +94,7 @@ namespace Tizen.NUI
         /// </return>
         public int GetY()
         {
-            int ret = Interop.IntPair.GetY(SwigCPtr);
+            int ret = Interop.Int32Pair.GetY(SwigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -18,28 +18,28 @@ namespace Tizen.NUI
 {
     internal static partial class Interop
     {
-         internal static partial class IntPair
+         internal static partial class Int32Pair
         {
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_IntPair__SWIG_0")]
-            public static extern global::System.IntPtr NewIntPair();
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Int32Pair__SWIG_0")]
+            public static extern global::System.IntPtr NewInt32Pair();
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_IntPair__SWIG_1")]
-            public static extern global::System.IntPtr NewIntPair(int x, int y);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Int32Pair__SWIG_1")]
+            public static extern global::System.IntPtr NewInt32Pair(int x, int y);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_IntPair_SetX")]
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Int32Pair_SetX")]
             public static extern void SetX(global::System.Runtime.InteropServices.HandleRef handle, int x);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_IntPair_GetX")]
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Int32Pair_GetX")]
             public static extern int GetX(global::System.Runtime.InteropServices.HandleRef handle);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_IntPair_SetY")]
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Int32Pair_SetY")]
             public static extern void SetY(global::System.Runtime.InteropServices.HandleRef handle, int y);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_IntPair_GetY")]
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Int32Pair_GetY")]
             public static extern int GetY(global::System.Runtime.InteropServices.HandleRef handle);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_IntPair")]
-            public static extern void DeleteIntPair(global::System.Runtime.InteropServices.HandleRef handle);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Int32Pair")]
+            public static extern void DeleteInt32Pair(global::System.Runtime.InteropServices.HandleRef handle);
        }
     }
 }
index da1f001..c39da9b 100755 (executable)
@@ -1525,8 +1525,8 @@ namespace Tizen.NUI
             {
                 throw new ArgumentNullException(nameof(position));
             }
-            var val = new IntPair(position.X, position.Y);
-            Interop.Window.SetPosition(SwigCPtr, IntPair.getCPtr(val));
+            var val = new Int32Pair(position.X, position.Y);
+            Interop.Window.SetPosition(SwigCPtr, Int32Pair.getCPtr(val));
             val.Dispose();
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             // Setting Position of the window should request a relayout of the tree.
@@ -1534,7 +1534,7 @@ namespace Tizen.NUI
 
         internal Position2D GetPosition()
         {
-            var val = new IntPair(Interop.Window.GetPosition(SwigCPtr), true);
+            var val = new Int32Pair(Interop.Window.GetPosition(SwigCPtr), true);
             Position2D ret = new Position2D((int)val.GetX(), (int)val.GetY());
             val.Dispose();
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();