diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2016-07-13 16:55:34 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2016-08-03 13:07:52 +0000 |
commit | a147fedc76c84d2a6b50820a685288efb43f80db (patch) | |
tree | 5d4af8751c7869bc943a069667af9517ed587cb2 | |
parent | a4d68e7d78a28225c23931431f0db6ebf75f5e41 (diff) |
Rename createSurface and similar signals
* createSurface -> surfaceRequested
* createXdgSurface -> xdgSurfaceRequested
* createXdgPopup -> xdgPopupRequested
* createShellSurface -> wlShellSurfaceRequested
* shellSurfaceCreated -> wlShellSurfaceCreated
Change-Id: I715a927242130d7504955002a6a64a2bac516d46
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
-rw-r--r-- | examples/wayland/custom-extension/compositor/qml/main.qml | 2 | ||||
-rw-r--r-- | examples/wayland/minimal-qml/main.qml | 2 | ||||
-rw-r--r-- | examples/wayland/multi-output/qml/main.qml | 4 | ||||
-rw-r--r-- | examples/wayland/pure-qml/qml/main.qml | 4 | ||||
-rw-r--r-- | examples/wayland/qwindow-compositor/compositor.cpp | 10 | ||||
-rw-r--r-- | examples/wayland/qwindow-compositor/compositor.h | 4 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandcompositor.cpp | 4 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandcompositor.h | 2 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandwlshell.cpp | 8 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandwlshell.h | 4 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell.cpp | 8 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell.h | 4 | ||||
-rw-r--r-- | src/imports/compositor/plugins.qmltypes | 10 |
13 files changed, 33 insertions, 33 deletions
diff --git a/examples/wayland/custom-extension/compositor/qml/main.qml b/examples/wayland/custom-extension/compositor/qml/main.qml index fe33fb0c8..a7ca56e03 100644 --- a/examples/wayland/custom-extension/compositor/qml/main.qml +++ b/examples/wayland/custom-extension/compositor/qml/main.qml @@ -76,7 +76,7 @@ WaylandCompositor { WlShell { id: defaultShell - onShellSurfaceCreated: { + onWlShellSurfaceCreated: { var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); lastItem = item; } diff --git a/examples/wayland/minimal-qml/main.qml b/examples/wayland/minimal-qml/main.qml index dde223859..7894a0321 100644 --- a/examples/wayland/minimal-qml/main.qml +++ b/examples/wayland/minimal-qml/main.qml @@ -73,7 +73,7 @@ WaylandCompositor { // chromeComponent on the output. extensions: [ WlShell { - onShellSurfaceCreated: + onWlShellSurfaceCreated: chromeComponent.createObject(surfaceArea, { "shellSurface": shellSurface } ); }, XdgShell { diff --git a/examples/wayland/multi-output/qml/main.qml b/examples/wayland/multi-output/qml/main.qml index 18fbd4604..e8a30100d 100644 --- a/examples/wayland/multi-output/qml/main.qml +++ b/examples/wayland/multi-output/qml/main.qml @@ -84,13 +84,13 @@ WaylandCompositor { WlShell { id: defaultShell - onShellSurfaceCreated: { + onWlShellSurfaceCreated: { var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); item.surface.activated.connect(item.raise); } } - onCreateSurface: { + onSurfaceRequested: { var surface = surfaceComponent.createObject(comp, { } ); surface.initialize(comp, client, id, version); } diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index 4f331641b..69e8d2c84 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -68,7 +68,7 @@ WaylandCompositor { } WlShell { - onShellSurfaceCreated: { + onWlShellSurfaceCreated: { chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); } } @@ -88,7 +88,7 @@ WaylandCompositor { TextInputManager { } - onCreateSurface: { + onSurfaceRequested: { var surface = surfaceComponent.createObject(comp, { } ); surface.initialize(comp, client, id, version); } diff --git a/examples/wayland/qwindow-compositor/compositor.cpp b/examples/wayland/qwindow-compositor/compositor.cpp index 4999a5ed0..cff3df082 100644 --- a/examples/wayland/qwindow-compositor/compositor.cpp +++ b/examples/wayland/qwindow-compositor/compositor.cpp @@ -147,9 +147,9 @@ Compositor::Compositor(QWindow *window) , m_wlShell(new QWaylandWlShell(this)) , m_xdgShell(new QWaylandXdgShell(this)) { - connect(m_wlShell, &QWaylandWlShell::shellSurfaceCreated, this, &Compositor::onWlShellSurfaceCreated); + connect(m_wlShell, &QWaylandWlShell::wlShellSurfaceCreated, this, &Compositor::onWlShellSurfaceCreated); connect(m_xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, this, &Compositor::onXdgSurfaceCreated); - connect(m_xdgShell, &QWaylandXdgShell::createXdgPopup, this, &Compositor::onCreateXdgPopup); + connect(m_xdgShell, &QWaylandXdgShell::xdgPopupRequested, this, &Compositor::onXdgPopupRequested); } Compositor::~Compositor() @@ -252,9 +252,9 @@ void Compositor::onXdgSurfaceCreated(QWaylandXdgSurface *xdgSurface) connect(xdgSurface, &QWaylandXdgSurface::unsetFullscreen, view, &View::onXdgUnsetFullscreen); } -void Compositor::onCreateXdgPopup(QWaylandSurface *surface, QWaylandSurface *parent, - QWaylandInputDevice *inputDevice, const QPoint &position, - const QWaylandResource &resource) +void Compositor::onXdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, + QWaylandInputDevice *inputDevice, const QPoint &position, + const QWaylandResource &resource) { Q_UNUSED(inputDevice); diff --git a/examples/wayland/qwindow-compositor/compositor.h b/examples/wayland/qwindow-compositor/compositor.h index 8eec0a58f..3e25ea7df 100644 --- a/examples/wayland/qwindow-compositor/compositor.h +++ b/examples/wayland/qwindow-compositor/compositor.h @@ -133,8 +133,8 @@ private slots: void onSurfaceCreated(QWaylandSurface *surface); void onWlShellSurfaceCreated(QWaylandWlShellSurface *wlShellSurface); void onXdgSurfaceCreated(QWaylandXdgSurface *xdgSurface); - void onCreateXdgPopup(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandInputDevice *inputDevice, - const QPoint &position, const QWaylandResource &resource); + void onXdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandInputDevice *inputDevice, + const QPoint &position, const QWaylandResource &resource); void onSetTransient(QWaylandSurface *parentSurface, const QPoint &relativeToParent, QWaylandWlShellSurface::FocusPolicy focusPolicy); void onSetPopup(QWaylandInputDevice *inputDevice, QWaylandSurface *parent, const QPoint &relativeToParent); diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp index a483a7564..450e94ae8 100644 --- a/src/compositor/compositor_api/qwaylandcompositor.cpp +++ b/src/compositor/compositor_api/qwaylandcompositor.cpp @@ -290,7 +290,7 @@ void QWaylandCompositorPrivate::compositor_create_surface(wl_compositor::Resourc { Q_Q(QWaylandCompositor); QWaylandClient *client = QWaylandClient::fromWlClient(q, resource->client()); - emit q->createSurface(client, id, resource->version()); + emit q->surfaceRequested(client, id, resource->version()); #ifndef QT_NO_DEBUG Q_ASSERT_X(!QWaylandSurfacePrivate::hasUninitializedSurface(), "QWaylandCompositor", QStringLiteral("Found uninitialized QWaylandSurface after emitting QWaylandCompositor::createSurface for id %1. All surfaces has to be initialized immediately after creation. See QWaylandSurface::initialize.").arg(id).toLocal8Bit().constData()); #endif @@ -416,7 +416,7 @@ void QWaylandCompositorPrivate::loadServerBufferIntegration() Normally, a compositor application will have a single WaylandCompositor instance, which can have several outputs as children. When a client requests the compositor to create a surface, the request is handled by - the onCreateSurface handler. + the onSurfaceRequested handler. Extensions that are supported by the compositor should be instantiated and added to the extensions property. diff --git a/src/compositor/compositor_api/qwaylandcompositor.h b/src/compositor/compositor_api/qwaylandcompositor.h index dd3c20e2f..5bb795a40 100644 --- a/src/compositor/compositor_api/qwaylandcompositor.h +++ b/src/compositor/compositor_api/qwaylandcompositor.h @@ -126,7 +126,7 @@ public Q_SLOTS: void processWaylandEvents(); Q_SIGNALS: - void createSurface(QWaylandClient *client, uint id, int version); + void surfaceRequested(QWaylandClient *client, uint id, int version); void surfaceCreated(QWaylandSurface *surface); void surfaceAboutToBeDestroyed(QWaylandSurface *surface); void subsurfaceChanged(QWaylandSurface *child, QWaylandSurface *parent); diff --git a/src/compositor/extensions/qwaylandwlshell.cpp b/src/compositor/extensions/qwaylandwlshell.cpp index 3e53af624..f6dfc8323 100644 --- a/src/compositor/extensions/qwaylandwlshell.cpp +++ b/src/compositor/extensions/qwaylandwlshell.cpp @@ -79,17 +79,17 @@ void QWaylandWlShellPrivate::shell_get_shell_surface(Resource *resource, uint32_ if (!surface->setRole(QWaylandWlShellSurface::role(), displayRes, WL_DISPLAY_ERROR_INVALID_OBJECT)) return; - emit q->createShellSurface(surface, shellSurfaceResource); + emit q->wlShellSurfaceRequested(surface, shellSurfaceResource); QWaylandWlShellSurface *shellSurface = QWaylandWlShellSurface::fromResource(shellSurfaceResource.resource()); if (!shellSurface) { - // A QWaylandShellSurface was not created in response to the createShellSurface signal - // we create one as fallback here instead. + // A QWaylandWlShellSurface was not created in response to the wlShellSurfaceRequested + // signal, so we create one as fallback here instead. shellSurface = new QWaylandWlShellSurface(q, surface, shellSurfaceResource); } m_shellSurfaces.append(shellSurface); - emit q->shellSurfaceCreated(shellSurface); + emit q->wlShellSurfaceCreated(shellSurface); } void QWaylandWlShellPrivate::unregisterShellSurface(QWaylandWlShellSurface *shellSurface) diff --git a/src/compositor/extensions/qwaylandwlshell.h b/src/compositor/extensions/qwaylandwlshell.h index ce6ca895c..beed34121 100644 --- a/src/compositor/extensions/qwaylandwlshell.h +++ b/src/compositor/extensions/qwaylandwlshell.h @@ -70,8 +70,8 @@ public: static QByteArray interfaceName(); Q_SIGNALS: - void createShellSurface(QWaylandSurface *surface, const QWaylandResource &resource); - void shellSurfaceCreated(QWaylandWlShellSurface *shellSurface); + void wlShellSurfaceRequested(QWaylandSurface *surface, const QWaylandResource &resource); + void wlShellSurfaceCreated(QWaylandWlShellSurface *shellSurface); }; class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandWlShellSurface : public QWaylandShellSurfaceTemplate<QWaylandWlShellSurface> diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp index 8299bd4ce..96fc171d8 100644 --- a/src/compositor/extensions/qwaylandxdgshell.cpp +++ b/src/compositor/extensions/qwaylandxdgshell.cpp @@ -150,11 +150,11 @@ void QWaylandXdgShellPrivate::xdg_shell_get_xdg_surface(Resource *resource, uint QWaylandResource xdgSurfaceResource(wl_resource_create(resource->client(), &xdg_surface_interface, wl_resource_get_version(resource->handle), id)); - emit q->createXdgSurface(surface, xdgSurfaceResource); + emit q->xdgSurfaceRequested(surface, xdgSurfaceResource); QWaylandXdgSurface *xdgSurface = QWaylandXdgSurface::fromResource(xdgSurfaceResource.resource()); if (!xdgSurface) { - // A QWaylandXdgSurface was not created in response to the createXdgSurface signal, so we + // A QWaylandXdgSurface was not created in response to the xdgSurfaceRequested signal, so we // create one as fallback here instead. xdgSurface = new QWaylandXdgSurface(q, surface, xdgSurfaceResource); } @@ -196,11 +196,11 @@ void QWaylandXdgShellPrivate::xdg_shell_get_xdg_popup(Resource *resource, uint32 wl_resource_get_version(resource->handle), id)); QWaylandInputDevice *inputDevice = QWaylandInputDevice::fromSeatResource(seat); QPoint position(x, y); - emit q->createXdgPopup(surface, parentSurface, inputDevice, position, xdgPopupResource); + emit q->xdgPopupRequested(surface, parentSurface, inputDevice, position, xdgPopupResource); QWaylandXdgPopup *xdgPopup = QWaylandXdgPopup::fromResource(xdgPopupResource.resource()); if (!xdgPopup) { - // A QWaylandXdgPopup was not created in response to the createXdgPopup signal, so we + // A QWaylandXdgPopup was not created in response to the xdgPopupRequested signal, so we // create one as fallback here instead. xdgPopup = new QWaylandXdgPopup(q, surface, parentSurface, position, xdgPopupResource); } diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h index af198989d..420fb98bc 100644 --- a/src/compositor/extensions/qwaylandxdgshell.h +++ b/src/compositor/extensions/qwaylandxdgshell.h @@ -77,10 +77,10 @@ public Q_SLOTS: void closeAllPopups(); Q_SIGNALS: - void createXdgSurface(QWaylandSurface *surface, const QWaylandResource &resource); + void xdgSurfaceRequested(QWaylandSurface *surface, const QWaylandResource &resource); void xdgSurfaceCreated(QWaylandXdgSurface *xdgSurface); void xdgPopupCreated(QWaylandXdgPopup *xdgPopup); - void createXdgPopup(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandInputDevice *seat, const QPoint &position, const QWaylandResource &resource); + void xdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandInputDevice *seat, const QPoint &position, const QWaylandResource &resource); void pong(uint serial); private Q_SLOTS: diff --git a/src/imports/compositor/plugins.qmltypes b/src/imports/compositor/plugins.qmltypes index c57810a8e..7720176e3 100644 --- a/src/imports/compositor/plugins.qmltypes +++ b/src/imports/compositor/plugins.qmltypes @@ -41,7 +41,7 @@ Module { isPointer: true } Signal { - name: "createSurface" + name: "surfaceRequested" Parameter { name: "client"; type: "QWaylandClient"; isPointer: true } Parameter { name: "id"; type: "uint" } Parameter { name: "version"; type: "int" } @@ -409,12 +409,12 @@ Module { name: "QWaylandWlShell" prototype: "QWaylandCompositorExtension" Signal { - name: "createShellSurface" + name: "wlShellSurfaceRequested" Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "resource"; type: "QWaylandResource" } } Signal { - name: "shellSurfaceCreated" + name: "wlShellSurfaceCreated" Parameter { name: "shellSurface"; type: "QWaylandWlShellSurface"; isPointer: true } } } @@ -524,7 +524,7 @@ Module { name: "QWaylandXdgShell" prototype: "QWaylandCompositorExtension" Signal { - name: "createXdgSurface" + name: "xdgSurfaceRequested" Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "resource"; type: "QWaylandResource" } } @@ -537,7 +537,7 @@ Module { Parameter { name: "xdgPopup"; type: "QWaylandXdgPopup"; isPointer: true } } Signal { - name: "createXdgPopup" + name: "xdgPopupRequested" Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "parent"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "seat"; type: "QWaylandInputDevice"; isPointer: true } |