From 3684be4af14ced861a28e5a8f13db76c3ea20063 Mon Sep 17 00:00:00 2001 From: Jiyun Yang Date: Mon, 12 Jul 2021 13:42:48 +0900 Subject: [PATCH] [NUI] Add WebView.SetTtsFocus API (#3295) Signed-off-by: Jiyun Yang --- src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs | 3 +++ src/Tizen.NUI/src/internal/WebView.cs | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs b/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs index e9a28e9..efb06bc 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs @@ -111,6 +111,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_ClearHistory")] public static extern void WebView_ClearHistory(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_SetTtsFocus")] + public static extern void SetTtsFocus(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_SWIGUpcast")] public static extern global::System.IntPtr WebView_SWIGUpcast(global::System.IntPtr jarg1); diff --git a/src/Tizen.NUI/src/internal/WebView.cs b/src/Tizen.NUI/src/internal/WebView.cs index c94156f..116334f 100755 --- a/src/Tizen.NUI/src/internal/WebView.cs +++ b/src/Tizen.NUI/src/internal/WebView.cs @@ -859,5 +859,17 @@ namespace Tizen.NUI { CookieManager.ClearCookies(); } + + /// + /// Sets the tts focus to the webview. + /// Please note that it only works when the webview does not have keyinput focus. + /// If the webview has a keyinput focus, it also has tts focus so calling SetTtsFocus(false) is ignored. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetTtsFocus(bool focused) + { + Interop.WebView.SetTtsFocus(SwigCPtr, focused); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } } } -- 2.7.4