summaryrefslogtreecommitdiffstats
path: root/src/gui/platform/unix
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-14 12:20:38 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-18 13:31:09 +0200
commit40e6fe780150161bb608f5df356bfe4f00861be5 (patch)
tree97749eb338e4365656d65da8bc1168570e9ca96d /src/gui/platform/unix
parent1f66d914e435e733a7741e6b98abf92594122c01 (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/platform/unix')
-rw-r--r--src/gui/platform/unix/qunixnativeinterface.cpp108
1 files changed, 104 insertions, 4 deletions
diff --git a/src/gui/platform/unix/qunixnativeinterface.cpp b/src/gui/platform/unix/qunixnativeinterface.cpp
index 378282936e..43184daa12 100644
--- a/src/gui/platform/unix/qunixnativeinterface.cpp
+++ b/src/gui/platform/unix/qunixnativeinterface.cpp
@@ -56,6 +56,46 @@ using namespace QNativeInterface::Private;
#ifndef QT_NO_OPENGL
#if defined(Q_OS_LINUX)
+
+/*!
+ \class QNativeInterface::QGLXContext
+ \since 6.0
+ \brief Native interface to a GLX context.
+
+ Accessed through QOpenGLContext::nativeInterface().
+
+ \inmodule QtGui
+ \ingroup native-interfaces
+ \ingroup native-interfaces-qopenglcontext
+*/
+
+/*!
+ \fn QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext = nullptr)
+
+ \brief Adopts a GLXContext created from an FBConfig.
+
+ The context must be created from a framebuffer configuration, using the \c glXCreateNewContext function.
+
+ Ownership of the created QOpenGLContext is transferred to the caller.
+*/
+
+/*!
+ \fn QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext = nullptr)
+
+ \brief Adopts a GLXContext created from an X visual.
+
+ The context must be created from a visual, using the \c glXCreateContext function.
+ The same visual must be passed as a pointer to an \c XVisualInfo struct, in the \a visualInfo argument.
+
+ Ownership of the created QOpenGLContext is transferred to the caller.
+*/
+
+/*!
+ \fn GLXContext QNativeInterface::QGLXContext::nativeContext() const
+
+ \return the underlying GLXContext.
+*/
+
QT_DEFINE_NATIVE_INTERFACE(QGLXContext, QOpenGLContext);
QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QGLXIntegration);
@@ -70,9 +110,38 @@ QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext visualBased
return QGuiApplicationPrivate::platformIntegration()->call<
&QGLXIntegration::createOpenGLContext>(visualBasedContext, visualInfo, shareContext);
}
-#endif
+#endif // defined(Q_OS_LINUX)
#if QT_CONFIG(egl)
+
+/*!
+ \class QNativeInterface::QEGLContext
+ \since 6.0
+ \brief Native interface to an EGL context.
+
+ Accessed through QOpenGLContext::nativeInterface().
+
+ \inmodule QtGui
+ \ingroup native-interfaces
+ \ingroup native-interfaces-qopenglcontext
+*/
+
+/*!
+ \fn QOpenGLContext *QNativeInterface::QEGLContext::fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext = nullptr)
+
+ \brief Adopts an EGLContext.
+
+ The same \c EGLDisplay passed to \c eglCreateContext must be passed as the \a display argument.
+
+ Ownership of the created QOpenGLContext is transferred to the caller.
+*/
+
+/*!
+ \fn EGLContext QNativeInterface::QEGLContext::nativeContext() const
+
+ \return the underlying EGLContext.
+*/
+
QT_DEFINE_NATIVE_INTERFACE(QEGLContext, QOpenGLContext);
QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEGLIntegration);
@@ -81,20 +150,51 @@ QOpenGLContext *QNativeInterface::QEGLContext::fromNative(EGLContext context, EG
return QGuiApplicationPrivate::platformIntegration()->call<
&QEGLIntegration::createOpenGLContext>(context, display, shareContext);
}
-#endif
+#endif // QT_CONFIG(egl)
#endif // QT_NO_OPENGL
#if QT_CONFIG(xcb)
+
+/*!
+ \class QNativeInterface::Private::QXcbScreen
+ \since 6.0
+ \internal
+ \brief Native interface to QPlatformScreen.
+ \inmodule QtGui
+ \ingroup native-interfaces
+*/
+
QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QXcbScreen);
+
+/*!
+ \class QNativeInterface::Private::QXcbWindow
+ \since 6.0
+ \internal
+ \brief Native interface to QPlatformWindow.
+ \inmodule QtGui
+ \ingroup native-interfaces
+*/
+
QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QXcbWindow);
-#endif
+
+#endif // QT_CONFIG(xcb)
#if QT_CONFIG(vsp2)
QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QVsp2Screen);
#endif
#if QT_CONFIG(evdev)
+
+/*!
+ \class QNativeInterface::Private::QEvdevKeyMapper
+ \since 6.0
+ \internal
+ \brief Native interface to QKeyMapper.
+ \inmodule QtGui
+ \ingroup native-interfaces
+*/
+
QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEvdevKeyMapper);
template <>
@@ -102,6 +202,6 @@ QEvdevKeyMapper *QKeyMapper::nativeInterface<QEvdevKeyMapper>() const
{
return dynamic_cast<QEvdevKeyMapper*>(QGuiApplicationPrivate::platformIntegration());
}
-#endif
+#endif // QT_CONFIG(evdev)
QT_END_NAMESPACE