From: huayong.xu Date: Thu, 12 Nov 2020 06:12:01 +0000 (+0800) Subject: Set focus for web engine. X-Git-Tag: dali_2.0.8~6^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=2752db422653b6b949bd7ccf0cb1c5d12325defe Set focus for web engine. When focus of web engine is gained, focus is transfered to web engine plugin. Change-Id: I945b93ae802b6aca5f8fc3e1995a5af27023bdfc --- 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();