QWaylandXdgSurface Class

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

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

Properties

  • popup : QWaylandXdgPopup* const
  • shell : QWaylandXdgShell* const
  • surface : QWaylandSurface* const

Public Functions

QWaylandXdgSurface(QWaylandXdgShell *xdgShell, QWaylandSurface *surface, const QWaylandResource &res)
QWaylandXdgSurface()
void initialize(QWaylandXdgShell *xdgShell, QWaylandSurface *surface, const QWaylandResource &resource)
QWaylandXdgPopup *popup() const
QWaylandXdgShell *shell() const
QWaylandSurface *surface() const
QWaylandXdgToplevel *toplevel() const
QRect windowGeometry() const

Signals

Static Public Members

QWaylandXdgSurface *fromResource(::wl_resource *resource)
const struct wl_interface *interface()

Detailed Description

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

Property Documentation

This property holds the properties and methods that are specific to the popup QWaylandXdgSurface.

Access functions:

QWaylandXdgPopup *popup() const

Notifier signal:

void popupCreated()

See also QWaylandXdgSurface::toplevel and QWaylandXdgShell::popupCreated.

[read-only] shell : QWaylandXdgShell* const

This property holds the shell associated with this QWaylandXdgSurface.

Access functions:

QWaylandXdgShell *shell() const

Notifier signal:

void shellChanged()

[read-only] surface : QWaylandSurface* const

This property holds the surface associated with this QWaylandXdgSurface.

Access functions:

QWaylandSurface *surface() const

Notifier signal:

void surfaceChanged()

[read-only] toplevel : QWaylandXdgToplevel* const

This property holds the properties and methods that are specific to the toplevel QWaylandXdgSurface.

Access functions:

QWaylandXdgToplevel *toplevel() const

Notifier signal:

void toplevelCreated()

See also QWaylandXdgSurface::popup and QWaylandXdgShell::toplevelCreated.

[read-only] windowGeometry : const QRect

This property holds the window geometry of the QWaylandXdgSurface. 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

QWaylandXdgSurface::QWaylandXdgSurface(QWaylandXdgShell *xdgShell, QWaylandSurface *surface, const QWaylandResource &res)

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

QWaylandXdgSurface::QWaylandXdgSurface()

Constructs a QWaylandXdgSurface.

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

Returns the QWaylandXdgSurface corresponding to the resource.

void QWaylandXdgSurface::initialize(QWaylandXdgShell *xdgShell, QWaylandSurface *surface, const QWaylandResource &resource)

Initializes the QWaylandXdgSurface, 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 *QWaylandXdgSurface::interface()

Returns the Wayland interface for the QWaylandXdgSurface.

© 2021 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.