diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-09-04 14:35:19 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-09-04 16:12:47 +0200 |
commit | 6358b0ede93c6633802126bf8bf0a44860e66917 (patch) | |
tree | 17c8a90565b3aa4f0d3c0cb36a642c0da53bf229 /src/compositor/compositor_api/qwaylandsurface.h | |
parent | b666aa58d7a168fe4ddb694caba099343421aa65 (diff) |
Make it possible to connect to a createSurface signal
Remove the QWaylandSurface factory function from QWaylandCompositor.
Add a default constructor to QWaylandSurface and a initialize function.
Add som housekeeping code in debug builds that ensures the user calls
initialize.
Add a fallback factory function on the compositor if the user is fine
with getting the default implementation of QWaylandSurface or
QWaylandQuickSurface
Change-Id: Ib9289c323b6723f0d1119a484cf9e0c26c95b549
Diffstat (limited to 'src/compositor/compositor_api/qwaylandsurface.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylandsurface.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h index b69312d58..110285900 100644 --- a/src/compositor/compositor_api/qwaylandsurface.h +++ b/src/compositor/compositor_api/qwaylandsurface.h @@ -76,9 +76,13 @@ public: OriginBottomLeft }; - QWaylandSurface(QWaylandClient *client, quint32 id, int version, QWaylandCompositor *compositor); + QWaylandSurface(); + QWaylandSurface(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version); virtual ~QWaylandSurface(); + Q_INVOKABLE void initialize(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version); + bool isInitialized() const; + QWaylandClient *client() const; struct wl_client *waylandClient() const { return client()->client(); } @@ -117,7 +121,7 @@ public Q_SLOTS: void updateSelection(); protected: - QWaylandSurface(QWaylandSurfacePrivate *dptr); + QWaylandSurface(QWaylandSurfacePrivate &dptr); Q_SIGNALS: void mappedChanged(); |