summaryrefslogtreecommitdiff
path: root/src/imports
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-07-08 14:28:54 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-08-20 09:57:06 +0200
commitf3d40b02558f5eca54ddb33b132d350b958cac1e (patch)
treeca6fdbdd8525b75810feaccf62aa0d1c1de05002 /src/imports
parenteca2eb2c19fdbb4ed5003d636d935fbf83968d70 (diff)
downloadqtwayland-f3d40b02558f5eca54ddb33b132d350b958cac1e.tar.gz
Port QtWayland.Compositor to new QML extension API
In order to add new properties and types in Qt 6, we need to port everything over to the new extension API in QML. This is generally more type safe and needs less manual maintenance, but there is some work involved in porting. The previous version exposed some types from the QtWaylandCompositor C++ library, extended a few of them with Qt Quick-specific subclass, added one additional C++-implemented type (QWaylandMouseTracker) and two additional QML-implemented types. We need all types to be defined in the same place for the automatic generation of plugins.qmltypes to work. Therefore all the additional types are moved from the plugin into the library, but still not exposed through public API. The plugin still exposes the types, so for the user this change will be transparent. Fixes: QTBUG-85512 Change-Id: I46e9e80424c9299c3eaee92773d233b1ec29cf2c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/compositor-extensions/iviapplication/qmldir2
-rw-r--r--src/imports/compositor-extensions/wlshell/qmldir2
-rw-r--r--src/imports/compositor-extensions/xdgshell/qmldir2
-rw-r--r--src/imports/compositor/CMakeLists.txt24
-rw-r--r--src/imports/compositor/WaylandCursorItem.qml72
-rw-r--r--src/imports/compositor/WaylandOutputWindow.qml47
-rw-r--r--src/imports/compositor/compositor.pro17
-rw-r--r--src/imports/compositor/compositor.qrc6
-rw-r--r--src/imports/compositor/plugins.qmltypes552
-rw-r--r--src/imports/compositor/qmldir1
-rw-r--r--src/imports/compositor/qwaylandmousetracker.cpp167
-rw-r--r--src/imports/compositor/qwaylandmousetracker_p.h76
-rw-r--r--src/imports/compositor/qwaylandquickcompositorplugin.cpp114
-rw-r--r--src/imports/texture-sharing-extension/qmldir1
-rw-r--r--src/imports/texture-sharing/qmldir1
15 files changed, 20 insertions, 1064 deletions
diff --git a/src/imports/compositor-extensions/iviapplication/qmldir b/src/imports/compositor-extensions/iviapplication/qmldir
index 75f6403e..a4d10b31 100644
--- a/src/imports/compositor-extensions/iviapplication/qmldir
+++ b/src/imports/compositor-extensions/iviapplication/qmldir
@@ -1,3 +1,5 @@
module QtWayland.Compositor.IviApplication
plugin qwaylandcompositoriviapplicationplugin
classname QWaylandCompositorIviApplicationPlugin
+typeinfo plugins.qmltypes
+typeinfo plugins.qmltypes
diff --git a/src/imports/compositor-extensions/wlshell/qmldir b/src/imports/compositor-extensions/wlshell/qmldir
index 75e1f2b3..51019c35 100644
--- a/src/imports/compositor-extensions/wlshell/qmldir
+++ b/src/imports/compositor-extensions/wlshell/qmldir
@@ -1,3 +1,5 @@
module QtWayland.Compositor.WlShell
plugin qwaylandcompositorwlshellplugin
classname QWaylandCompositorWlShellPlugin
+typeinfo plugins.qmltypes
+typeinfo plugins.qmltypes
diff --git a/src/imports/compositor-extensions/xdgshell/qmldir b/src/imports/compositor-extensions/xdgshell/qmldir
index 9880a20a..d011ddc1 100644
--- a/src/imports/compositor-extensions/xdgshell/qmldir
+++ b/src/imports/compositor-extensions/xdgshell/qmldir
@@ -1,3 +1,5 @@
module QtWayland.Compositor.XdgShell
plugin qwaylandcompositorxdgshellplugin
classname QWaylandCompositorXdgShellPlugin
+typeinfo plugins.qmltypes
+typeinfo plugins.qmltypes
diff --git a/src/imports/compositor/CMakeLists.txt b/src/imports/compositor/CMakeLists.txt
index 79aa5dbb..71f2e665 100644
--- a/src/imports/compositor/CMakeLists.txt
+++ b/src/imports/compositor/CMakeLists.txt
@@ -8,9 +8,7 @@ qt_add_qml_module(qwaylandcompositorplugin
URI "QtWayland.Compositor"
VERSION "${CMAKE_PROJECT_VERSION}"
CLASSNAME QWaylandCompositorPlugin
- SKIP_TYPE_REGISTRATION
SOURCES
- qwaylandmousetracker.cpp qwaylandmousetracker_p.h
qwaylandquickcompositorplugin.cpp
PUBLIC_LIBRARIES
Qt::Core
@@ -23,28 +21,8 @@ qt_add_qml_module(qwaylandcompositorplugin
Qt::WaylandCompositorPrivate
)
-# Resources:
-set(compositor_resource_files
- "WaylandCursorItem.qml"
- "WaylandOutputWindow.qml"
-)
-
-qt_add_resource(qwaylandcompositorplugin "compositor"
- PREFIX
- "/QtWaylandCompositor"
- FILES
- ${compositor_resource_files}
-)
-
-
#### Keys ignored in scope 1:.:.:compositor.pro:<TRUE>:
# CXX_MODULE = "qml"
-# QMAKE_QMLPLUGINDUMP_FLAGS = "-defaultplatform"
# QML_IMPORT_VERSION = "$$QT_VERSION"
+# QMl_IMPORT_NAME = "QtWayland.Compositor"
# TARGETPATH = "QtWayland/Compositor"
-
-## Scopes:
-#####################################################################
-
-#### Keys ignored in scope 2:.:.:compositor.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
-# QML_FILES = "WaylandOutputWindow.qml" "WaylandCursorItem.qml"
diff --git a/src/imports/compositor/WaylandCursorItem.qml b/src/imports/compositor/WaylandCursorItem.qml
deleted file mode 100644
index ba2e044c..00000000
--- a/src/imports/compositor/WaylandCursorItem.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtWayland.Compositor
-
-WaylandQuickItem {
- id: cursorItem
- property QtObject seat
- property int hotspotX: 0
- property int hotspotY: 0
-
- visible: cursorItem.surface != null
- inputEventsEnabled: false
- enabled: false
- transform: Translate {
- // If we've set an output scale factor different from the device pixel ratio
- // then the item will be rendered scaled, so we need to shift the hotspot accordingly
- x: -hotspotX * (output ? output.scaleFactor / Screen.devicePixelRatio : 1)
- y: -hotspotY * (output ? output.scaleFactor / Screen.devicePixelRatio : 1)
- }
-
- Connections {
- target: seat
- onCursorSurfaceRequest: {
- cursorItem.surface = surface;
- cursorItem.hotspotX = hotspotX;
- cursorItem.hotspotY = hotspotY;
- }
- }
-
- WaylandQuickItem {
- id: dragIcon
- property point offset
-
- x: cursorItem.hotspotX + offset.x
- y: cursorItem.hotspotY + offset.y
- z: -1
- surface: cursorItem.seat ? cursorItem.seat.drag.icon : null
-
- Connections {
- target: dragIcon.surface
- onOffsetForNextFrame: dragIcon.offset = offset;
- }
- }
-}
diff --git a/src/imports/compositor/WaylandOutputWindow.qml b/src/imports/compositor/WaylandOutputWindow.qml
deleted file mode 100644
index 0462a9a2..00000000
--- a/src/imports/compositor/WaylandOutputWindow.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-
-Window {
- id: window
- property QtObject compositor
- property QtObject output
- property bool automaticFrameCallback: false
-
- Component.onCompleted: {
- if (!compositor) {
- console.warn("WaylandOutputWindow initiated without compositor. This leads to undefined behavior");
- return;
- }
- output = compositor.addOutput(window);
- output.automaticFrameCallbacks = window.automaticFrameCallback;
- }
-}
-
diff --git a/src/imports/compositor/compositor.pro b/src/imports/compositor/compositor.pro
index 193450a8..dcfadb55 100644
--- a/src/imports/compositor/compositor.pro
+++ b/src/imports/compositor/compositor.pro
@@ -1,24 +1,11 @@
CXX_MODULE = qml
TARGET = qwaylandcompositorplugin
TARGETPATH = QtWayland/Compositor
+QMl_IMPORT_NAME = QtWayland.Compositor
QML_IMPORT_VERSION = $$QT_VERSION
-HEADERS += \
- qwaylandmousetracker_p.h
-
SOURCES += \
- qwaylandquickcompositorplugin.cpp \
- qwaylandmousetracker.cpp
-
-RESOURCES += compositor.qrc
-
-# In case of a debug build, deploy the QML files too
-CONFIG(debug, debug|release): \
- QML_FILES += \
- WaylandOutputWindow.qml \
- WaylandCursorItem.qml
+ qwaylandquickcompositorplugin.cpp
QT += quick-private qml-private gui-private core-private waylandcompositor waylandcompositor-private
-
-QMAKE_QMLPLUGINDUMP_FLAGS = -defaultplatform
load(qml_plugin)
diff --git a/src/imports/compositor/compositor.qrc b/src/imports/compositor/compositor.qrc
deleted file mode 100644
index 0004e083..00000000
--- a/src/imports/compositor/compositor.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
-<qresource prefix="/QtWaylandCompositor">
- <file>WaylandOutputWindow.qml</file>
- <file>WaylandCursorItem.qml</file>
-</qresource>
-</RCC>
diff --git a/src/imports/compositor/plugins.qmltypes b/src/imports/compositor/plugins.qmltypes
deleted file mode 100644
index a37f99d5..00000000
--- a/src/imports/compositor/plugins.qmltypes
+++ /dev/null
@@ -1,552 +0,0 @@
-import QtQuick.tooling 1.2
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtWayland.Compositor 6.0'
-
-Module {
- dependencies: [
- "QtQuick 2.15",
- "QtQuick.Window 2.15"
- ]
- Component {
- name: "QWaylandClient"
- prototype: "QObject"
- exports: ["QtWayland.Compositor/WaylandClient 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "compositor"; type: "QWaylandCompositor"; isReadonly: true; isPointer: true }
- Property { name: "userId"; type: "qlonglong"; isReadonly: true }
- Property { name: "groupId"; type: "qlonglong"; isReadonly: true }
- Property { name: "processId"; type: "qlonglong"; isReadonly: true }
- Method { name: "close" }
- Method {
- name: "kill"
- Parameter { name: "signal"; type: "int" }
- }
- Method { name: "kill" }
- }
- Component {
- name: "QWaylandCompositor"
- prototype: "QWaylandObject"
- exports: ["QtWayland.Compositor/WaylandCompositorBase 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "socketName"; type: "QByteArray" }
- Property { name: "created"; type: "bool"; isReadonly: true }
- Property { name: "retainedSelection"; type: "bool" }
- Property { name: "defaultOutput"; type: "QWaylandOutput"; isPointer: true }
- Property { name: "useHardwareIntegrationExtension"; type: "bool" }
- Property { name: "defaultSeat"; type: "QWaylandSeat"; isReadonly: true; isPointer: true }
- Signal {
- name: "socketNameChanged"
- Parameter { name: "socketName"; type: "QByteArray" }
- }
- Signal {
- name: "retainedSelectionChanged"
- Parameter { name: "retainedSelection"; type: "bool" }
- }
- Signal {
- name: "surfaceRequested"
- Parameter { name: "client"; type: "QWaylandClient"; isPointer: true }
- Parameter { name: "id"; type: "uint" }
- Parameter { name: "version"; type: "int" }
- }
- Signal {
- name: "surfaceCreated"
- Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true }
- }
- Signal {
- name: "surfaceAboutToBeDestroyed"
- Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true }
- }
- Signal {
- name: "subsurfaceChanged"
- Parameter { name: "child"; type: "QWaylandSurface"; isPointer: true }
- Parameter { name: "parent"; type: "QWaylandSurface"; isPointer: true }
- }
- Signal {
- name: "defaultSeatChanged"
- Parameter { name: "newDevice"; type: "QWaylandSeat"; isPointer: true }
- Parameter { name: "oldDevice"; type: "QWaylandSeat"; isPointer: true }
- }
- Signal {
- name: "outputAdded"
- Parameter { name: "output"; type: "QWaylandOutput"; isPointer: true }
- }
- Signal {
- name: "outputRemoved"
- Parameter { name: "output"; type: "QWaylandOutput"; isPointer: true }
- }
- Method { name: "processWaylandEvents" }
- Method {
- name: "addSocketDescriptor"
- Parameter { name: "fd"; type: "int" }
- }
- Method {
- name: "destroyClientForSurface"
- Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true }
- }
- Method {
- name: "destroyClient"
- Parameter { name: "client"; type: "QWaylandClient"; isPointer: true }
- }
- Method {
- name: "outputFor"
- type: "QWaylandOutput*"
- Parameter { name: "window"; type: "QWindow"; isPointer: true }
- }
- }
- Component {
- name: "QWaylandCompositorExtension"
- prototype: "QWaylandObject"
- exports: ["QtWayland.Compositor/WaylandExtension 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- }
- Component {
- name: "QWaylandDrag"
- prototype: "QObject"
- exports: ["QtWayland.Compositor/WaylandDrag 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "icon"; type: "QWaylandSurface"; isReadonly: true; isPointer: true }
- Property { name: "visible"; type: "bool"; isReadonly: true }
- Signal { name: "dragStarted" }
- Method {
- name: "dragMove"
- Parameter { name: "target"; type: "QWaylandSurface"; isPointer: true }
- Parameter { name: "pos"; type: "QPointF" }
- }
- Method { name: "drop" }
- Method { name: "cancelDrag" }
- }
- Component { name: "QWaylandIdleInhibitManagerV1"; prototype: "QWaylandCompositorExtension" }
- Component {
- name: "QWaylandIdleInhibitManagerV1QuickExtension"
- defaultProperty: "data"
- prototype: "QWaylandIdleInhibitManagerV1"
- exports: ["QtWayland.Compositor/IdleInhibitManagerV1 1.14"]
- exportMetaObjectRevisions: [0]
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- }
- Component {
- name: "QWaylandKeymap"
- defaultProperty: "data"
- prototype: "QObject"
- exports: ["QtWayland.Compositor/WaylandKeymap 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "layout"; type: "string" }
- Property { name: "variant"; type: "string" }
- Property { name: "options"; type: "string" }
- Property { name: "rules"; type: "string" }
- Property { name: "model"; type: "string" }
- }
- Component {
- name: "QWaylandMouseTracker"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: ["QtWayland.Compositor/WaylandMouseTracker 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "mouseX"; type: "double"; isReadonly: true }
- Property { name: "mouseY"; type: "double"; isReadonly: true }
- Property { name: "containsMouse"; type: "bool"; isReadonly: true }
- Property { name: "windowSystemCursorEnabled"; type: "bool" }
- Signal { name: "hoveredChanged" }
- }
- Component { name: "QWaylandObject"; prototype: "QObject" }
- Component {
- name: "QWaylandOutput"
- prototype: "QWaylandObject"
- exports: ["QtWayland.Compositor/WaylandOutputBase 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "Subpixel"
- values: {
- "SubpixelUnknown": 0,
- "SubpixelNone": 1,
- "SubpixelHorizontalRgb": 2,
- "SubpixelHorizontalBgr": 3,
- "SubpixelVerticalRgb": 4,
- "SubpixelVerticalBgr": 5
- }
- }
- Enum {
- name: "Transform"
- values: {
- "TransformNormal": 0,
- "Transform90": 1,
- "Transform180": 2,
- "Transform270": 3,
- "TransformFlipped": 4,
- "TransformFlipped90": 5,
- "TransformFlipped180": 6,
- "TransformFlipped270": 7
- }
- }
- Property { name: "compositor"; type: "QWaylandCompositor"; isPointer: true }
- Property { name: "window"; type: "QWindow"; isPointer: true }
- Property { name: "manufacturer"; type: "string" }
- Property { name: "model"; type: "string" }
- Property { name: "position"; type: "QPoint" }
- Property { name: "geometry"; type: "QRect"; isReadonly: true }
- Property { name: "availableGeometry"; type: "QRect" }
- Property { name: "physicalSize"; type: "QSize" }
- Property { name: "subpixel"; type: "QWaylandOutput::Subpixel" }
- Property { name: "transform"; type: "QWaylandOutput::Transform" }
- Property { name: "scaleFactor"; type: "int" }
- Property { name: "sizeFollowsWindow"; type: "bool" }
- Signal { name: "modeAdded" }
- Signal { name: "currentModeChanged" }
- Signal { name: "physicalSizeFollowsSizeChanged" }
- Signal { name: "windowDestroyed" }
- }
- Component {
- name: "QWaylandQtWindowManager"
- prototype: "QWaylandCompositorExtension"
- Property { name: "showIsFullScreen"; type: "bool" }
- Signal {
- name: "openUrl"
- Parameter { name: "client"; type: "QWaylandClient"; isPointer: true }
- Parameter { name: "url"; type: "QUrl" }
- }
- }
- Component {
- name: "QWaylandQtWindowManagerQuickExtension"
- defaultProperty: "data"
- prototype: "QWaylandQtWindowManager"
- exports: ["QtWayland.Compositor/QtWindowManager 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- }
- Component { name: "QWaylandQuickCompositor"; prototype: "QWaylandCompositor" }
- Component {
- name: "QWaylandQuickCompositorQuickExtensionContainer"
- defaultProperty: "data"
- prototype: "QWaylandQuickCompositor"
- exports: ["QtWayland.Compositor/WaylandCompositor 1.0"]
- exportMetaObjectRevisions: [0]
- Property {
- name: "extensions"
- type: "QWaylandCompositorExtension"
- isList: true
- isReadonly: true
- }
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- }
- Component {
- name: "QWaylandQuickHardwareLayer"
- prototype: "QObject"
- exports: ["QtWayland.Compositor/WaylandHardwareLayer 1.2"]
- exportMetaObjectRevisions: [0]
- Property { name: "stackingLevel"; type: "int" }
- }
- Component {
- name: "QWaylandQuickItem"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: [
- "QtWayland.Compositor/WaylandQuickItem 1.0",
- "QtWayland.Compositor/WaylandQuickItem 1.13"
- ]
- exportMetaObjectRevisions: [0, 65293]
- Property { name: "compositor"; type: "QWaylandCompositor"; isReadonly: true; isPointer: true }
- Property { name: "surface"; type: "QWaylandSurface"; isPointer: true }
- Property { name: "paintEnabled"; type: "bool" }
- Property { name: "touchEventsEnabled"; type: "bool" }
- Property { name: "origin"; type: "QWaylandSurface::Origin"; isReadonly: true }
- Property { name: "inputEventsEnabled"; type: "bool" }
- Property { name: "focusOnClick"; type: "bool" }
- Property { name: "subsurfaceHandler"; type: "QObject"; isPointer: true }
- Property { name: "output"; type: "QWaylandOutput"; isPointer: true }
- Property { name: "bufferLocked"; type: "bool" }
- Property { name: "allowDiscardFrontBuffer"; type: "bool" }
- Signal { name: "surfaceDestroyed" }
- Signal {
- name: "mouseMove"
- Parameter { name: "windowPosition"; type: "QPointF" }
- }
- Signal { name: "mouseRelease" }
- Method {
- name: "takeFocus"
- Parameter { name: "device"; type: "QWaylandSeat"; isPointer: true }
- }
- Method { name: "takeFocus" }
- Method {
- name: "setPaintEnabled"
- Parameter { name: "paintEnabled"; type: "bool" }
- }
- Method { name: "raise" }
- Method { name: "lower" }
- Method {
- name: "sendMouseMoveEvent"
- Parameter { name: "position"; type: "QPointF" }
- Parameter { name: "seat"; type: "QWaylandSeat"; isPointer: true }
- }
- Method {
- name: "sendMouseMoveEvent"
- Parameter { name: "position"; type: "QPointF" }
- }
- Method {
- name: "mapToSurface"
- type: "QPointF"
- Parameter { name: "point"; type: "QPointF" }
- }
- Method {
- name: "mapFromSurface"
- revision: 269
- type: "QPointF"
- Parameter { name: "point"; type: "QPointF" }
- }
- Method {
- name: "inputMethodQuery"
- type: "QVariant"
- Parameter { name: "query"; type: "Qt::InputMethodQuery" }
- Parameter { name: "argument"; type: "QVariant" }
- }
- Method { name: "setPrimary" }
- }
- Component {
- name: "QWaylandQuickOutput"
- defaultProperty: "data"
- prototype: "QWaylandOutput"
- exports: ["QtWayland.Compositor/WaylandOutput 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "automaticFrameCallback"; type: "bool" }
- Method { name: "updateStarted" }
- }
- Component {
- name: "QWaylandQuickShellSurfaceItem"
- defaultProperty: "data"
- prototype: "QWaylandQuickItem"
- exports: ["QtWayland.Compositor/ShellSurfaceItem 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "shellSurface"; type: "QWaylandShellSurface"; isPointer: true }
- Property { name: "moveItem"; type: "QQuickItem"; isPointer: true }
- Property { name: "autoCreatePopupItems"; type: "bool" }
- }
- Component {
- name: "QWaylandQuickSurface"
- defaultProperty: "data"
- prototype: "QWaylandSurface"
- exports: [
- "QtWayland.Compositor/WaylandSurface 1.0",
- "QtWayland.Compositor/WaylandSurface 1.13"
- ]
- exportMetaObjectRevisions: [0, 65293]
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "useTextureAlpha"; type: "bool" }
- }
- Component {
- name: "QWaylandResource"
- exports: ["QtWayland.Compositor/WaylandResource 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- }
- Component {
- name: "QWaylandSeat"
- prototype: "QWaylandObject"
- exports: ["QtWayland.Compositor/WaylandSeat 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "CapabilityFlags"
- values: {
- "Pointer": 1,
- "Keyboard": 2,
- "Touch": 4,
- "DefaultCapabilities": 7
- }
- }
- Property { name: "drag"; type: "QWaylandDrag"; isReadonly: true; isPointer: true }
- Property { name: "keymap"; type: "QWaylandKeymap"; isReadonly: true; isPointer: true }
- Signal {
- name: "mouseFocusChanged"
- Parameter { name: "newFocus"; type: "QWaylandView"; isPointer: true }
- Parameter { name: "oldFocus"; type: "QWaylandView"; isPointer: true }
- }
- Signal {
- name: "keyboardFocusChanged"
- Parameter { name: "newFocus"; type: "QWaylandSurface"; isPointer: true }
- Parameter { name: "oldFocus"; type: "QWaylandSurface"; isPointer: true }
- }
- Signal {
- name: "cursorSurfaceRequest"
- Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true }
- Parameter { name: "hotspotX"; type: "int" }
- Parameter { name: "hotspotY"; type: "int" }
- }
- Method {
- name: "sendKeyEvent"
- Parameter { name: "qtKey"; type: "int" }
- Parameter { name: "pressed"; type: "bool" }
- }
- Method {
- name: "sendTouchPointPressed"
- type: "uint"
- Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true }
- Parameter { name: "id"; type: "int" }
- Parameter { name: "position"; type: "QPointF" }
- }
- Method {
- name: "sendTouchPointReleased"
- type: "uint"
- Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true }
- Parameter { name: "id"; type: "int" }
- Parameter { name: "position"; type: "QPointF" }
- }
- Method {
- name: "sendTouchPointMoved"
- type: "uint"
- Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true }
- Parameter { name: "id"; type: "int" }
- Parameter { name: "position"; type: "QPointF" }
- }
- Method {
- name: "sendTouchFrameEvent"
- Parameter { name: "client"; type: "QWaylandClient"; isPointer: true }
- }
- Method {
- name: "sendTouchCancelEvent"
- Parameter { name: "client"; type: "QWaylandClient"; isPointer: true }
- }
- }
- Component {
- name: "QWaylandShell"
- prototype: "QWaylandCompositorExtension"
- exports: ["QtWayland.Compositor/Shell 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "FocusPolicy"
- values: {
- "AutomaticFocus": 0,
- "ManualFocus": 1
- }
- }
- Property { name: "focusPolicy"; type: "FocusPolicy" }
- }
- Component {
- name: "QWaylandShellSurface"
- prototype: "QWaylandCompositorExtension"
- exports: ["QtWayland.Compositor/ShellSurface 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "windowType"; type: "Qt::WindowType"; isReadonly: true }
- }
- Component {
- name: "QWaylandSurface"
- prototype: "QWaylandObject"
- exports: ["QtWayland.Compositor/WaylandSurfaceBase 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "Origin"
- values: {
- "OriginTopLeft": 0,
- "OriginBottomLeft": 1
- }
- }
- Property { name: "client"; type: "QWaylandClient"; isReadonly: true; isPointer: true }
- Property { name: "sourceGeometry"; revision: 269; type: "QRectF"; isReadonly: true }
- Property { name: "destinationSize"; revision: 269; type: "QSize"; isReadonly: true }
- Property { name: "bufferSize"; revision: 269; type: "QSize"; isReadonly: true }
- Property { name: "bufferScale"; type: "int"; isReadonly: true }
- Property { name: "contentOrientation"; type: "Qt::ScreenOrientation"; isReadonly: true }
- Property { name: "origin"; type: "QWaylandSurface::Origin"; isReadonly: true }
- Property { name: "hasContent"; type: "bool"; isReadonly: true }
- Property { name: "cursorSurface"; type: "bool" }
- Property { name: "inhibitsIdle"; revision: 270; type: "bool"; isReadonly: true }
- Signal {
- name: "damaged"
- Parameter { name: "rect"; type: "QRegion" }
- }
- Signal {
- name: "parentChanged"
- Parameter { name: "newParent"; type: "QWaylandSurface"; isPointer: true }
- Parameter { name: "oldParent"; type: "QWaylandSurface"; isPointer: true }
- }
- Signal {
- name: "childAdded"
- Parameter { name: "child"; type: "QWaylandSurface"; isPointer: true }
- }
- Signal { name: "sourceGeometryChanged"; revision: 269 }
- Signal { name: "destinationSizeChanged"; revision: 269 }
- Signal { name: "bufferSizeChanged"; revision: 269 }
- Signal {
- name: "offsetForNextFrame"
- Parameter { name: "offset"; type: "QPoint" }
- }
- Signal { name: "surfaceDestroyed" }
- Signal {
- name: "subsurfacePositionChanged"
- Parameter { name: "position"; type: "QPoint" }
- }
- Signal {
- name: "subsurfacePlaceAbove"
- Parameter { name: "sibling"; type: "QWaylandSurface"; isPointer: true }
- }
- Signal {
- name: "subsurfacePlaceBelow"
- Parameter { name: "sibling"; type: "QWaylandSurface"; isPointer: true }
- }
- Signal {
- name: "dragStarted"
- Parameter { name: "drag"; type: "QWaylandDrag"; isPointer: true }
- }
- Signal { name: "inhibitsIdleChanged"; revision: 65294 }
- Signal {
- name: "configure"
- Parameter { name: "hasBuffer"; type: "bool" }
- }
- Signal { name: "redraw" }
- Method { name: "updateSelection" }
- Method {
- name: "initialize"
- Parameter { name: "compositor"; type: "QWaylandCompositor"; isPointer: true }
- Parameter { name: "client"; type: "QWaylandClient"; isPointer: true }
- Parameter { name: "id"; type: "uint" }
- Parameter { name: "version"; type: "int" }
- }
- Method { name: "destroy" }
- Method { name: "isDestroyed"; type: "bool" }
- Method { name: "frameStarted" }
- Method { name: "sendFrameCallbacks" }
- }
- Component { name: "QWaylandTextInputManager"; prototype: "QWaylandCompositorExtension" }
- Component {
- name: "QWaylandTextInputManagerQuickExtension"
- defaultProperty: "data"
- prototype: "QWaylandTextInputManager"
- exports: ["QtWayland.Compositor/TextInputManager 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- }
- Component {
- prototype: "QWaylandQuickItem"
- name: "QtWayland.Compositor/WaylandCursorItem 1.0"
- exports: ["QtWayland.Compositor/WaylandCursorItem 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- Property { name: "seat"; type: "QObject"; isPointer: true }
- Property { name: "hotspotX"; type: "int" }
- Property { name: "hotspotY"; type: "int" }
- }
- Component {
- prototype: "QQuickWindowQmlImpl"
- name: "QtWayland.Compositor/WaylandOutputWindow 1.0"
- exports: ["QtWayland.Compositor/WaylandOutputWindow 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- Property { name: "compositor"; type: "QObject"; isPointer: true }
- Property { name: "output"; type: "QObject"; isPointer: true }
- Property { name: "automaticFrameCallback"; type: "bool" }
- }
-}
diff --git a/src/imports/compositor/qmldir b/src/imports/compositor/qmldir
index 6307e1a8..0a9a719e 100644
--- a/src/imports/compositor/qmldir
+++ b/src/imports/compositor/qmldir
@@ -1,3 +1,4 @@
module QtWayland.Compositor
plugin qwaylandcompositorplugin
classname QWaylandCompositorPlugin
+typeinfo plugins.qmltypes
diff --git a/src/imports/compositor/qwaylandmousetracker.cpp b/src/imports/compositor/qwaylandmousetracker.cpp
deleted file mode 100644
index c195f03c..00000000
--- a/src/imports/compositor/qwaylandmousetracker.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qwaylandmousetracker_p.h"
-
-#include <QtQuick/private/qquickitem_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class QWaylandMouseTrackerPrivate : public QQuickItemPrivate
-{
- Q_DECLARE_PUBLIC(QWaylandMouseTracker)
-public:
- QWaylandMouseTrackerPrivate()
- {
- QImage cursorImage(64,64,QImage::Format_ARGB32);
- cursorImage.fill(Qt::transparent);
- cursorPixmap = QPixmap::fromImage(cursorImage);
- }
- void handleMousePos(const QPointF &mousePos)
- {
- Q_Q(QWaylandMouseTracker);
- bool xChanged = mousePos.x() != this->mousePos.x();
- bool yChanged = mousePos.y() != this->mousePos.y();
- if (xChanged || yChanged) {
- this->mousePos = mousePos;
- if (xChanged)
- emit q->mouseXChanged();
- if (yChanged)
- emit q->mouseYChanged();
- }
- }
-
- void setHovered(bool hovered)
- {
- Q_Q(QWaylandMouseTracker);
- if (this->hovered == hovered)
- return;
- this->hovered = hovered;
- emit q->hoveredChanged();
- }
-
- QPointF mousePos;
- bool windowSystemCursorEnabled = false;
- QPixmap cursorPixmap;
- bool hovered = false;
-};
-
-QWaylandMouseTracker::QWaylandMouseTracker(QQuickItem *parent)
- : QQuickItem(*(new QWaylandMouseTrackerPrivate), parent)
-{
- Q_D(QWaylandMouseTracker);
- setFiltersChildMouseEvents(true);
- setAcceptHoverEvents(true);
- setAcceptedMouseButtons(Qt::AllButtons);
-#if QT_CONFIG(cursor)
- setCursor(QCursor(d->cursorPixmap));
-#endif
-}
-
-qreal QWaylandMouseTracker::mouseX() const
-{
- Q_D(const QWaylandMouseTracker);
- return d->mousePos.x();
-}
-qreal QWaylandMouseTracker::mouseY() const
-{
- Q_D(const QWaylandMouseTracker);
- return d->mousePos.y();
-}
-
-#if QT_CONFIG(cursor)
-void QWaylandMouseTracker::setWindowSystemCursorEnabled(bool enable)
-{
- Q_D(QWaylandMouseTracker);
- if (d->windowSystemCursorEnabled != enable) {
- d->windowSystemCursorEnabled = enable;
- if (enable) {
- unsetCursor();
- } else {
- setCursor(QCursor(d->cursorPixmap));
- }
- emit windowSystemCursorEnabledChanged();
- }
-}
-
-bool QWaylandMouseTracker::windowSystemCursorEnabled() const
-{
- Q_D(const QWaylandMouseTracker);
- return d->windowSystemCursorEnabled;
-}
-#endif
-
-bool QWaylandMouseTracker::hovered() const
-{
- Q_D(const QWaylandMouseTracker);
- return d->hovered;
-}
-
-bool QWaylandMouseTracker::childMouseEventFilter(QQuickItem *item, QEvent *event)
-{
- Q_D(QWaylandMouseTracker);
- if (event->type() == QEvent::MouseMove) {
- QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
- d->handleMousePos(mapFromItem(item, mouseEvent->position()));
- } else if (event->type() == QEvent::HoverMove) {
- QHoverEvent *hoverEvent = static_cast<QHoverEvent *>(event);
- d->handleMousePos(mapFromItem(item, hoverEvent->position()));
- }
- return false;
-}
-
-void QWaylandMouseTracker::mouseMoveEvent(QMouseEvent *event)
-{
- Q_D(QWaylandMouseTracker);
- QQuickItem::mouseMoveEvent(event);
- d->handleMousePos(event->position());
-}
-
-void QWaylandMouseTracker::hoverMoveEvent(QHoverEvent *event)
-{
- Q_D(QWaylandMouseTracker);
- QQuickItem::hoverMoveEvent(event);
- d->handleMousePos(event->position());
-}
-
-void QWaylandMouseTracker::hoverEnterEvent(QHoverEvent *event)
-{
- Q_D(QWaylandMouseTracker);
- Q_UNUSED(event);
- d->setHovered(true);
-}
-
-void QWaylandMouseTracker::hoverLeaveEvent(QHoverEvent *event)
-{
- Q_D(QWaylandMouseTracker);
- Q_UNUSED(event);
- d->setHovered(false);
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/compositor/qwaylandmousetracker_p.h b/src/imports/compositor/qwaylandmousetracker_p.h
deleted file mode 100644
index abc0942d..00000000
--- a/src/imports/compositor/qwaylandmousetracker_p.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QWAYLANDMOUSETRACKER_P_H
-#define QWAYLANDMOUSETRACKER_P_H
-
-#include <QtQuick/private/qquickmousearea_p.h>
-
-#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
-
-QT_BEGIN_NAMESPACE
-
-class QWaylandMouseTrackerPrivate;
-
-class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandMouseTracker : public QQuickItem
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QWaylandMouseTracker)
- Q_PROPERTY(qreal mouseX READ mouseX NOTIFY mouseXChanged)
- Q_PROPERTY(qreal mouseY READ mouseY NOTIFY mouseYChanged)
- Q_PROPERTY(bool containsMouse READ hovered NOTIFY hoveredChanged)
-
- Q_PROPERTY(bool windowSystemCursorEnabled READ windowSystemCursorEnabled WRITE setWindowSystemCursorEnabled NOTIFY windowSystemCursorEnabledChanged)
-public:
- QWaylandMouseTracker(QQuickItem *parent = nullptr);
-
- qreal mouseX() const;
- qreal mouseY() const;
-
- void setWindowSystemCursorEnabled(bool enable);
- bool windowSystemCursorEnabled() const;
- bool hovered() const;
-
-signals:
- void mouseXChanged();
- void mouseYChanged();
- void windowSystemCursorEnabledChanged();
- void hoveredChanged();
-
-protected:
- bool childMouseEventFilter(QQuickItem *item, QEvent *event) override;
- void mouseMoveEvent(QMouseEvent *event) override;
- void hoverMoveEvent(QHoverEvent *event) override;
- void hoverEnterEvent(QHoverEvent *event) override;
- void hoverLeaveEvent(QHoverEvent *event) override;
-};
-
-QT_END_NAMESPACE
-
-#endif /*QWAYLANDMOUSETRACKER_P_H*/
diff --git a/src/imports/compositor/qwaylandquickcompositorplugin.cpp b/src/imports/compositor/qwaylandquickcompositorplugin.cpp
index 9711fc05..aa2d822d 100644
--- a/src/imports/compositor/qwaylandquickcompositorplugin.cpp
+++ b/src/imports/compositor/qwaylandquickcompositorplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
@@ -26,123 +26,25 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtCore/QDir>
#include <QtQml/qqmlextensionplugin.h>
-
-#include <QtQuick/QQuickItem>
-
-#include <QtWaylandCompositor/QWaylandQuickCompositor>
-#include <QtWaylandCompositor/QWaylandQuickItem>
-#include <QtWaylandCompositor/private/qwaylandquickhardwarelayer_p.h>
-#include <QtWaylandCompositor/QWaylandQuickSurface>
-#include <QtWaylandCompositor/QWaylandClient>
-#include <QtWaylandCompositor/QWaylandQuickOutput>
-#include <QtWaylandCompositor/QWaylandCompositorExtension>
-#include <QtWaylandCompositor/QWaylandQuickExtension>
-#include <QtWaylandCompositor/QWaylandSeat>
-#if QT_CONFIG(draganddrop)
-#include <QtWaylandCompositor/QWaylandDrag>
-#endif
-#include <QtWaylandCompositor/QWaylandKeymap>
-#include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
-#include <QtWaylandCompositor/QWaylandResource>
-
-#include <QtWaylandCompositor/QWaylandQtWindowManager>
-#include <QtWaylandCompositor/QWaylandShell>
-#include <QtWaylandCompositor/QWaylandShellSurface>
-#include <QtWaylandCompositor/QWaylandTextInputManager>
-#include <QtWaylandCompositor/QWaylandIdleInhibitManagerV1>
-
#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
-#include "qwaylandmousetracker_p.h"
-
-QT_BEGIN_NAMESPACE
+#include <QtWaylandCompositor/private/qwaylandcompositor_p.h>
-Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CONTAINER_CLASS(QWaylandQuickCompositor)
-Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(QWaylandQtWindowManager)
-Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(QWaylandIdleInhibitManagerV1)
-Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(QWaylandTextInputManager)
+extern void qml_register_types_QtWayland_Compositor();
-class QmlUrlResolver
-{
-public:
- QmlUrlResolver(bool useResource, const QDir &qmlDir, const QString &qrcPath)
- : m_useResource(useResource)
- , m_qmlDir(qmlDir)
- , m_qrcPath(qrcPath)
- { }
-
- QUrl get(const QString &fileName)
- {
- return m_useResource ? QUrl(m_qrcPath + fileName) :
- QUrl::fromLocalFile(m_qmlDir.filePath(fileName));
- }
-private:
- bool m_useResource;
- const QDir m_qmlDir;
- const QString m_qrcPath;
-};
+QT_BEGIN_NAMESPACE
//![class decl]
-class QWaylandCompositorPlugin : public QQmlExtensionPlugin
+class QWaylandCompositorPlugin : public QQmlEngineExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
- void registerTypes(const char *uri) override
+ QWaylandCompositorPlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent)
{
- Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWayland.Compositor"));
- defineModule(uri);
-
- bool useResource = true;
- QDir qmlDir(baseUrl().toLocalFile());
- if (qmlDir.exists(QStringLiteral("WaylandCursorItem.qml")))
- useResource = false;
-
- QmlUrlResolver resolver(useResource, qmlDir, QStringLiteral("qrc:/QtWayland/Compositor/"));
-
- qmlRegisterType(resolver.get(QStringLiteral("WaylandOutputWindow.qml")), uri, 1, 0, "WaylandOutputWindow");
- qmlRegisterType(resolver.get(QStringLiteral("WaylandCursorItem.qml")), uri, 1, 0, "WaylandCursorItem");
- }
-
- static void defineModule(const char *uri)
- {
- // The minor version used to be the current Qt 5 minor. For compatibility it is the last
- // Qt release.
- qmlRegisterModule(uri, QT_VERSION_MAJOR, QT_VERSION_MINOR);
-
- qmlRegisterType<QWaylandQuickCompositorQuickExtensionContainer>(uri, 1, 0, "WaylandCompositor");
- qmlRegisterType<QWaylandQuickItem>(uri, 1, 0, "WaylandQuickItem");
- qmlRegisterType<QWaylandQuickItem, 13>(uri, 1, 13, "WaylandQuickItem");
-#if QT_CONFIG(opengl)
- qmlRegisterType<QWaylandQuickHardwareLayer>(uri, 1, 2, "WaylandHardwareLayer");
-#endif
- qmlRegisterType<QWaylandMouseTracker>(uri, 1, 0, "WaylandMouseTracker");
- qmlRegisterType<QWaylandQuickOutput>(uri, 1, 0, "WaylandOutput");
- qmlRegisterType<QWaylandQuickSurface>(uri, 1, 0, "WaylandSurface");
- qmlRegisterType<QWaylandQuickSurface, 13>(uri, 1, 13, "WaylandSurface");
- qmlRegisterType<QWaylandKeymap>(uri, 1, 0, "WaylandKeymap");
-
- qmlRegisterUncreatableType<QWaylandCompositorExtension>(uri, 1, 0, "WaylandExtension", QObject::tr("Cannot create instance of WaylandExtension"));
- qmlRegisterUncreatableType<QWaylandClient>(uri, 1, 0, "WaylandClient", QObject::tr("Cannot create instance of WaylandClient"));
- qmlRegisterUncreatableType<QWaylandOutput>(uri, 1, 0, "WaylandOutputBase", QObject::tr("Cannot create instance of WaylandOutputBase, use WaylandOutput instead"));
- qmlRegisterUncreatableType<QWaylandSeat>(uri, 1, 0, "WaylandSeat", QObject::tr("Cannot create instance of WaylandSeat"));
-#if QT_CONFIG(draganddrop)
- qmlRegisterUncreatableType<QWaylandDrag>(uri, 1, 0, "WaylandDrag", QObject::tr("Cannot create instance of WaylandDrag"));
-#endif
- 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<QWaylandShell>(uri, 1, 0, "Shell", QObject::tr("Cannot create instance of Shell"));
- qmlRegisterUncreatableType<QWaylandShellSurface>(uri, 1, 0, "ShellSurface", QObject::tr("Cannot create instance of ShellSurface"));
- qmlRegisterUncreatableType<QWaylandResource>(uri, 1, 0, "WaylandResource", QObject::tr("Cannot create instance of WaylandResource"));
-
- //This should probably be somewhere else
- qmlRegisterType<QWaylandQtWindowManagerQuickExtension>(uri, 1, 0, "QtWindowManager");
- qmlRegisterType<QWaylandQuickShellSurfaceItem>(uri, 1, 0, "ShellSurfaceItem");
- qmlRegisterType<QWaylandTextInputManagerQuickExtension>(uri, 1, 0, "TextInputManager");
-
- qmlRegisterType<QWaylandIdleInhibitManagerV1QuickExtension>(uri, 1, 14, "IdleInhibitManagerV1");
+ volatile auto registration = &qml_register_types_QtWayland_Compositor;
+ Q_UNUSED(registration);
}
};
//![class decl]
diff --git a/src/imports/texture-sharing-extension/qmldir b/src/imports/texture-sharing-extension/qmldir
index 182e5c0e..c66f29bc 100644
--- a/src/imports/texture-sharing-extension/qmldir
+++ b/src/imports/texture-sharing-extension/qmldir
@@ -1,3 +1,4 @@
module QtWayland.Compositor.TextureSharingExtension
plugin qwaylandtexturesharingextension
classname QWaylandTextureSharingExtensionPlugin
+typeinfo plugins.qmltypes
diff --git a/src/imports/texture-sharing/qmldir b/src/imports/texture-sharing/qmldir
index cf3b74c4..4107ebc2 100644
--- a/src/imports/texture-sharing/qmldir
+++ b/src/imports/texture-sharing/qmldir
@@ -1,3 +1,4 @@
module QtWayland.Client.TextureSharing
plugin qwaylandtexturesharing
classname QWaylandTextureSharingPlugin
+typeinfo plugins.qmltypes