From: huayong.xu Date: Mon, 1 Mar 2021 10:14:42 +0000 (+0800) Subject: Add APIs for hit test in web engine. X-Git-Tag: dali_2.0.22~5^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=3013c2a3987055e65fa574438028cf8fdb0f5683 Add APIs for hit test in web engine. This patch is to add some APIs for hit test into web engine. Change-Id: Ie694a161d393bdcde03e9ecf7d65f34459239bd7 --- diff --git a/dali/devel-api/adaptor-framework/web-engine-hit-test.h b/dali/devel-api/adaptor-framework/web-engine-hit-test.h new file mode 100755 index 0000000..356fec8 --- /dev/null +++ b/dali/devel-api/adaptor-framework/web-engine-hit-test.h @@ -0,0 +1,163 @@ +#ifndef DALI_WEB_ENGINE_HIT_TEST_H +#define DALI_WEB_ENGINE_HIT_TEST_H + +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// EXTERNAL INCLUDES +#include +#include +#include +#include + +namespace Dali +{ +/** + * @brief A class WebEngineHitTest for hit test of web engine. + */ +class WebEngineHitTest +{ +public: + /** + * @brief Enumeration for mode of hit test. + */ + enum class HitTestMode + { + DEFAULT = 1 << 1, ///< link data. + NODE_DATA = 1 << 2, ///< extra node data(tag name, node value, attribute infomation, etc). + IMAGE_DATA = 1 << 3, ///< extra image data(image data, image data length, image file name exteionsion, etc). + ALL = DEFAULT | NODE_DATA | IMAGE_DATA, ///< all data. + }; + + /** + * @brief Enumeration for context of hit test result. + */ + enum class ResultContext + { + DOCUMENT = 1 << 1, ///< anywhere in the document. + LINK = 1 << 2, ///< a hyperlink element. + IMAGE = 1 << 3, ///< an image element. + MEDIA = 1 << 4, ///< a video or audio element. + SELECTION = 1 << 5, ///< the area is selected. + EDITABLE = 1 << 6, ///< the area is editable + TEXT = 1 << 7, ///< the area is text + }; + + /** + * @brief Constructor. + */ + WebEngineHitTest() = default; + + /** + * @brief Destructor. + */ + virtual ~WebEngineHitTest() = default; + + /** + * @brief Get the context of the hit test. + * + * @return a bitmask of the hit test context. + */ + virtual ResultContext GetResultContext() const = 0; + + /** + * @brief Get the link uri string of the hit test. + * + * @return the URI of the link element in the coordinates of the hit test + */ + virtual std::string GetLinkUri() const = 0; + + /** + * @brief Get the link title of the hit test. + * + * @return the title of the link element in the coordinates of the hit test + */ + virtual std::string GetLinkTitle() const = 0; + + /** + * @brief Get the link label of the hit test. + * + * @return the label of the link element in the coordinates of the hit test + */ + virtual std::string GetLinkLabel() const = 0; + + /** + * @brief Get the image uri of the hit test. + * + * @return the URI of the image element in the coordinates of the hit test + */ + virtual std::string GetImageUri() const = 0; + + /** + * @brief Get the media uri of the hit test. + * + * @return the URI of the media element in the coordinates of the hit test + */ + virtual std::string GetMediaUri() const = 0; + + /** + * @brief Get the tag name of hit element of the hit test. + * + * @return the tag name of the hit element in the coordinates of the hit test + */ + virtual std::string GetTagName() const = 0; + + /** + * @brief Get the node value of hit element of the hit test. + * + * @return the node value of the hit element in the coordinates of the hit test + */ + virtual std::string GetNodeValue() const = 0; + + /** + * @brief Get the attribute data of hit element of the hit test. + * + * @return the attribute data of the hit element in the coordinates of the hit test + */ + virtual Dali::Property::Map& GetAttributes() const = 0; + + /** + * @brief Get the image file name extension of hit element of the hit test. + * + * @return the image fiile name extension of the hit element in the coordinates of the hit test + */ + virtual std::string GetImageFileNameExtension() const = 0; + + /** + * @brief Get the image buffer of hit element of the hit test. + * + * @return the image buffer of the hit element in the coordinates of the hit test + */ + virtual Dali::PixelData GetImageBuffer() = 0; +}; + +// specialization has to be done in the same namespace +template<> +struct EnableBitMaskOperators +{ + static const bool ENABLE = true; +}; + +template<> +struct EnableBitMaskOperators +{ + static const bool ENABLE = true; +}; + +} // namespace Dali + +#endif // DALI_WEB_ENGINE_HIT_TEST_H diff --git a/dali/devel-api/adaptor-framework/web-engine-plugin.h b/dali/devel-api/adaptor-framework/web-engine-plugin.h index ad74323..ec8cde0 100755 --- a/dali/devel-api/adaptor-framework/web-engine-plugin.h +++ b/dali/devel-api/adaptor-framework/web-engine-plugin.h @@ -19,12 +19,15 @@ */ // EXTERNAL INCLUDES +#include +#include + +// INTERNAL INCLUDES +#include #include #include #include #include -#include -#include namespace Dali { @@ -39,6 +42,7 @@ class WebEngineContextMenu; class WebEngineContextMenuItem; class WebEngineCookieManager; class WebEngineFormRepostDecision; +class WebEngineHitTest; class WebEngineHttpAuthHandler; class WebEngineLoadError; class WebEnginePolicyDecision; @@ -160,6 +164,11 @@ public: using WebEnginePolicyDecisionSignalType = Signal)>; /** + * @brief Hit test callback called after hit test is created asynchronously. + */ + using WebEngineHitTestCreatedCallback = std::function)>; + + /** * @brief Enumeration for the scroll edge. */ enum class ScrollEdge @@ -204,7 +213,7 @@ public: * @param [in] locale The locale of Web * @param [in] timezoneId The timezoneID of Web */ - virtual void Create(int width, int height, const std::string& locale, const std::string& timezoneId) = 0; + virtual void Create(uint32_t width, uint32_t height, const std::string& locale, const std::string& timezoneId) = 0; /** * @brief Create WebEngine instance. @@ -214,7 +223,7 @@ public: * @param [in] argc The count of application arguments * @param [in] argv The string array of application arguments */ - virtual void Create(int width, int height, int argc, char** argv) = 0; + virtual void Create(uint32_t width, uint32_t height, uint32_t argc, char** argv) = 0; /** * @brief Destroy WebEngine instance. @@ -381,7 +390,7 @@ public: * @param[in] deltaX horizontal offset to scroll * @param[in] deltaY vertical offset to scroll */ - virtual void ScrollBy(int deltaX, int deltaY) = 0; + virtual void ScrollBy(int32_t deltaX, int32_t deltaY) = 0; /** * @brief Scroll edge of view by deltaX and deltaY. @@ -391,12 +400,12 @@ public: * * @return true if succeeded, false otherwise */ - virtual bool ScrollEdgeBy(int deltaX, int deltaY) = 0; + virtual bool ScrollEdgeBy(int32_t deltaX, int32_t deltaY) = 0; /** * @brief Scroll to the specified position of the given view. */ - virtual void SetScrollPosition(int x, int y) = 0; + virtual void SetScrollPosition(int32_t x, int32_t y) = 0; /** * @brief Get the current scroll position of the given view. @@ -490,6 +499,29 @@ public: virtual void JavaScriptPromptReply(const std::string& result) = 0; /** + * @brief Create a new hit test. + * + * @param[in] x the horizontal position to query + * @param[in] y the vertical position to query + * @param[in] mode the mode of hit test + * + * @return a new hit test object. + */ + virtual std::unique_ptr CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode) = 0; + + /** + * @brief create a hit test asynchronously. + * + * @param[in] x the horizontal position to query + * @param[in] y the vertical position to query + * @param[in] mode the mode of hit test + * @param[in] callback The callback function + * + * @return true if succeeded, false otherwise + */ + virtual bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, WebEngineHitTestCreatedCallback callback) = 0; + + /** * @brief Clear the history of Web. */ virtual void ClearHistory() = 0; @@ -516,7 +548,7 @@ public: /** * @brief Set size of Web Page. */ - virtual void SetSize(int width, int height) = 0; + virtual void SetSize(uint32_t width, uint32_t height) = 0; /** * @brief Set background color of web page. @@ -663,7 +695,7 @@ public: * * @return pixel data of screen shot */ - virtual Dali::PixelData GetScreenshot(Dali::Rect viewArea, float scaleFactor) = 0; + virtual Dali::PixelData GetScreenshot(Dali::Rect viewArea, float scaleFactor) = 0; /** * @brief Request to get snapshot of the specified viewArea of page asynchronously. @@ -674,7 +706,7 @@ public: * * @return true if requested successfully, false otherwise */ - virtual bool GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, ScreenshotCapturedCallback callback) = 0; + virtual bool GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, ScreenshotCapturedCallback callback) = 0; /** * @brief Asynchronously request to check if there is a video playing in the given view. @@ -696,7 +728,7 @@ public: * @brief Update display area. * @param[in] displayArea The display area need be updated. */ - virtual void UpdateDisplayArea(Dali::Rect displayArea) = 0; + virtual void UpdateDisplayArea(Dali::Rect displayArea) = 0; /** * @brief Enable video hole. diff --git a/dali/devel-api/adaptor-framework/web-engine.cpp b/dali/devel-api/adaptor-framework/web-engine.cpp index 243fb75..21806f7 100644 --- a/dali/devel-api/adaptor-framework/web-engine.cpp +++ b/dali/devel-api/adaptor-framework/web-engine.cpp @@ -77,12 +77,12 @@ WebEngine WebEngine::DownCast(BaseHandle handle) return WebEngine(dynamic_cast(handle.GetObjectPtr())); } -void WebEngine::Create(int width, int height, const std::string& locale, const std::string& timezoneId) +void WebEngine::Create(uint32_t width, uint32_t height, const std::string& locale, const std::string& timezoneId) { GetImplementation(*this).Create(width, height, locale, timezoneId); } -void WebEngine::Create(int width, int height, int argc, char** argv) +void WebEngine::Create(uint32_t width, uint32_t height, uint32_t argc, char** argv) { GetImplementation(*this).Create(width, height, argc, argv); } @@ -207,17 +207,17 @@ bool WebEngine::StopInspectorServer() return GetImplementation(*this).StopInspectorServer(); } -void WebEngine::ScrollBy(int deltaX, int deltaY) +void WebEngine::ScrollBy(int32_t deltaX, int32_t deltaY) { GetImplementation(*this).ScrollBy(deltaX, deltaY); } -bool WebEngine::ScrollEdgeBy(int deltaX, int deltaY) +bool WebEngine::ScrollEdgeBy(int32_t deltaX, int32_t deltaY) { return GetImplementation(*this).ScrollEdgeBy(deltaX, deltaY); } -void WebEngine::SetScrollPosition(int x, int y) +void WebEngine::SetScrollPosition(int32_t x, int32_t y) { GetImplementation(*this).SetScrollPosition(x, y); } @@ -297,6 +297,16 @@ void WebEngine::JavaScriptPromptReply(const std::string& result) GetImplementation(*this).JavaScriptPromptReply(result); } +std::unique_ptr WebEngine::CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode) +{ + return GetImplementation(*this).CreateHitTest(x, y, mode); +} + +bool WebEngine::CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback) +{ + return GetImplementation(*this).CreateHitTestAsynchronously(x, y, mode, callback); +} + void WebEngine::ClearHistory() { GetImplementation(*this).ClearHistory(); @@ -317,7 +327,7 @@ void WebEngine::SetUserAgent(const std::string& userAgent) GetImplementation(*this).SetUserAgent(userAgent); } -void WebEngine::SetSize(int width, int height) +void WebEngine::SetSize(uint32_t width, uint32_t height) { GetImplementation(*this).SetSize(width, height); } @@ -427,12 +437,12 @@ void WebEngine::AddDynamicCertificatePath(const std::string& host, const std::st GetImplementation(*this).AddDynamicCertificatePath(host, certPath); } -Dali::PixelData WebEngine::GetScreenshot(Dali::Rect viewArea, float scaleFactor) +Dali::PixelData WebEngine::GetScreenshot(Dali::Rect viewArea, float scaleFactor) { return GetImplementation(*this).GetScreenshot(viewArea, scaleFactor); } -bool WebEngine::GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback) +bool WebEngine::GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback) { return GetImplementation(*this).GetScreenshotAsynchronously(viewArea, scaleFactor, callback); } @@ -447,7 +457,7 @@ void WebEngine::RegisterGeolocationPermissionCallback(Dali::WebEnginePlugin::Geo GetImplementation(*this).RegisterGeolocationPermissionCallback(callback); } -void WebEngine::UpdateDisplayArea(Dali::Rect displayArea) +void WebEngine::UpdateDisplayArea(Dali::Rect displayArea) { GetImplementation(*this).UpdateDisplayArea(displayArea); } diff --git a/dali/devel-api/adaptor-framework/web-engine.h b/dali/devel-api/adaptor-framework/web-engine.h index fee7cfc..f461e46 100644 --- a/dali/devel-api/adaptor-framework/web-engine.h +++ b/dali/devel-api/adaptor-framework/web-engine.h @@ -56,7 +56,7 @@ public: ~WebEngine(); /** - * @brief Creates a new instance of a WebEngine. + * @brief Create a new instance of a WebEngine. */ static WebEngine New(); @@ -94,7 +94,7 @@ public: * @param [in] locale The locale of Web * @param [in] timezoneId The timezoneID of Web */ - void Create(int width, int height, const std::string& locale, const std::string& timezoneId); + void Create(uint32_t width, uint32_t height, const std::string& locale, const std::string& timezoneId); /** * @brief Create WebEngine instance. @@ -104,7 +104,7 @@ public: * @param [in] argc The count of application arguments * @param [in] argv The string array of application arguments */ - void Create(int width, int height, int argc, char** argv); + void Create(uint32_t width, uint32_t height, uint32_t argc, char** argv); /** * @brief Destroy WebEngine instance. @@ -269,7 +269,7 @@ public: * @param[in] deltaX horizontal offset to scroll * @param[in] deltaY vertical offset to scroll */ - void ScrollBy(int deltaX, int deltaY); + void ScrollBy(int32_t deltaX, int32_t deltaY); /** * @brief Scroll edge of view by deltaX and deltaY. @@ -279,12 +279,12 @@ public: * * @return true if succeeded, false otherwise */ - bool ScrollEdgeBy(int deltaX, int deltaY); + bool ScrollEdgeBy(int32_t deltaX, int32_t deltaY); /** * @brief Set an absolute scroll of the given view. */ - void SetScrollPosition(int x, int y); + void SetScrollPosition(int32_t x, int32_t y); /** * @brief Get the current scroll position of the given view. @@ -380,6 +380,29 @@ public: void JavaScriptPromptReply(const std::string& result); /** + * @brief Create a new hit test. + * + * @param[in] x the horizontal position to query + * @param[in] y the vertical position to query + * @param[in] mode the mode of hit test + * + * @return a new hit test object + */ + std::unique_ptr CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode); + + /** + * @brief create a hit test asynchronously. + * + * @param[in] x the horizontal position to query + * @param[in] y the vertical position to query + * @param[in] mode the mode of hit test + * @param[in] callback the callback function + * + * @return true if succeeded, false otherwise + */ + bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback); + + /** * @brief Clear the history of Web. */ void ClearHistory(); @@ -406,7 +429,7 @@ public: /** * @brief Set the size of Web Pages. */ - void SetSize(int width, int height); + void SetSize(uint32_t width, uint32_t height); /** * @brief Set background color of web page. @@ -555,7 +578,7 @@ public: * * @return pixel data of screen shot */ - Dali::PixelData GetScreenshot(Dali::Rect viewArea, float scaleFactor); + Dali::PixelData GetScreenshot(Dali::Rect viewArea, float scaleFactor); /** * @brief Request to get snapshot of the specified viewArea of page asynchronously. @@ -566,7 +589,7 @@ public: * * @return true if requested successfully, false otherwise */ - bool GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback); + bool GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback); /** * @brief Asynchronous request to check if there is a video playing in the given view. @@ -588,7 +611,7 @@ public: * @brief Update display area. * @param[in] displayArea The area to display web page */ - void UpdateDisplayArea(Dali::Rect displayArea); + void UpdateDisplayArea(Dali::Rect displayArea); /** * @brief Enable video hole. diff --git a/dali/devel-api/file.list b/dali/devel-api/file.list index 6f6d767..edf8862 100755 --- a/dali/devel-api/file.list +++ b/dali/devel-api/file.list @@ -101,6 +101,7 @@ SET( devel_api_adaptor_framework_header_files ${adaptor_devel_api_dir}/adaptor-framework/web-engine-frame.h ${adaptor_devel_api_dir}/adaptor-framework/web-engine-http-auth-handler.h ${adaptor_devel_api_dir}/adaptor-framework/web-engine-load-error.h + ${adaptor_devel_api_dir}/adaptor-framework/web-engine-hit-test.h ${adaptor_devel_api_dir}/adaptor-framework/web-engine-plugin.h ${adaptor_devel_api_dir}/adaptor-framework/web-engine-policy-decision.h ${adaptor_devel_api_dir}/adaptor-framework/web-engine-request-interceptor.h diff --git a/dali/internal/web-engine/common/web-engine-impl.cpp b/dali/internal/web-engine/common/web-engine-impl.cpp index d7e9fec..a9b483c 100644 --- a/dali/internal/web-engine/common/web-engine-impl.cpp +++ b/dali/internal/web-engine/common/web-engine-impl.cpp @@ -171,12 +171,12 @@ bool WebEngine::Initialize() return true; } -void WebEngine::Create(int width, int height, const std::string& locale, const std::string& timezoneId) +void WebEngine::Create(uint32_t width, uint32_t height, const std::string& locale, const std::string& timezoneId) { mPlugin->Create(width, height, locale, timezoneId); } -void WebEngine::Create(int width, int height, int argc, char** argv) +void WebEngine::Create(uint32_t width, uint32_t height, uint32_t argc, char** argv) { mPlugin->Create(width, height, argc, argv); } @@ -311,17 +311,17 @@ bool WebEngine::StopInspectorServer() return mPlugin->StopInspectorServer(); } -void WebEngine::ScrollBy(int deltaX, int deltaY) +void WebEngine::ScrollBy(int32_t deltaX, int32_t deltaY) { mPlugin->ScrollBy(deltaX, deltaY); } -bool WebEngine::ScrollEdgeBy(int deltaX, int deltaY) +bool WebEngine::ScrollEdgeBy(int32_t deltaX, int32_t deltaY) { return mPlugin->ScrollEdgeBy(deltaX, deltaY); } -void WebEngine::SetScrollPosition(int x, int y) +void WebEngine::SetScrollPosition(int32_t x, int32_t y) { mPlugin->SetScrollPosition(x, y); } @@ -371,6 +371,16 @@ void WebEngine::JavaScriptPromptReply(const std::string& result) mPlugin->JavaScriptPromptReply(result); } +std::unique_ptr WebEngine::CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode) +{ + return mPlugin->CreateHitTest(x, y, mode); +} + +bool WebEngine::CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback) +{ + return mPlugin->CreateHitTestAsynchronously(x, y, mode, callback); +} + bool WebEngine::CanGoForward() { return mPlugin->CanGoForward(); @@ -411,7 +421,7 @@ void WebEngine::ClearHistory() mPlugin->ClearHistory(); } -void WebEngine::SetSize(int width, int height) +void WebEngine::SetSize(uint32_t width, uint32_t height) { mPlugin->SetSize(width, height); } @@ -521,12 +531,12 @@ void WebEngine::AddDynamicCertificatePath(const std::string& host, const std::st mPlugin->AddDynamicCertificatePath(host, certPath); } -Dali::PixelData WebEngine::GetScreenshot(Dali::Rect viewArea, float scaleFactor) +Dali::PixelData WebEngine::GetScreenshot(Dali::Rect viewArea, float scaleFactor) { return mPlugin->GetScreenshot(viewArea, scaleFactor); } -bool WebEngine::GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback) +bool WebEngine::GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback) { return mPlugin->GetScreenshotAsynchronously(viewArea, scaleFactor, callback); } @@ -541,7 +551,7 @@ void WebEngine::RegisterGeolocationPermissionCallback(Dali::WebEnginePlugin::Geo mPlugin->RegisterGeolocationPermissionCallback(callback); } -void WebEngine::UpdateDisplayArea(Dali::Rect displayArea) +void WebEngine::UpdateDisplayArea(Dali::Rect displayArea) { mPlugin->UpdateDisplayArea(displayArea); } diff --git a/dali/internal/web-engine/common/web-engine-impl.h b/dali/internal/web-engine/common/web-engine-impl.h index d015ea5..505feb3 100755 --- a/dali/internal/web-engine/common/web-engine-impl.h +++ b/dali/internal/web-engine/common/web-engine-impl.h @@ -48,7 +48,7 @@ class WebEngine : public Dali::BaseObject { public: /** - * @brief Creates a new WebEngine handle + * @brief Create a new WebEngine handle * * @return WebEngine pointer */ @@ -57,12 +57,12 @@ public: /** * @copydoc Dali::WebEngine::Create() */ - void Create(int width, int height, const std::string& locale, const std::string& timezoneId); + void Create(uint32_t width, uint32_t height, const std::string& locale, const std::string& timezoneId); /** * @copydoc Dali::WebEngine::Create() */ - void Create(int width, int height, int argc, char** argv); + void Create(uint32_t width, uint32_t height, uint32_t argc, char** argv); /** * @copydoc Dali::WebEngine::Destroy() @@ -197,17 +197,17 @@ public: /** * @copydoc Dali::WebEngine::ScrollBy() */ - void ScrollBy(int deltaX, int deltaY); + void ScrollBy(int32_t deltaX, int32_t deltaY); /** * @copydoc Dali::WebEngine::ScrollEdgeBy() */ - bool ScrollEdgeBy(int deltaX, int deltaY); + bool ScrollEdgeBy(int32_t deltaX, int32_t deltaY); /** * @copydoc Dali::WebEngine::SetScrollPosition() */ - void SetScrollPosition(int x, int y); + void SetScrollPosition(int32_t x, int32_t y); /** * @copydoc Dali::WebEngine::GetScrollPosition() @@ -255,6 +255,16 @@ public: void JavaScriptPromptReply(const std::string& result); /** + * @copydoc Dali::WebEngine::CreateHitTest() + */ + std::unique_ptr CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode); + + /** + * @copydoc Dali::WebEngine::CreateHitTestAsynchronously() + */ + bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback); + + /** * @copydoc Dali::WebEngine::CanGoForward() */ bool CanGoForward(); @@ -297,7 +307,7 @@ public: /** * @copydoc Dali::WebEngine::SetSize() */ - void SetSize(int width, int height); + void SetSize(uint32_t width, uint32_t height); /** * @copydoc Dali::WebEngine::EnableMouseEvents() @@ -407,12 +417,12 @@ public: /** * @copydoc Dali::WebEngine::GetScreenshot() */ - Dali::PixelData GetScreenshot(Dali::Rect viewArea, float scaleFactor); + Dali::PixelData GetScreenshot(Dali::Rect viewArea, float scaleFactor); /** * @copydoc Dali::WebEngine::GetScreenshotAsync() */ - bool GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback); + bool GetScreenshotAsynchronously(Dali::Rect viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback); /** * @copydoc Dali::WebEngine::IsVideoPlaying() @@ -427,7 +437,7 @@ public: /** * @copydoc Dali::WebEngine::UpdateDisplayArea() */ - void UpdateDisplayArea(Dali::Rect displayArea); + void UpdateDisplayArea(Dali::Rect displayArea); /** * @copydoc Dali::WebEngine::EnableVideoHole() @@ -542,14 +552,14 @@ private: WebEngine& operator=(const WebEngine& WebEngine); /** - * @brief Initializes member data. + * @brief Initialize member data. * * @return Whether the initialization succeed or not. */ bool Initialize(); /** - * @brief Initializes library handle by loading web engine plugin. + * @brief Initialize library handle by loading web engine plugin. * * @return Whether the initialization succeed or not. */