X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fweb-view%2Fweb-view-impl.h;h=9abfd49e68c2a0c6ffdd5dc3cd72a357c3fbf42d;hb=fb222199e44a5352d8c7f6e1c715da1a995e41af;hp=065dc45b97cda0d8ff90e6ad81e926c13253de0c;hpb=87765be3d821b9fa3e1dbfe0e032f555f1e09587;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/web-view/web-view-impl.h b/dali-toolkit/internal/controls/web-view/web-view-impl.h index 065dc45..9abfd49 100644 --- a/dali-toolkit/internal/controls/web-view/web-view-impl.h +++ b/dali-toolkit/internal/controls/web-view/web-view-impl.h @@ -166,7 +166,7 @@ public: /** * @copydoc Dali::Toolkit::WebView::RegisterJavaScriptAlertCallback() */ - void RegisterJavaScriptAlertCallback( Dali::WebEnginePlugin::JavaScriptAlertCallback callback ); + void RegisterJavaScriptAlertCallback(Dali::WebEnginePlugin::JavaScriptAlertCallback callback); /** * @copydoc Dali::Toolkit::WebView::JavaScriptAlertReply() @@ -176,22 +176,22 @@ public: /** * @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() @@ -275,14 +275,6 @@ private: // From Control 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; @@ -374,6 +366,20 @@ private: 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 */ @@ -383,7 +389,7 @@ private: * @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. @@ -408,32 +414,58 @@ private: * @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); 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::WebViewScrollEdgeReachedSignalType mScrollEdgeReachedSignal; - std::unique_ptr mWebContext; - std::unique_ptr mWebCookieManager; - std::unique_ptr mWebSettings; - std::unique_ptr 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 mWebContext; + std::unique_ptr mWebCookieManager; + std::unique_ptr mWebSettings; + std::unique_ptr mWebBackForwardList; + Dali::Toolkit::ImageView mFaviconView; + + Dali::PropertyNotification mPositionUpdateNotification; + Dali::PropertyNotification mSizeUpdateNotification; + Dali::PropertyNotification mScaleUpdateNotification; + bool mVideoHoleEnabled; + Dali::Rect mWebViewArea; + Dali::Toolkit::WebView::WebViewUrlChangedSignalType mUrlChangedSignal; + bool mMouseEventsEnabled; + bool mKeyEventsEnabled; }; } // namespace Internal