From: Jiyun Yang Date: Mon, 12 Jul 2021 04:42:48 +0000 (+0900) Subject: [NUI] Add WebView.SetTtsFocus API (#3295) X-Git-Tag: submit/tizen_6.0/20210712.151737~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3684be4af14ced861a28e5a8f13db76c3ea20063;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add WebView.SetTtsFocus API (#3295) Signed-off-by: Jiyun Yang --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs b/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs index e9a28e95d..efb06bc8b 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 c94156fff..116334fa4 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(); + } } }