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 QXCBGLXINTEGRATION_H
5#define QXCBGLXINTEGRATION_H
6
7#include "qxcbglintegration.h"
8
9QT_BEGIN_NAMESPACE
10
11class QXcbNativeInterfaceHandler;
12
13class QXcbGlxIntegration : public QXcbGlIntegration,
14 public QNativeInterface::Private::QGLXIntegration
15{
16public:
17 QXcbGlxIntegration();
18 ~QXcbGlxIntegration();
19
20 bool initialize(QXcbConnection *connection) override;
21 bool handleXcbEvent(xcb_generic_event_t *event, uint responseType) override;
22
23 QXcbWindow *createWindow(QWindow *window) const override;
24 QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
25 QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const override;
26 QOpenGLContext *createOpenGLContext(GLXContext context, void *visualInfo, QOpenGLContext *shareContext) const override;
27
28 bool supportsThreadedOpenGL() const override;
29 bool supportsSwitchableWidgetComposition() const override;
30
31private:
32 QXcbConnection *m_connection;
33 uint32_t m_glx_first_event;
34
35 QScopedPointer<QXcbNativeInterfaceHandler> m_native_interface_handler;
36};
37
38QT_END_NAMESPACE
39
40#endif //QXCBGLXINTEGRATION_H
41

source code of qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h