Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QOFFSCREENINTEGRATION_X11_H
6
#
define
QOFFSCREENINTEGRATION_X11_H
7
8
#
include
"qoffscreenintegration.h"
9
#
include
"qoffscreencommon.h"
10
11
#
include
<
qglobal
.
h
>
12
#
include
<
qscopedpointer
.
h
>
13
14
#
include
<
qpa
/
qplatformopenglcontext
.
h
>
15
#
include
<
QtGui
/
qguiapplication
.
h
>
16
17
QT_BEGIN_NAMESPACE
18
19
class
QOffscreenX11Connection;
20
class
QOffscreenX11Info;
21
22
class
QOffscreenX11PlatformNativeInterface
:
public
QOffscreenPlatformNativeInterface
23
#
if
QT_CONFIG
(
xcb
)
24
,
public
QNativeInterface
::
QX11Application
25
#
endif
26
{
27
public
:
28
QOffscreenX11PlatformNativeInterface
(
QOffscreenIntegration
*integration);
29
~
QOffscreenX11PlatformNativeInterface
();
30
31
void
*
nativeResourceForScreen
(
const
QByteArray &resource, QScreen *screen)
override
;
32
#
if
!
defined
(
QT_NO_OPENGL
)
&&
QT_CONFIG
(
xcb_glx_plugin
)
33
void
*
nativeResourceForContext
(
const
QByteArray
&
resource
,
QOpenGLContext
*
context
)
override
;
34
#
endif
35
#
if
QT_CONFIG
(
xcb
)
36
Display
*
display
()
const
override
;
37
xcb_connection_t
*
connection
()
const
override
{
return
nullptr
; }
38
#
endif
39
QScopedPointer
<
QOffscreenX11Connection
>
m_connection
;
40
};
41
42
class
QOffscreenX11Integration
:
public
QOffscreenIntegration
43
{
44
public
:
45
QOffscreenX11Integration
(
const
QStringList& paramList);
46
~
QOffscreenX11Integration
();
47
bool
hasCapability
(QPlatformIntegration::Capability cap)
const
override
;
48
49
#
if
!
defined
(
QT_NO_OPENGL
)
&&
QT_CONFIG
(
xcb_glx_plugin
)
50
QPlatformOpenGLContext
*
createPlatformOpenGLContext
(
QOpenGLContext
*
context
)
const
override
;
51
#
endif
52
QOffscreenX11PlatformNativeInterface
*
nativeInterface
()
const
override
;
53
};
54
55
class
QOffscreenX11Connection
{
56
public
:
57
QOffscreenX11Connection
();
58
~
QOffscreenX11Connection
();
59
60
QOffscreenX11Info *
x11Info
();
61
62
void
*
display
()
const
{
return
m_display; }
63
int
screenNumber
()
const
{
return
m_screenNumber; }
64
65
private
:
66
void
*m_display;
67
int
m_screenNumber;
68
69
QScopedPointer<QOffscreenX11Info> m_x11Info;
70
};
71
72
#
if
QT_CONFIG
(
xcb_glx_plugin
)
73
class
QOffscreenX11GLXContextData;
74
75
class
QOffscreenX11GLXContext :
public
QPlatformOpenGLContext
76
,
public
QNativeInterface::QGLXContext
77
{
78
public
:
79
QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGLContext *context);
80
~QOffscreenX11GLXContext();
81
82
bool
makeCurrent(QPlatformSurface *surface) override;
83
void
doneCurrent() override;
84
void
swapBuffers(QPlatformSurface *surface) override;
85
QFunctionPointer getProcAddress(
const
char
*procName) override;
86
87
QSurfaceFormat format()
const
override;
88
bool
isSharing()
const
override;
89
bool
isValid()
const
override;
90
91
GLXContext nativeContext()
const
override {
return
glxContext(); }
92
93
void
*glxConfig()
const
;
94
GLXContext glxContext()
const
;
95
96
private
:
97
QScopedPointer<QOffscreenX11GLXContextData> d;
98
};
99
#
endif
// QT_CONFIG(xcb_glx_plugin)
100
101
QT_END_NAMESPACE
102
103
#
endif
QOffscreenIntegration
Definition
qoffscreenintegration.h:20
QOffscreenPlatformNativeInterface
Definition
qoffscreencommon.h:96
QOffscreenPlatformNativeInterface::QOffscreenPlatformNativeInterface
QOffscreenPlatformNativeInterface(QOffscreenIntegration *integration)
Definition
qoffscreencommon.cpp:222
QOffscreenX11Connection
Definition
qoffscreenintegration_x11.h:55
QOffscreenX11Connection::~QOffscreenX11Connection
~QOffscreenX11Connection()
Definition
qoffscreenintegration_x11.cpp:139
QOffscreenX11Connection::QOffscreenX11Connection
QOffscreenX11Connection()
Definition
qoffscreenintegration_x11.cpp:129
QOffscreenX11Connection::display
void * display() const
Definition
qoffscreenintegration_x11.h:62
QOffscreenX11Connection::x11Info
QOffscreenX11Info * x11Info()
Definition
qoffscreenintegration_x11.cpp:145
QOffscreenX11Connection::screenNumber
int screenNumber() const
Definition
qoffscreenintegration_x11.h:63
QOffscreenX11Integration
Definition
qoffscreenintegration_x11.h:43
QOffscreenX11Integration::hasCapability
bool hasCapability(QPlatformIntegration::Capability cap) const override
Definition
qoffscreenintegration_x11.cpp:52
QOffscreenX11Integration::nativeInterface
QOffscreenX11PlatformNativeInterface * nativeInterface() const override
Definition
qoffscreenintegration_x11.cpp:76
QOffscreenX11Integration::QOffscreenX11Integration
QOffscreenX11Integration(const QStringList ¶mList)
Definition
qoffscreenintegration_x11.cpp:44
QOffscreenX11Integration::~QOffscreenX11Integration
~QOffscreenX11Integration()
QOffscreenX11PlatformNativeInterface
Definition
qoffscreenintegration_x11.h:26
QOffscreenX11PlatformNativeInterface::QOffscreenX11PlatformNativeInterface
QOffscreenX11PlatformNativeInterface(QOffscreenIntegration *integration)
Definition
qoffscreenintegration_x11.cpp:83
QOffscreenX11PlatformNativeInterface::~QOffscreenX11PlatformNativeInterface
~QOffscreenX11PlatformNativeInterface()
QOffscreenX11PlatformNativeInterface::nativeResourceForScreen
void * nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override
Definition
qoffscreenintegration_x11.cpp:91
QOffscreenX11PlatformNativeInterface::m_connection
QScopedPointer< QOffscreenX11Connection > m_connection
Definition
qoffscreenintegration_x11.h:39
qtbase
src
plugins
platforms
offscreen
qoffscreenintegration_x11.h
Generated on
for Qt by
1.18.0