| 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 "qxcbnativeinterfacehandler.h" |
| 7 | |
| 8 | QT_BEGIN_NAMESPACE |
| 9 | |
| 10 | class QXcbEglNativeInterfaceHandler : public QXcbNativeInterfaceHandler |
| 11 | { |
| 12 | public: |
| 13 | enum ResourceType { |
| 14 | EglDisplay, |
| 15 | EglContext, |
| 16 | EglConfig |
| 17 | }; |
| 18 | |
| 19 | QXcbEglNativeInterfaceHandler(QXcbNativeInterface *nativeInterface); |
| 20 | |
| 21 | QPlatformNativeInterface::NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource) const override; |
| 22 | QPlatformNativeInterface::NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) const override; |
| 23 | QPlatformNativeInterface::NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource) const override; |
| 24 | private: |
| 25 | static void *eglDisplay(); |
| 26 | static void *eglDisplayForWindow(QWindow *window); |
| 27 | static void *eglContextForContext(QOpenGLContext *context); |
| 28 | static void *eglConfigForContext(QOpenGLContext *context); |
| 29 | }; |
| 30 | |
| 31 | QT_END_NAMESPACE |
| 32 |
