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

Provided by KDAB

Privacy Policy
Start learning QML with our Intro Training
Find out more

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