Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qoffscreenintegration_x11.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOFFSCREENINTEGRATION_X11_H
5#define QOFFSCREENINTEGRATION_X11_H
6
8#include "qoffscreencommon.h"
9
10#include <qglobal.h>
11#include <qscopedpointer.h>
12
13#include <qpa/qplatformopenglcontext.h>
14#include <QtGui/qguiapplication.h>
15
17
20
22#if QT_CONFIG(xcb)
23 , public QNativeInterface::QX11Application
24#endif
25{
26public:
29
30 void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override;
31#if !defined(QT_NO_OPENGL) && QT_CONFIG(xcb_glx_plugin)
32 void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override;
33#endif
34#if QT_CONFIG(xcb)
35 Display *display() const override;
36 xcb_connection_t *connection() const override { return nullptr; };
37#endif
38 QScopedPointer<QOffscreenX11Connection> m_connection;
39};
40
42{
43public:
44 QOffscreenX11Integration(const QStringList& paramList);
47
48#if !defined(QT_NO_OPENGL) && QT_CONFIG(xcb_glx_plugin)
50#endif
52};
53
55public:
58
60
61 void *display() const { return m_display; }
62 int screenNumber() const { return m_screenNumber; }
63
64private:
65 void *m_display;
66 int m_screenNumber;
67
68 QScopedPointer<QOffscreenX11Info> m_x11Info;
69};
70
71#if QT_CONFIG(xcb_glx_plugin)
72class QOffscreenX11GLXContextData;
73
74class QOffscreenX11GLXContext : public QPlatformOpenGLContext
75 , public QNativeInterface::QGLXContext
76{
77public:
78 QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGLContext *context);
79 ~QOffscreenX11GLXContext();
80
81 bool makeCurrent(QPlatformSurface *surface) override;
82 void doneCurrent() override;
83 void swapBuffers(QPlatformSurface *surface) override;
84 QFunctionPointer getProcAddress(const char *procName) override;
85
86 QSurfaceFormat format() const override;
87 bool isSharing() const override;
88 bool isValid() const override;
89
90 GLXContext nativeContext() const override { return glxContext(); }
91
92 void *glxConfig() const;
93 GLXContext glxContext() const;
94
95private:
96 QScopedPointer<QOffscreenX11GLXContextData> d;
97};
98#endif // QT_CONFIG(xcb_glx_plugin)
99
101
102#endif
\inmodule QtCore
Definition qbytearray.h:57
bool hasCapability(QPlatformIntegration::Capability cap) const override
QOffscreenX11PlatformNativeInterface * nativeInterface() const override
QOffscreenX11Integration(const QStringList &paramList)
QOffscreenX11PlatformNativeInterface(QOffscreenIntegration *integration)
void * nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override
QScopedPointer< QOffscreenX11Connection > m_connection
\inmodule QtGui
virtual QPlatformOpenGLContext * createPlatformOpenGLContext(QOpenGLContext *context) const
Factory function for QPlatformOpenGLContext.
Capability
Capabilities are used to determine specific features of a platform integration.
virtual void * nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
The QPlatformSurface class provides an abstraction for a surface.
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
\inmodule QtCore
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
static void * context
DBusConnection * connection
GLint GLsizei GLsizei GLenum format
const void * getProcAddress
GLenum cap
QScreen * screen
[1]
Definition main.cpp:29
struct _XDisplay Display