From 06420ad253d1338ec54947f589c81e6cffcd76ff Mon Sep 17 00:00:00 2001 From: "huayong.xu" Date: Mon, 9 Nov 2020 18:06:59 +0800 Subject: [PATCH] Update position & size of web engine. Originally position of web engine is not updated when position of web view is changed. This patch is to update position & size of web engine. Change-Id: I7ec0a70a12a4ce19c3d4ddec54f127415f13c40e --- dali/devel-api/adaptor-framework/web-engine-plugin.h | 13 +++++++++++++ dali/devel-api/adaptor-framework/web-engine.cpp | 10 ++++++++++ dali/devel-api/adaptor-framework/web-engine.h | 13 +++++++++++++ dali/internal/web-engine/common/web-engine-impl.cpp | 10 ++++++++++ dali/internal/web-engine/common/web-engine-impl.h | 10 ++++++++++ 5 files changed, 56 insertions(+) diff --git a/dali/devel-api/adaptor-framework/web-engine-plugin.h b/dali/devel-api/adaptor-framework/web-engine-plugin.h index 118446d..f74c41a 100755 --- a/dali/devel-api/adaptor-framework/web-engine-plugin.h +++ b/dali/devel-api/adaptor-framework/web-engine-plugin.h @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include #include #include @@ -294,6 +295,18 @@ public: virtual void SetFocus( bool focused ) = 0; /** + * @brief Update display area. + * @param[in] displayArea The display area need be updated. + */ + virtual void UpdateDisplayArea( Dali::Rect< int > displayArea ) = 0; + + /** + * @brief Enable video hole. + * @param[in] enabled True if enabled, false othewise. + */ + virtual void EnableVideoHole( bool enabled ) = 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 index e454f0d..17318de 100755 --- a/dali/devel-api/adaptor-framework/web-engine.cpp +++ b/dali/devel-api/adaptor-framework/web-engine.cpp @@ -249,6 +249,16 @@ void WebEngine::SetFocus( bool focused ) GetImplementation( *this ).SetFocus( focused ); } +void WebEngine::UpdateDisplayArea( Dali::Rect< int > displayArea ) +{ + GetImplementation( *this ).UpdateDisplayArea( displayArea ); +} + +void WebEngine::EnableVideoHole( bool enabled ) +{ + GetImplementation( *this ).EnableVideoHole( enabled ); +} + 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 040a521..102ea8c 100755 --- a/dali/devel-api/adaptor-framework/web-engine.h +++ b/dali/devel-api/adaptor-framework/web-engine.h @@ -295,10 +295,23 @@ public: /** * @brief Set focus. + * @param[in] focused True if web view is focused, false otherwise */ void SetFocus( bool focused ); /** + * @brief Update display area. + * @param[in] displayArea The area to display web page. + */ + void UpdateDisplayArea( Dali::Rect< int > displayArea ); + + /** + * @brief Enable video hole. + * @param[in] enabled True if video hole is enabled, false otherwise + */ + void EnableVideoHole( bool enabled ); + + /** * @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 0a6ecf0..c9df245 100755 --- a/dali/internal/web-engine/common/web-engine-impl.cpp +++ b/dali/internal/web-engine/common/web-engine-impl.cpp @@ -348,6 +348,16 @@ void WebEngine::SetFocus( bool focused ) mPlugin->SetFocus( focused ); } +void WebEngine::UpdateDisplayArea( Dali::Rect< int > displayArea ) +{ + mPlugin->UpdateDisplayArea( displayArea ); +} + +void WebEngine::EnableVideoHole( bool enabled ) +{ + mPlugin->EnableVideoHole( enabled ); +} + Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal() { return mPlugin->PageLoadStartedSignal(); diff --git a/dali/internal/web-engine/common/web-engine-impl.h b/dali/internal/web-engine/common/web-engine-impl.h index dea65ba..c4bac08 100755 --- a/dali/internal/web-engine/common/web-engine-impl.h +++ b/dali/internal/web-engine/common/web-engine-impl.h @@ -239,6 +239,16 @@ public: void SetFocus( bool focused ); /** + * @copydoc Dali::WebEngine::UpdateDisplayArea() + */ + void UpdateDisplayArea( Dali::Rect< int > displayArea ); + + /** + * @copydoc Dali::WebEngine::EnableVideoHole() + */ + void EnableVideoHole( bool enabled ); + + /** * @copydoc Dali::WebEngine::PageLoadStartedSignal() */ Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadStartedSignal(); -- 2.7.4