/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
END_TEST;
}
+int UtcDaliWebViewMethodsForCoverage(void)
+{
+ ToolkitTestApplication application;
+
+ WebView view = WebView::New( "ko-KR", "Asia/Seoul" );
+ view.SetTtsFocus(true);
+
+ DALI_TEST_CHECK( view );
+
+ END_TEST;
+}
+
int UtcDaliWebViewScrollBy(void)
{
ToolkitTestApplication application;
Dali::Toolkit::GetImpl(*this).ClearHistory();
}
+void WebView::SetTtsFocus(bool focused)
+{
+ Dali::Toolkit::GetImpl(*this).SetTtsFocus(focused);
+}
+
WebView::WebViewPageLoadSignalType& WebView::PageLoadStartedSignal()
{
return Dali::Toolkit::GetImpl(*this).PageLoadStartedSignal();
void ClearHistory();
/**
+ * @brief Set or unset TTS focus of the webview.
+ * @param[in] focused True if it is gained, false lost.
+ * @return true if succeeded, false otherwise.
+ * @note It only works when the webview does not have keyinput focus. If it has keyinput focus, the TTS focus is set automatically.
+ */
+ void SetTtsFocus(bool focused);
+
+ /**
* @brief Connects to this signal to be notified when page loading is started.
*
* @return A signal object to connect with
}
}
+void WebView::SetTtsFocus(bool focused)
+{
+ if(mWebEngine && !HasKeyInputFocus())
+ {
+ mWebEngine.SetFocus(focused);
+ }
+}
+
void WebView::UpdateDisplayArea( Dali::PropertyNotification& /*source*/ )
{
if( !mWebEngine )
void ClearHistory();
/**
+ * @copydoc Dali::Toolkit::WebView::SetTtsFocus()
+ */
+ void SetTtsFocus(bool focused);
+
+ /**
* @copydoc Dali::Toolkit::WebView::PageLoadStartedSignal()
*/
Dali::Toolkit::WebView::WebViewPageLoadSignalType& PageLoadStartedSignal();