| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 | */ |
| 6 | #ifndef QTWAYLANDINTEGRATIONTEST_H |
| 7 | #define QTWAYLANDINTEGRATIONTEST_H |
| 8 | |
| 9 | #include <QObject> |
| 10 | #include <QSize> |
| 11 | |
| 12 | namespace KWayland |
| 13 | { |
| 14 | namespace Client |
| 15 | { |
| 16 | class Compositor; |
| 17 | class ConnectionThread; |
| 18 | class Registry; |
| 19 | class ShellSurface; |
| 20 | class ShmPool; |
| 21 | class Surface; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | class QTimer; |
| 26 | |
| 27 | class WaylandClientTest : public QObject |
| 28 | { |
| 29 | Q_OBJECT |
| 30 | public: |
| 31 | explicit WaylandClientTest(QObject *parent = nullptr); |
| 32 | ~WaylandClientTest() override; |
| 33 | |
| 34 | private: |
| 35 | void init(); |
| 36 | void render(const QSize &size); |
| 37 | void render(); |
| 38 | void setupRegistry(KWayland::Client::Registry *registry); |
| 39 | void toggleTimer(); |
| 40 | KWayland::Client::ConnectionThread *m_connectionThreadObject; |
| 41 | KWayland::Client::Compositor *m_compositor; |
| 42 | KWayland::Client::Surface *m_surface; |
| 43 | KWayland::Client::ShmPool *m_shm; |
| 44 | KWayland::Client::ShellSurface *m_shellSurface; |
| 45 | QSize m_currentSize; |
| 46 | QTimer *m_timer; |
| 47 | }; |
| 48 | |
| 49 | #endif |
| 50 | |