blob: 4174c96cfabb094939b813dcbe2a525223077676 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
|