File indexing completed on 2024-05-19 16:35:18
0001 /* 0002 SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org> 0003 SPDX-FileCopyrightText: 2018 David Edmundson <davidedmundson@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #pragma once 0009 0010 #include <wayland-server-core.h> 0011 0012 #include <QHash> 0013 #include <QList> 0014 #include <QSocketNotifier> 0015 #include <QString> 0016 #include <QVector> 0017 0018 #include <EGL/egl.h> 0019 0020 struct wl_resource; 0021 0022 namespace KWaylandServer 0023 { 0024 class ClientBufferIntegration; 0025 class ClientBuffer; 0026 class ClientConnection; 0027 class Display; 0028 class OutputInterface; 0029 class OutputDeviceV2Interface; 0030 class SeatInterface; 0031 struct ClientBufferDestroyListener; 0032 0033 class DisplayPrivate 0034 { 0035 public: 0036 static DisplayPrivate *get(Display *display); 0037 DisplayPrivate(Display *q); 0038 0039 void registerSocketName(const QString &socketName); 0040 0041 void registerClientBuffer(ClientBuffer *clientBuffer); 0042 void unregisterClientBuffer(ClientBuffer *clientBuffer); 0043 0044 Display *q; 0045 QSocketNotifier *socketNotifier = nullptr; 0046 wl_display *display = nullptr; 0047 wl_event_loop *loop = nullptr; 0048 bool running = false; 0049 QList<OutputInterface *> outputs; 0050 QList<OutputDeviceV2Interface *> outputdevicesV2; 0051 QVector<SeatInterface *> seats; 0052 QVector<ClientConnection *> clients; 0053 QStringList socketNames; 0054 EGLDisplay eglDisplay = EGL_NO_DISPLAY; 0055 QHash<::wl_resource *, ClientBuffer *> resourceToBuffer; 0056 QHash<ClientBuffer *, ClientBufferDestroyListener *> bufferToListener; 0057 QList<ClientBufferIntegration *> bufferIntegrations; 0058 }; 0059 0060 } // namespace KWaylandServer