WaylandSeat QML Type (Uncreatable)
キーボード、マウス、タッチ入力へのアクセスを提供します。詳細...
| Import Statement: | import QtWayland.Compositor |
| In C++: | QWaylandSeat |
注:これは作成不可能な型です。QML ではインスタンス化できません。
シグナル
- void cursorSurfaceRequest(QWaylandSurface surface, int hotspotX, int hotspotY)
- void keyboardFocusChanged(QWaylandSurface newFocus, QWaylandSurface oldFocus)
方法
- void sendKeyEvent(int qtKey, bool pressed)
- void sendTouchCancelEvent(WaylandClient client)
- void sendTouchFrameEvent(WaylandClient client)
- void sendTouchPointMoved(WaylandSurface surface, int id, point position)
- uint sendTouchPointPressed(WaylandSurface surface, int id, point position)
- void sendTouchPointReleased(WaylandSurface surface, int id, point position)
- void sendUnicodeKeyPressEvent(uint unicode)
(since 6.7) - void sendUnicodeKeyReleaseEvent(uint unicode)
(since 6.7)
詳細な説明
WaylandSeat タイプは、さまざまな種類のユーザー入力へのアクセスを提供し、キーボードのフォーカスとマウスポインタを管理します。これは、Wayland プロトコルにおける wl_seat インターフェースに対応しています。
シグナルのドキュメント
void cursorSurfaceRequest(QWaylandSurface surface, int hotspotX, int hotspotY)
このシグナルは、クライアントが特定のsurface をマウスカーソルとして設定するよう要求した際に発せられます。たとえば、ユーザーが特定のサーフェスにカーソルを合わせ、カーソルをサイズ変更用の矢印に変更したい場合などです。
hotspotX とhotspotY はどちらも、クリックが行われるべきポインタサーフェスの左上隅からのオフセット値です。たとえば、要求されたカーソルサーフェスが矢印の場合、これらのパラメータはそのサーフェス上の矢印の先端の位置を示します。
注: 対応するハンドラは onCursorSurfaceRequest です。
void keyboardFocusChanged(QWaylandSurface newFocus, QWaylandSurface oldFocus)
このシグナルは、setKeyboardFocus() が呼び出されたとき、またはWaylandQuickItem がフォーカスを持ち、ユーザーがキーの押下を開始したときに発生します。
newFocus キーボードフォーカスを受け取ったサーフェスを持ちます。フォーカスを持つサーフェスがない場合は、nullptr になります。oldFocus は、キーボードフォーカスを失ったサーフェスを持ちます。フォーカスを持つサーフェスがない場合は、nullptr になります。
注: 対応するハンドラは onKeyboardFocusChanged です。
メソッドのドキュメント
void sendKeyEvent(int qtKey, bool pressed)
キーqtKey のキー押下イベント(pressed がtrue の場合)またはキー離しイベント(pressed がfalse の場合)を、キーボードデバイスに送信します。
void sendTouchCancelEvent(WaylandClient client)
client のタッチデバイスにキャンセルイベントを送信します。
void sendTouchFrameEvent(WaylandClient client)
client のタッチデバイスに対してフレームイベントを送信し、一連のタッチアップ、タッチダウン、およびモーションイベントの終了を通知します。
void sendTouchPointMoved(WaylandSurface surface, int id, point position)
surface 上のタッチポイントid に対して、位置position のタッチ移動イベントを送信します。
注: タッチイベントの送信が完了したら、タッチフレームイベントを送信する必要があります 。
警告:この API は、WaylandQuickItem::touchEventsEnabled を使用したタッチイベントの転送と組み合わせて使用しないでください。タッチ ID の競合を引き起こす可能性があります。
タッチモーションイベントのシリアル番号を返します。
uint sendTouchPointPressed(WaylandSurface surface, int id, point position)
surface 上の、位置position にあるタッチポイントid に対して、タッチ押下イベントを送信します。
注: タッチイベントの送信が完了したら、タッチフレームイベントを送信する必要があります 。
警告:この API は、WaylandQuickItem::touchEventsEnabled を使用したタッチイベントの転送と組み合わせて使用しないでください。タッチ ID の競合を引き起こす可能性があります。
タッチダウンイベントのシリアル番号を返します。
void sendTouchPointReleased(WaylandSurface surface, int id, point position)
surface 上の位置position にあるタッチポイントid に対して、タッチリリースイベントを送信します。
注: タッチイベントの送信が完了したら、タッチフレームイベントを送信する必要があります 。
警告:この API は、WaylandQuickItem::touchEventsEnabled を使用したタッチイベントの転送と組み合わせて使用しないでください。タッチ ID の競合を引き起こす可能性があります。
タッチアップイベントのシリアル番号を返します。
[since 6.7] void sendUnicodeKeyPressEvent(uint unicode)
テキスト入力プロトコルを介して、UCS4形式のunicode のキー押下イベントを送信します。
注: クライアントがコンポジターがサポートするテキスト入力プロトコルをサポートしていない場合、この関数は 正常に動作しません。
このメソッドは Qt 6.7 で導入されました。
[since 6.7] void sendUnicodeKeyReleaseEvent(uint unicode)
テキスト入力プロトコルを介して、UCS4unicode のキーリリースイベントを送信します。
注: クライアントがコンポジターがサポートするテキスト入力プロトコルをサポートしていない場合、この関数は 正常に動作しません。
このメソッドは Qt 6.7 で導入されました。
© 2026 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.