From 4275dceb896ff3afce1ccb0a2f1aca6f1c40f493 Mon Sep 17 00:00:00 2001 From: "huayong.xu" Date: Thu, 12 Nov 2020 14:12:01 +0800 Subject: [PATCH] [Tizen] Set focus for web engine. When focus of web engine is gained, focus is transfered to web engine plugin. Change-Id: I945b93ae802b6aca5f8fc3e1995a5af27023bdfc --- dali/devel-api/adaptor-framework/web-engine-plugin.h | 5 +++++ dali/devel-api/adaptor-framework/web-engine.cpp | 5 +++++ dali/devel-api/adaptor-framework/web-engine.h | 5 +++++ dali/internal/web-engine/common/web-engine-impl.cpp | 6 ++++++ dali/internal/web-engine/common/web-engine-impl.h | 5 +++++ 5 files changed, 26 insertions(+) mode change 100644 => 100755 dali/devel-api/adaptor-framework/web-engine.cpp mode change 100644 => 100755 dali/internal/web-engine/common/web-engine-impl.h diff --git a/dali/devel-api/adaptor-framework/web-engine-plugin.h b/dali/devel-api/adaptor-framework/web-engine-plugin.h index 7b42614..5914637 100644 --- a/dali/devel-api/adaptor-framework/web-engine-plugin.h +++ b/dali/devel-api/adaptor-framework/web-engine-plugin.h @@ -331,6 +331,11 @@ public: virtual bool SendKeyEvent(const KeyEvent& event) = 0; /** + * @brief Sets focus. + */ + virtual void SetFocus( bool focused ) = 0; + + /** * @brief Connects to this signal to be notified when page loading is started. * * @return A signal object to connect with. diff --git a/dali/devel-api/adaptor-framework/web-engine.cpp b/dali/devel-api/adaptor-framework/web-engine.cpp old mode 100644 new mode 100755 index f1a7420..69c2b79 --- a/dali/devel-api/adaptor-framework/web-engine.cpp +++ b/dali/devel-api/adaptor-framework/web-engine.cpp @@ -242,6 +242,11 @@ bool WebEngine::SendKeyEvent(const KeyEvent& event) return GetImplementation(*this).SendKeyEvent(event); } +void WebEngine::SetFocus( bool focused ) +{ + GetImplementation( *this ).SetFocus( focused ); +} + Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal() { return GetImplementation(*this).PageLoadStartedSignal(); diff --git a/dali/devel-api/adaptor-framework/web-engine.h b/dali/devel-api/adaptor-framework/web-engine.h index dc72683..f3622ab 100644 --- a/dali/devel-api/adaptor-framework/web-engine.h +++ b/dali/devel-api/adaptor-framework/web-engine.h @@ -314,6 +314,11 @@ public: bool SendKeyEvent(const KeyEvent& event); /** + * @brief Set focus. + */ + void SetFocus( bool focused ); + + /** * @brief Connects to this signal to be notified when page loading is started. * * @return A signal object to connect with. diff --git a/dali/internal/web-engine/common/web-engine-impl.cpp b/dali/internal/web-engine/common/web-engine-impl.cpp index c058c63..8e2d55d 100644 --- a/dali/internal/web-engine/common/web-engine-impl.cpp +++ b/dali/internal/web-engine/common/web-engine-impl.cpp @@ -343,6 +343,11 @@ bool WebEngine::SendKeyEvent( const Dali::KeyEvent& event ) return mPlugin->SendKeyEvent( event ); } +void WebEngine::SetFocus( bool focused ) +{ + mPlugin->SetFocus( focused ); +} + Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal() { return mPlugin->PageLoadStartedSignal(); @@ -362,3 +367,4 @@ Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& WebEngine::PageLoadErro } // namespace Internal; } // namespace Dali; + diff --git a/dali/internal/web-engine/common/web-engine-impl.h b/dali/internal/web-engine/common/web-engine-impl.h old mode 100644 new mode 100755 index 19d93f3..a9a9928 --- a/dali/internal/web-engine/common/web-engine-impl.h +++ b/dali/internal/web-engine/common/web-engine-impl.h @@ -233,6 +233,11 @@ public: bool SendKeyEvent( const Dali::KeyEvent& event ); /** + * @copydoc Dali::WebEngine::SetFocus() + */ + void SetFocus( bool focused ); + + /** * @copydoc Dali::WebEngine::PageLoadStartedSignal() */ Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadStartedSignal(); -- 2.7.4