| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef QWAYLANDSUBSURFACE_H |
| 6 |
#define QWAYLANDSUBSURFACE_H |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#include <wayland-client.h> |
| 20 |
|
| 21 |
#include <QtCore/qglobal.h> |
| 22 |
#include <QtCore/qmutex.h> |
| 23 |
|
| 24 |
#include <QtWaylandClient/qtwaylandclientglobal.h> |
| 25 |
#include <QtWaylandClient/private/qwayland-wayland.h> |
| 26 |
|
| 27 |
QT_BEGIN_NAMESPACE |
| 28 |
|
| 29 |
namespace QtWaylandClient { |
| 30 |
|
| 31 |
class QWaylandDisplay; |
| 32 |
class QWaylandWindow; |
| 33 |
|
| 34 |
class Q_WAYLAND_CLIENT_EXPORT QWaylandSubSurface : public QtWayland::wl_subsurface |
| 35 |
{ |
| 36 |
public: |
| 37 |
QWaylandSubSurface(QWaylandWindow *window, QWaylandWindow *parent, ::wl_subsurface *subsurface); |
| 38 |
~QWaylandSubSurface() override; |
| 39 |
|
| 40 |
QWaylandWindow *window() const { return m_window; } |
| 41 |
QWaylandWindow *parent() const { return m_parent; } |
| 42 |
|
| 43 |
void setSync(); |
| 44 |
void setDeSync(); |
| 45 |
bool isSync() const { return m_synchronized; } |
| 46 |
QMutex *syncMutex() { return &m_syncLock; } |
| 47 |
|
| 48 |
private: |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
void set_sync(); |
| 53 |
void set_desync(); |
| 54 |
QWaylandWindow *m_window = nullptr; |
| 55 |
QWaylandWindow *m_parent = nullptr; |
| 56 |
bool m_synchronized = false; |
| 57 |
QMutex m_syncLock; |
| 58 |
|
| 59 |
}; |
| 60 |
|
| 61 |
QT_END_NAMESPACE |
| 62 |
|
| 63 |
} |
| 64 |
|
| 65 |
#endif |