File indexing completed on 2024-05-19 16:33:10

0001 /*
0002     SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 #ifndef QTWAYLANDINTEGRATIONTEST_H
0007 #define QTWAYLANDINTEGRATIONTEST_H
0008 
0009 #include <QObject>
0010 #include <QSize>
0011 
0012 namespace KWayland
0013 {
0014 namespace Client
0015 {
0016 class Compositor;
0017 class ConnectionThread;
0018 class Registry;
0019 class ShellSurface;
0020 class ShmPool;
0021 class Surface;
0022 }
0023 }
0024 
0025 class QTimer;
0026 
0027 class WaylandClientTest : public QObject
0028 {
0029     Q_OBJECT
0030 public:
0031     explicit WaylandClientTest(QObject *parent = nullptr);
0032     ~WaylandClientTest() override;
0033 
0034 private:
0035     void init();
0036     void render(const QSize &size);
0037     void render();
0038     void setupRegistry(KWayland::Client::Registry *registry);
0039     void toggleTimer();
0040     KWayland::Client::ConnectionThread *m_connectionThreadObject;
0041     KWayland::Client::Compositor *m_compositor;
0042     KWayland::Client::Surface *m_surface;
0043     KWayland::Client::ShmPool *m_shm;
0044     KWayland::Client::ShellSurface *m_shellSurface;
0045     QSize m_currentSize;
0046     QTimer *m_timer;
0047 };
0048 
0049 #endif