Changeset View
Changeset View
Standalone View
Standalone View
src/server/seat_interface.h
Show All 38 Lines | |||||
39 | { | 39 | { | ||
40 | 40 | | |||
41 | class DataDeviceInterface; | 41 | class DataDeviceInterface; | ||
42 | class Display; | 42 | class Display; | ||
43 | class SurfaceInterface; | 43 | class SurfaceInterface; | ||
44 | class TextInputInterface; | 44 | class TextInputInterface; | ||
45 | 45 | | |||
46 | /** | 46 | /** | ||
47 | * Describes the source types for axis events. This indicates to the | ||||
48 | * client how an axis event was physically generated; a client may | ||||
49 | * adjust the user interface accordingly. For example, scroll events | ||||
50 | * from a "finger" source may be in a smooth coordinate space with | ||||
51 | * kinetic scrolling whereas a "wheel" source may be in discrete steps | ||||
52 | * of a number of lines. | ||||
53 | * | ||||
54 | * The "continuous" axis source is a device generating events in a | ||||
55 | * continuous coordinate space, but using something other than a | ||||
56 | * finger. One example for this source is button-based scrolling where | ||||
57 | * the vertical motion of a device is converted to scroll events while | ||||
58 | * a button is held down. | ||||
59 | * | ||||
60 | * The "wheel tilt" axis source indicates that the actual device is a | ||||
61 | * wheel but the scroll event is not caused by a rotation but a | ||||
62 | * (usually sideways) tilt of the wheel. | ||||
63 | * | ||||
64 | * @since 5.XX | ||||
65 | **/ | ||||
66 | enum class PointerAxisSource { | ||||
67 | Wheel, | ||||
68 | Finger, | ||||
69 | Continuous, | ||||
70 | WheelTilt | ||||
71 | }; | ||||
72 | | ||||
73 | /** | ||||
47 | * @brief Represents a Seat on the Wayland Display. | 74 | * @brief Represents a Seat on the Wayland Display. | ||
48 | * | 75 | * | ||
49 | * A Seat is a set of input devices (e.g. Keyboard, Pointer and Touch) the client can connect | 76 | * A Seat is a set of input devices (e.g. Keyboard, Pointer and Touch) the client can connect | ||
50 | * to. The server needs to announce which input devices are supported and passes dedicated input | 77 | * to. The server needs to announce which input devices are supported and passes dedicated input | ||
51 | * focus to a SurfaceInterface. Only the focused surface receives input events. | 78 | * focus to a SurfaceInterface. Only the focused surface receives input events. | ||
52 | * | 79 | * | ||
53 | * The SeatInterface internally handles enter and release events when setting a focused surface. | 80 | * The SeatInterface internally handles enter and release events when setting a focused surface. | ||
54 | * Also it handles input translation from global to the local coordination, removing the need from | 81 | * Also it handles input translation from global to the local coordination, removing the need from | ||
▲ Show 20 Lines • Show All 301 Lines • ▼ Show 20 Line(s) | 149 | public: | |||
356 | /** | 383 | /** | ||
357 | * @returns the last serial for @p button. | 384 | * @returns the last serial for @p button. | ||
358 | **/ | 385 | **/ | ||
359 | quint32 pointerButtonSerial(quint32 button) const; | 386 | quint32 pointerButtonSerial(quint32 button) const; | ||
360 | /** | 387 | /** | ||
361 | * @returns the last serial for @p button. | 388 | * @returns the last serial for @p button. | ||
362 | **/ | 389 | **/ | ||
363 | quint32 pointerButtonSerial(Qt::MouseButton button) const; | 390 | quint32 pointerButtonSerial(Qt::MouseButton button) const; | ||
391 | /** | ||||
392 | * Sends axis events to the currently focused pointer surface. | ||||
393 | * | ||||
394 | * @param orientation The scroll axis. | ||||
395 | * @param delta The length of a vector along the specified axis @p orientation. | ||||
396 | * @param deltaDiscrete The number of discrete steps, e.g. mouse wheel clicks. | ||||
397 | * @param source Describes how the axis event was physically generated. | ||||
398 | * @since 5.XX | ||||
399 | * @todo Drop V5 suffix with KF6. | ||||
400 | **/ | ||||
401 | void pointerAxisV5(Qt::Orientation orientation, qreal delta, qint32 deltaDiscrete, PointerAxisSource source); | ||||
402 | /** | ||||
403 | * @see pointerAxisV5 | ||||
404 | **/ | ||||
364 | void pointerAxis(Qt::Orientation orientation, quint32 delta); | 405 | void pointerAxis(Qt::Orientation orientation, quint32 delta); | ||
365 | /** | 406 | /** | ||
366 | * @returns true if there is a pressed button with the given @p serial | 407 | * @returns true if there is a pressed button with the given @p serial | ||
367 | * @since 5.6 | 408 | * @since 5.6 | ||
368 | **/ | 409 | **/ | ||
369 | bool hasImplicitPointerGrab(quint32 serial) const; | 410 | bool hasImplicitPointerGrab(quint32 serial) const; | ||
370 | 411 | | |||
371 | /** | 412 | /** | ||
▲ Show 20 Lines • Show All 365 Lines • Show Last 20 Lines |