diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-14 12:20:38 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-18 13:31:09 +0200 |
commit | 40e6fe780150161bb608f5df356bfe4f00861be5 (patch) | |
tree | 97749eb338e4365656d65da8bc1168570e9ca96d /src/gui/kernel | |
parent | 1f66d914e435e733a7741e6b98abf92594122c01 (diff) |
doc: Update and flesh out native interface docs
The namespace and overviews are in the qtdoc repository.
Docs for individual interfaces should live with their platform.
Change-Id: Iba5fd7e9ebc4f1f634ec9dc3ec125ce88a1312ba
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qoffscreensurface.cpp | 25 | ||||
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 8 | ||||
-rw-r--r-- | src/gui/kernel/qopenglcontext_platform.h | 2 |
3 files changed, 19 insertions, 16 deletions
diff --git a/src/gui/kernel/qoffscreensurface.cpp b/src/gui/kernel/qoffscreensurface.cpp index 3144bc6f8c..d80a081105 100644 --- a/src/gui/kernel/qoffscreensurface.cpp +++ b/src/gui/kernel/qoffscreensurface.cpp @@ -50,18 +50,6 @@ QT_BEGIN_NAMESPACE - -/*! - \fn template <typename NativeInterface> NativeInterface *QOffScreenSurface::nativeInterface() - - Returns a native interface of type \c NativeInterface for the surface. - - This function provides access to platform specific functionality - of QOffScreenSurface, as defined in the QNativeInterface namespace. - - If the requested interface is not available a \nullptr is returned. -*/ - /*! \class QOffscreenSurface \inmodule QtGui @@ -355,6 +343,19 @@ QPlatformOffscreenSurface *QOffscreenSurface::handle() const } /*! + \fn template <typename QNativeInterface> QNativeInterface *QOffscreenSurface::nativeInterface() const + + Returns a native interface of the given type for the surface. + + This function provides access to platform specific functionality + of QOffScreenSurface, as defined in the QNativeInterface namespace: + + \annotatedlist native-interfaces-qoffscreensurface + + If the requested interface is not available a \nullptr is returned. +*/ + +/*! Returns the platform surface corresponding to the offscreen surface. \internal diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 490d082fd4..6cc2d65a35 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -347,12 +347,14 @@ void QOpenGLContextPrivate::_q_screenDestroyed(QObject *object) } /*! - \fn template <typename NativeInterface> NativeInterface *QOpenGLContext::nativeInterface() const + \fn template <typename QNativeInterface> QNativeInterface *QOpenGLContext::nativeInterface() const - Returns a native interface of type \c NativeInterface for the context. + Returns a native interface of the given type for the context. This function provides access to platform specific functionality - of QOpenGLContext, as defined in the QNativeInterface namespace. + of QOpenGLContext, as defined in the QNativeInterface namespace: + + \annotatedlist native-interfaces-qopenglcontext If the requested interface is not available a \nullptr is returned. */ diff --git a/src/gui/kernel/qopenglcontext_platform.h b/src/gui/kernel/qopenglcontext_platform.h index 80a29a1021..c0e1c59fdf 100644 --- a/src/gui/kernel/qopenglcontext_platform.h +++ b/src/gui/kernel/qopenglcontext_platform.h @@ -70,7 +70,7 @@ namespace QNativeInterface { struct Q_GUI_EXPORT QCocoaGLContext { QT_DECLARE_NATIVE_INTERFACE(QCocoaGLContext) - static QOpenGLContext *fromNative(QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *, QOpenGLContext *shareContext = nullptr); + static QOpenGLContext *fromNative(QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *context, QOpenGLContext *shareContext = nullptr); virtual QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *nativeContext() const = 0; }; #endif |