File indexing completed on 2024-12-01 05:02:04

0001 /*
0002     SPDX-FileCopyrightText: 2014, 2015 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 #pragma once
0007 
0008 #include <QObject>
0009 #include <QSize>
0010 
0011 namespace KWayland
0012 {
0013 namespace Client
0014 {
0015 class Compositor;
0016 class ConnectionThread;
0017 class EventQueue;
0018 class Output;
0019 class Registry;
0020 class ShmPool;
0021 class Surface;
0022 }
0023 }
0024 
0025 class QThread;
0026 class QTimer;
0027 
0028 class WaylandClientTest : public QObject
0029 {
0030     Q_OBJECT
0031 public:
0032     explicit WaylandClientTest(QObject *parent = nullptr);
0033     virtual ~WaylandClientTest();
0034 
0035 private:
0036     void init();
0037     void render(const QSize &size);
0038     void render();
0039     void setupRegistry(KWayland::Client::Registry *registry);
0040     QThread *m_connectionThread;
0041     KWayland::Client::ConnectionThread *m_connectionThreadObject;
0042     KWayland::Client::EventQueue *m_eventQueue;
0043     KWayland::Client::Compositor *m_compositor;
0044     KWayland::Client::Output *m_output;
0045     KWayland::Client::Surface *m_surface;
0046     KWayland::Client::ShmPool *m_shm;
0047     QSize m_currentSize;
0048     QTimer *m_timer;
0049 };