From 111e585788abf529d768e6de92220d35eb7c0ada Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Tue, 22 Aug 2023 05:40:54 +0900 Subject: [PATCH] [NUI] Supports key event of repeat and delay of each way. --- .../src/internal/Interop/Interop.Window.cs | 16 +++++++ src/Tizen.NUI/src/public/Window/Window.cs | 56 ++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs index e6a0384..637205c 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs @@ -255,6 +255,22 @@ namespace Tizen.NUI [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] public static extern bool GetKeyboardRepeatInfo(out float rate, out float delay); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Keyboard_Set_Horizental_RepeatInfo")] + [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] + public static extern bool SetKeyboardHorizentalRepeatInfo(float rate, float delay); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Keyboard_Get_Horizental_RepeatInfo")] + [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] + public static extern bool GetKeyboardHorizentalRepeatInfo(out float rate, out float delay); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Keyboard_Set_Vertical_RepeatInfo")] + [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] + public static extern bool SetKeyboardVerticalRepeatInfo(float rate, float delay); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Keyboard_Get_Vertical_RepeatInfo")] + [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] + public static extern bool GetKeyboardVerticalRepeatInfo(out float rate, out float delay); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GetNativeWindowHandler")] public static extern System.IntPtr GetNativeWindowHandler(System.IntPtr Window); diff --git a/src/Tizen.NUI/src/public/Window/Window.cs b/src/Tizen.NUI/src/public/Window/Window.cs index 6afb8c6..2cd8307 100755 --- a/src/Tizen.NUI/src/public/Window/Window.cs +++ b/src/Tizen.NUI/src/public/Window/Window.cs @@ -1120,6 +1120,62 @@ namespace Tizen.NUI } /// + /// Sets the keyboard repeat information of horizontal way. + /// + /// The key repeat rate value in seconds. + /// The key repeat delay value in seconds. + /// True if setting the keyboard repeat succeeds. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool SetKeyboardHorizentalRepeatInfo(float rate, float delay) + { + bool ret = Interop.Window.SetKeyboardHorizentalRepeatInfo(rate, delay); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets the keyboard repeat information of horizontal way. + /// + /// The key repeat rate value in seconds. + /// The key repeat delay value in seconds. + /// True if setting the keyboard repeat succeeds. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool GetKeyboardHorizentalRepeatInfo(out float rate, out float delay) + { + bool ret = Interop.Window.GetKeyboardHorizentalRepeatInfo(out rate, out delay); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets the keyboard repeat information of vertical way. + /// + /// The key repeat rate value in seconds. + /// The key repeat delay value in seconds. + /// True if setting the keyboard repeat succeeds. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool SetKeyboardVerticalRepeatInfo(float rate, float delay) + { + bool ret = Interop.Window.SetKeyboardVerticalRepeatInfo(rate, delay); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets the keyboard repeat information of vertical way. + /// + /// The key repeat rate value in seconds. + /// The key repeat delay value in seconds. + /// True if setting the keyboard repeat succeeds. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool GetKeyboardVerticalRepeatInfo(out float rate, out float delay) + { + bool ret = Interop.Window.GetKeyboardVerticalRepeatInfo(out rate, out delay); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// /// Adds a layer to the stage. /// /// Layer to add. -- 2.7.4