QWaylandSurface Class
QWaylandSurfaceクラスは、出力デバイス上の矩形領域を表します。詳細...
ヘッダー | #include <QWaylandSurface> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
qmake | QT += waylandcompositor |
QML で | WaylandSurface |
継承: | QWaylandObject |
パブリックな型
enum | Origin { OriginTopLeft, OriginBottomLeft } |
プロパティ
|
|
パブリック機能
QWaylandSurface() | |
QWaylandSurface(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version) | |
virtual | ~QWaylandSurface() override |
int | bufferScale() const |
QSize | bufferSize() const |
QWaylandClient * | client() const |
QWaylandCompositor * | compositor() const |
Qt::ScreenOrientation | contentOrientation() const |
QSize | destinationSize() const |
void | destroy() |
void | frameStarted() |
bool | hasContent() const |
bool | inhibitsIdle() const |
void | initialize(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version) |
bool | inputRegionContains(const QPoint &p) const |
bool | inputRegionContains(const QPointF &position) const |
bool | isCursorSurface() const |
bool | isDestroyed() const |
bool | isInitialized() const |
bool | isOpaque() const |
void | markAsCursorSurface(bool cursorSurface) |
QWaylandSurface::Origin | origin() const |
QWaylandView * | primaryView() const |
struct wl_resource * | resource() const |
void | sendFrameCallbacks() |
void | setPrimaryView(QWaylandView *view) |
bool | setRole(QWaylandSurfaceRole *role, wl_resource *errorResource, uint32_t errorCode) |
QRectF | sourceGeometry() const |
QList<QWaylandView *> | views() const |
wl_client * | waylandClient() const |
パブリックスロット
void | updateSelection() |
シグナル
void | bufferScaleChanged() |
void | bufferSizeChanged() |
void | childAdded(QWaylandSurface *child) |
void | contentOrientationChanged() |
void | cursorSurfaceChanged() |
void | destinationSizeChanged() |
void | dragStarted(QWaylandDrag *drag) |
void | hasContentChanged() |
void | inhibitsIdleChanged() |
void | isOpaqueChanged() |
void | originChanged() |
void | sourceGeometryChanged() |
void | surfaceDestroyed() |
静的パブリックメンバ
QWaylandSurface * | fromResource(wl_resource *resource) |
メンバ型ドキュメント
enum QWaylandSurface::Origin
この列挙型は、QWaylandSurface'のバッファの原点を指定するために使われる。
定数 | 値 | 説明 |
---|---|---|
QWaylandSurface::OriginTopLeft | 0 | 原点はバッファの左上隅です。 |
QWaylandSurface::OriginBottomLeft | 1 | 原点はバッファの左下隅です。 |
プロパティの説明
[read-only]
bufferScale : const int
このプロパティはQWaylandSurface のバッファースケールを保持する。バッファースケールにより、クライアントは高解像度出力で使用するためにより高解像度のバッファデータを提供することができます。
アクセス関数:
int | bufferScale() const |
通知シグナル:
void | bufferScaleChanged() |
[read-only]
bufferSize : const QSize
このプロパティは、このQWaylandSurface の現在のバッファのサイズを、サーフェス座標ではなくピクセルで保持する。
表面座標でのサイズについては、代わりにdestinationSize を使用してください。
アクセス関数
QSize | bufferSize() const |
通知シグナル:
void | bufferSizeChanged() |
destinationSize およびbufferScaleも参照 。
[read-only]
client : QWaylandClient* const
このプロパティは、このQWaylandSurface を使用しているクライアントを保持します。
アクセス関数:
QWaylandClient * | client() const |
[read-only]
contentOrientation : const Qt::ScreenOrientation
このプロパティはQWaylandSurface のコンテンツの向きを保持する。
アクセス関数:
Qt::ScreenOrientation | contentOrientation() const |
ノーティファイアシグナル:
void | contentOrientationChanged() |
QWaylandOutput::transformも参照のこと 。
cursorSurface : bool
このプロパティは、QWaylandSurface がカーソルサーフェスであるかどうかを保持する。
アクセス関数
bool | isCursorSurface() const |
void | markAsCursorSurface(bool cursorSurface) |
ノーティファイアシグナル:
void | cursorSurfaceChanged() |
[read-only]
destinationSize : const QSize
このプロパティは、このWaylandSurface のサイズをサーフェス座標で保持する。
アクセス関数:
QSize | destinationSize() const |
通知シグナル:
void | destinationSizeChanged() |
bufferScale およびbufferSizeも参照のこと 。
[read-only]
hasContent : const bool
このプロパティは、QWaylandSurface にコンテンツがあるかどうかを保持する。
アクセス関数
bool | hasContent() const |
通知シグナル
void | hasContentChanged() |
[read-only]
inhibitsIdle : const bool
このプロパティは、このサーフェスが、スクリーンブランキング、ロック、スクリーン保存などのコンポジターのアイドル動作を抑制することを意図しているかどうかを保持する。
アクセス関数
bool | inhibitsIdle() const |
Notifier シグナル:
void | inhibitsIdleChanged() |
QWaylandIdleInhibitManagerV1も参照してください 。
[read-only, since 6.4]
isOpaque : const bool
このプロパティは、set_opaque_regionリクエストを通してクライアントから報告された、サーフェスが完全に不透明であるかどうかを保持します。
このプロパティは Qt 6.4 で導入されました。
アクセス関数です:
bool | isOpaque() const |
通知シグナル:
void | isOpaqueChanged() |
[read-only]
origin : const QWaylandSurface::Origin
このプロパティはQWaylandSurface のバッファの原点を保持し、サーフェスにバッファがない場合はQWaylandSurface::OriginTopLeft を保持する。
アクセス関数:
QWaylandSurface::Origin | origin() const |
通知シグナル:
void | originChanged() |
[read-only]
sourceGeometry : const QRectF
このプロパティは、アタッチされた QWaylandBuffer のうち、画面に描画されるべき部分を記述します。座標はバッファのコーナーからで、bufferScale によってスケーリングされます。
アクセス関数
QRectF | sourceGeometry() const |
Notifierシグナル:
void | sourceGeometryChanged() |
bufferScale,bufferSize,destinationSizeも参照してください 。
メンバ関数ドキュメント
QWaylandSurface::QWaylandSurface()
初期化されていない QWaylandSurface を構築します。
QWaylandSurface::QWaylandSurface(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)
与えられたcompositor とclient の QWaylandSurface を、与えられたid とversion で構築し、初期化する。
[override virtual noexcept]
QWaylandSurface::~QWaylandSurface()
QWaylandSurface を破壊する。
[signal]
void QWaylandSurface::childAdded(QWaylandSurface *child)
このシグナルは、wl_subsurface(child )がサーフェスに追加されたときに発せられる。
QWaylandCompositor *QWaylandSurface::compositor() const
このQWaylandSurface のコンポジターを返します。
[invokable]
void QWaylandSurface::destroy()
QWaylandSurface を破棄します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[signal]
void QWaylandSurface::dragStarted(QWaylandDrag *drag)
このシグナルは、このサーフェスからdrag 。
[invokable]
void QWaylandSurface::frameStarted()
すべてのフレームのコールバックを送信準備します。
注意: この関数は、メタオブジェクトシステムや QML から呼び出すことができます。Q_INVOKABLE を参照してください。
[static]
QWaylandSurface *QWaylandSurface::fromResource(wl_resource *resource)
Wayland リソースresource に対応するQWaylandSurface を返します。
[invokable]
void QWaylandSurface::initialize(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)
与えられたcompositor とclient でQWaylandSurface を、与えられたid とversion で を初期化します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
bool QWaylandSurface::inputRegionContains(const QPoint &p) const
QWaylandSurface の入力領域に点p が含まれる場合はtrue
を返す。それ以外の場合はfalse
を返す。
bool QWaylandSurface::inputRegionContains(const QPointF &position) const
QWaylandSurface の入力領域に点position が含まれる場合はtrue
を返す。それ以外の場合はfalse
を返す。
[invokable]
bool QWaylandSurface::isDestroyed() const
QWaylandSurface が破壊された場合は true を返す。そうでない場合は false を返します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
bool QWaylandSurface::isInitialized() const
QWaylandSurface が初期化されていれば true を返す。
QWaylandView *QWaylandSurface::primaryView() const
このQWaylandSurface'のプライマリ・ビューを返します。
QWaylandView::advance() およびQWaylandSurface::setPrimaryView()も参照 ください。
struct wl_resource *QWaylandSurface::resource() const
このQWaylandSurface に対応する Wayland リソースを返します。
[invokable]
void QWaylandSurface::sendFrameCallbacks()
保留中のフレームコールバックを送信します。
注意: この関数はメタオブジェクトシステムや QML から呼び出すことができます。Q_INVOKABLE を参照してください。
void QWaylandSurface::setPrimaryView(QWaylandView *view)
このサーフェスに複数のビューがある場合、このQWaylandSurface のプライマリビューをview に設定します。プライマリビューはクライアントのリフレッシュレートを制御するビューです。QWaylandView::advance() が呼び出されたときに、バッファ参照を破棄します。詳細はQWaylandView::advance() のドキュメントを参照してください。
QWaylandWlShellIntegration や QWaylandXdgShellV5Integration などのシェルサーフェス統合では、クライアントからの最大化およびフルスクリーンリクエストは、統合がサーフェスのプライマリビューを持っている場合にのみ効果があります。
primaryView() およびQWaylandView::advance()も参照してください 。
bool QWaylandSurface::setRole(QWaylandSurfaceRole *role, wl_resource *errorResource, uint32_t errorCode)
サーフェスにrole 。ロールは、サーフェスがスクリーン上でどのようにマッピングされるかを定義します。ロールがない場合、サーフェスは非表示になります。一度ロールがサーフェスに割り当てられると、それが永続的なロールになります。それ以降、異なるロールでsetRole()
を呼び出すと、errorResource にプロトコルエラーが発生し、errorCode がクライアントに送信される。この要件を強制することが、サーフェスロールの主な目的である。
role はポインタ値で比較される。QWaylandSurfaceRole 、2つのオブジェクトはその名前に関係なく、異なるロールとみなされます。
サーフェスロールは、例えばシェル拡張などでサーフェスが特定の目的に採用された場合、プロトコル実装によって内部的に設定されます。このような方法でサーフェスを使用する拡張機能を開発していない限り、この関数を呼び出すべきではありません。
ロールを割り当てることができればtrueを返し、そうでなければfalseを返します。
[signal]
void QWaylandSurface::surfaceDestroyed()
このシグナルは、対応するwl_surfaceが破壊されたときに発せられる。
[slot]
void QWaylandSurface::updateSelection()
コンポジターが保持しているクリップボード選択でサーフェスを更新します。これはサーフェスがキーボードフォーカスを受け取ると自動的に行われますが、この関数はキーボードフォーカスを持たないクライアントを更新するのに便利です。
QList<QWaylandView *> QWaylandSurface::views() const
このQWaylandSurface のビューを返します。
wl_client *QWaylandSurface::waylandClient() const
このQWaylandSurface を使ってwl_client
を保持する。
© 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.