From ec2af1bcdae2fa376f8a096405acfc8bdaa3e799 Mon Sep 17 00:00:00 2001 From: Eunki Hong Date: Tue, 26 Sep 2023 01:22:41 +0900 Subject: [PATCH 1/1] [NUI] Implement defaut key construct Let we use default key creation API if we only need to use empty key handle. Signed-off-by: Eunki Hong --- src/Tizen.NUI/src/internal/Interop/Interop.Key.cs | 3 +++ src/Tizen.NUI/src/public/Input/Key.cs | 2 +- src/Tizen.NUI/src/public/Window/Window.cs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Key.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Key.cs index fdce0aa..18a7e6a 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Key.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Key.cs @@ -33,6 +33,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Key_New")] public static extern global::System.IntPtr New(string jarg1, string jarg2, int jarg3, int jarg4, uint jarg5, int jarg6); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Key_New__SWIG_1")] + public static extern global::System.IntPtr New(); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Key")] public static extern void DeleteKey(global::System.Runtime.InteropServices.HandleRef jarg1); diff --git a/src/Tizen.NUI/src/public/Input/Key.cs b/src/Tizen.NUI/src/public/Input/Key.cs index c17c299..2ce31b9 100755 --- a/src/Tizen.NUI/src/public/Input/Key.cs +++ b/src/Tizen.NUI/src/public/Input/Key.cs @@ -30,7 +30,7 @@ namespace Tizen.NUI /// The default constructor. /// /// 3 - public Key() : this(Interop.Key.New("", "", 0, 0, 0u, 0), true) + public Key() : this(Interop.Key.New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/public/Window/Window.cs b/src/Tizen.NUI/src/public/Window/Window.cs index c35c464..e9e2081 100755 --- a/src/Tizen.NUI/src/public/Window/Window.cs +++ b/src/Tizen.NUI/src/public/Window/Window.cs @@ -2119,7 +2119,7 @@ namespace Tizen.NUI if (internalLastKeyEvent == null || !internalLastKeyEvent.HasBody()) { // Create empty event handle without register. - internalLastKeyEvent = new Key(Interop.Key.New("", "", 0, 0, 0u, 0), false); + internalLastKeyEvent = new Key(Interop.Key.New(), false); } Interop.Window.InternalRetrievingLastKeyEvent(SwigCPtr, internalLastKeyEvent.SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); -- 2.7.4