Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qeglfsx11integration.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QEGLFSX11INTEGRATION_H
6#define QEGLFSX11INTEGRATION_H
7
8#include "private/qeglfsdeviceintegration_p.h"
9
10#include <qpa/qwindowsysteminterface.h>
11#include <qpa/qplatformwindow.h>
12
13#include <xcb/xcb.h>
14
15QT_BEGIN_NAMESPACE
16
29
30class EventReader;
31
33{
34public:
35 QEglFSX11Integration() : m_connection(nullptr), m_window(0), m_eventReader(nullptr) {}
36
40 QSize screenSize() const override;
41 EGLNativeWindowType createNativeWindow(QPlatformWindow *window,
42 const QSize &size,
43 const QSurfaceFormat &format) override;
44 void destroyNativeWindow(EGLNativeWindowType window) override;
45 bool hasCapability(QPlatformIntegration::Capability cap) const override;
46
47 xcb_connection_t *connection() { return m_connection; }
48 const xcb_atom_t *atoms() const { return m_atoms; }
49 QPlatformWindow *platformWindow() { return m_platformWindow; }
50
51private:
52 void sendConnectionEvent(xcb_atom_t a);
53
54 void *m_display;
55 xcb_connection_t *m_connection;
56 xcb_atom_t m_atoms[Atoms::N_ATOMS];
57 xcb_window_t m_window;
58 EventReader *m_eventReader;
59 xcb_window_t m_connectionEventListener;
60 QPlatformWindow *m_platformWindow;
61 mutable QSize m_screenSize;
62};
63
64QT_END_NAMESPACE
65
66#endif
xcb_connection_t * connection()
const xcb_atom_t * atoms() const
QPlatformWindow * platformWindow()
EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) override
EGLNativeDisplayType platformDisplay() const override
QSize screenSize() const override
bool hasCapability(QPlatformIntegration::Capability cap) const override
void destroyNativeWindow(EGLNativeWindowType window) override
#define DISPLAY