From 22090ad2a931847b988eaeba411012ab490432da Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Thu, 9 Apr 2015 07:37:32 -0700 Subject: Quick: Document fullscreen API Change-Id: Iade66eaea7016e6f7d73f25f8fc7af1879d099d9 Reviewed-by: Andras Becsi --- .../doc/src/qquickwebengineview_lgpl.qdoc | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc b/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc index 6d04473d3..5f41fde67 100644 --- a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc +++ b/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc @@ -175,6 +175,16 @@ read-only value that reflects the contents of the \c{} tag. */ +/*! + \qmlproperty bool WebEngineView::isFullScreen + \since QtWebEngine 1.1 + \readonly + + Returns \c{true} if the web view is in fullscreen mode, \c{false} otherwise. + + \sa WebEngineView::fullScreenRequested(), WebEngineView::fullScreenCancelled() +*/ + /*! \qmlmethod void WebEngineView::loadHtml(string html, url baseUrl) \brief Loads the specified \a html as the content of the web view. @@ -252,6 +262,30 @@ \sa featurePermissionRequested() */ +/*! + \qmlmethod void WebEngineView::fullScreenCancelled() + \since QtWebEngine 1.1 + + Immediately sets \c{isFullScreen} property to \c{false}. It can be used to notify the + browser engine when the windowing system forces the application to leave fullscreen mode. + + \code + ApplicationWindow { + onVisibilityChanged: { + if (webEngineView.isFullScreen && visibility != Window.FullScreen) + webEngineView.fullScreenCancelled() + } + + WebEngineView { + id: webEngineView + ... + } + } + \endcode + + \sa WebEngineView::isFullScreen, WebEngineView::fullScreenRequested() +*/ + /*! \qmlsignal void WebEngineView::featurePermissionRequested(url securityOrigin, WebEngineView::Feature feature) @@ -364,6 +398,18 @@ \sa WebEngineNewViewRequest, WebEngineView::NewViewDestination, {WebEngine Quick Nano Browser} */ +/*! + \qmlsignal WebEngineView::fullScreenRequested(request) + \since QtWebEngine 1.1 + + This signal is emitted when the web page requests fullscreen mode through the + JavaScript API. + + The corresponding handler is onFullScreenRequested. + + \sa WebEngineFullScreenRequest, WebEngineView::isFullScreen +*/ + /*! \qmlproperty enumeration WebEngineView::ErrorDomain @@ -479,3 +525,49 @@ \sa featurePermissionRequested(), grantFeaturePermission() */ + +/*! + \qmltype WebEngineFullScreenRequest + \instantiates QQuickWebEngineFullScreenRequest + \inqmlmodule QtWebEngine 1.1 + \since QtWebEngine 1.1 + + \brief A utility class for the WebEngineView::fullScreenRequested signal. + + \sa WebEngineView::fullScreenRequested +*/ + +/*! + \qmlproperty bool WebEngineFullScreenRequest::toggleOn + \since QtWebEngine 1.1 + \readonly + + Returns \c{true} if the application should toggle fullscreen mode on, \c{false} otherwise. + + \sa WebEngineFullScreenRequest::accept() +*/ + +/*! + \qmlmethod void WebEngineFullScreenRequest::accept() + \since QtWebEngine 1.1 + + Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen + property to be equal to WebEngineFullScreenRequest::toggleOn. + + \code + ApplicationWindow { + id: window + WebEngineView { + onFullScreenRequested: { + if (request.toggleOn) + window.showFullScreen() + else + window.showNormal() + request.accept() + } + } + } + \endcode + + \sa WebEngineFullScreenRequest::toggleOn() +*/ -- cgit v1.2.3