[NUI] Supports key event of repeat and delay of each way.
authorWonsik Jung <sidein@samsung.com>
Mon, 21 Aug 2023 20:40:54 +0000 (05:40 +0900)
committerSeoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com>
Tue, 22 Aug 2023 06:52:05 +0000 (15:52 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.Window.cs
src/Tizen.NUI/src/public/Window/Window.cs

index e6a0384..637205c 100755 (executable)
@@ -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);
 
index 6afb8c6..2cd8307 100755 (executable)
@@ -1120,6 +1120,62 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Sets the keyboard repeat information of horizontal way.
+        /// </summary>
+        /// <param name="rate">The key repeat rate value in seconds.</param>
+        /// <param name="delay">The key repeat delay value in seconds.</param>
+        /// <returns>True if setting the keyboard repeat succeeds.</returns>
+        [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;
+        }
+
+        /// <summary>
+        /// Gets the keyboard repeat information of horizontal way.
+        /// </summary>
+        /// <param name="rate">The key repeat rate value in seconds.</param>
+        /// <param name="delay">The key repeat delay value in seconds.</param>
+        /// <returns>True if setting the keyboard repeat succeeds.</returns>
+        [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;
+        }
+
+        /// <summary>
+        /// Sets the keyboard repeat information of vertical way.
+        /// </summary>
+        /// <param name="rate">The key repeat rate value in seconds.</param>
+        /// <param name="delay">The key repeat delay value in seconds.</param>
+        /// <returns>True if setting the keyboard repeat succeeds.</returns>
+        [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;
+        }
+
+        /// <summary>
+        /// Gets the keyboard repeat information of vertical way.
+        /// </summary>
+        /// <param name="rate">The key repeat rate value in seconds.</param>
+        /// <param name="delay">The key repeat delay value in seconds.</param>
+        /// <returns>True if setting the keyboard repeat succeeds.</returns>
+        [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;
+        }
+
+        /// <summary>
         /// Adds a layer to the stage.
         /// </summary>
         /// <param name="layer">Layer to add.</param>