Debian Codegraph @

wayland/qtwayland-dev/5.11.3/QtWaylandClient/private/qwaylandclientbufferintegration_p.h

raw symbols SCIP
1 // Copyright (C) 2016 The Qt Company Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QWAYLANDCLIENTBUFFERINTEGRATION_H
6 #define QWAYLANDCLIENTBUFFERINTEGRATION_H
7
8 //
9 // W A R N I N G
10 // -------------
11 //
12 // This file is not part of the Qt API. It exists purely as an
13 // implementation detail. This header file may change from version to
14 // version without notice, or even be removed.
15 //
16 // We mean it.
17 //
18
19 #include <QtCore/qglobal.h>
20 #include <QtWaylandClient/qtwaylandclientglobal.h>
21
22 QT_BEGIN_NAMESPACE
23
24 class QWindow;
25 class QPlatformOpenGLContext;
26 class QSurfaceFormat;
27
28 namespace QtWaylandClient {
29
30 class QWaylandWindow;
31 class QWaylandDisplay;
32
33 class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegration
34 {
35 public:
36 QWaylandClientBufferIntegration();
37 virtual ~QWaylandClientBufferIntegration();
38
39 virtual void initialize(QWaylandDisplay *display) = 0;
40
41 virtual bool isValid() const { return true; }
42
43 virtual bool supportsThreadedOpenGL() const { return false; }
44 virtual bool supportsWindowDecoration() const { return false; }
45
46 virtual QWaylandWindow *createEglWindow(QWindow *window) = 0;
47 virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0;
48
49 enum NativeResource {
50 EglDisplay,
51 EglConfig,
52 EglContext
53 };
54 virtual void *nativeResource(NativeResource /*resource*/) { return nullptr; }
55 virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return nullptr; }
56 };
57
58 }
59
60 QT_END_NAMESPACE
61
62 #endif // QWAYLANDCLIENTBUFFERINTEGRATION_H