KWaylandServer

seat_interface.h
1 /*
2  SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
3  SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 #pragma once
8 
9 #include <KWaylandServer/kwaylandserver_export.h>
10 
11 #include <QMatrix4x4>
12 #include <QObject>
13 #include <QPoint>
14 
15 struct wl_client;
16 struct wl_resource;
17 
18 namespace KWaylandServer
19 {
20 class AbstractDataSource;
21 class AbstractDropHandler;
22 class DragAndDropIcon;
23 class DataDeviceInterface;
24 class Display;
25 class KeyboardInterface;
26 class PointerInterface;
27 class SeatInterfacePrivate;
28 class SurfaceInterface;
29 class TextInputV2Interface;
30 class TextInputV3Interface;
31 class TouchInterface;
32 
33 /**
34  * Describes the source types for axis events. This indicates to the
35  * client how an axis event was physically generated; a client may
36  * adjust the user interface accordingly. For example, scroll events
37  * from a "finger" source may be in a smooth coordinate space with
38  * kinetic scrolling whereas a "wheel" source may be in discrete steps
39  * of a number of lines.
40  *
41  * The "continuous" axis source is a device generating events in a
42  * continuous coordinate space, but using something other than a
43  * finger. One example for this source is button-based scrolling where
44  * the vertical motion of a device is converted to scroll events while
45  * a button is held down.
46  *
47  * The "wheel tilt" axis source indicates that the actual device is a
48  * wheel but the scroll event is not caused by a rotation but a
49  * (usually sideways) tilt of the wheel.
50  */
51 enum class PointerAxisSource {
52  Unknown,
53  Wheel,
54  Finger,
55  Continuous,
56  WheelTilt,
57 };
58 
59 /**
60  * This enum type is used to describe the state of a pointer button. It
61  * is equivalent to the @c wl_pointer.button_state enum.
62  */
63 enum class PointerButtonState : quint32 {
64  Released = 0,
65  Pressed = 1,
66 };
67 
68 /**
69  * This enum type is used to describe the state of a keyboard key. It is
70  * equivalent to the @c wl_keyboard.key_state enum.
71  */
72 enum class KeyboardKeyState : quint32 {
73  Released = 0,
74  Pressed = 1,
75 };
76 
77 /**
78  * @brief Represents a Seat on the Wayland Display.
79  *
80  * A Seat is a set of input devices (e.g. Keyboard, Pointer and Touch) the client can connect
81  * to. The server needs to announce which input devices are supported and passes dedicated input
82  * focus to a SurfaceInterface. Only the focused surface receives input events.
83  *
84  * The SeatInterface internally handles enter and release events when setting a focused surface.
85  * Also it handles input translation from global to the local coordination, removing the need from
86  * the user of the API to track the focused surfaces and can just interact with this class.
87  *
88  * To create a SeatInterface use @link Display::createSeat @endlink. Then one can set up what is
89  * supported. Last but not least create needs to be called.
90  *
91  * @code
92  * SeatInterface *seat = display->createSeat();
93  * // set up
94  * seat->setName(QStringLiteral("seat0"));
95  * seat->setHasPointer(true);
96  * seat->setHasKeyboard(true);
97  * seat->setHasTouch(false);
98  * // now fully create
99  * seat->create();
100  * @endcode
101  *
102  * To forward input events one needs to set the focused surface, update time stamp and then
103  * forward the actual events:
104  *
105  * @code
106  * // example for pointer
107  * seat->setFocusedPointerSurface(surface, QPointF(100, 200)); // surface at it's global position
108  * seat->setTimestamp(100);
109  * seat->notifyPointerMotion(QPointF(350, 210)); // global pos, local pos in surface: 250,10
110  * seat->notifyPointerFrame();
111  * seat->setTimestamp(110);
112  * seat->notifyPointerButton(Qt::LeftButton, PointerButtonState::Pressed);
113  * seat->notifyPointerFrame();
114  * seat->setTimestamp(120);
115  * seat->notifyPointerButton(Qt::LeftButton, PointerButtonState::Released);
116  * seat->notifyPointerFrame();
117  * @endcode
118  *
119  * @see KeyboardInterface
120  * @see PointerInterface
121  * @see TouchInterface
122  * @see SurfaceInterface
123  */
124 class KWAYLANDSERVER_EXPORT SeatInterface : public QObject
125 {
126  Q_OBJECT
127  /**
128  * The name of the Seat
129  */
130  Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
131  /**
132  * Whether the SeatInterface supports a pointer device.
133  */
134  Q_PROPERTY(bool pointer READ hasPointer WRITE setHasPointer NOTIFY hasPointerChanged)
135  /**
136  * Whether the SeatInterface supports a keyboard device.
137  */
138  Q_PROPERTY(bool keyboard READ hasKeyboard WRITE setHasKeyboard NOTIFY hasKeyboardChanged)
139  /**
140  * Whether the SeatInterface supports a touch device.
141  * @deprecated Since 5.5, use touch
142  */
143  Q_PROPERTY(bool tourch READ hasTouch WRITE setHasTouch NOTIFY hasTouchChanged)
144  /**
145  * Whether the SeatInterface supports a touch device.
146  */
147  Q_PROPERTY(bool touch READ hasTouch WRITE setHasTouch NOTIFY hasTouchChanged)
148  /**
149  * The global pointer position.
150  */
151  Q_PROPERTY(QPointF pointerPos READ pointerPos WRITE notifyPointerMotion NOTIFY pointerPosChanged)
152  /**
153  * The current timestamp passed to the input events.
154  */
155  Q_PROPERTY(quint32 timestamp READ timestamp WRITE setTimestamp NOTIFY timestampChanged)
156 public:
157  explicit SeatInterface(Display *display, QObject *parent = nullptr);
158  virtual ~SeatInterface();
159 
160  Display *display() const;
161  QString name() const;
162  bool hasPointer() const;
163  bool hasKeyboard() const;
164  bool hasTouch() const;
165 
166  void setName(const QString &name);
167  void setHasPointer(bool has);
168  void setHasKeyboard(bool has);
169  void setHasTouch(bool has);
170 
171  void setTimestamp(quint32 time);
172  quint32 timestamp() const;
173 
174  /**
175  * @name Drag'n'Drop related methods
176  */
177  ///@{
178  /**
179  * @returns whether there is currently a drag'n'drop going on.
180  * @see isDragPointer
181  * @see isDragTouch
182  * @see dragStarted
183  * @see dragEnded
184  */
185  bool isDrag() const;
186  /**
187  * @returns whether the drag'n'drop is operated through the pointer device
188  * @see isDrag
189  * @see isDragTouch
190  */
191  bool isDragPointer() const;
192  /**
193  * @returns whether the drag'n'drop is operated through the touch device
194  * @see isDrag
195  * @see isDragPointer
196  */
197  bool isDragTouch() const;
198  /**
199  * @returns The transformation applied to go from global to local coordinates for drag motion events.
200  * @see dragSurfaceTransformation
201  */
202  QMatrix4x4 dragSurfaceTransformation() const;
203  /**
204  * @returns The currently focused Surface for drag motion events.
205  * @see dragSurfaceTransformation
206  * @see dragSurfaceChanged
207  */
208  SurfaceInterface *dragSurface() const;
209  /**
210  * @returns The DataDeviceInterface which started the drag and drop operation.
211  * @see isDrag
212  */
213  KWaylandServer::AbstractDataSource *dragSource() const;
214  /**
215  * Sets the current drag target to @p surface.
216  *
217  * Sends a drag leave event to the current target and an enter event to @p surface.
218  * The enter position is derived from @p globalPosition and transformed by @p inputTransformation.
219  */
220  void setDragTarget(AbstractDropHandler *dropTarget, SurfaceInterface *surface, const QPointF &globalPosition, const QMatrix4x4 &inputTransformation);
221  /**
222  * Sets the current drag target to @p surface.
223  *
224  * Sends a drag leave event to the current target and an enter event to @p surface.
225  * The enter position is derived from current global position and transformed by @p inputTransformation.
226  */
227  void setDragTarget(AbstractDropHandler *dropTarget, SurfaceInterface *surface, const QMatrix4x4 &inputTransformation = QMatrix4x4());
228  ///@}
229 
230  AbstractDropHandler *dropHandlerForSurface(SurfaceInterface *surface) const;
231 
232  /**
233  * @name Pointer related methods
234  */
235  ///@{
236  /**
237  * Updates the global pointer @p pos.
238  *
239  * Sends a pointer motion event to the focused pointer surface.
240  */
241  void notifyPointerMotion(const QPointF &pos);
242  /**
243  * @returns the global pointer position
244  */
245  QPointF pointerPos() const;
246  /**
247  * Sets the focused pointer @p surface.
248  * All pointer events will be sent to the @p surface till a new focused pointer surface gets
249  * installed. When the focus pointer surface changes a leave event is sent to the previous
250  * focused surface.
251  *
252  * To unset the focused pointer surface pass @c nullptr as @p surface.
253  *
254  * Pointer motion events are adjusted to the local position based on the @p surfacePosition.
255  * If the surface changes it's position in the global coordinate system
256  * use setFocusedPointerSurfacePosition to update.
257  * The surface position is used to create the base transformation matrix to go from global
258  * to surface local coordinates. The default generated matrix is a translation with
259  * negative @p surfacePosition.
260  *
261  * @param surface The surface which should become the new focused pointer surface.
262  * @param surfacePosition The position of the surface in the global coordinate system
263  *
264  * @see setPointerPos
265  * @see focucedPointerSurface
266  * @see focusedPointer
267  * @see setFocusedPointerSurfacePosition
268  * @see focusedPointerSurfacePosition
269  * @see setFocusedPointerSurfaceTransformation
270  * @see focusedPointerSurfaceTransformation
271  */
272  void setFocusedPointerSurface(SurfaceInterface *surface, const QPointF &surfacePosition = QPoint());
273  /**
274  * Sets the focused pointer @p surface.
275  * All pointer events will be sent to the @p surface till a new focused pointer surface gets
276  * installed. When the focus pointer surface changes a leave event is sent to the previous
277  * focused surface.
278  *
279  * To unset the focused pointer surface pass @c nullptr as @p surface.
280  *
281  * Pointer motion events are adjusted to the local position based on the @p transformation.
282  * If the surface changes it's position in the global coordinate system
283  * use setFocusedPointerSurfaceTransformation to update.
284  *
285  * @param surface The surface which should become the new focused pointer surface.
286  * @param transformation The transformation to transform global into local coordinates
287  *
288  * @see setPointerPos
289  * @see focucedPointerSurface
290  * @see focusedPointer
291  * @see setFocusedPointerSurfacePosition
292  * @see focusedPointerSurfacePosition
293  * @see setFocusedPointerSurfaceTransformation
294  * @see focusedPointerSurfaceTransformation
295  */
296  void setFocusedPointerSurface(SurfaceInterface *surface, const QMatrix4x4 &transformation);
297  /**
298  * @returns The currently focused pointer surface, that is the surface receiving pointer events.
299  * @see setFocusedPointerSurface
300  */
301  SurfaceInterface *focusedPointerSurface() const;
302  PointerInterface *pointer() const;
303  /**
304  * Updates the global position of the currently focused pointer surface.
305  *
306  * Updating the focused surface position also generates a new transformation matrix.
307  * The default generated matrix is a translation with negative @p surfacePosition.
308  * If a different transformation is required a dedicated call to
309  * @link setFocusedPointerSurfaceTransformation is required.
310  *
311  * @param surfacePosition The new global position of the focused pointer surface
312  * @see focusedPointerSurface
313  * @see setFocusedPointerSurface
314  * @see focusedPointerSurfaceTransformation
315  * @see setFocusedPointerSurfaceTransformation
316  */
317  void setFocusedPointerSurfacePosition(const QPointF &surfacePosition);
318  /**
319  * @returns The position of the focused pointer surface in global coordinates.
320  * @see setFocusedPointerSurfacePosition
321  * @see setFocusedPointerSurface
322  * @see focusedPointerSurfaceTransformation
323  */
324  QPointF focusedPointerSurfacePosition() const;
325  /**
326  * Sets the @p transformation for going from global to local coordinates.
327  *
328  * The default transformation gets generated from the surface position and reset whenever
329  * the surface position changes.
330  *
331  * @see focusedPointerSurfaceTransformation
332  * @see focusedPointerSurfacePosition
333  * @see setFocusedPointerSurfacePosition
334  */
335  void setFocusedPointerSurfaceTransformation(const QMatrix4x4 &transformation);
336  /**
337  * @returns The transformation applied to pointer position to go from global to local coordinates.
338  * @see setFocusedPointerSurfaceTransformation
339  */
340  QMatrix4x4 focusedPointerSurfaceTransformation() const;
341  /**
342  * Marks the specified @a button as pressed or released based on @a state.
343  */
344  void notifyPointerButton(quint32 button, PointerButtonState state);
345  /**
346  * @overload
347  */
348  void notifyPointerButton(Qt::MouseButton button, PointerButtonState state);
349  void notifyPointerFrame();
350  /**
351  * @returns whether the @p button is pressed
352  */
353  bool isPointerButtonPressed(quint32 button) const;
354  /**
355  * @returns whether the @p button is pressed
356  */
357  bool isPointerButtonPressed(Qt::MouseButton button) const;
358  /**
359  * @returns the last serial for @p button.
360  */
361  quint32 pointerButtonSerial(quint32 button) const;
362  /**
363  * @returns the last serial for @p button.
364  */
365  quint32 pointerButtonSerial(Qt::MouseButton button) const;
366  /**
367  * Sends axis events to the currently focused pointer surface.
368  *
369  * @param orientation The scroll axis.
370  * @param delta The length of a vector along the specified axis @p orientation.
371  * @param discreteDelta The number of discrete steps, e.g. mouse wheel clicks.
372  * @param source Describes how the axis event was physically generated.
373  */
374  void notifyPointerAxis(Qt::Orientation orientation, qreal delta, qint32 discreteDelta, PointerAxisSource source);
375  /**
376  * @returns true if there is a pressed button with the given @p serial
377  */
378  bool hasImplicitPointerGrab(quint32 serial) const;
379 
380  /**
381  * A relative motion is in the same dimension as regular motion events,
382  * except they do not represent an absolute position. For example,
383  * moving a pointer from (x, y) to (x', y') would have the equivalent
384  * relative motion (x' - x, y' - y). If a pointer motion caused the
385  * absolute pointer position to be clipped by for example the edge of the
386  * monitor, the relative motion is unaffected by the clipping and will
387  * represent the unclipped motion.
388  *
389  * This method also contains non-accelerated motion deltas (@p deltaNonAccelerated).
390  * The non-accelerated delta is, when applicable, the regular pointer motion
391  * delta as it was before having applied motion acceleration and other
392  * transformations such as normalization.
393  *
394  * Note that the non-accelerated delta does not represent 'raw' events as
395  * they were read from some device. Pointer motion acceleration is device-
396  * and configuration-specific and non-accelerated deltas and accelerated
397  * deltas may have the same value on some devices.
398  *
399  * Relative motions are not coupled to wl_pointer.motion events (see {@link setPointerPos},
400  * and can be sent in combination with such events, but also independently. There may
401  * also be scenarios where wl_pointer.motion is sent, but there is no
402  * relative motion. The order of an absolute and relative motion event
403  * originating from the same physical motion is not guaranteed.
404  *
405  * Sending relative pointer events only makes sense if the RelativePointerManagerInterface
406  * is created on the Display.
407  *
408  * @param delta Motion vector
409  * @param deltaNonAccelerated non-accelerated motion vector
410  * @param microseconds timestamp with microseconds granularity
411  * @see setPointerPos
412  */
413  void relativePointerMotion(const QSizeF &delta, const QSizeF &deltaNonAccelerated, quint64 microseconds);
414 
415  /**
416  * Starts a multi-finger swipe gesture for the currently focused pointer surface.
417  *
418  * Such gestures are normally reported through dedicated input devices such as touchpads.
419  *
420  * The gesture is usually initiated by multiple fingers moving in the
421  * same direction but once initiated the direction may change.
422  * The precise conditions of when such a gesture is detected are
423  * implementation-dependent.
424  *
425  * Only one gesture (either swipe or pinch) can be active at a given time.
426  *
427  * @param fingerCount The number of fingers involved in this multi-finger touchpad gesture
428  *
429  * @see PointerGesturesInterface
430  * @see focusedPointerSurface
431  * @see updatePointerSwipeGesture
432  * @see endPointerSwipeGesture
433  * @see cancelPointerSwipeGesture
434  * @see startPointerPinchGesture
435  */
436  void startPointerSwipeGesture(quint32 fingerCount);
437 
438  /**
439  * The position of the logical center of the currently active multi-finger swipe gesture changes.
440  *
441  * @param delta coordinates are relative coordinates of the logical center of the gesture compared to the previous event.
442  * @see startPointerSwipeGesture
443  * @see endPointerSwipeGesture
444  * @see cancelPointerSwipeGesture
445  */
446  void updatePointerSwipeGesture(const QSizeF &delta);
447 
448  /**
449  * The multi-finger swipe gesture ended. This may happen when one or more fingers are lifted.
450  * @see startPointerSwipeGesture
451  * @see updatePointerSwipeGesture
452  * @see cancelPointerSwipeGesture
453  * @see 5.29
454  */
455  void endPointerSwipeGesture();
456 
457  /**
458  * The multi-finger swipe gestures ended and got cancelled by the Wayland compositor.
459  * @see startPointerSwipeGesture
460  * @see updatePointerSwipeGesture
461  * @see endPointerSwipeGesture
462  */
463  void cancelPointerSwipeGesture();
464 
465  /**
466  * Starts a multi-finch pinch gesture for the currently focused pointer surface.
467  *
468  * Such gestures are normally reported through dedicated input devices such as touchpads.
469  *
470  * The gesture is usually initiated by multiple fingers moving towards
471  * each other or away from each other, or by two or more fingers rotating
472  * around a logical center of gravity. The precise conditions of when
473  * such a gesture is detected are implementation-dependent.
474  *
475  * Only one gesture (either swipe or pinch) can be active at a given time.
476  *
477  * @param fingerCount The number of fingers involved in this multi-touch touchpad gesture
478  *
479  * @see PointerGesturesInterface
480  * @see focusedPointerSurface
481  * @see updatePointerPinchGesture
482  * @see endPointerPinchGesture
483  * @see cancelPointerPinchGesture
484  * @see startPointerSwipeGesture
485  */
486  void startPointerPinchGesture(quint32 fingerCount);
487 
488  /**
489  * The position of the logical center, the rotation or the relative scale of this
490  * multi-finger pinch gesture changes.
491  *
492  * @param delta coordinates are relative coordinates of the logical center of the gesture compared to the previous event.
493  * @param scale an absolute scale compared to the gesture start
494  * @param rotation relative angle in degrees clockwise compared to the previous start of update
495  * @see startPointerPinchGesture
496  * @see endPointerPinchGesture
497  * @see cancelPointerPinchGesture
498  */
499  void updatePointerPinchGesture(const QSizeF &delta, qreal scale, qreal rotation);
500 
501  /**
502  *
503  * @see startPointerPinchGesture
504  * @see updatePointerPinchGesture
505  * @see cancelPointerPinchGesture
506  */
507  void endPointerPinchGesture();
508 
509  /**
510  *
511  * @see startPointerPinchGesture
512  * @see updatePointerPinchGesture
513  * @see endPointerPinchGesture
514  */
515  void cancelPointerPinchGesture();
516  ///@}
517 
518  /**
519  * Passes keyboard focus to @p surface.
520  *
521  * If the SeatInterface has the keyboard capability, also the focused
522  * text input surface will be set to @p surface.
523  *
524  * @see focusedKeyboardSurface
525  * @see hasKeyboard
526  * @see setFocusedTextInputSurface
527  */
528  void setFocusedKeyboardSurface(SurfaceInterface *surface);
529  SurfaceInterface *focusedKeyboardSurface() const;
530  KeyboardInterface *keyboard() const;
531  void notifyKeyboardKey(quint32 keyCode, KeyboardKeyState state);
532  void notifyKeyboardModifiers(quint32 depressed, quint32 latched, quint32 locked, quint32 group);
533  ///@}
534 
535  /**
536  * @name touch related methods
537  */
538  ///@{
539  void setFocusedTouchSurface(SurfaceInterface *surface, const QPointF &surfacePosition = QPointF());
540  SurfaceInterface *focusedTouchSurface() const;
541  TouchInterface *touch() const;
542  void setFocusedTouchSurfacePosition(const QPointF &surfacePosition);
543  QPointF focusedTouchSurfacePosition() const;
544  void notifyTouchDown(qint32 id, const QPointF &globalPosition);
545  void notifyTouchUp(qint32 id);
546  void notifyTouchMotion(qint32 id, const QPointF &globalPosition);
547  void notifyTouchFrame();
548  void notifyTouchCancel();
549  bool isTouchSequence() const;
550  /**
551  * @returns true if there is a touch sequence going on associated with a touch
552  * down of the given @p serial.
553  */
554  bool hasImplicitTouchGrab(quint32 serial) const;
555  ///@}
556 
557  /**
558  * @name Text input related methods.
559  */
560  ///@{
561  /**
562  * Passes text input focus to @p surface.
563  *
564  * If the SeatInterface has the keyboard capability this method will
565  * be invoked automatically when setting the focused keyboard surface.
566  *
567  * In case there is a TextInputV2Interface for the @p surface, the enter
568  * event will be triggered on the TextInputV2Interface for @p surface.
569  * The focusedTextInput will be set to that TextInputV2Interface. If there
570  * is no TextInputV2Interface for that @p surface, it might get updated later on.
571  * In both cases the signal focusedTextInputChanged will be emitted.
572  *
573  * @see focusedTextInputSurface
574  * @see focusedTextInput
575  * @see focusedTextInputChanged
576  * @see setFocusedKeyboardSurface
577  */
578  void setFocusedTextInputSurface(SurfaceInterface *surface);
579  /**
580  * @returns The SurfaceInterface which is currently focused for text input.
581  * @see setFocusedTextInputSurface
582  */
583  SurfaceInterface *focusedTextInputSurface() const;
584  /**
585  * The currently focused text input, may be @c null even if there is a
586  * focused text input surface set.
587  *
588  * The focused text input might not be enabled for the {@link focusedTextInputSurface}.
589  * It is recommended to check the enabled state before interacting with the
590  * TextInputV2Interface.
591  *
592  * @see focusedTextInputChanged
593  * @see focusedTextInputSurface
594  */
595  TextInputV2Interface *textInputV2() const;
596 
597  TextInputV3Interface *textInputV3() const;
598  ///@}
599 
600  /**
601  * @returns The DataDeviceInterface holding the current clipboard selection.
602  * @see selectionChanged
603  * @see setSelection
604  * This may be null
605  */
606  KWaylandServer::AbstractDataSource *selection() const;
607 
608  /**
609  * This method allows to manually set the @p dataDevice for the current clipboard selection.
610  * The clipboard selection is handled automatically in SeatInterface.
611  * If a DataDeviceInterface belonging to the current focused KeyboardInterface
612  * sets a selection, the current clipboard selection will be updated automatically.
613  * With this method it's possible to override the automatic clipboard update for
614  * e.g. the case of a clipboard manager.
615  *
616  * @param dataDevice Sets the current clipboard selection.
617  * @see selection
618  * @see selectionChanged
619  */
620  void setSelection(AbstractDataSource *selection);
621 
622  KWaylandServer::AbstractDataSource *primarySelection() const;
623  void setPrimarySelection(AbstractDataSource *selection);
624 
625  void startDrag(AbstractDataSource *source, SurfaceInterface *sourceSurface, int dragSerial = -1, DragAndDropIcon *dragIcon = nullptr);
626 
627  /**
628  * Returns the additional icon attached to the cursor during a drag-and-drop operation.
629  * This function returns @c null if no drag-and-drop is active or no icon has been attached.
630  */
631  DragAndDropIcon *dragIcon() const;
632 
633  static SeatInterface *get(wl_resource *native);
634 
635 Q_SIGNALS:
636  void nameChanged(const QString &);
637  void hasPointerChanged(bool);
638  void hasKeyboardChanged(bool);
639  void hasTouchChanged(bool);
640  void pointerPosChanged(const QPointF &pos);
641  void touchMoved(qint32 id, quint32 serial, const QPointF &globalPosition);
642  void timestampChanged(quint32);
643 
644  /**
645  * Emitted whenever the selection changes
646  * @see selection
647  * @see setSelection
648  */
649  void selectionChanged(KWaylandServer::AbstractDataSource *);
650 
651  /**
652  * Emitted whenever the primary selection changes
653  * @see primarySelection
654  */
655  void primarySelectionChanged(KWaylandServer::AbstractDataSource *);
656 
657  /**
658  * Emitted when a drag'n'drop operation is started
659  * @see dragEnded
660  */
661  void dragStarted();
662  /**
663  * Emitted when a drag'n'drop operation ended, either by dropping or canceling.
664  * @see dragStarted
665  */
666  void dragEnded();
667  /**
668  * Emitted whenever the drag surface for motion events changed.
669  * @see dragSurface
670  */
671  void dragSurfaceChanged();
672 
673  /** Emitted when a drop ocurrs in a drag'n'drop operation. This is emitted
674  * before dragEnded
675  */
676  void dragDropped();
677  /**
678  * Emitted whenever the focused text input changed.
679  * @see focusedTextInput
680  */
681  void focusedTextInputSurfaceChanged();
682 
683 private:
684  QScopedPointer<SeatInterfacePrivate> d;
685  friend class SeatInterfacePrivate;
686 };
687 
688 }
689 
690 Q_DECLARE_METATYPE(KWaylandServer::SeatInterface *)
The AbstractDataSource class abstracts the data that can be transferred to another client...
Represents a Seat on the Wayland Display.
Class holding the Wayland server display loop.
Definition: display.h:47
The TouchInterface class repserents a touchscreen associated with a wl_seat.
The PointerInterface class represents one or more input devices such as mice, which control the point...
Resource for the wl_keyboard interface.
Resource representing a wl_surface.
The DragAndDropIcon class represents a drag-and-drop icon.
Represents a generic Resource for a text input object.
Represents a generic Resource for a text input object.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 23:10:15 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.