diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2013-04-09 16:52:59 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@digia.com> | 2013-04-17 09:39:21 +0200 |
commit | 82d52cdae8bb5c328db68123cb16d9d1fe4efb81 (patch) | |
tree | 58429ba7ec7cf33d520c28765ebb216d9415e620 /src/plugins/platforms/wayland_common/qwaylandwindow.h | |
parent | 05d054ad7207764293525661876ebc689940a15c (diff) | |
download | qtwayland-82d52cdae8bb5c328db68123cb16d9d1fe4efb81.tar.gz |
Adapted code to use qtwaylandscanner.
We include the wayland.xml since we need to generate bindings for the
core protocol as well.
Also, WAYLANDSOURCES has been split into WAYLANDSERVERSOURCES and
WAYLANDCLIENTSOURCES since we need to produce different output in the
server and client cases.
Change-Id: I0bd493d41ca6b26dfd2d9b1463d4b762786537f9
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/plugins/platforms/wayland_common/qwaylandwindow.h')
-rw-r--r-- | src/plugins/platforms/wayland_common/qwaylandwindow.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/platforms/wayland_common/qwaylandwindow.h b/src/plugins/platforms/wayland_common/qwaylandwindow.h index 613f17e7..b90af1f6 100644 --- a/src/plugins/platforms/wayland_common/qwaylandwindow.h +++ b/src/plugins/platforms/wayland_common/qwaylandwindow.h @@ -50,6 +50,8 @@ #include "qwaylanddisplay.h" +#include "qwayland-wayland.h" + struct wl_egl_window; QT_BEGIN_NAMESPACE @@ -81,7 +83,7 @@ public: uint32_t edges; }; -class QWaylandWindow : public QObject, public QPlatformWindow +class QWaylandWindow : public QObject, public QPlatformWindow, public QtWayland::wl_surface { Q_OBJECT public: @@ -107,18 +109,24 @@ public: void configure(uint32_t edges, int32_t width, int32_t height); + using QtWayland::wl_surface::attach; void attach(QWaylandBuffer *buffer, int x, int y); void attachOffset(QWaylandBuffer *buffer); QWaylandBuffer *attached() const; QPoint attachOffset() const; + using QtWayland::wl_surface::damage; void damage(const QRect &rect); void waitForFrameSync(); QMargins frameMargins() const; - struct wl_surface *wl_surface() const { return mSurface; } + // TODO: remove? + struct ::wl_surface *wl_surface() { return object(); } + const struct ::wl_surface *wl_surface() const { return object(); } + + static QWaylandWindow *fromWlSurface(::wl_surface *surface); QWaylandShellSurface *shellSurface() const; QWaylandExtendedSurface *extendedWindow() const; @@ -155,7 +163,6 @@ public slots: protected: QWaylandDisplay *mDisplay; - struct wl_surface *mSurface; QWaylandShellSurface *mShellSurface; QWaylandExtendedSurface *mExtendedWindow; QWaylandSubSurface *mSubSurfaceWindow; |