From 09051335896c1bd61f8dcec277e06f275f99e817 Mon Sep 17 00:00:00 2001 From: Seoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com> Date: Tue, 12 Jun 2018 16:54:36 +0900 Subject: [PATCH] [NUI] Add KeyboardRepeatInfo APIs to Window (#274) * [NUI] Add KeyboardRepeatInfo APIs to Window - Added Set / Get KeyboardRepeatInfo to Window class Signed-off-by: Seoyeon Kim * Fixed Typo error - Fixed typo : infomation -> information - Added the unit of the parameter description * [NUI] Update NUI internal API version Signed-off-by: Seoyeon Kim --- packaging/version.txt | 2 +- src/Tizen.NUI/src/internal/ManualPINVOKE.cs | 6 ++++++ src/Tizen.NUI/src/internal/VersionCheck.cs | 5 +++-- src/Tizen.NUI/src/public/Window.cs | 30 +++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 3 deletions(-) mode change 100755 => 100644 src/Tizen.NUI/src/internal/ManualPINVOKE.cs mode change 100755 => 100644 src/Tizen.NUI/src/internal/VersionCheck.cs mode change 100755 => 100644 src/Tizen.NUI/src/public/Window.cs diff --git a/packaging/version.txt b/packaging/version.txt index 21b0bc7..1f947fb 100755 --- a/packaging/version.txt +++ b/packaging/version.txt @@ -7,4 +7,4 @@ NUGET_VERSION=4.0.1-preview1-99999 INTERNAL_NUGET_VERSION=4.0.1.999 # RPM Version Suffix -RPM_VERSION_SUFFIX=nui401 +RPM_VERSION_SUFFIX=nui402 diff --git a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs old mode 100755 new mode 100644 index f4bc28d..e97b61b --- a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs @@ -302,6 +302,12 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_UngrabKey")] public static extern bool UngrabKey(System.IntPtr Window, int DaliKey); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_SetKeyboardRepeatInfo")] + public static extern bool SetKeyboardRepeatInfo(double rate, double delay); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_GetKeyboardRepeatInfo")] + public static extern bool GetKeyboardRepeatInfo(out double rate, out double delay); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_GetNativeWindowHandler")] public static extern System.IntPtr GetNativeWindowHandler(System.IntPtr Window); diff --git a/src/Tizen.NUI/src/internal/VersionCheck.cs b/src/Tizen.NUI/src/internal/VersionCheck.cs old mode 100755 new mode 100644 index a6e157f..b5fc461 --- a/src/Tizen.NUI/src/internal/VersionCheck.cs +++ b/src/Tizen.NUI/src/internal/VersionCheck.cs @@ -24,8 +24,9 @@ namespace Tizen.NUI internal static class Version { //Lower than dali_1.2.85 : NUI internal API version 400 - //dali_1.2.86 : NUI internal API version 401 - public const int nuiAPIVer = 401; + //dali_1.2.86 ~ dali_1.2.89 : NUI internal API version 401 + //dali_1.2.90 : NUI internal API version 402 + public const int nuiAPIVer = 402; public const int reservedVer1 = 0; public const int reservedVer2 = 0; diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs old mode 100755 new mode 100644 index b3cfbad..ea292fd --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -861,6 +861,36 @@ namespace Tizen.NUI return ret; } + /// + /// Sets keyboard repeat information. + /// + /// The key repeat rate value in seconds + /// The key repeat delay value in seconds + /// True if setting the keyboard repeat succeeds. + /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool SetKeyboardRepeatInfo(double rate, double delay) + { + bool ret = NDalicManualPINVOKE.SetKeyboardRepeatInfo(rate, delay); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets keyboard repeat information. + /// + /// The key repeat rate value in seconds + /// The key repeat delay value in seconds + /// True if setting the keyboard repeat succeeds. + /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool GetKeyboardRepeatInfo(out double rate, out double delay) + { + bool ret = NDalicManualPINVOKE.GetKeyboardRepeatInfo(out rate, out delay); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + internal System.IntPtr GetNativeWindowHandler() { System.IntPtr ret = NDalicManualPINVOKE.GetNativeWindowHandler(HandleRef.ToIntPtr(this.swigCPtr)); -- 2.7.4