From: Joogab Yun Date: Mon, 19 Jul 2021 01:22:47 +0000 (+0900) Subject: [NUI] Add EnableDefaultAlgorithm and IsDefaultAlgorithmEnabled X-Git-Tag: accepted/tizen/unified/20231205.024657~1667 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e1f173b24270bf454b808c6026dfce3aca604fc;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add EnableDefaultAlgorithm and IsDefaultAlgorithmEnabled --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.FocusManager.cs b/src/Tizen.NUI/src/internal/Interop/Interop.FocusManager.cs index a0e9f73..ec9c4ab 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.FocusManager.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.FocusManager.cs @@ -82,6 +82,13 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_KeyboardFocusManager_FocusedActorEnterKeySignal")] public static extern global::System.IntPtr FocusedActorEnterKeySignal(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_KeyboardFocusManager_EnableDefaultAlgorithm")] + public static extern void EnableDefaultAlgorithm(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_KeyboardFocusManager_IsDefaultAlgorithmEnabled")] + [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] + public static extern bool IsDefaultAlgorithmEnabled(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_KeyboardFocusManager_SWIGUpcast")] public static extern global::System.IntPtr Upcast(global::System.IntPtr jarg1); } diff --git a/src/Tizen.NUI/src/public/Input/FocusManager.cs b/src/Tizen.NUI/src/public/Input/FocusManager.cs index cfd59ec..016b311 100755 --- a/src/Tizen.NUI/src/public/Input/FocusManager.cs +++ b/src/Tizen.NUI/src/public/Input/FocusManager.cs @@ -410,6 +410,30 @@ namespace Tizen.NUI } } + /// + /// Sets to use the automatic focus moveing algorithm.
+ /// It moves the focus to the view closest to the keyboard movement direction. + ///
+ /// Whether using default focus algorithm or not + [EditorBrowsable(EditorBrowsableState.Never)] + public void EnableDefaultAlgorithm(bool enable) + { + Interop.FocusManager.EnableDefaultAlgorithm(SwigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Checks default focus moveing algorithm is enabled or not + /// + /// Whether default focus algorithm is enabled + [EditorBrowsable(EditorBrowsableState.Never)] + public bool IsDefaultAlgorithmEnabled() + { + bool ret = Interop.FocusManager.IsDefaultAlgorithmEnabled(SwigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + internal static FocusManager Get() { FocusManager ret = new FocusManager(Interop.FocusManager.Get(), true);