diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2012-01-04 08:33:28 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2012-01-04 10:34:40 +0100 |
commit | d5ea033df8cf0a2dec49fce639d84e7dd0a2fced (patch) | |
tree | 15d92a4990b612e73450d110a6cc820df8cdee2e /src/compositor/compositor_api/waylandsurface.h | |
parent | 62bba49c83849ca5904357de45c888f9fab3106a (diff) |
Implement subsurfaces extension
This allows you to have subwindows in the compositor.
We tried to experiment with composing subsurfaces client side, but the
architecture did not feel very lean. This however, requires the
compositor to compose each surface before drawing the surface. The
example compositors render the subsurfaces into the wl_surfaces texture.
This might not be a good idea.
Change-Id: I6e186b62d7b490de7f4e6c6f22fcf6c1e0a70df3
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/compositor/compositor_api/waylandsurface.h')
-rw-r--r-- | src/compositor/compositor_api/waylandsurface.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/waylandsurface.h b/src/compositor/compositor_api/waylandsurface.h index 45c308a6b..89befeafc 100644 --- a/src/compositor/compositor_api/waylandsurface.h +++ b/src/compositor/compositor_api/waylandsurface.h @@ -54,15 +54,21 @@ class WaylandSurfacePrivate; +#ifdef QT_COMPOSITOR_QUICK +class WaylandSurfaceItem; +#endif + namespace Wayland { class Surface; class SurfacePrivate; +class ExtendedSurface; } class Q_COMPOSITOR_EXPORT WaylandSurface : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(WaylandSurface) + Q_PROPERTY(QRect geometry READ geometry WRITE setGeometry NOTIFY geometryChanged) public: enum Type { Invalid, @@ -73,6 +79,9 @@ public: WaylandSurface(Wayland::Surface *surface); + WaylandSurface *parentSurface() const; + QLinkedList<WaylandSurface *> subSurfaces() const; + Type type() const; bool isYInverted() const; @@ -105,19 +114,31 @@ public: void setInputFocus(); Wayland::Surface *handle() const; + +#ifdef QT_COMPOSITOR_QUICK + WaylandSurfaceItem *surfaceItem() const; + void setSurfaceItem(WaylandSurfaceItem *surfaceItem); +#endif + qint64 processId() const; QByteArray authenticationToken() const; QVariantMap windowProperties() const; void setWindowProperty(const QString &name, const QVariant &value); + QPoint mapToParent(const QPoint &) const; + QPoint mapTo(WaylandSurface *, const QPoint &) const; + signals: void mapped(); void unmapped(); void damaged(const QRect &rect); + void parentChanged(WaylandSurface *newParent, WaylandSurface *oldParent); + void geometryChanged(); void windowPropertyChanged(const QString &name, const QVariant &value); friend class Wayland::Surface; friend class Wayland::SurfacePrivate; + friend class Wayland::ExtendedSurface; }; #endif // WAYLANDSURFACE_H |