QWaylandXdgSurfaceV5 Class

The QWaylandXdgSurfaceV5 class provides desktop-style compositor-specific features to an xdg surface. More...

Header: #include <QWaylandXdgSurfaceV5>
qmake: QT += waylandcompositor
Since: Qt 5.8

This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Public Types

enum ResizeEdge { NoneEdge, TopEdge, BottomEdge, LeftEdge, ..., BottomRightEdge }
enum State { MaximizedState, FullscreenState, ResizingState, ActivatedState }

Properties

Public Functions

QWaylandXdgSurfaceV5()
QWaylandXdgSurfaceV5(QWaylandXdgShellV5 *xdgShell, QWaylandSurface *surface, const QWaylandResource &res)
bool activated() const
QString appId() const
bool fullscreen() const
void initialize(QWaylandXdgShellV5 *xdgShell, QWaylandSurface *surface, const QWaylandResource &resource)
bool maximized() const
QWaylandXdgSurfaceV5 *parentSurface() const
bool resizing() const
void sendClose()
uint sendConfigure(const QSize &size, const QVector<uint> &states)
uint sendConfigure(const QSize &size, const QVector<QWaylandXdgSurfaceV5::State> &states)
uint sendFullscreen(const QSize &size)
uint sendMaximized(const QSize &size)
uint sendResizing(const QSize &maxSize)
uint sendUnmaximized(const QSize &size = QSize(0, 0))
QWaylandXdgShellV5 *shell() const
QSize sizeForResize(const QSizeF &size, const QPointF &delta, QWaylandXdgSurfaceV5::ResizeEdge edge)
QVector<uint> states() const
QWaylandSurface *surface() const
QString title() const
QRect windowGeometry() const
Qt::WindowType windowType() const

Signals

void ackConfigure(uint serial)
void activatedChanged()
void appIdChanged()
void fullscreenChanged()
void maximizedChanged()
void parentSurfaceChanged()
void resizingChanged()
void setFullscreen(QWaylandOutput *output)
void setMaximized()
void setMinimized()
void setTopLevel()
void setTransient()
void shellChanged()
void showWindowMenu(QWaylandSeat *seat, const QPoint &localSurfacePosition)
void startMove(QWaylandSeat *seat)
void startResize(QWaylandSeat *seat, QWaylandXdgSurfaceV5::ResizeEdge edges)
void statesChanged()
void surfaceChanged()
void titleChanged()
void unsetFullscreen()
void unsetMaximized()
void windowGeometryChanged()

Static Public Members

QWaylandXdgSurfaceV5 *fromResource(::wl_resource *resource)
const struct wl_interface *interface()
QByteArray interfaceName()
QWaylandSurfaceRole *role()
const QMetaObject staticMetaObject

Detailed Description

The QWaylandXdgSurfaceV5 class provides desktop-style compositor-specific features to an xdg surface.

This class is part of the QWaylandXdgShellV5 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.

It corresponds to the Wayland interface xdg_surface.

Member Type Documentation

enum QWaylandXdgSurfaceV5::ResizeEdge

enum QWaylandXdgSurfaceV5::State

Property Documentation

activated : const bool

Access functions:

bool activated() const

Notifier signal:

void activatedChanged()

appId : const QString

This property holds the app id of the QWaylandXdgSurfaceV5.

Access functions:

QString appId() const

Notifier signal:

void appIdChanged()

fullscreen : const bool

Access functions:

bool fullscreen() const

Notifier signal:

void fullscreenChanged()

maximized : const bool

Access functions:

bool maximized() const

Notifier signal:

void maximizedChanged()

parentSurface : QWaylandXdgSurfaceV5* const

This property holds the XdgSurfaceV5 parent of this XdgSurfaceV5. When a parent surface is set, the parentSurfaceChanged() signal is guaranteed to be emitted before setTopLevel() and setTransient().

Access functions:

QWaylandXdgSurfaceV5 *parentSurface() const

Notifier signal:

void parentSurfaceChanged()

See also QWaylandXdgSurfaceV5::setTopLevel() and QWaylandXdgSurfaceV5::setTransient().

resizing : const bool

Access functions:

bool resizing() const

Notifier signal:

void resizingChanged()

shell : QWaylandXdgShellV5* const

This property holds the shell associated with this QWaylandXdgSurfaceV5.

Access functions:

QWaylandXdgShellV5 *shell() const

Notifier signal:

void shellChanged()

states : const QList<int>

This property holds the last states the client acknowledged for this QWaylandXdgSurfaceV5.

Notifier signal:

void statesChanged()

surface : QWaylandSurface* const

This property holds the surface associated with this QWaylandXdgSurfaceV5.

Access functions:

QWaylandSurface *surface() const

Notifier signal:

void surfaceChanged()

title : const QString

This property holds the title of the QWaylandXdgSurfaceV5.

Access functions:

QString title() const

Notifier signal:

void titleChanged()

windowGeometry : const QRect

This property holds the window geometry of the QWaylandXdgSurfaceV5. The window geometry describes the window's visible bounds from the user's perspective. The geometry includes title bars and borders if drawn by the client, but excludes drop shadows. It is meant to be used for aligning and tiling windows.

Access functions:

QRect windowGeometry() const

Notifier signal:

void windowGeometryChanged()

Member Function Documentation

QWaylandXdgSurfaceV5::QWaylandXdgSurfaceV5()

Constructs a QWaylandXdgSurfaceV5.

QWaylandXdgSurfaceV5::QWaylandXdgSurfaceV5(QWaylandXdgShellV5 *xdgShell, QWaylandSurface *surface, const QWaylandResource &res)

Constructs a QWaylandXdgSurfaceV5 for surface and initializes it with the given xdgShell, surface, and resource res.

[signal] void QWaylandXdgSurfaceV5::ackConfigure(uint serial)

This signal is emitted when the client has received configure events up to and including the configure event with serial serial and will draw its surface accordingly in the next committed buffer.

[static] QWaylandXdgSurfaceV5 *QWaylandXdgSurfaceV5::fromResource(::wl_resource *resource)

Returns the QWaylandXdgSurfaceV5 corresponding to the resource.

void QWaylandXdgSurfaceV5::initialize(QWaylandXdgShellV5 *xdgShell, QWaylandSurface *surface, const QWaylandResource &resource)

Initializes the QWaylandXdgSurfaceV5, associating it with the given xdgShell, surface and resource.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

[static] const struct wl_interface *QWaylandXdgSurfaceV5::interface()

Returns the Wayland interface for the QWaylandXdgSurfaceV5.

[static] QByteArray QWaylandXdgSurfaceV5::interfaceName()

[static] QWaylandSurfaceRole *QWaylandXdgSurfaceV5::role()

Returns the surface role for the QWaylandXdgSurfaceV5.

void QWaylandXdgSurfaceV5::sendClose()

Sends a close event to the client.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

uint QWaylandXdgSurfaceV5::sendConfigure(const QSize &size, const QVector<uint> &states)

Sends a configure event to the client. Parameter size contains the pixel size of the surface. Known states are enumerated in QWaylandXdgSurfaceV5::State.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

uint QWaylandXdgSurfaceV5::sendConfigure(const QSize &size, const QVector<QWaylandXdgSurfaceV5::State> &states)

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

uint QWaylandXdgSurfaceV5::sendFullscreen(const QSize &size)

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

uint QWaylandXdgSurfaceV5::sendMaximized(const QSize &size)

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

uint QWaylandXdgSurfaceV5::sendResizing(const QSize &maxSize)

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

uint QWaylandXdgSurfaceV5::sendUnmaximized(const QSize &size = QSize(0, 0))

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

[signal] void QWaylandXdgSurfaceV5::setFullscreen(QWaylandOutput *output)

This signal is emitted when the client wants the xdg_surface to be in full screen mode. The client may specify an output it wishes the xdg_surface to be shown on.

See also fullscreen().

[signal] void QWaylandXdgSurfaceV5::setMaximized()

This signal is emitted when the client wants the xdg_surface to be maximized.

See also maximized().

[signal] void QWaylandXdgSurfaceV5::setMinimized()

This signal is emitted when the client wants the xdg_surface to be minimized.

[signal] void QWaylandXdgSurfaceV5::setTopLevel()

[signal] void QWaylandXdgSurfaceV5::setTransient()

[signal] void QWaylandXdgSurfaceV5::showWindowMenu(QWaylandSeat *seat, const QPoint &localSurfacePosition)

This signal is emitted when the client wants to show a context menu at localSurfacePosition, using the Wayland seat seat. It's typically emitted in response to the user right-clicking the window decorations.

QSize QWaylandXdgSurfaceV5::sizeForResize(const QSizeF &size, const QPointF &delta, QWaylandXdgSurfaceV5::ResizeEdge edge)

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

[signal] void QWaylandXdgSurfaceV5::startMove(QWaylandSeat *seat)

This signal is emitted when the client wants to start an interactive move of the QWaylandXdgSurfaceV5, typically in response to the window decorations being dragged by seat.

[signal] void QWaylandXdgSurfaceV5::startResize(QWaylandSeat *seat, QWaylandXdgSurfaceV5::ResizeEdge edges)

This signal is emitted when the client wants to start an interactive resize of the QWaylandXdgSurfaceV5, typically in response to the window decorations being dragged by seat on the window borders given by edges.

QVector<uint> QWaylandXdgSurfaceV5::states() const

[signal] void QWaylandXdgSurfaceV5::unsetFullscreen()

This signal is emitted when the client doesn't want the xdg_surface to be in full screen mode anymore.

[signal] void QWaylandXdgSurfaceV5::unsetMaximized()

This signal is emitted when the client doesn't want the xdg_surface to be maximized anymore.

Qt::WindowType QWaylandXdgSurfaceV5::windowType() const

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.