File indexing completed on 2024-05-19 05:30:34
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 #ifndef TOUCHCLIENTTEST_H 0007 #define TOUCHCLIENTTEST_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 EventQueue; 0019 class Output; 0020 class Registry; 0021 class ShmPool; 0022 class Surface; 0023 } 0024 } 0025 0026 class QThread; 0027 class QTimer; 0028 0029 class WaylandClientTest : public QObject 0030 { 0031 Q_OBJECT 0032 public: 0033 explicit WaylandClientTest(QObject *parent = nullptr); 0034 ~WaylandClientTest() override; 0035 0036 private: 0037 void init(); 0038 void render(const QSize &size); 0039 void render(); 0040 void setupRegistry(KWayland::Client::Registry *registry); 0041 void toggleTimer(); 0042 QThread *m_connectionThread; 0043 KWayland::Client::ConnectionThread *m_connectionThreadObject; 0044 KWayland::Client::EventQueue *m_eventQueue; 0045 KWayland::Client::Compositor *m_compositor; 0046 KWayland::Client::Output *m_output; 0047 KWayland::Client::Surface *m_surface; 0048 KWayland::Client::ShmPool *m_shm; 0049 QSize m_currentSize; 0050 QTimer *m_timer; 0051 }; 0052 0053 #endif