diff options
author | Johan Klokkhammer Helsing <johan.helsing@theqtcompany.com> | 2016-03-29 15:04:42 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@theqtcompany.com> | 2016-04-05 14:05:28 +0000 |
commit | 465e6f559fccf04203997cdf5182693567a9e697 (patch) | |
tree | ca1c50eb8fd3a26e02d8a2b205d1775febb0859e /src/compositor | |
parent | ac670666395882c60b512ff493b66d58a1ad6541 (diff) |
Rename compositor Shell to WlShell
* QWaylandShell -> QWaylandWlShell
* QWaylandShellSurface -> QWaylandWlShellSurface
* QWaylandQuickShellSurfaceItem -> QWaylandQuickWlShellSurfaceItem
* Shell -> WlShell (QML)
* ShellSurface -> WlShellSurface (QML)
* ShellSurfaceItem -> WlShellSurfaceItem (QML)
This is done to avoid confusion with XdgShell and will hopefully help
clarify that some of the examples only support wl_shell and not
xdg_shell.
Additionally, this makes "Shell" an available name in the compositor
API, which may in turn enable the creation of a more general abstraction
hiding the details of the shell backends (i.e. xdg_shell, wl_shell, and
eventually ivi_shell).
Change-Id: Iebac1f36505084bfaaea68838005d54db6c55e21
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'src/compositor')
-rw-r--r-- | src/compositor/compositor_api/qwaylandinput.cpp | 6 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickcompositor.cpp | 4 | ||||
-rw-r--r-- | src/compositor/extensions/extensions.pri | 12 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp (renamed from src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp) | 104 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandquickwlshellsurfaceitem.h (renamed from src/compositor/extensions/qwaylandquickshellsurfaceitem.h) | 28 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandquickwlshellsurfaceitem_p.h (renamed from src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h) | 14 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandwlshell.cpp (renamed from src/compositor/extensions/qwaylandshell.cpp) | 262 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandwlshell.h (renamed from src/compositor/extensions/qwaylandshell.h) | 30 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandwlshell_p.h (renamed from src/compositor/extensions/qwaylandshell_p.h) | 34 |
9 files changed, 247 insertions, 247 deletions
diff --git a/src/compositor/compositor_api/qwaylandinput.cpp b/src/compositor/compositor_api/qwaylandinput.cpp index 512ad6e37..ed1a9c786 100644 --- a/src/compositor/compositor_api/qwaylandinput.cpp +++ b/src/compositor/compositor_api/qwaylandinput.cpp @@ -42,7 +42,7 @@ #include <QtWaylandCompositor/QWaylandDrag> #include <QtWaylandCompositor/QWaylandTouch> #include <QtWaylandCompositor/QWaylandPointer> -#include <QtWaylandCompositor/QWaylandShellSurface> +#include <QtWaylandCompositor/QWaylandWlShellSurface> #include <QtWaylandCompositor/private/qwlinputmethod_p.h> #include <QtWaylandCompositor/private/qwaylandinput_p.h> #include <QtWaylandCompositor/private/qwaylandcompositor_p.h> @@ -346,8 +346,8 @@ bool QWaylandInputDevice::setKeyboardFocus(QWaylandSurface *surface) if (surface == oldSurface) return true; - QWaylandShellSurface *shellsurface = QWaylandShellSurface::findIn(surface); - if (shellsurface && shellsurface->focusPolicy() == QWaylandShellSurface::NoKeyboardFocus) + QWaylandWlShellSurface *wlShellsurface = QWaylandWlShellSurface::findIn(surface); + if (wlShellsurface && wlShellsurface->focusPolicy() == QWaylandWlShellSurface::NoKeyboardFocus) return false; d->keyboardFocus = surface; diff --git a/src/compositor/compositor_api/qwaylandquickcompositor.cpp b/src/compositor/compositor_api/qwaylandquickcompositor.cpp index 8a7ef7451..a30ea05b3 100644 --- a/src/compositor/compositor_api/qwaylandquickcompositor.cpp +++ b/src/compositor/compositor_api/qwaylandquickcompositor.cpp @@ -73,14 +73,14 @@ QWaylandQuickCompositor::QWaylandQuickCompositor(QObject *parent) * any Wayland extension the compositor should support, instantiate its component, * and add it to the list of extensions. * - * For instance, the following code would allow the clients to request shell surfaces + * For instance, the following code would allow the clients to request wl shell surfaces * in the compositor using the wl_shell interface. * * \code * import QtWayland.Compositor 1.0 * * WaylandCompositor { - * extensions: [ Shell { + * extensions: [ WlShell { * // ... * } ] * } diff --git a/src/compositor/extensions/extensions.pri b/src/compositor/extensions/extensions.pri index a62490585..03be3905e 100644 --- a/src/compositor/extensions/extensions.pri +++ b/src/compositor/extensions/extensions.pri @@ -12,8 +12,8 @@ HEADERS += \ extensions/qwlextendedsurface_p.h \ extensions/qwlqttouch_p.h \ extensions/qwlqtkey_p.h \ - extensions/qwaylandshell.h \ - extensions/qwaylandshell_p.h \ + extensions/qwaylandwlshell.h \ + extensions/qwaylandwlshell_p.h \ extensions/qwaylandwindowmanagerextension.h \ extensions/qwaylandwindowmanagerextension_p.h \ extensions/qwltextinput_p.h \ @@ -29,7 +29,7 @@ SOURCES += \ extensions/qwlextendedsurface.cpp \ extensions/qwlqttouch.cpp \ extensions/qwlqtkey.cpp \ - extensions/qwaylandshell.cpp \ + extensions/qwaylandwlshell.cpp \ extensions/qwaylandwindowmanagerextension.cpp \ extensions/qwltextinput.cpp \ extensions/qwltextinputmanager.cpp \ @@ -41,11 +41,11 @@ SOURCES += \ qtHaveModule(quick) { HEADERS += \ - extensions/qwaylandquickshellsurfaceitem.h \ - extensions/qwaylandquickshellsurfaceitem_p.h \ + extensions/qwaylandquickwlshellsurfaceitem.h \ + extensions/qwaylandquickwlshellsurfaceitem_p.h \ SOURCES += \ - extensions/qwaylandquickshellsurfaceitem.cpp \ + extensions/qwaylandquickwlshellsurfaceitem.cpp \ } diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp b/src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp index 5eb34b849..fc6d856d8 100644 --- a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp +++ b/src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp @@ -34,8 +34,8 @@ ** ****************************************************************************/ -#include "qwaylandquickshellsurfaceitem.h" -#include "qwaylandquickshellsurfaceitem_p.h" +#include "qwaylandquickwlshellsurfaceitem.h" +#include "qwaylandquickwlshellsurfaceitem_p.h" #include <QtWaylandCompositor/QWaylandCompositor> #include <QtWaylandCompositor/QWaylandInputDevice> @@ -43,91 +43,91 @@ QT_BEGIN_NAMESPACE /*! - * \qmltype ShellSurfaceItem + * \qmltype WlShellSurfaceItem * \inqmlmodule QtWayland.Compositor - * \brief An item representing a ShellSurface. + * \brief An item representing a WlShellSurface. * - * This type can be used to render shell surfaces as part of a Qt Quick scene. + * This type can be used to render wl_shell_surfaces as part of a Qt Quick scene. * It handles moving and resizing triggered by clicking on the window decorations. */ /*! - * \class QWaylandQuickShellSurfaceItem + * \class QWaylandQuickWlShellSurfaceItem * \inmodule QtWaylandCompositor - * \brief A Qt Quick item for QWaylandShellSurface. + * \brief A Qt Quick item for QWaylandWlShellSurface. * - * This class can be used to create Qt Quick items representing shell surfaces. + * This class can be used to create Qt Quick items representing wl_shell_surfaces. * It handles moving and resizing triggered by clicking on the window decorations. * * \sa QWaylandQuickItem */ /*! - * Constructs a QWaylandQuickShellSurfaceItem with the given \a parent. + * Constructs a QWaylandQuickWlShellSurfaceItem with the given \a parent. */ -QWaylandQuickShellSurfaceItem::QWaylandQuickShellSurfaceItem(QQuickItem *parent) - : QWaylandQuickItem(*new QWaylandQuickShellSurfaceItemPrivate(), parent) +QWaylandQuickWlShellSurfaceItem::QWaylandQuickWlShellSurfaceItem(QQuickItem *parent) + : QWaylandQuickItem(*new QWaylandQuickWlShellSurfaceItemPrivate(), parent) { } /*! * \internal */ -QWaylandQuickShellSurfaceItem::QWaylandQuickShellSurfaceItem(QWaylandQuickShellSurfaceItemPrivate &dd, QQuickItem *parent) +QWaylandQuickWlShellSurfaceItem::QWaylandQuickWlShellSurfaceItem(QWaylandQuickWlShellSurfaceItemPrivate &dd, QQuickItem *parent) : QWaylandQuickItem(dd, parent) { } /*! - * \qmlproperty object QtWaylandCompositor::ShellSurfaceItem::shellSurface + * \qmlproperty object QtWaylandCompositor::WlShellSurfaceItem::shellSurface * - * This property holds the shell surface rendered by this ShellSurfaceItem. + * This property holds the wl_shell_surface rendered by this WlShellSurfaceItem. */ /*! - * \property QWaylandQuickShellSurfaceItem::shellSurface + * \property QWaylandQuickWlShellSurfaceItem::shellSurface * - * This property holds the shell surface rendered by this QWaylandQuickShellSurfaceItem. + * This property holds the wl_shell_surface rendered by this QWaylandQuickWlShellSurfaceItem. */ -QWaylandShellSurface *QWaylandQuickShellSurfaceItem::shellSurface() const +QWaylandWlShellSurface *QWaylandQuickWlShellSurfaceItem::shellSurface() const { - Q_D(const QWaylandQuickShellSurfaceItem); + Q_D(const QWaylandQuickWlShellSurfaceItem); return d->shellSurface; } -void QWaylandQuickShellSurfaceItem::setShellSurface(QWaylandShellSurface *shellSurface) +void QWaylandQuickWlShellSurfaceItem::setShellSurface(QWaylandWlShellSurface *shellSurface) { - Q_D(QWaylandQuickShellSurfaceItem); + Q_D(QWaylandQuickWlShellSurfaceItem); if (shellSurface == d->shellSurface) return; if (d->shellSurface) { - disconnect(d->shellSurface, &QWaylandShellSurface::startMove, this, &QWaylandQuickShellSurfaceItem::handleStartMove); - disconnect(d->shellSurface, &QWaylandShellSurface::startResize, this, &QWaylandQuickShellSurfaceItem::handleStartResize); + disconnect(d->shellSurface, &QWaylandWlShellSurface::startMove, this, &QWaylandQuickWlShellSurfaceItem::handleStartMove); + disconnect(d->shellSurface, &QWaylandWlShellSurface::startResize, this, &QWaylandQuickWlShellSurfaceItem::handleStartResize); } d->shellSurface = shellSurface; if (d->shellSurface) { - connect(d->shellSurface, &QWaylandShellSurface::startMove, this, &QWaylandQuickShellSurfaceItem::handleStartMove); - connect(d->shellSurface, &QWaylandShellSurface::startResize, this, &QWaylandQuickShellSurfaceItem::handleStartResize); + connect(d->shellSurface, &QWaylandWlShellSurface::startMove, this, &QWaylandQuickWlShellSurfaceItem::handleStartMove); + connect(d->shellSurface, &QWaylandWlShellSurface::startResize, this, &QWaylandQuickWlShellSurfaceItem::handleStartResize); } emit shellSurfaceChanged(); } /*! * \internal - * \property QWaylandQuickShellSurfaceItem::moveItem + * \property QWaylandQuickWlShellSurfaceItem::moveItem * - * This property holds the move item for this QWaylandQuickShellSurfaceItem. + * This property holds the move item for this QWaylandQuickWlShellSurfaceItem. */ -QQuickItem *QWaylandQuickShellSurfaceItem::moveItem() const +QQuickItem *QWaylandQuickWlShellSurfaceItem::moveItem() const { - Q_D(const QWaylandQuickShellSurfaceItem); + Q_D(const QWaylandQuickWlShellSurfaceItem); return d->moveItem; } -void QWaylandQuickShellSurfaceItem::setMoveItem(QQuickItem *moveItem) +void QWaylandQuickWlShellSurfaceItem::setMoveItem(QQuickItem *moveItem) { - Q_D(QWaylandQuickShellSurfaceItem); + Q_D(QWaylandQuickWlShellSurfaceItem); if (d->moveItem == moveItem) return; d->moveItem = moveItem; @@ -137,10 +137,10 @@ void QWaylandQuickShellSurfaceItem::setMoveItem(QQuickItem *moveItem) /*! * \internal */ -void QWaylandQuickShellSurfaceItem::handleStartMove(QWaylandInputDevice *inputDevice) +void QWaylandQuickWlShellSurfaceItem::handleStartMove(QWaylandInputDevice *inputDevice) { - Q_D(QWaylandQuickShellSurfaceItem); - d->grabberState = QWaylandQuickShellSurfaceItemPrivate::MoveState; + Q_D(QWaylandQuickWlShellSurfaceItem); + d->grabberState = QWaylandQuickWlShellSurfaceItemPrivate::MoveState; d->moveState.inputDevice = inputDevice; d->moveState.initialized = false; } @@ -148,10 +148,10 @@ void QWaylandQuickShellSurfaceItem::handleStartMove(QWaylandInputDevice *inputDe /*! * \internal */ -void QWaylandQuickShellSurfaceItem::handleStartResize(QWaylandInputDevice *inputDevice, QWaylandShellSurface::ResizeEdge edges) +void QWaylandQuickWlShellSurfaceItem::handleStartResize(QWaylandInputDevice *inputDevice, QWaylandWlShellSurface::ResizeEdge edges) { - Q_D(QWaylandQuickShellSurfaceItem); - d->grabberState = QWaylandQuickShellSurfaceItemPrivate::ResizeState; + Q_D(QWaylandQuickWlShellSurfaceItem); + d->grabberState = QWaylandQuickWlShellSurfaceItemPrivate::ResizeState; d->resizeState.inputDevice = inputDevice; d->resizeState.resizeEdges = edges; d->resizeState.initialSize = surface()->size(); @@ -161,9 +161,9 @@ void QWaylandQuickShellSurfaceItem::handleStartResize(QWaylandInputDevice *input /*! * \internal */ -void QWaylandQuickShellSurfaceItem::adjustOffsetForNextFrame(const QPointF &offset) +void QWaylandQuickWlShellSurfaceItem::adjustOffsetForNextFrame(const QPointF &offset) { - Q_D(QWaylandQuickShellSurfaceItem); + Q_D(QWaylandQuickWlShellSurfaceItem); QQuickItem *moveItem = d->moveItem ? d->moveItem : this; moveItem->setPosition(moveItem->position() + offset); } @@ -171,10 +171,10 @@ void QWaylandQuickShellSurfaceItem::adjustOffsetForNextFrame(const QPointF &offs /*! * \internal */ -void QWaylandQuickShellSurfaceItem::mouseMoveEvent(QMouseEvent *event) +void QWaylandQuickWlShellSurfaceItem::mouseMoveEvent(QMouseEvent *event) { - Q_D(QWaylandQuickShellSurfaceItem); - if (d->grabberState == QWaylandQuickShellSurfaceItemPrivate::ResizeState) { + Q_D(QWaylandQuickWlShellSurfaceItem); + if (d->grabberState == QWaylandQuickWlShellSurfaceItemPrivate::ResizeState) { Q_ASSERT(d->resizeState.inputDevice == compositor()->inputDeviceFor(event)); if (!d->resizeState.initialized) { d->resizeState.initialMousePos = event->windowPos(); @@ -184,7 +184,7 @@ void QWaylandQuickShellSurfaceItem::mouseMoveEvent(QMouseEvent *event) QPointF delta = event->windowPos() - d->resizeState.initialMousePos; QSize newSize = shellSurface()->sizeForResize(d->resizeState.initialSize, delta, d->resizeState.resizeEdges); shellSurface()->sendConfigure(newSize, d->resizeState.resizeEdges); - } else if (d->grabberState == QWaylandQuickShellSurfaceItemPrivate::MoveState) { + } else if (d->grabberState == QWaylandQuickWlShellSurfaceItemPrivate::MoveState) { Q_ASSERT(d->moveState.inputDevice == compositor()->inputDeviceFor(event)); QQuickItem *moveItem = d->moveItem ? d->moveItem : this; if (!d->moveState.initialized) { @@ -204,11 +204,11 @@ void QWaylandQuickShellSurfaceItem::mouseMoveEvent(QMouseEvent *event) /*! * \internal */ -void QWaylandQuickShellSurfaceItem::mouseReleaseEvent(QMouseEvent *event) +void QWaylandQuickWlShellSurfaceItem::mouseReleaseEvent(QMouseEvent *event) { - Q_D(QWaylandQuickShellSurfaceItem); - if (d->grabberState != QWaylandQuickShellSurfaceItemPrivate::DefaultState) { - d->grabberState = QWaylandQuickShellSurfaceItemPrivate::DefaultState; + Q_D(QWaylandQuickWlShellSurfaceItem); + if (d->grabberState != QWaylandQuickWlShellSurfaceItemPrivate::DefaultState) { + d->grabberState = QWaylandQuickWlShellSurfaceItemPrivate::DefaultState; return; } QWaylandQuickItem::mouseReleaseEvent(event); @@ -217,23 +217,23 @@ void QWaylandQuickShellSurfaceItem::mouseReleaseEvent(QMouseEvent *event) /*! * \internal */ -void QWaylandQuickShellSurfaceItem::surfaceChangedEvent(QWaylandSurface *newSurface, QWaylandSurface *oldSurface) +void QWaylandQuickWlShellSurfaceItem::surfaceChangedEvent(QWaylandSurface *newSurface, QWaylandSurface *oldSurface) { if (oldSurface) - disconnect(oldSurface, &QWaylandSurface::offsetForNextFrame, this, &QWaylandQuickShellSurfaceItem::adjustOffsetForNextFrame); + disconnect(oldSurface, &QWaylandSurface::offsetForNextFrame, this, &QWaylandQuickWlShellSurfaceItem::adjustOffsetForNextFrame); if (newSurface) - connect(newSurface, &QWaylandSurface::offsetForNextFrame, this, &QWaylandQuickShellSurfaceItem::adjustOffsetForNextFrame); + connect(newSurface, &QWaylandSurface::offsetForNextFrame, this, &QWaylandQuickWlShellSurfaceItem::adjustOffsetForNextFrame); } /*! * \internal */ -void QWaylandQuickShellSurfaceItem::componentComplete() +void QWaylandQuickWlShellSurfaceItem::componentComplete() { - Q_D(QWaylandQuickShellSurfaceItem); + Q_D(QWaylandQuickWlShellSurfaceItem); if (!d->shellSurface) - setShellSurface(new QWaylandShellSurface()); + setShellSurface(new QWaylandWlShellSurface()); QWaylandQuickItem::componentComplete(); } diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem.h b/src/compositor/extensions/qwaylandquickwlshellsurfaceitem.h index f65172690..626926f85 100644 --- a/src/compositor/extensions/qwaylandquickshellsurfaceitem.h +++ b/src/compositor/extensions/qwaylandquickwlshellsurfaceitem.h @@ -34,31 +34,31 @@ ** ****************************************************************************/ -#ifndef QWAYLANDQUICKSHELLSURFACEITEM_H -#define QWAYLANDQUICKSHELLSURFACEITEM_H +#ifndef QWAYLANDQUICKWLSHELLSURFACEITEM_H +#define QWAYLANDQUICKWLSHELLSURFACEITEM_H #include <QtWaylandCompositor/QWaylandExtension> #include <QtWaylandCompositor/QWaylandQuickItem> -#include <QtWaylandCompositor/QWaylandShellSurface> +#include <QtWaylandCompositor/QWaylandWlShellSurface> QT_BEGIN_NAMESPACE -class QWaylandQuickShellSurfaceItemPrivate; +class QWaylandQuickWlShellSurfaceItemPrivate; -class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickShellSurfaceItem : public QWaylandQuickItem +class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickWlShellSurfaceItem : public QWaylandQuickItem { Q_OBJECT - Q_DECLARE_PRIVATE(QWaylandQuickShellSurfaceItem) - Q_PROPERTY(QWaylandShellSurface *shellSurface READ shellSurface WRITE setShellSurface NOTIFY shellSurfaceChanged) + Q_DECLARE_PRIVATE(QWaylandQuickWlShellSurfaceItem) + Q_PROPERTY(QWaylandWlShellSurface *shellSurface READ shellSurface WRITE setShellSurface NOTIFY shellSurfaceChanged) Q_PROPERTY(QQuickItem *moveItem READ moveItem WRITE setMoveItem NOTIFY moveItemChanged) public: - QWaylandQuickShellSurfaceItem(QQuickItem *parent = 0); + QWaylandQuickWlShellSurfaceItem(QQuickItem *parent = 0); - static QWaylandQuickShellSurfaceItemPrivate *get(QWaylandQuickShellSurfaceItem *item) { return item->d_func(); } + static QWaylandQuickWlShellSurfaceItemPrivate *get(QWaylandQuickWlShellSurfaceItem *item) { return item->d_func(); } - QWaylandShellSurface *shellSurface() const; - void setShellSurface(QWaylandShellSurface *shellSurface); + QWaylandWlShellSurface *shellSurface() const; + void setShellSurface(QWaylandWlShellSurface *shellSurface); QQuickItem *moveItem() const; void setMoveItem(QQuickItem *moveItem); @@ -68,10 +68,10 @@ Q_SIGNALS: private Q_SLOTS: void handleStartMove(QWaylandInputDevice *inputDevice); - void handleStartResize(QWaylandInputDevice *inputDevice, QWaylandShellSurface::ResizeEdge edges); + void handleStartResize(QWaylandInputDevice *inputDevice, QWaylandWlShellSurface::ResizeEdge edges); void adjustOffsetForNextFrame(const QPointF &offset); protected: - QWaylandQuickShellSurfaceItem(QWaylandQuickShellSurfaceItemPrivate &dd, QQuickItem *parent); + QWaylandQuickWlShellSurfaceItem(QWaylandQuickWlShellSurfaceItemPrivate &dd, QQuickItem *parent); void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE; @@ -83,4 +83,4 @@ protected: QT_END_NAMESPACE -#endif /*QWAYLANDQUICKSHELLSURFACEITEM_H*/ +#endif /*QWAYLANDQUICKWLSHELLSURFACEITEM_H*/ diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h b/src/compositor/extensions/qwaylandquickwlshellsurfaceitem_p.h index 22e0d8a6c..3e6834771 100644 --- a/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h +++ b/src/compositor/extensions/qwaylandquickwlshellsurfaceitem_p.h @@ -34,8 +34,8 @@ ** ****************************************************************************/ -#ifndef QWAYLANDQUICKSHELLSURFACEITEM_P_H -#define QWAYLANDQUICKSHELLSURFACEITEM_P_H +#ifndef QWAYLANDQUICKWLSHELLSURFACEITEM_P_H +#define QWAYLANDQUICKWLSHELLSURFACEITEM_P_H #include <QtWaylandCompositor/private/qwaylandquickitem_p.h> @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE // We mean it. // -class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickShellSurfaceItemPrivate : public QWaylandQuickItemPrivate +class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickWlShellSurfaceItemPrivate : public QWaylandQuickItemPrivate { public: enum GrabberState { @@ -61,14 +61,14 @@ public: MoveState }; - QWaylandQuickShellSurfaceItemPrivate() + QWaylandQuickWlShellSurfaceItemPrivate() : QWaylandQuickItemPrivate() , shellSurface(Q_NULLPTR) , moveItem(Q_NULLPTR) , grabberState(DefaultState) {} - QWaylandShellSurface *shellSurface; + QWaylandWlShellSurface *shellSurface; QQuickItem *moveItem; GrabberState grabberState; @@ -80,7 +80,7 @@ public: struct { QWaylandInputDevice *inputDevice; - QWaylandShellSurface::ResizeEdge resizeEdges; + QWaylandWlShellSurface::ResizeEdge resizeEdges; QSizeF initialSize; QPointF initialMousePos; bool initialized; @@ -89,4 +89,4 @@ public: QT_END_NAMESPACE -#endif /*QWAYLANDQUICKSHELLSURFACEITEM_P_H*/ +#endif /*QWAYLANDQUICKWLSHELLSURFACEITEM_P_H*/ diff --git a/src/compositor/extensions/qwaylandshell.cpp b/src/compositor/extensions/qwaylandwlshell.cpp index 7965c9c6c..c6d13b392 100644 --- a/src/compositor/extensions/qwaylandshell.cpp +++ b/src/compositor/extensions/qwaylandwlshell.cpp @@ -35,8 +35,8 @@ ** ****************************************************************************/ -#include "qwaylandshell.h" -#include "qwaylandshell_p.h" +#include "qwaylandwlshell.h" +#include "qwaylandwlshell_p.h" #include <QtWaylandCompositor/QWaylandCompositor> #include <QtWaylandCompositor/QWaylandView> @@ -48,17 +48,17 @@ QT_BEGIN_NAMESPACE -QWaylandSurfaceRole QWaylandShellSurfacePrivate::s_role("wl_shell_surface"); +QWaylandSurfaceRole QWaylandWlShellSurfacePrivate::s_role("wl_shell_surface"); -QWaylandShellPrivate::QWaylandShellPrivate() +QWaylandWlShellPrivate::QWaylandWlShellPrivate() : QWaylandExtensionTemplatePrivate() , wl_shell() { } -void QWaylandShellPrivate::shell_get_shell_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface_res) +void QWaylandWlShellPrivate::shell_get_shell_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface_res) { - Q_Q(QWaylandShell); + Q_Q(QWaylandWlShell); QWaylandSurface *surface = QWaylandSurface::fromResource(surface_res); wl_resource *res = wl_resource_create(resource->client(), &wl_shell_surface_interface, @@ -71,70 +71,70 @@ void QWaylandShellPrivate::shell_get_shell_surface(Resource *resource, uint32_t // However we're still using wayland 1.4, which doesn't have interface specific role // errors, so the best we can do is to use wl_display's object_id error. wl_resource *displayRes = wl_client_get_object(resource->client(), 1); - if (surface->setRole(QWaylandShellSurface::role(), displayRes, WL_DISPLAY_ERROR_INVALID_OBJECT)) + if (surface->setRole(QWaylandWlShellSurface::role(), displayRes, WL_DISPLAY_ERROR_INVALID_OBJECT)) emit q->createShellSurface(surface, QWaylandResource(res)); } -QWaylandShellSurfacePrivate::QWaylandShellSurfacePrivate() +QWaylandWlShellSurfacePrivate::QWaylandWlShellSurfacePrivate() : QWaylandExtensionTemplatePrivate() , wl_shell_surface() , m_shell(Q_NULLPTR) , m_surface(Q_NULLPTR) - , m_focusPolicy(QWaylandShellSurface::DefaultFocus) + , m_focusPolicy(QWaylandWlShellSurface::DefaultFocus) { } -QWaylandShellSurfacePrivate::~QWaylandShellSurfacePrivate() +QWaylandWlShellSurfacePrivate::~QWaylandWlShellSurfacePrivate() { } -void QWaylandShellSurfacePrivate::ping(uint32_t serial) +void QWaylandWlShellSurfacePrivate::ping(uint32_t serial) { m_pings.insert(serial); send_ping(serial); } -void QWaylandShellSurfacePrivate::shell_surface_destroy_resource(Resource *) +void QWaylandWlShellSurfacePrivate::shell_surface_destroy_resource(Resource *) { - Q_Q(QWaylandShellSurface); + Q_Q(QWaylandWlShellSurface); delete q; } -void QWaylandShellSurfacePrivate::shell_surface_move(Resource *resource, +void QWaylandWlShellSurfacePrivate::shell_surface_move(Resource *resource, struct wl_resource *input_device_super, uint32_t serial) { Q_UNUSED(resource); Q_UNUSED(serial); - Q_Q(QWaylandShellSurface); + Q_Q(QWaylandWlShellSurface); QWaylandInputDevice *input_device = QWaylandInputDevice::fromSeatResource(input_device_super); emit q->startMove(input_device); } -void QWaylandShellSurfacePrivate::shell_surface_resize(Resource *resource, +void QWaylandWlShellSurfacePrivate::shell_surface_resize(Resource *resource, struct wl_resource *input_device_super, uint32_t serial, uint32_t edges) { Q_UNUSED(resource); Q_UNUSED(serial); - Q_Q(QWaylandShellSurface); + Q_Q(QWaylandWlShellSurface); QWaylandInputDevice *input_device = QWaylandInputDevice::fromSeatResource(input_device_super); - emit q->startResize(input_device, QWaylandShellSurface::ResizeEdge(edges)); + emit q->startResize(input_device, QWaylandWlShellSurface::ResizeEdge(edges)); } -void QWaylandShellSurfacePrivate::shell_surface_set_toplevel(Resource *resource) +void QWaylandWlShellSurfacePrivate::shell_surface_set_toplevel(Resource *resource) { Q_UNUSED(resource); - Q_Q(QWaylandShellSurface); - setFocusPolicy(QWaylandShellSurface::DefaultFocus); + Q_Q(QWaylandWlShellSurface); + setFocusPolicy(QWaylandWlShellSurface::DefaultFocus); emit q->setDefaultToplevel(); } -void QWaylandShellSurfacePrivate::shell_surface_set_transient(Resource *resource, +void QWaylandWlShellSurfacePrivate::shell_surface_set_transient(Resource *resource, struct wl_resource *parent_surface_resource, int x, int y, @@ -142,16 +142,16 @@ void QWaylandShellSurfacePrivate::shell_surface_set_transient(Resource *resource { Q_UNUSED(resource); - Q_Q(QWaylandShellSurface); + Q_Q(QWaylandWlShellSurface); QWaylandSurface *parent_surface = QWaylandSurface::fromResource(parent_surface_resource); - QWaylandShellSurface::FocusPolicy focusPolicy = - flags & WL_SHELL_SURFACE_TRANSIENT_INACTIVE ? QWaylandShellSurface::NoKeyboardFocus - : QWaylandShellSurface::DefaultFocus; + QWaylandWlShellSurface::FocusPolicy focusPolicy = + flags & WL_SHELL_SURFACE_TRANSIENT_INACTIVE ? QWaylandWlShellSurface::NoKeyboardFocus + : QWaylandWlShellSurface::DefaultFocus; setFocusPolicy(focusPolicy); emit q->setTransient(parent_surface, QPoint(x,y), focusPolicy); } -void QWaylandShellSurfacePrivate::shell_surface_set_fullscreen(Resource *resource, +void QWaylandWlShellSurfacePrivate::shell_surface_set_fullscreen(Resource *resource, uint32_t method, uint32_t framerate, struct wl_resource *output_resource) @@ -159,91 +159,91 @@ void QWaylandShellSurfacePrivate::shell_surface_set_fullscreen(Resource *resourc Q_UNUSED(resource); Q_UNUSED(method); Q_UNUSED(framerate); - Q_Q(QWaylandShellSurface); - setFocusPolicy(QWaylandShellSurface::DefaultFocus); + Q_Q(QWaylandWlShellSurface); + setFocusPolicy(QWaylandWlShellSurface::DefaultFocus); QWaylandOutput *output = output_resource ? QWaylandOutput::fromResource(output_resource) : Q_NULLPTR; - emit q->setFullScreen(QWaylandShellSurface::FullScreenMethod(method), framerate, output); + emit q->setFullScreen(QWaylandWlShellSurface::FullScreenMethod(method), framerate, output); } -void QWaylandShellSurfacePrivate::shell_surface_set_popup(Resource *resource, wl_resource *input_device, uint32_t serial, wl_resource *parent, int32_t x, int32_t y, uint32_t flags) +void QWaylandWlShellSurfacePrivate::shell_surface_set_popup(Resource *resource, wl_resource *input_device, uint32_t serial, wl_resource *parent, int32_t x, int32_t y, uint32_t flags) { Q_UNUSED(resource); Q_UNUSED(serial); Q_UNUSED(flags); - Q_Q(QWaylandShellSurface); - setFocusPolicy(QWaylandShellSurface::DefaultFocus); + Q_Q(QWaylandWlShellSurface); + setFocusPolicy(QWaylandWlShellSurface::DefaultFocus); QWaylandInputDevice *input = QWaylandInputDevice::fromSeatResource(input_device); QWaylandSurface *parentSurface = QWaylandSurface::fromResource(parent); emit q->setPopup(input, parentSurface, QPoint(x,y)); } -void QWaylandShellSurfacePrivate::shell_surface_set_maximized(Resource *resource, +void QWaylandWlShellSurfacePrivate::shell_surface_set_maximized(Resource *resource, struct wl_resource *output_resource) { Q_UNUSED(resource); - Q_Q(QWaylandShellSurface); - setFocusPolicy(QWaylandShellSurface::DefaultFocus); + Q_Q(QWaylandWlShellSurface); + setFocusPolicy(QWaylandWlShellSurface::DefaultFocus); QWaylandOutput *output = output_resource ? QWaylandOutput::fromResource(output_resource) : Q_NULLPTR; emit q->setMaximized(output); } -void QWaylandShellSurfacePrivate::shell_surface_pong(Resource *resource, +void QWaylandWlShellSurfacePrivate::shell_surface_pong(Resource *resource, uint32_t serial) { Q_UNUSED(resource); - Q_Q(QWaylandShellSurface); + Q_Q(QWaylandWlShellSurface); if (m_pings.remove(serial)) emit q->pong(); else qWarning("Received an unexpected pong!"); } -void QWaylandShellSurfacePrivate::shell_surface_set_title(Resource *resource, +void QWaylandWlShellSurfacePrivate::shell_surface_set_title(Resource *resource, const QString &title) { Q_UNUSED(resource); if (title == m_title) return; - Q_Q(QWaylandShellSurface); + Q_Q(QWaylandWlShellSurface); m_title = title; emit q->titleChanged(); } -void QWaylandShellSurfacePrivate::shell_surface_set_class(Resource *resource, +void QWaylandWlShellSurfacePrivate::shell_surface_set_class(Resource *resource, const QString &className) { Q_UNUSED(resource); if (className == m_className) return; - Q_Q(QWaylandShellSurface); + Q_Q(QWaylandWlShellSurface); m_className = className; emit q->classNameChanged(); } /*! - * \qmltype Shell + * \qmltype WlShell * \inqmlmodule QtWayland.Compositor * \brief Extension for desktop-style user interfaces. * - * The Shell extension provides a way to assiociate a \l{ShellSurface} + * The WlShell extension provides a way to assiociate a \l{ShellSurface} * with a regular Wayland surface. Using the shell surface interface, the client * can request that the surface is resized, moved, and so on. * - * Shell corresponds to the Wayland interface wl_shell. + * WlShell corresponds to the Wayland interface wl_shell. * * To provide the functionality of the shell extension in a compositor, create - * an instance of the Shell component and add it to the list of extensions + * an instance of the WlShell component and add it to the list of extensions * supported by the compositor: * \code * import QtWayland.Compositor 1.0 * * WaylandCompositor { - * extensions: Shell { + * extensions: WlShell { * // ... * } * } @@ -251,66 +251,66 @@ void QWaylandShellSurfacePrivate::shell_surface_set_class(Resource *resource, */ /*! - * \class QWaylandShell + * \class QWaylandWlShell * \inmodule QtWaylandCompositor * \brief Extension for desktop-style user interfaces. * - * The QWaylandShell extension provides a way to assiociate a QWaylandShellSurface with + * The QWaylandWlShell extension provides a way to assiociate a QWaylandWlShellSurface with * a regular Wayland surface. Using the shell surface interface, the client * can request that the surface is resized, moved, and so on. * - * Shell corresponds to the Wayland interface wl_shell. + * WlShell corresponds to the Wayland interface wl_shell. */ /*! - * Constructs a QWaylandShell object. + * Constructs a QWaylandWlShell object. */ -QWaylandShell::QWaylandShell() - : QWaylandExtensionTemplate<QWaylandShell>(*new QWaylandShellPrivate()) +QWaylandWlShell::QWaylandWlShell() + : QWaylandExtensionTemplate<QWaylandWlShell>(*new QWaylandWlShellPrivate()) { } /*! - * Constructs a QWaylandShell object for the provided \a compositor. + * Constructs a QWaylandWlShell object for the provided \a compositor. */ -QWaylandShell::QWaylandShell(QWaylandCompositor *compositor) - : QWaylandExtensionTemplate<QWaylandShell>(compositor, *new QWaylandShellPrivate()) +QWaylandWlShell::QWaylandWlShell(QWaylandCompositor *compositor) + : QWaylandExtensionTemplate<QWaylandWlShell>(compositor, *new QWaylandWlShellPrivate()) { } /*! - * Initializes the shell extension. + * Initializes the WlShell extension. */ -void QWaylandShell::initialize() +void QWaylandWlShell::initialize() { - Q_D(QWaylandShell); + Q_D(QWaylandWlShell); QWaylandExtensionTemplate::initialize(); QWaylandCompositor *compositor = static_cast<QWaylandCompositor *>(extensionContainer()); if (!compositor) { - qWarning() << "Failed to find QWaylandCompositor when initializing QWaylandShell"; + qWarning() << "Failed to find QWaylandCompositor when initializing QWaylandWlShell"; return; } d->init(compositor->display(), 1); } /*! - * Returns the Wayland interface for the QWaylandShell. + * Returns the Wayland interface for the QWaylandWlShell. */ -const struct wl_interface *QWaylandShell::interface() +const struct wl_interface *QWaylandWlShell::interface() { - return QWaylandShellPrivate::interface(); + return QWaylandWlShellPrivate::interface(); } /*! - * \qmlsignal void QtWaylandCompositor::Shell::createShellSurface(object surface, object client, int id) + * \qmlsignal void QtWaylandCompositor::WlShell::createShellSurface(object surface, object client, int id) * - * This signal is emitted when the \a client has requested a shell surface to be associated + * This signal is emitted when the \a client has requested a wl_shell_surface to be associated * with \a surface and be assigned the given \a id. The handler for this signal is * expected to create the shell surface and initialize it within the scope of the * signal emission. */ /*! - * \fn void QWaylandShell::createShellSurface(QWaylandSurface *surface, QWaylandClient *client, uint id) + * \fn void QWaylandWlShell::createShellSurface(QWaylandSurface *surface, QWaylandClient *client, uint id) * * This signal is emitted when the \a client has requested a shell surface to be associated * with \a surface and be assigned the given \a id. The handler for this signal is @@ -321,17 +321,17 @@ const struct wl_interface *QWaylandShell::interface() /*! * \internal */ -QByteArray QWaylandShell::interfaceName() +QByteArray QWaylandWlShell::interfaceName() { - return QWaylandShellPrivate::interfaceName(); + return QWaylandWlShellPrivate::interfaceName(); } /*! - * \qmltype ShellSurface + * \qmltype WlShellSurface * \inqmlmodule QtWayland.Compositor - * \brief A shell surface providing desktop-style compositor-specific features to a surface. + * \brief A wl_shell_surface providing desktop-style compositor-specific features to a surface. * - * This type is part of the \l{Shell} extension and provides a way to extend + * This type is part of the \l{WlShell} extension and provides a way to extend * the functionality of an existing WaylandSurface with features specific to desktop-style * compositors, such as resizing and moving the surface. * @@ -339,11 +339,11 @@ QByteArray QWaylandShell::interfaceName() */ /*! - * \class QWaylandShellSurface + * \class QWaylandWlShellSurface * \inmodule QtWaylandCompositor * \brief A shell surface providing desktop-style compositor-specific features to a surface. * - * This class is part of the QWaylandShell extension and provides a way to extend + * This class is part of the QWaylandWlShell extension and provides a way to extend * the functionality of an existing QWaylandSurface with features specific to desktop-style * compositors, such as resizing and moving the surface. * @@ -351,34 +351,34 @@ QByteArray QWaylandShell::interfaceName() */ /*! - * Constructs a QWaylandShellSurface. + * Constructs a QWaylandWlShellSurface. */ -QWaylandShellSurface::QWaylandShellSurface() - : QWaylandExtensionTemplate<QWaylandShellSurface>(*new QWaylandShellSurfacePrivate) +QWaylandWlShellSurface::QWaylandWlShellSurface() + : QWaylandExtensionTemplate<QWaylandWlShellSurface>(*new QWaylandWlShellSurfacePrivate) { } /*! - * Constructs a QWaylandShellSurface for \a surface and initializes it with the given \a shell and \a resource. + * Constructs a QWaylandWlShellSurface for \a surface and initializes it with the given \a shell and \a resource. */ -QWaylandShellSurface::QWaylandShellSurface(QWaylandShell *shell, QWaylandSurface *surface, const QWaylandResource &res) - : QWaylandExtensionTemplate<QWaylandShellSurface>(*new QWaylandShellSurfacePrivate) +QWaylandWlShellSurface::QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &res) + : QWaylandExtensionTemplate<QWaylandWlShellSurface>(*new QWaylandWlShellSurfacePrivate) { initialize(shell, surface, res); } /*! - * \qmlmethod void QtWaylandCompositor::ShellSurface::initialize(object shell, object surface, object client, int id) + * \qmlmethod void QtWaylandCompositor::WlShellSurface::initialize(object shell, object surface, object client, int id) * - * Initializes the ShellSurface, associating it with the given \a shell, \a surface, \a client, and \a id. + * Initializes the WlShellSurface, associating it with the given \a shell, \a surface, \a client, and \a id. */ /*! - * Initializes the QWaylandShellSurface, associating it with the given \a shell, \a surface and \a resource. + * Initializes the QWaylandWlShellSurface, associating it with the given \a shell, \a surface and \a resource. */ -void QWaylandShellSurface::initialize(QWaylandShell *shell, QWaylandSurface *surface, const QWaylandResource &resource) +void QWaylandWlShellSurface::initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource) { - Q_D(QWaylandShellSurface); + Q_D(QWaylandWlShellSurface); d->m_shell = shell; d->m_surface = surface; d->init(resource.resource()); @@ -390,25 +390,25 @@ void QWaylandShellSurface::initialize(QWaylandShell *shell, QWaylandSurface *sur /*! * \internal */ -void QWaylandShellSurface::initialize() +void QWaylandWlShellSurface::initialize() { QWaylandExtensionTemplate::initialize(); } -const struct wl_interface *QWaylandShellSurface::interface() +const struct wl_interface *QWaylandWlShellSurface::interface() { - return QWaylandShellSurfacePrivate::interface(); + return QWaylandWlShellSurfacePrivate::interface(); } /*! * \internal */ -QByteArray QWaylandShellSurface::interfaceName() +QByteArray QWaylandWlShellSurface::interfaceName() { - return QWaylandShellSurfacePrivate::interfaceName(); + return QWaylandWlShellSurfacePrivate::interfaceName(); } -QSize QWaylandShellSurface::sizeForResize(const QSizeF &size, const QPointF &delta, QWaylandShellSurface::ResizeEdge edge) +QSize QWaylandWlShellSurface::sizeForResize(const QSizeF &size, const QPointF &delta, QWaylandWlShellSurface::ResizeEdge edge) { qreal width = size.width(); qreal height = size.height(); @@ -426,7 +426,7 @@ QSize QWaylandShellSurface::sizeForResize(const QSizeF &size, const QPointF &del } /*! - * \enum QWaylandShellSurface::ResizeEdge + * \enum QWaylandWlShellSurface::ResizeEdge * * This enum type provides a way to specify a specific edge or corner of * the surface. @@ -443,7 +443,7 @@ QSize QWaylandShellSurface::sizeForResize(const QSizeF &size, const QPointF &del */ /*! - * \qmlmethod void QtWaylandCompositor::ShellSurface::sendConfigure(size size, enum edges) + * \qmlmethod void QtWaylandCompositor::WlShellSurface::sendConfigure(size size, enum edges) * * Sends a configure event to the client, suggesting that it resize its surface to * the provided \a size. The \a edges provide a hint about how the surface @@ -455,14 +455,14 @@ QSize QWaylandShellSurface::sizeForResize(const QSizeF &size, const QPointF &del * the provided \a size. The \a edges provide a hint about how the surface * was resized. */ -void QWaylandShellSurface::sendConfigure(const QSize &size, ResizeEdge edges) +void QWaylandWlShellSurface::sendConfigure(const QSize &size, ResizeEdge edges) { - Q_D(QWaylandShellSurface); + Q_D(QWaylandWlShellSurface); d->send_configure(edges, size.width(), size.height()); } /*! - * \qmlmethod void QtWaylandCompositor::ShellSurface::sendPopupDone() + * \qmlmethod void QtWaylandCompositor::WlShellSurface::sendPopupDone() * * Sends a popup_done event to the client to indicate that the user has clicked * somewhere outside the client's surfaces. @@ -472,31 +472,31 @@ void QWaylandShellSurface::sendConfigure(const QSize &size, ResizeEdge edges) * Sends a popup_done event to the client to indicate that the user has clicked * somewhere outside the client's surfaces. */ -void QWaylandShellSurface::sendPopupDone() +void QWaylandWlShellSurface::sendPopupDone() { - Q_D(QWaylandShellSurface); + Q_D(QWaylandWlShellSurface); d->send_popup_done(); } /*! - * \qmlproperty object QtWaylandCompositor::ShellSurface::surface + * \qmlproperty object QtWaylandCompositor::WlShellSurface::surface * - * This property holds the surface associated with this ShellSurface. + * This property holds the wl_surface associated with this WlShellSurface. */ /*! - * \property QWaylandShellSurface::surface + * \property QWaylandWlShellSurface::surface * - * This property holds the surface associated with this QWaylandShellSurface. + * This property holds the surface associated with this QWaylandWlShellSurface. */ -QWaylandSurface *QWaylandShellSurface::surface() const +QWaylandSurface *QWaylandWlShellSurface::surface() const { - Q_D(const QWaylandShellSurface); + Q_D(const QWaylandWlShellSurface); return d->m_surface; } /*! - * \enum QWaylandShellSurface::FocusPolicy + * \enum QWaylandWlShellSurface::FocusPolicy * * This enum type is used to specify the focus policy of a shell surface. * @@ -505,63 +505,63 @@ QWaylandSurface *QWaylandShellSurface::surface() const */ /*! - * \qmlproperty enum QtWaylandCompositor::ShellSurface::focusPolicy + * \qmlproperty enum QtWaylandCompositor::WlShellSurface::focusPolicy * - * This property holds the focus policy of the ShellSurface. + * This property holds the focus policy of the WlShellSurface. */ /*! - * \property QWaylandShellSurface::focusPolicy + * \property QWaylandWlShellSurface::focusPolicy * - * This property holds the focus policy of the QWaylandShellSurface. + * This property holds the focus policy of the QWaylandWlShellSurface. */ -QWaylandShellSurface::FocusPolicy QWaylandShellSurface::focusPolicy() const +QWaylandWlShellSurface::FocusPolicy QWaylandWlShellSurface::focusPolicy() const { - Q_D(const QWaylandShellSurface); + Q_D(const QWaylandWlShellSurface); return d->m_focusPolicy; } /*! - * \qmlproperty string QtWaylandCompositor::ShellSurface::title + * \qmlproperty string QtWaylandCompositor::WlShellSurface::title * - * This property holds the title of the ShellSurface. + * This property holds the title of the WlShellSurface. */ /*! - * \property QWaylandShellSurface::title + * \property QWaylandWlShellSurface::title * - * This property holds the title of the QWaylandShellSurface. + * This property holds the title of the QWaylandWlShellSurface. */ -QString QWaylandShellSurface::title() const +QString QWaylandWlShellSurface::title() const { - Q_D(const QWaylandShellSurface); + Q_D(const QWaylandWlShellSurface); return d->m_title; } /*! - * \qmlproperty string QtWaylandCompositor::ShellSurface::className + * \qmlproperty string QtWaylandCompositor::WlShellSurface::className * - * This property holds the class name of the ShellSurface. + * This property holds the class name of the WlShellSurface. */ /*! - * \property QWaylandShellSurface::className + * \property QWaylandWlShellSurface::className * - * This property holds the class name of the QWaylandShellSurface. + * This property holds the class name of the QWaylandWlShellSurface. */ -QString QWaylandShellSurface::className() const +QString QWaylandWlShellSurface::className() const { - Q_D(const QWaylandShellSurface); + Q_D(const QWaylandWlShellSurface); return d->m_className; } -QWaylandSurfaceRole *QWaylandShellSurface::role() +QWaylandSurfaceRole *QWaylandWlShellSurface::role() { - return &QWaylandShellSurfacePrivate::s_role; + return &QWaylandWlShellSurfacePrivate::s_role; } /*! - * \qmlmethod void QtWaylandCompositor::ShellSurface::ping() + * \qmlmethod void QtWaylandCompositor::WlShellSurface::ping() * * Sends a ping event to the client. If the client replies to the event the \a pong * signal will be emitted. @@ -571,21 +571,21 @@ QWaylandSurfaceRole *QWaylandShellSurface::role() * Sends a ping event to the client. If the client replies to the event the \a pong * signal will be emitted. */ -void QWaylandShellSurface::ping() +void QWaylandWlShellSurface::ping() { - Q_D(QWaylandShellSurface); + Q_D(QWaylandWlShellSurface); uint32_t serial = d->m_surface->compositor()->nextSerial(); d->ping(serial); } /*! - * Returns the QWaylandShellSurface object associated with the given \a resource, or null if no such object exists. + * Returns the QWaylandWlShellSurface object associated with the given \a resource, or null if no such object exists. */ -QWaylandShellSurface *QWaylandShellSurface::fromResource(wl_resource *resource) +QWaylandWlShellSurface *QWaylandWlShellSurface::fromResource(wl_resource *resource) { - QWaylandShellSurfacePrivate::Resource *res = QWaylandShellSurfacePrivate::Resource::fromResource(resource); + QWaylandWlShellSurfacePrivate::Resource *res = QWaylandWlShellSurfacePrivate::Resource::fromResource(resource); if (res) - return static_cast<QWaylandShellSurfacePrivate *>(res->shell_surface_object)->q_func(); + return static_cast<QWaylandWlShellSurfacePrivate *>(res->shell_surface_object)->q_func(); return 0; } diff --git a/src/compositor/extensions/qwaylandshell.h b/src/compositor/extensions/qwaylandwlshell.h index 5fec80ffc..2420f4cd0 100644 --- a/src/compositor/extensions/qwaylandshell.h +++ b/src/compositor/extensions/qwaylandwlshell.h @@ -34,8 +34,8 @@ ** ****************************************************************************/ -#ifndef QWAYLANDSHELL_H -#define QWAYLANDSHELL_H +#ifndef QWAYLANDWLSHELL_H +#define QWAYLANDWLSHELL_H #include <QtWaylandCompositor/QWaylandExtension> #include <QtWaylandCompositor/QWaylandResource> @@ -44,21 +44,21 @@ QT_BEGIN_NAMESPACE -class QWaylandShellPrivate; -class QWaylandShellSurfacePrivate; +class QWaylandWlShellPrivate; +class QWaylandWlShellSurfacePrivate; class QWaylandSurface; class QWaylandClient; class QWaylandInputDevice; class QWaylandOutput; class QWaylandSurfaceRole; -class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandShell : public QWaylandExtensionTemplate<QWaylandShell> +class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandWlShell : public QWaylandExtensionTemplate<QWaylandWlShell> { Q_OBJECT - Q_DECLARE_PRIVATE(QWaylandShell) + Q_DECLARE_PRIVATE(QWaylandWlShell) public: - QWaylandShell(); - QWaylandShell(QWaylandCompositor *compositor); + QWaylandWlShell(); + QWaylandWlShell(QWaylandCompositor *compositor); void initialize() Q_DECL_OVERRIDE; @@ -69,10 +69,10 @@ Q_SIGNALS: void createShellSurface(QWaylandSurface *surface, const QWaylandResource &resource); }; -class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandShellSurface : public QWaylandExtensionTemplate<QWaylandShellSurface> +class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandWlShellSurface : public QWaylandExtensionTemplate<QWaylandWlShellSurface> { Q_OBJECT - Q_DECLARE_PRIVATE(QWaylandShellSurface) + Q_DECLARE_PRIVATE(QWaylandWlShellSurface) Q_PROPERTY(QWaylandSurface *surface READ surface NOTIFY surfaceChanged) Q_PROPERTY(QString title READ title NOTIFY titleChanged) Q_PROPERTY(QString className READ className NOTIFY classNameChanged) @@ -106,10 +106,10 @@ public: }; Q_ENUM(FocusPolicy) - QWaylandShellSurface(); - QWaylandShellSurface(QWaylandShell *shell, QWaylandSurface *surface, const QWaylandResource &resource); + QWaylandWlShellSurface(); + QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource); - Q_INVOKABLE void initialize(QWaylandShell *shell, QWaylandSurface *surface, const QWaylandResource &resource); + Q_INVOKABLE void initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource); QString title() const; QString className() const; @@ -122,7 +122,7 @@ public: static QByteArray interfaceName(); static QWaylandSurfaceRole *role(); - static QWaylandShellSurface *fromResource(wl_resource *res); + static QWaylandWlShellSurface *fromResource(wl_resource *res); Q_INVOKABLE QSize sizeForResize(const QSizeF &size, const QPointF &delta, ResizeEdge edges); Q_INVOKABLE void sendConfigure(const QSize &size, ResizeEdge edges); @@ -152,4 +152,4 @@ private: QT_END_NAMESPACE -#endif /*QWAYLANDSHELL_H*/ +#endif /*QWAYLANDWLSHELL_H*/ diff --git a/src/compositor/extensions/qwaylandshell_p.h b/src/compositor/extensions/qwaylandwlshell_p.h index bfa8c4004..8d7129fa8 100644 --- a/src/compositor/extensions/qwaylandshell_p.h +++ b/src/compositor/extensions/qwaylandwlshell_p.h @@ -34,13 +34,13 @@ ** ****************************************************************************/ -#ifndef QWAYLANDSHELL_P_H -#define QWAYLANDSHELL_P_H +#ifndef QWAYLANDWLSHELL_P_H +#define QWAYLANDWLSHELL_P_H #include <QtWaylandCompositor/qwaylandexport.h> #include <QtWaylandCompositor/qwaylandsurface.h> #include <QtWaylandCompositor/private/qwaylandextension_p.h> -#include <QtWaylandCompositor/QWaylandShellSurface> +#include <QtWaylandCompositor/QWaylandWlShellSurface> #include <QtWaylandCompositor/QWaylandInputDevice> #include <wayland-server.h> @@ -63,49 +63,49 @@ QT_BEGIN_NAMESPACE -class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandShellPrivate +class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandWlShellPrivate : public QWaylandExtensionTemplatePrivate , public QtWaylandServer::wl_shell { - Q_DECLARE_PUBLIC(QWaylandShell) + Q_DECLARE_PUBLIC(QWaylandWlShell) public: - QWaylandShellPrivate(); - static QWaylandShellPrivate *get(QWaylandShell *shell) { return shell->d_func(); } + QWaylandWlShellPrivate(); + static QWaylandWlShellPrivate *get(QWaylandWlShell *shell) { return shell->d_func(); } protected: void shell_get_shell_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface) Q_DECL_OVERRIDE; }; -class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandShellSurfacePrivate +class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandWlShellSurfacePrivate : public QWaylandExtensionTemplatePrivate , public QtWaylandServer::wl_shell_surface { - Q_DECLARE_PUBLIC(QWaylandShellSurface) + Q_DECLARE_PUBLIC(QWaylandWlShellSurface) public: - QWaylandShellSurfacePrivate(); - ~QWaylandShellSurfacePrivate(); + QWaylandWlShellSurfacePrivate(); + ~QWaylandWlShellSurfacePrivate(); - static QWaylandShellSurfacePrivate *get(QWaylandShellSurface *surface) { return surface->d_func(); } + static QWaylandWlShellSurfacePrivate *get(QWaylandWlShellSurface *surface) { return surface->d_func(); } void ping(uint32_t serial); - void setFocusPolicy(QWaylandShellSurface::FocusPolicy focusPolicy) + void setFocusPolicy(QWaylandWlShellSurface::FocusPolicy focusPolicy) { if (focusPolicy == m_focusPolicy) return; - Q_Q(QWaylandShellSurface); + Q_Q(QWaylandWlShellSurface); m_focusPolicy = focusPolicy; emit q->focusPolicyChanged(); } private: - QWaylandShell *m_shell; + QWaylandWlShell *m_shell; QWaylandSurface *m_surface; QSet<uint32_t> m_pings; QString m_title; QString m_className; - QWaylandShellSurface::FocusPolicy m_focusPolicy; + QWaylandWlShellSurface::FocusPolicy m_focusPolicy; void shell_surface_destroy_resource(Resource *resource) Q_DECL_OVERRIDE; @@ -147,4 +147,4 @@ private: QT_END_NAMESPACE -#endif // QWAYLANDSHELL_P_H +#endif // QWAYLANDWLSHELL_P_H |