From 621aff47dcbc632a67f1bbb4c437cbd85b79cd49 Mon Sep 17 00:00:00 2001 From: Eunki Hong Date: Wed, 2 Nov 2022 17:16:42 +0900 Subject: [PATCH] [NUI] Change WindowPosition from IntPair to Int32Pair (#4702) Signed-off-by: Eunki, Hong Signed-off-by: Eunki, Hong Co-authored-by: Eunki, Hong --- .../WindowIntPair.cs => Common/Int32Pair.cs} | 18 +++++++++--------- ...terop.WindowIntPair.cs => Interop.Int32Pair.cs} | 22 +++++++++++----------- src/Tizen.NUI/src/public/Window/Window.cs | 6 +++--- 3 files changed, 23 insertions(+), 23 deletions(-) rename src/Tizen.NUI/src/internal/{Window/WindowIntPair.cs => Common/Int32Pair.cs} (83%) rename src/Tizen.NUI/src/internal/Interop/{Interop.WindowIntPair.cs => Interop.Int32Pair.cs} (67%) diff --git a/src/Tizen.NUI/src/internal/Window/WindowIntPair.cs b/src/Tizen.NUI/src/internal/Common/Int32Pair.cs similarity index 83% rename from src/Tizen.NUI/src/internal/Window/WindowIntPair.cs rename to src/Tizen.NUI/src/internal/Common/Int32Pair.cs index 74dcd02..04d5ede 100644 --- a/src/Tizen.NUI/src/internal/Window/WindowIntPair.cs +++ b/src/Tizen.NUI/src/internal/Common/Int32Pair.cs @@ -24,21 +24,21 @@ namespace Tizen.NUI /// Simple class for window position pairs of integers. /// Use this for integer position with window coordinates. /// - 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); } /// /// Default constructor for the(0, 0) tuple. /// - 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 /// /// The X dimension of the tuple. /// The Y dimension of the tuple. - 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 /// The x dimension to be stored in this 2-tuple. 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 /// 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 /// The y dimension to be stored in this 2-tuple. 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 /// 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; } diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.WindowIntPair.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Int32Pair.cs similarity index 67% rename from src/Tizen.NUI/src/internal/Interop/Interop.WindowIntPair.cs rename to src/Tizen.NUI/src/internal/Interop/Interop.Int32Pair.cs index 2937a58..7da4cb0 100644 --- a/src/Tizen.NUI/src/internal/Interop/Interop.WindowIntPair.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Int32Pair.cs @@ -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); } } } diff --git a/src/Tizen.NUI/src/public/Window/Window.cs b/src/Tizen.NUI/src/public/Window/Window.cs index da1f001..c39da9b 100755 --- a/src/Tizen.NUI/src/public/Window/Window.cs +++ b/src/Tizen.NUI/src/public/Window/Window.cs @@ -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(); -- 2.7.4