From: Jiyun Yang Date: Thu, 15 Jul 2021 07:54:31 +0000 (+0900) Subject: [NUI] Add WebView.SetTtsFocus(bool) method (#3310) X-Git-Tag: accepted/tizen/unified/20231205.024657~1681 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20206802d6a918d7c859a608e37be60b2bf384ef;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add WebView.SetTtsFocus(bool) method (#3310) This API sets/unsets the tts focus to the webview. 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 26ecbe3..9fdbd50 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs @@ -250,6 +250,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_SWIGUpcast")] public static extern global::System.IntPtr Upcast(global::System.IntPtr 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_new_WebViewPageLoadSignal_PageLoadStarted")] public static extern global::System.IntPtr NewWebViewPageLoadSignalPageLoadStarted(global::System.Runtime.InteropServices.HandleRef jarg1); diff --git a/src/Tizen.NUI/src/internal/WebView/WebView.cs b/src/Tizen.NUI/src/internal/WebView/WebView.cs index 35fc19e..52bafc4 100755 --- a/src/Tizen.NUI/src/internal/WebView/WebView.cs +++ b/src/Tizen.NUI/src/internal/WebView/WebView.cs @@ -2029,6 +2029,18 @@ namespace Tizen.NUI.BaseComponents 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(); + } + internal static WebView DownCast(BaseHandle handle) { WebView ret = new WebView(Interop.WebView.DownCast(BaseHandle.getCPtr(handle)), true);