QWaylandCompositor Class
QWaylandCompositorクラスはWaylandディスプレイサーバーを管理します。詳細...
ヘッダー | #include <QWaylandCompositor> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
qmake | QT += waylandcompositor |
QML で | WaylandCompositor |
継承: | QWaylandObject |
プロパティ
|
|
パブリック機能
QWaylandCompositor(QObject *parent = nullptr) | |
virtual | ~QWaylandCompositor() override |
void | addSocketDescriptor(int fd) |
QVector<QWaylandCompositor::ShmFormat> | additionalShmFormats() const |
virtual void | create() |
QWaylandOutput * | defaultOutput() const |
QWaylandSeat * | defaultSeat() const |
void | destroyClient(QWaylandClient *client) |
void | destroyClientForSurface(QWaylandSurface *surface) |
virtual void | grabSurface(QWaylandSurfaceGrabber *grabber, const QWaylandBufferRef &buffer) |
bool | isCreated() const |
QWaylandOutput * | outputFor(QWindow *window) const |
bool | retainedSelectionEnabled() const |
QWaylandSeat * | seatFor(QInputEvent *inputEvent) |
void | setAdditionalShmFormats(const QVector<QWaylandCompositor::ShmFormat> &additionalShmFormats) |
void | setDefaultOutput(QWaylandOutput *output) |
void | setRetainedSelectionEnabled(bool enabled) |
void | setSocketName(const QByteArray &name) |
void | setUseHardwareIntegrationExtension(bool use) |
QByteArray | socketName() const |
bool | useHardwareIntegrationExtension() const |
シグナル
void | additionalShmFormatsChanged() |
void | createdChanged() |
void | defaultOutputChanged() |
void | defaultSeatChanged(QWaylandSeat *newDevice, QWaylandSeat *oldDevice) |
void | retainedSelectionChanged(bool retainedSelection) |
void | socketNameChanged(const QByteArray &socketName) |
void | surfaceCreated(QWaylandSurface *surface) |
void | surfaceRequested(QWaylandClient *client, uint id, int version) |
void | useHardwareIntegrationExtensionChanged() |
詳細説明
QWaylandCompositor はクライアントとの接続を管理し、outputs とseats を管理します。
通常、コンポジターアプリケーションは1つのWaylandCompositor インスタンスを持ち、子として複数の出力を持つことができます。
プロパティ ドキュメント
[since 6.0]
additionalShmFormats : QVector<ShmFormat>
このプロパティは、コンポジターがサポートすると宣伝されている追加の wl_shm フォーマットのリストを保持します。
デフォルトでは、必須の ShmFormat_ARGB8888 と ShmFormat_XRGB8888 のみがリストされ、このリストは空になります。
このプロパティは、コンポジターがcreated になる前に設定する必要があります。それ以降の変更は影響しません。
このプロパティは Qt 6.0 で導入されました。
アクセス関数です:
QVector<QWaylandCompositor::ShmFormat> | additionalShmFormats() const |
void | setAdditionalShmFormats(const QVector<QWaylandCompositor::ShmFormat> &additionalShmFormats) |
Notifier シグナル:
void | additionalShmFormatsChanged() |
[read-only]
created : const bool
このプロパティは、QWaylandCompositor が初期化されていれば真、そうでなければ偽となる。
アクセス関数
bool | isCreated() const |
通知シグナル
void | createdChanged() |
defaultOutput : QWaylandOutput*
このプロパティには、QWaylandCompositor に追加された出力リストの先頭が格納され、出力が追加されていない場合は null が格納されます。
新しいデフォルト出力を設定すると、その出力が出力リストの先頭に追加され、新しいデフォルトになりますが、以前のデフォルトはリストから削除されません。新しいデフォルト出力がすでに出力リストにあった場合は、リストの先頭に移動します。
アクセス関数
QWaylandOutput * | defaultOutput() const |
void | setDefaultOutput(QWaylandOutput *output) |
通知シグナル:
void | defaultOutputChanged() |
[read-only]
defaultSeat : QWaylandSeat* const
このプロパティには、このQWaylandCompositor のデフォルトシートが含まれます。
アクセス関数:
QWaylandSeat * | defaultSeat() const |
通知シグナル:
void | defaultSeatChanged(QWaylandSeat *newDevice, QWaylandSeat *oldDevice) |
retainedSelection : bool
このプロパティは、保持された選択が有効であるかどうかを保持する。
アクセス関数
bool | retainedSelectionEnabled() const |
void | setRetainedSelectionEnabled(bool enabled) |
通知シグナル
void | retainedSelectionChanged(bool retainedSelection) |
socketName : QByteArray
このプロパティは、QWaylandCompositor がクライアントと通信する際に使用するソケット名を保持する。これはQWaylandCompositor がcreated になる前に設定する必要がある。
socketName が空(デフォルト)の場合、代わりに開始引数--wayland-socket-name
の内容が使用される。この引数が設定されていない場合、コンポジターはソケット名を探そうとするが、デフォルトではwayland-0
である。
アクセス関数
QByteArray | socketName() const |
void | setSocketName(const QByteArray &name) |
通知シグナル
void | socketNameChanged(const QByteArray &socketName) |
useHardwareIntegrationExtension : bool
このプロパティは、このQWaylandCompositor でハードウェア統合エクステンションを有効にするかどうかを保持します。
このプロパティは、コンポジターがcreated になる前に設定する必要があります。
アクセス関数
bool | useHardwareIntegrationExtension() const |
void | setUseHardwareIntegrationExtension(bool use) |
Notifier シグナル:
void | useHardwareIntegrationExtensionChanged() |
メンバ関数ドキュメント
QWaylandCompositor::QWaylandCompositor(QObject *parent = nullptr)
与えられたparent で QWaylandCompositor を構築します。
[override virtual noexcept]
QWaylandCompositor::~QWaylandCompositor()
を破壊する。QWaylandCompositor
[invokable]
void QWaylandCompositor::addSocketDescriptor(int fd)
既にバインドされリッスンしているサーバーソケットを参照して、ファイルディスクリプタfd のクライアント接続をリッスンする。
ファイルディスクリプタの所有権は持たないので、必要であれば明示的にクローズする必要がある。
注意: このメソッドは libwayland 1.10.0 以降でのみ利用可能である。それ以前のlibwaylandランタイムに対してビルドされた場合、このメソッドはnoopとなります。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[virtual]
void QWaylandCompositor::create()
QWaylandCompositor を初期化します。 サブクラスでこの関数をオーバーライドする場合は、必ずベース・クラスの実装を呼び出してください。
[invokable]
void QWaylandCompositor::destroyClient(QWaylandClient *client)
client を破棄します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[invokable]
void QWaylandCompositor::destroyClientForSurface(QWaylandSurface *surface)
surface のクライアントを破棄します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[virtual]
void QWaylandCompositor::grabSurface(QWaylandSurfaceGrabber *grabber, const QWaylandBufferRef &buffer)
与えられたbuffer からサーフェスの内容を取得する。デフォルトの実装では、OpenGLコンテキストが現在のスレッドにバインドされている必要があります。これが不可能な場合は、カスタムロジックを実装するために、コンポジターのサブクラスでこの関数を再実装してください。デフォルトの実装では、共有メモリとOpenGLバッファのみを取り込みます。
注意: この関数を手動で呼び出すのではなく、QWaylandSurfaceGrabber (grabber) を使用してください。
[invokable]
QWaylandOutput *QWaylandCompositor::outputFor(QWindow *window) const
与えられたwindow に接続されているQWaylandOutput を返します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
QWaylandSeat *QWaylandCompositor::seatFor(QInputEvent *inputEvent)
指定された入力イベントの座席を選択するinputEvent 。現在のところ、Qtは1つのシートしかサポートしていません。
[signal]
void QWaylandCompositor::surfaceCreated(QWaylandSurface *surface)
このシグナルは、新しいQWaylandSurface インスタンスsurface が作成されたときに発せられる。
[signal]
void QWaylandCompositor::surfaceRequested(QWaylandClient *client, uint id, int version)
このシグナルは、client が idid を持つサーフェスを作成したときに発せられる。インターフェースversion も利用可能です。
このシグナルに接続するスロットは、スロットのスコープ内でQWaylandSurface インスタンスを作成し、初期化することができます。そうでない場合は、デフォルトのサーフェスが作成されます。
このシグナルへの接続は、Qt::DirectConnection 接続タイプでなければならない。
© 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.