![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtWaylandCompositor More...
#include <qwaylandsurface.h>
Public Member Functions | |
QWaylandSurfaceRole (const QByteArray &n) | |
Creates a QWaylandSurfaceRole and assigns it name. | |
const QByteArray | name () |
Returns the name of the QWaylandSurfaceRole. | |
\inmodule QtWaylandCompositor
The QWaylandSurfaceRole class represents the role of the surface in context of wl_surface.
QWaylandSurfaceRole is used to represent the role of a QWaylandSurface. According to the protocol specification, the role of a surface is permanent once set, and if the same surface is later reused for a different role, this constitutes a protocol error. Setting the surface to the same role multiple times is not an error.
As an example, the QWaylandXdgShell can assign either "popup" or "toplevel" roles to surfaces. If get_toplevel
is requested on a surface which has previously received a get_popup
request, then the compositor will issue a protocol error.
Roles are compared by pointer value, so any two objects of QWaylandSurfaceRole will be considered different roles, regardless of what their \l{name()}{names} are. A typical way of assigning a role is to have a static QWaylandSurfaceRole object to represent it.
Definition at line 30 of file qwaylandsurface.h.
|
inline |
Creates a QWaylandSurfaceRole and assigns it name.
The name is used in error messages involving this QWaylandSurfaceRole.
Definition at line 33 of file qwaylandsurface.h.
|
inline |
Returns the name of the QWaylandSurfaceRole.
The name is used in error messages involving this QWaylandSurfaceRole, for example if an attempt is made to change the role of a surface.
Definition at line 35 of file qwaylandsurface.h.
Referenced by QWaylandSurface::setRole(), and QWaylandXdgShellPrivate::xdg_wm_base_get_xdg_surface().