[NUI] Implement defaut key construct
authorEunki Hong <eunkiki.hong@samsung.com>
Mon, 25 Sep 2023 16:22:41 +0000 (01:22 +0900)
committerJay Cho <chojoong@gmail.com>
Fri, 27 Oct 2023 02:32:15 +0000 (11:32 +0900)
Let we use default key creation API if we only need to use
empty key handle.

Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.Key.cs
src/Tizen.NUI/src/public/Input/Key.cs
src/Tizen.NUI/src/public/Window/Window.cs

index fdce0aa..18a7e6a 100755 (executable)
@@ -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);
 
index c17c299..2ce31b9 100755 (executable)
@@ -30,7 +30,7 @@ namespace Tizen.NUI
         /// The default constructor.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        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();
         }
index c35c464..e9e2081 100755 (executable)
@@ -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();