summaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@theqtcompany.com>2016-02-26 13:10:36 +0100
committerJohan Helsing <johan.helsing@qt.io>2016-04-26 12:29:04 +0000
commitb04a737dc694064b4fd507f0f52a7b9537c09bc7 (patch)
tree335d18f572926e082affb7d9e682b7feb3502144 /src/imports
parent38cdbabc0fe92a105ac6f6accaa6e75a6d730e56 (diff)
QML API for xdg-shell
Exposes QWaylandXdgShell and QWaylandXdgSurface as QML types, along with a new QWaylandXdgSurfaceItem. All of this mirrors the implementation of wl_shell closely. The biggest difference is how resize is handled. There is now some duplication in the window chrome implementation of the pure-qml compositor. This may be improved by refactoring the existing API for shell extensions. Change-Id: I4f2ceff7e0462034cd295a27c3eefea457cc9b96 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/compositor/qwaylandquickcompositorplugin.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/imports/compositor/qwaylandquickcompositorplugin.cpp b/src/imports/compositor/qwaylandquickcompositorplugin.cpp
index 6b42a2e0a..d2d8189bf 100644
--- a/src/imports/compositor/qwaylandquickcompositorplugin.cpp
+++ b/src/imports/compositor/qwaylandquickcompositorplugin.cpp
@@ -48,11 +48,13 @@
#include <QtWaylandCompositor/QWaylandQuickExtension>
#include <QtWaylandCompositor/QWaylandInputDevice>
#include <QtWaylandCompositor/QWaylandQuickWlShellSurfaceItem>
+#include <QtWaylandCompositor/QWaylandQuickXdgSurfaceItem>
#include <QtWaylandCompositor/QWaylandResource>
#include <QtWaylandCompositor/QWaylandWindowManagerExtension>
#include <QtWaylandCompositor/QWaylandWlShell>
#include <QtWaylandCompositor/QWaylandTextInputManager>
+#include <QtWaylandCompositor/QWaylandXdgShell>
#include <QtWaylandCompositor/qwaylandexport.h>
#include "qwaylandmousetracker_p.h"
@@ -63,6 +65,8 @@ Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(QWaylandQuickCompositor)
Q_COMPOSITOR_DECLARE_QUICK_DATA_CLASS(QWaylandWindowManagerExtension)
Q_COMPOSITOR_DECLARE_QUICK_DATA_CLASS(QWaylandWlShell)
Q_COMPOSITOR_DECLARE_QUICK_DATA_CLASS(QWaylandWlShellSurface)
+Q_COMPOSITOR_DECLARE_QUICK_DATA_CLASS(QWaylandXdgShell)
+Q_COMPOSITOR_DECLARE_QUICK_DATA_CLASS(QWaylandXdgSurface)
Q_COMPOSITOR_DECLARE_QUICK_DATA_CLASS(QWaylandTextInputManager)
@@ -142,6 +146,7 @@ public:
qmlRegisterUncreatableType<QWaylandCompositor>(uri, 1, 0, "WaylandCompositorBase", QObject::tr("Cannot create instance of WaylandCompositorBase, use WaylandCompositor instead"));
qmlRegisterUncreatableType<QWaylandSurface>(uri, 1, 0, "WaylandSurfaceBase", QObject::tr("Cannot create instance of WaylandSurfaceBase, use WaylandSurface instead"));
qmlRegisterUncreatableType<QWaylandWlShellSurface>(uri, 1, 0, "WlShellSurfaceBase", QObject::tr("Cannot create instance of WlShellSurfaceBase, use WlShellSurface instead"));
+ qmlRegisterUncreatableType<QWaylandXdgSurface>(uri, 1, 0, "XdgSurfaceBase", QObject::tr("Cannot create instance of XdgSurfaceBase, use XdgSurface instead"));
qmlRegisterUncreatableType<QWaylandResource>(uri, 1, 0, "WaylandResource", QObject::tr("Cannot create instance of WaylandResource"));
//This should probably be somewhere else
@@ -149,6 +154,10 @@ public:
qmlRegisterType<QWaylandWlShellSurfaceQuickData>(uri, 1, 0, "WlShellSurface");
qmlRegisterType<QWaylandQuickWlShellSurfaceItem>(uri, 1, 0, "WlShellSurfaceItem");
qmlRegisterType<QWaylandTextInputManagerQuickData>(uri, 1, 0, "TextInputManager");
+
+ qmlRegisterType<QWaylandXdgShellQuickData>(uri, 1, 0, "XdgShell");
+ qmlRegisterType<QWaylandXdgSurfaceQuickData>(uri, 1, 0, "XdgSurface");
+ qmlRegisterType<QWaylandQuickXdgSurfaceItem>(uri, 1, 0, "XdgSurfaceItem");
}
};
//![class decl]