/**
* @copydoc Dali::Toolkit::WebView::RegisterJavaScriptAlertCallback()
*/
- void RegisterJavaScriptAlertCallback( Dali::WebEnginePlugin::JavaScriptAlertCallback callback );
+ void RegisterJavaScriptAlertCallback(Dali::WebEnginePlugin::JavaScriptAlertCallback callback);
/**
* @copydoc Dali::Toolkit::WebView::JavaScriptAlertReply()
/**
* @copydoc Dali::Toolkit::WebView::RegisterJavaScriptConfirmCallback()
*/
- void RegisterJavaScriptConfirmCallback( Dali::WebEnginePlugin::JavaScriptConfirmCallback callback );
+ void RegisterJavaScriptConfirmCallback(Dali::WebEnginePlugin::JavaScriptConfirmCallback callback);
/**
* @copydoc Dali::Toolkit::WebView::JavaScriptConfirmReply()
*/
- void JavaScriptConfirmReply( bool confirmed );
+ void JavaScriptConfirmReply(bool confirmed);
/**
* @copydoc Dali::Toolkit::WebView::RegisterJavaScriptPromptCallback()
*/
- void RegisterJavaScriptPromptCallback( Dali::WebEnginePlugin::JavaScriptPromptCallback callback);
+ void RegisterJavaScriptPromptCallback(Dali::WebEnginePlugin::JavaScriptPromptCallback callback);
/**
* @copydoc Dali::Toolkit::WebView::JavaScriptPromptReply()
*/
- void JavaScriptPromptReply( const std::string& result );
+ void JavaScriptPromptReply(const std::string& result);
/**
* @copydoc Dali::Toolkit::WebView::ClearHistory()
void ClearHistory();
/**
- * @brief Clears all tiles resources of Web.
+ * @copydoc Dali::Toolkit::WebView::ClearAllTilesResources()
*/
void ClearAllTilesResources();
*/
Dali::Toolkit::WebView::WebViewUrlChangedSignalType& UrlChangedSignal();
+ /**
+ * @copydoc Dali::Toolkit::WebView::FormRepostDecisionSignal()
+ */
+ Dali::Toolkit::WebView::WebViewFormRepostDecisionSignalType& FormRepostDecisionSignal();
+
+ /**
+ * @copydoc Dali::Toolkit::WebView::FrameRenderedSignal()
+ */
+ Dali::Toolkit::WebView::WebViewFrameRenderedSignalType& FrameRenderedSignal();
+
public: // Properties
/**
* @brief Called when a property of an object of this type is set.
Vector3 GetNaturalSize() override;
/**
- * Signal occurs when the Web View has been touched.
- * @param[in] actor The Actor Touched
- * @param[in] touch The Touch Data.
- * @return Whether to consume event or not.
- */
- bool OnTouchEvent(Actor actor, const Dali::TouchEvent& touch);
-
- /**
* @copydoc Toolkit::Control::OnKeyEvent()
*/
bool OnKeyEvent(const Dali::KeyEvent& event) override;
std::string GetTitle() const;
/**
+ * @brief Sets the background color of web page.
+ * @param[in] color The value of background color.
+ */
+ void SetDocumentBackgroundColor(Dali::Vector4 color);
+
+ /**
+ * @brief Clears tiles when hidden.
+ *
+ * @param[in] cleared Whether tiles are cleared or not
+ */
+ void ClearTilesWhenHidden(bool cleared);
+
+ /**
+ * @brief Sets multiplier of cover area of tile.
+ *
+ * @param[in] multiplier The multiplier of cover area
+ */
+ void SetTileCoverAreaMultiplier(float multiplier);
+
+ /**
+ * @brief Enables cursor by client.
+ * @param[in] enabled Whether cursor is enabled or not.
+ */
+ void EnableCursorByClient(bool enabled);
+
+ /**
+ * @brief Gets the selected text.
+ * @return The selected text
+ */
+ std::string GetSelectedText() const;
+
+ /**
* @brief Get user agent string.
* @return The string value of user agent
*/
void EnableBlendMode(bool blendEnabled);
/**
+ * @brief Enables/disables mouse events. The default is enabled.
+ *
+ * @param[in] enabled True if mouse events are enabled, false otherwise
+ */
+ void EnableMouseEvents(bool enabled);
+
+ /**
+ * @brief Enables/disables key events. The default is enabled.
+ *
+ * @param[in] enabled True if key events enabled, false otherwise
+ */
+ void EnableKeyEvents(bool enabled);
+
+ /**
* @brief Callback function to be called when page load started.
* @param[in] url The url currently being loaded
*/
* @brief Callback function to be called when page is loading in progress.
* @param[in] url The url currently being loaded
*/
- void OnPageLoadInProgress( const std::string& url );
+ void OnPageLoadInProgress(const std::string& url);
/**
* @brief Callback function to be called when page load finished.
* @brief Callback function to be called when url is changed.
* @param[in] url The url currently being loaded
*/
- void OnUrlChanged( const std::string& url );
+ void OnUrlChanged(const std::string& url);
+
+ /**
+ * Signal occurs when the Web View has been touched.
+ * @param[in] actor The Actor Touched
+ * @param[in] touch The Touch Data.
+ * @return Whether to consume event or not.
+ */
+ bool OnTouchEvent(Actor actor, const Dali::TouchEvent& touch);
+
+ /**
+ * Signal occurs when the Web View has been hovered.
+ * @param[in] actor The Actor Hovered
+ * @param[in] hover The Hover Data.
+ * @return Whether to consume event or not.
+ */
+ bool OnHoverEvent(Actor actor, const Dali::HoverEvent& hover);
+
+ /**
+ * Signal occurs when the Web View receives wheel event.
+ * @param[in] actor The Actor that receives Wheel event.
+ * @param[in] wheel The Wheel Data.
+ * @return Whether to consume event or not.
+ */
+ bool OnWheelEvent(Actor actor, const Dali::WheelEvent& wheel);
+
+ /**
+ * @brief Callback function to be called when form repost decision need be checked.
+ * @param[in] decision The new decision for form repost
+ */
+ void OnFormRepostDecision(std::shared_ptr<Dali::WebEngineFormRepostDecision> decision);
+
+ /**
+ * @brief Callback function to be called when frame is rendered.
+ */
+ void OnFrameRendered();
private:
- std::string mUrl;
- Dali::Toolkit::Visual::Base mVisual;
- Dali::Size mWebViewSize;
- Dali::WebEngine mWebEngine;
-
- Dali::Toolkit::WebView::WebViewPageLoadSignalType mPageLoadStartedSignal;
- Dali::Toolkit::WebView::WebViewPageLoadSignalType mPageLoadInProgressSignal;
- Dali::Toolkit::WebView::WebViewPageLoadSignalType mPageLoadFinishedSignal;
- Dali::Toolkit::WebView::WebViewPageLoadErrorSignalType mPageLoadErrorSignal;
+ std::string mUrl;
+ Dali::Toolkit::Visual::Base mVisual;
+ Dali::Size mWebViewSize;
+ Dali::WebEngine mWebEngine;
+
+ Dali::Toolkit::WebView::WebViewPageLoadSignalType mPageLoadStartedSignal;
+ Dali::Toolkit::WebView::WebViewPageLoadSignalType mPageLoadInProgressSignal;
+ Dali::Toolkit::WebView::WebViewPageLoadSignalType mPageLoadFinishedSignal;
+ Dali::Toolkit::WebView::WebViewPageLoadErrorSignalType mPageLoadErrorSignal;
+ Dali::Toolkit::WebView::WebViewUrlChangedSignalType mUrlChangedSignal;
Dali::Toolkit::WebView::WebViewScrollEdgeReachedSignalType mScrollEdgeReachedSignal;
- std::unique_ptr<Dali::Toolkit::WebContext> mWebContext;
- std::unique_ptr<Dali::Toolkit::WebCookieManager> mWebCookieManager;
- std::unique_ptr<Dali::Toolkit::WebSettings> mWebSettings;
- std::unique_ptr<Dali::Toolkit::WebBackForwardList> mWebBackForwardList;
- Dali::Toolkit::ImageView mFaviconView;
-
- Dali::PropertyNotification mPositionUpdateNotification;
- Dali::PropertyNotification mSizeUpdateNotification;
- Dali::PropertyNotification mScaleUpdateNotification;
- bool mVideoHoleEnabled;
- Dali::Rect< int > mWebViewArea;
- Dali::Toolkit::WebView::WebViewUrlChangedSignalType mUrlChangedSignal;
+ std::unique_ptr<Dali::Toolkit::WebContext> mWebContext;
+ std::unique_ptr<Dali::Toolkit::WebCookieManager> mWebCookieManager;
+ std::unique_ptr<Dali::Toolkit::WebSettings> mWebSettings;
+ std::unique_ptr<Dali::Toolkit::WebBackForwardList> mWebBackForwardList;
+ Dali::Toolkit::ImageView mFaviconView;
+
+ Dali::PropertyNotification mPositionUpdateNotification;
+ Dali::PropertyNotification mSizeUpdateNotification;
+ Dali::PropertyNotification mScaleUpdateNotification;
+ bool mVideoHoleEnabled;
+ Dali::Rect<int> mWebViewArea;
+ bool mMouseEventsEnabled;
+ bool mKeyEventsEnabled;
+
+ Dali::Toolkit::WebView::WebViewFormRepostDecisionSignalType mFormRepostDecisionSignal;
+ Dali::Toolkit::WebView::WebViewFrameRenderedSignalType mFrameRenderedSignal;
};
} // namespace Internal