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

source code of qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h