QWaylandWlShellSurface Class

The QWaylandWlShellSurface class provides desktop-style compositor-specific features to a surface. More...

Header: #include <QWaylandWlShellSurface>
CMake: find_package(Qt6 COMPONENTS Waylandcompositor REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::Waylandcompositor)
qmake: QT += waylandcompositor
Since: Qt 5.8
Inherits: QWaylandShellSurfaceTemplate

Public Types

enum ResizeEdge { NoneEdge, TopEdge, BottomEdge, LeftEdge, TopLeftEdge, …, BottomRightEdge }

Properties

Public Functions

QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &res)
QWaylandWlShellSurface()
QString className() const
void initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource)
void sendConfigure(const QSize &size, QWaylandWlShellSurface::ResizeEdge edges)
void sendPopupDone()
QWaylandWlShell * shell() const
QWaylandSurface * surface() const
QString title() const

Public Slots

void ping()

Signals

void classNameChanged()
void shellChanged()
void surfaceChanged()
void titleChanged()

Static Public Members

QWaylandWlShellSurface * fromResource(wl_resource *resource)

Detailed Description

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.

It corresponds to the Wayland interface wl_shell_surface.

Member Type Documentation

enum QWaylandWlShellSurface::ResizeEdge

This enum type provides a way to specify an edge or corner of the surface.

Constant Value Description
QWaylandWlShellSurface::NoneEdge 0 No edge.
QWaylandWlShellSurface::TopEdge 1 The top edge.
QWaylandWlShellSurface::BottomEdge 2 The bottom edge.
QWaylandWlShellSurface::LeftEdge 4 The left edge.
QWaylandWlShellSurface::TopLeftEdge 5 The top left corner.
QWaylandWlShellSurface::BottomLeftEdge 6 The bottom left corner.
QWaylandWlShellSurface::RightEdge 8 The right edge.
QWaylandWlShellSurface::TopRightEdge 9 The top right corner.
QWaylandWlShellSurface::BottomRightEdge 10 The bottom right corner.

Property Documentation

[read-only] className : const QString

This property holds the class name of the QWaylandWlShellSurface.

Access functions:

QString className() const

Notifier signal:

void classNameChanged()

[read-only] shell : QWaylandWlShell* const

This property holds the shell associated with this QWaylandWlShellSurface.

Access functions:

QWaylandWlShell * shell() const

Notifier signal:

void shellChanged()

[read-only] surface : QWaylandSurface* const

This property holds the surface associated with this QWaylandWlShellSurface.

Access functions:

QWaylandSurface * surface() const

Notifier signal:

void surfaceChanged()

[read-only] title : const QString

This property holds the title of the QWaylandWlShellSurface.

Access functions:

QString title() const

Notifier signal:

void titleChanged()

Member Function Documentation

QWaylandWlShellSurface::QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &res)

Constructs a QWaylandWlShellSurface for surface and initializes it with the given shell and resource res.

QWaylandWlShellSurface::QWaylandWlShellSurface()

Constructs a QWaylandWlShellSurface.

[slot] void QWaylandWlShellSurface::ping()

Sends a ping event to the client. If the client replies to the event the pong signal will be emitted.

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

Returns the QWaylandWlShellSurface object associated with the given resource, or null if no such object exists.

void QWaylandWlShellSurface::initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource)

Initializes the QWaylandWlShellSurface and associates it with the given shell, surface, and resource.

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

void QWaylandWlShellSurface::sendConfigure(const QSize &size, QWaylandWlShellSurface::ResizeEdge edges)

Sends a configure event to the client, suggesting that it resize its surface to the provided size. The edges provide a hint about how the surface was resized.

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

void QWaylandWlShellSurface::sendPopupDone()

Sends a popup_done event to the client to indicate that the user has clicked somewhere outside the client's surfaces.

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

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.0/qwaylandwlshellsurface.html