| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef QWAYLANDCLIENTBUFFERINTEGRATION_H |
| 6 |
#define QWAYLANDCLIENTBUFFERINTEGRATION_H |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 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 ) { return nullptr; } |
| 55 |
virtual void *nativeResourceForContext(NativeResource , QPlatformOpenGLContext *) { return nullptr; } |
| 56 |
}; |
| 57 |
|
| 58 |
} |
| 59 |
|
| 60 |
QT_END_NAMESPACE |
| 61 |
|
| 62 |
#endif |