Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
9
10#include <qglobal.h>
11#include <qscopedpointer.h>
12
13#include <qpa/qplatformopenglcontext.h>
14#include <QtGui/qguiapplication.h>
15
16QT_BEGIN_NAMESPACE
17
18class QOffscreenX11Connection;
19class QOffscreenX11Info;
20
22#if QT_CONFIG(xcb)
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)
33#endif
34#if QT_CONFIG(xcb)
35 Display *display() const override;
36 xcb_connection_t *connection() const override { return nullptr; }
37#endif
39};
40
42{
43public:
44 QOffscreenX11Integration(const QStringList& paramList);
46 bool hasCapability(QPlatformIntegration::Capability cap) const override;
47
48#if !defined(QT_NO_OPENGL) && QT_CONFIG(xcb_glx_plugin)
50#endif
52};
53
55public:
58
59 QOffscreenX11Info *x11Info();
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
100QT_END_NAMESPACE
101
102#endif
QOffscreenPlatformNativeInterface(QOffscreenIntegration *integration)
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