30class Q_WAYLANDCOMPOSITOR_EXPORT
QWaylandSeat :
public QWaylandObject
33 Q_DECLARE_PRIVATE(QWaylandSeat)
35#if QT_CONFIG(draganddrop)
36 Q_PROPERTY(QWaylandDrag *drag READ drag CONSTANT)
37 Q_MOC_INCLUDE(
"qwaylanddrag.h")
39 Q_PROPERTY(QWaylandKeymap *keymap READ keymap CONSTANT)
40 Q_MOC_INCLUDE(
"qwaylandkeymap.h")
41 Q_MOC_INCLUDE(
"qwaylandview.h")
43 QML_NAMED_ELEMENT(WaylandSeat)
44 QML_ADDED_IN_VERSION(1, 0)
53 DefaultCapabilities = Pointer | Keyboard | Touch
55 Q_DECLARE_FLAGS(CapabilityFlags, CapabilityFlag)
56 Q_ENUM(CapabilityFlags)
58 QWaylandSeat(QWaylandCompositor *compositor, CapabilityFlags capabilityFlags = DefaultCapabilities);
59 ~QWaylandSeat() override;
60 virtual void initialize();
61 bool isInitialized()
const;
63 void sendMousePressEvent(Qt::MouseButton button);
64 void sendMouseReleaseEvent(Qt::MouseButton button);
65 void sendMouseMoveEvent(QWaylandView *surface ,
const QPointF &localPos,
const QPointF &outputSpacePos = QPointF());
66 void sendMouseWheelEvent(Qt::Orientation orientation,
int delta);
68 void sendKeyPressEvent(uint code);
69 void sendKeyReleaseEvent(uint code);
71 void sendFullKeyEvent(QKeyEvent *event);
72 Q_INVOKABLE
void sendKeyEvent(
int qtKey,
bool pressed);
74 Q_REVISION(6, 7) Q_INVOKABLE
void sendUnicodeKeyPressEvent(uint unicode);
75 Q_REVISION(6, 7) Q_INVOKABLE
void sendUnicodeKeyReleaseEvent(uint unicode);
77 uint sendTouchPointEvent(QWaylandSurface *surface,
int id,
const QPointF &point, Qt::TouchPointState state);
78 Q_INVOKABLE uint sendTouchPointPressed(QWaylandSurface *surface,
int id,
const QPointF &position);
79 Q_INVOKABLE uint sendTouchPointReleased(QWaylandSurface *surface,
int id,
const QPointF &position);
80 Q_INVOKABLE uint sendTouchPointMoved(QWaylandSurface *surface,
int id,
const QPointF &position);
81 Q_INVOKABLE
void sendTouchFrameEvent(QWaylandClient *client);
82 Q_INVOKABLE
void sendTouchCancelEvent(QWaylandClient *client);
84 void sendFullTouchEvent(QWaylandSurface *surface, QTouchEvent *event);
86 QWaylandPointer *pointer()
const;
89 QWaylandView *mouseFocus()
const;
90 void setMouseFocus(QWaylandView *view);
92 QWaylandKeyboard *keyboard()
const;
93 QWaylandSurface *keyboardFocus()
const;
94 bool setKeyboardFocus(QWaylandSurface *surface);
95 QWaylandKeymap *keymap();
97 QWaylandTouch *touch()
const;
99 QWaylandCompositor *compositor()
const;
101#if QT_CONFIG(draganddrop)
102 QWaylandDrag *drag()
const;
105 QWaylandSeat::CapabilityFlags capabilities()
const;
107 virtual bool isOwner(QInputEvent *inputEvent)
const;
109 static QWaylandSeat *fromSeatResource(
struct ::wl_resource *resource);
112 void mouseFocusChanged(QWaylandView *newFocus, QWaylandView *oldFocus);
113 void keyboardFocusChanged(QWaylandSurface *newFocus, QWaylandSurface *oldFocus);
114#if QT_DEPRECATED_SINCE(6
, 1
)
115 void cursorSurfaceRequest(QWaylandSurface *surface,
int hotspotX,
int hotspotY);
117 void cursorSurfaceRequested(QWaylandSurface *surface,
int hotspotX,
int hotspotY, QWaylandClient *client);
120 void sendUnicodeKeyEvent(uint unicode, QEvent::Type type);
122 void handleMouseFocusDestroyed();