31class Q_WAYLANDCOMPOSITOR_EXPORT
QWaylandSeat :
public QWaylandObject
34 Q_DECLARE_PRIVATE(QWaylandSeat)
36#if QT_CONFIG(draganddrop)
37 Q_PROPERTY(QWaylandDrag *drag READ drag CONSTANT)
38 Q_MOC_INCLUDE(
"qwaylanddrag.h")
40 Q_PROPERTY(QWaylandKeymap *keymap READ keymap CONSTANT)
41 Q_MOC_INCLUDE(
"qwaylandkeymap.h")
42 Q_MOC_INCLUDE(
"qwaylandview.h")
44 QML_NAMED_ELEMENT(WaylandSeat)
45 QML_ADDED_IN_VERSION(1, 0)
54 DefaultCapabilities = Pointer | Keyboard | Touch
56 Q_DECLARE_FLAGS(CapabilityFlags, CapabilityFlag)
57 Q_ENUM(CapabilityFlags)
59 QWaylandSeat(QWaylandCompositor *compositor, CapabilityFlags capabilityFlags = DefaultCapabilities);
60 ~QWaylandSeat() override;
61 virtual void initialize();
62 bool isInitialized()
const;
64 void sendMousePressEvent(Qt::MouseButton button);
65 void sendMouseReleaseEvent(Qt::MouseButton button);
66 void sendMouseMoveEvent(QWaylandView *surface ,
const QPointF &localPos,
const QPointF &outputSpacePos = QPointF());
67 void sendMouseWheelEvent(Qt::Orientation orientation,
int delta);
69 void sendKeyPressEvent(uint code);
70 void sendKeyReleaseEvent(uint code);
72 void sendFullKeyEvent(QKeyEvent *event);
73 Q_INVOKABLE
void sendKeyEvent(
int qtKey,
bool pressed);
75 Q_REVISION(6, 7) Q_INVOKABLE
void sendUnicodeKeyPressEvent(uint unicode);
76 Q_REVISION(6, 7) Q_INVOKABLE
void sendUnicodeKeyReleaseEvent(uint unicode);
78 uint sendTouchPointEvent(QWaylandSurface *surface,
int id,
const QPointF &point, Qt::TouchPointState state);
79 Q_INVOKABLE uint sendTouchPointPressed(QWaylandSurface *surface,
int id,
const QPointF &position);
80 Q_INVOKABLE uint sendTouchPointReleased(QWaylandSurface *surface,
int id,
const QPointF &position);
81 Q_INVOKABLE uint sendTouchPointMoved(QWaylandSurface *surface,
int id,
const QPointF &position);
82 Q_INVOKABLE
void sendTouchFrameEvent(QWaylandClient *client);
83 Q_INVOKABLE
void sendTouchCancelEvent(QWaylandClient *client);
85 void sendFullTouchEvent(QWaylandSurface *surface, QTouchEvent *event);
87 QWaylandPointer *pointer()
const;
90 QWaylandView *mouseFocus()
const;
91 void setMouseFocus(QWaylandView *view);
93 QWaylandKeyboard *keyboard()
const;
94 QWaylandSurface *keyboardFocus()
const;
95 bool setKeyboardFocus(QWaylandSurface *surface);
96 QWaylandKeymap *keymap();
98 QWaylandTouch *touch()
const;
100 QWaylandCompositor *compositor()
const;
102#if QT_CONFIG(draganddrop)
103 QWaylandDrag *drag()
const;
106 QWaylandSeat::CapabilityFlags capabilities()
const;
108 virtual bool isOwner(QInputEvent *inputEvent)
const;
110 static QWaylandSeat *fromSeatResource(
struct ::wl_resource *resource);
113 void mouseFocusChanged(QWaylandView *newFocus, QWaylandView *oldFocus);
114 void keyboardFocusChanged(QWaylandSurface *newFocus, QWaylandSurface *oldFocus);
115#if QT_DEPRECATED_SINCE(6
, 1
)
116 void cursorSurfaceRequest(QWaylandSurface *surface,
int hotspotX,
int hotspotY);
118 void cursorSurfaceRequested(QWaylandSurface *surface,
int hotspotX,
int hotspotY, QWaylandClient *client);
121 void sendUnicodeKeyEvent(uint unicode, QEvent::Type type);
123 void handleMouseFocusDestroyed();