diff options
author | Jorgen Lind <jorgen.lind@digia.com> | 2013-11-14 13:22:13 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-27 15:32:17 +0100 |
commit | d250b714f8eb5a60bb048830e723ac76f06215b7 (patch) | |
tree | f6a6334b5ed8d3f3425447bd995f2bbff75e312f /src/client/qwaylandeventthread.h | |
parent | 333648ff98558b78ca0464f8b1d606d40234d46f (diff) |
Move wayland into a client directory not under the plugins src folder
And make wayland common files into a library, exporting all classes. Now
there is no need to do bulild hacks to make your own version of the
wayland plugin.
Change-Id: Ib4872863dfb5ab3f2bc0f4a94ae16fc1e7b63b88
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/client/qwaylandeventthread.h')
-rw-r--r-- | src/client/qwaylandeventthread.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/client/qwaylandeventthread.h b/src/client/qwaylandeventthread.h new file mode 100644 index 000000000..ba7e33e09 --- /dev/null +++ b/src/client/qwaylandeventthread.h @@ -0,0 +1,46 @@ +#ifndef QWAYLANDEVENTTHREAD_H +#define QWAYLANDEVENTTHREAD_H + +#include <QObject> +#include <QMutex> +#include <wayland-client.h> + +#include <QtWaylandClient/qwaylandclientexport.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 |