QWaylandSurfaceRole Class
QWaylandSurfaceRoleクラスは、wl_surfaceのコンテキストにおけるサーフェスの役割を表します。詳細...
ヘッダー | #include <QWaylandSurfaceRole> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
qmake: | QT += waylandcompositor |
パブリック関数
QWaylandSurfaceRole(const QByteArray &name) | |
const QByteArray | name() |
詳細説明
QWaylandSurfaceRoleは、QWaylandSurface 。プロトコルの仕様によると、サーフェスのロールは一度設定されると永続的であり、同じサーフェスを後で別のロールに再利用するとプロトコルエラーになる。表面を同じ役割に複数回設定してもエラーにはならない。
例として、QWaylandXdgShell 、サーフェスに「ポップアップ」または「トップレベル」の役割を割り当てることができます。以前にget_popup
リクエストを受けたサーフェスでget_toplevel
リクエストされた場合、コンポジターはプロトコルエラーを発行します。
ロールはポインタ値で比較されるため、QWaylandSurfaceRoleの2つのオブジェクトは、names に関係なく、異なるロールとみなされます。ロールを割り当てる典型的な方法は、それを表す静的なQWaylandSurfaceRoleオブジェクトを持つことです。
class MyShellSurfaceSubType { static QWaylandSurfaceRole s_role; // ... }; // ... surface->setRole(&MyShellSurfaceSubType::s_role, resource->handle, MY_ERROR_CODE);
メンバ関数のドキュメント
QWaylandSurfaceRole::QWaylandSurfaceRole(const QByteArray &name)
QWaylandSurfaceRoleを作成し、name 。この名前は、この QWaylandSurfaceRole が関係するエラーメッセージで使用されます。
const QByteArray QWaylandSurfaceRole::name()
QWaylandSurfaceRole の名前を返す。この名前は、サーフェスの役割を変更しようとした場合など、このQWaylandSurfaceRole に関わるエラーメッセージで使用される。
© 2025 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.