summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandeventthread_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandeventthread_p.h')
-rw-r--r--src/client/qwaylandeventthread_p.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/client/qwaylandeventthread_p.h b/src/client/qwaylandeventthread_p.h
new file mode 100644
index 000000000..4174c96cf
--- /dev/null
+++ b/src/client/qwaylandeventthread_p.h
@@ -0,0 +1,46 @@
+#ifndef QWAYLANDEVENTTHREAD_H
+#define QWAYLANDEVENTTHREAD_H
+
+#include <QObject>
+#include <QMutex>
+#include <wayland-client.h>
+
+#include <QtWaylandClient/private/qwaylandclientexport_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QSocketNotifier;
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandEventThread : public QObject
+{
+ Q_OBJECT
+public:
+ explicit QWaylandEventThread(QObject *parent = 0);
+ ~QWaylandEventThread();
+
+ void displayConnect();
+
+ wl_display *display() const;
+
+private slots:
+ void readWaylandEvents();
+
+ void waylandDisplayConnect();
+
+signals:
+ void newEventsRead();
+
+private:
+
+ struct wl_display *m_display;
+ int m_fileDescriptor;
+
+ QSocketNotifier *m_readNotifier;
+
+ QMutex *m_displayLock;
+
+};
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDEVENTTHREAD_H