summaryrefslogtreecommitdiffstats
path: root/examples/wayland/minimal-cpp/compositor.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/wayland/minimal-cpp/compositor.h')
-rw-r--r--examples/wayland/minimal-cpp/compositor.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/wayland/minimal-cpp/compositor.h b/examples/wayland/minimal-cpp/compositor.h
index 984deebdb..e804ac02f 100644
--- a/examples/wayland/minimal-cpp/compositor.h
+++ b/examples/wayland/minimal-cpp/compositor.h
@@ -59,17 +59,20 @@ QT_BEGIN_NAMESPACE
class Window;
class QOpenGLTexture;
+class QWaylandIviApplication;
+class QWaylandIviSurface;
class View : public QWaylandView
{
Q_OBJECT
public:
- View() {}
+ View(int iviId) : m_iviId(iviId) {}
QOpenGLTexture *getTexture();
- bool isCursor() const;
+ int iviId() const { return m_iviId; }
private:
friend class Compositor;
QOpenGLTexture *m_texture = nullptr;
+ int m_iviId;
};
class Compositor : public QWaylandCompositor
@@ -86,13 +89,14 @@ public:
void endRender();
private slots:
- void onSurfaceCreated(QWaylandSurface *surface);
+ void onIviSurfaceCreated(QWaylandIviSurface *iviSurface);
void onSurfaceDestroyed();
void triggerRender();
void viewSurfaceDestroyed();
private:
Window *m_window = nullptr;
+ QWaylandIviApplication *m_iviApplication = nullptr;
QList<View*> m_views;
};