KWaylandServer::SeatInterface
#include <seat_interface.h>

Properties | |
bool | keyboard |
QString | name |
bool | pointer |
QPointF | pointerPos |
quint32 | timestamp |
bool | touch |
bool | tourch |
![]() | |
objectName | |
Signals | |
void | dragEnded () |
void | dragStarted () |
void | dragSurfaceChanged () |
void | focusedPointerChanged (KWaylandServer::PointerInterface *) |
void | focusedTextInputSurfaceChanged () |
void | hasKeyboardChanged (bool) |
void | hasPointerChanged (bool) |
void | hasTouchChanged (bool) |
void | keyboardCreated (KWaylandServer::KeyboardInterface *) |
void | nameChanged (const QString &) |
void | pointerCreated (KWaylandServer::PointerInterface *) |
void | pointerPosChanged (const QPointF &pos) |
void | primarySelectionChanged (KWaylandServer::AbstractDataSource *) |
void | selectionChanged (KWaylandServer::AbstractDataSource *) |
void | timestampChanged (quint32) |
void | touchCreated (KWaylandServer::TouchInterface *) |
void | touchMoved (qint32 id, quint32 serial, const QPointF &globalPosition) |
![]() | |
void | aboutToDestroyGlobal () |
Public Member Functions | |
SeatInterface (Display *display, QObject *parent=nullptr) | |
SurfaceInterface * | focusedKeyboardSurface () const |
bool | hasKeyboard () const |
bool | hasPointer () const |
bool | hasTouch () const |
KeyboardInterface * | keyboard () const |
QString | name () const |
KWaylandServer::AbstractDataSource * | selection () const |
void | setFocusedKeyboardSurface (SurfaceInterface *surface) |
void | setHasKeyboard (bool has) |
void | setHasPointer (bool has) |
void | setHasTouch (bool has) |
void | setName (const QString &name) |
void | setPrimarySelection (AbstractDataSource *selection) |
void | setSelection (AbstractDataSource *selection) |
void | setTimestamp (quint32 time) |
quint32 | timestamp () const |
Drag'n'Drop related methods | |
bool | isDrag () const |
bool | isDragPointer () const |
bool | isDragTouch () const |
QMatrix4x4 | dragSurfaceTransformation () const |
SurfaceInterface * | dragSurface () const |
PointerInterface * | dragPointer () const |
DataDeviceInterface * | dragSource () const |
void | setDragTarget (SurfaceInterface *surface, const QPointF &globalPosition, const QMatrix4x4 &inputTransformation) |
void | setDragTarget (SurfaceInterface *surface, const QMatrix4x4 &inputTransformation=QMatrix4x4()) |
Pointer related methods | |
void | setPointerPos (const QPointF &pos) |
QPointF | pointerPos () const |
void | setFocusedPointerSurface (SurfaceInterface *surface, const QPointF &surfacePosition=QPoint()) |
void | setFocusedPointerSurface (SurfaceInterface *surface, const QMatrix4x4 &transformation) |
SurfaceInterface * | focusedPointerSurface () const |
PointerInterface * | focusedPointer () const |
void | setFocusedPointerSurfacePosition (const QPointF &surfacePosition) |
QPointF | focusedPointerSurfacePosition () const |
void | setFocusedPointerSurfaceTransformation (const QMatrix4x4 &transformation) |
QMatrix4x4 | focusedPointerSurfaceTransformation () const |
void | pointerButtonPressed (quint32 button) |
void | pointerButtonPressed (Qt::MouseButton button) |
void | pointerButtonReleased (quint32 button) |
void | pointerButtonReleased (Qt::MouseButton button) |
bool | isPointerButtonPressed (quint32 button) const |
bool | isPointerButtonPressed (Qt::MouseButton button) const |
quint32 | pointerButtonSerial (quint32 button) const |
quint32 | pointerButtonSerial (Qt::MouseButton button) const |
void | pointerAxisV5 (Qt::Orientation orientation, qreal delta, qint32 discreteDelta, PointerAxisSource source) |
void | pointerAxis (Qt::Orientation orientation, quint32 delta) |
bool | hasImplicitPointerGrab (quint32 serial) const |
void | relativePointerMotion (const QSizeF &delta, const QSizeF &deltaNonAccelerated, quint64 microseconds) |
void | startPointerSwipeGesture (quint32 fingerCount) |
void | updatePointerSwipeGesture (const QSizeF &delta) |
void | endPointerSwipeGesture () |
void | cancelPointerSwipeGesture () |
void | startPointerPinchGesture (quint32 fingerCount) |
void | updatePointerPinchGesture (const QSizeF &delta, qreal scale, qreal rotation) |
void | endPointerPinchGesture () |
void | cancelPointerPinchGesture () |
touch related methods | |
void | setFocusedTouchSurface (SurfaceInterface *surface, const QPointF &surfacePosition=QPointF()) |
SurfaceInterface * | focusedTouchSurface () const |
TouchInterface * | focusedTouch () const |
void | setFocusedTouchSurfacePosition (const QPointF &surfacePosition) |
QPointF | focusedTouchSurfacePosition () const |
qint32 | touchDown (const QPointF &globalPosition) |
void | touchUp (qint32 id) |
void | touchMove (qint32 id, const QPointF &globalPosition) |
void | touchFrame () |
void | cancelTouchSequence () |
bool | isTouchSequence () const |
bool | hasImplicitTouchGrab (quint32 serial) const |
Text input related methods. | |
void | setFocusedTextInputSurface (SurfaceInterface *surface) |
SurfaceInterface * | focusedTextInputSurface () const |
TextInputV2Interface * | textInputV2 () const |
TextInputV3Interface * | textInputV3 () const |
![]() | |
void | create () |
void | destroy () |
Display * | display () |
bool | isValid () const |
operator wl_global * () | |
operator wl_global * () const | |
![]() | |
QObject (QObject *parent) | |
bool | blockSignals (bool block) |
const QObjectList & | children () const const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectInfo () |
void | dumpObjectInfo () const const |
void | dumpObjectTree () |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_DISABLE_COPY (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_OBJECT Q_OBJECT | |
Q_PROPERTY (...) | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
Q_SIGNAL Q_SIGNAL | |
Q_SIGNALS Q_SIGNALS | |
Q_SLOT Q_SLOT | |
Q_SLOTS Q_SLOTS | |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
T | qobject_cast (QObject *object) |
T | qobject_cast (const QObject *object) |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
QThread * | thread () const const |
Static Public Member Functions | |
static SeatInterface * | get (wl_resource *native) |
![]() | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Additional Inherited Members | |
![]() | |
typedef | QObjectList |
![]() | |
Global (Private *d, QObject *parent=nullptr) | |
![]() | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
QScopedPointer< Private > | d |
Detailed Description
Represents a Seat on the Wayland Display.
A Seat is a set of input devices (e.g. Keyboard, Pointer and Touch) the client can connect to. The server needs to announce which input devices are supported and passes dedicated input focus to a SurfaceInterface. Only the focused surface receives input events.
The SeatInterface internally handles enter and release events when setting a focused surface. Also it handles input translation from global to the local coordination, removing the need from the user of the API to track the focused surfaces and can just interact with this class.
To create a SeatInterface use Display::createSeat. Then one can set up what is supported. Last but not least create needs to be called.
To forward input events one needs to set the focused surface, update time stamp and then forward the actual events:
Definition at line 104 of file seat_interface.h.
Property Documentation
|
readwrite |
Whether the SeatInterface supports a keyboard device.
Definition at line 118 of file seat_interface.h.
|
readwrite |
The name of the Seat.
Definition at line 110 of file seat_interface.h.
|
readwrite |
Whether the SeatInterface supports a pointer device.
Definition at line 114 of file seat_interface.h.
|
readwrite |
The global pointer position.
Definition at line 131 of file seat_interface.h.
|
readwrite |
The current timestamp passed to the input events.
Definition at line 135 of file seat_interface.h.
|
readwrite |
Whether the SeatInterface supports a touch device.
Definition at line 127 of file seat_interface.h.
|
readwrite |
Whether the SeatInterface supports a touch device.
- Deprecated:
- Since 5.5, use touch
Definition at line 123 of file seat_interface.h.
Member Function Documentation
void KWaylandServer::SeatInterface::cancelPointerPinchGesture | ( | ) |
- Since
- 5.29
Definition at line 1090 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::cancelPointerSwipeGesture | ( | ) |
The multi-finger swipe gestures ended and got cancelled by the Wayland compositor.
- Since
- 5.29
Definition at line 1029 of file seat_interface.cpp.
|
signal |
Emitted when a drag'n'drop operation ended, either by dropping or canceling.
- Since
- 5.6
- See also
- dragStarted
PointerInterface * KWaylandServer::SeatInterface::dragPointer | ( | ) | const |
- Returns
- The PointerInterface which triggered the drag operation
- Since
- 5.6
- See also
- isDragPointer
Definition at line 1406 of file seat_interface.cpp.
DataDeviceInterface * KWaylandServer::SeatInterface::dragSource | ( | ) | const |
- Returns
- The DataDeviceInterface which started the drag and drop operation.
- See also
- isDrag
- Since
- 5.6
Definition at line 1416 of file seat_interface.cpp.
|
signal |
SurfaceInterface * KWaylandServer::SeatInterface::dragSurface | ( | ) | const |
- Returns
- The currently focused Surface for drag motion events.
- Since
- 5.6
Definition at line 1400 of file seat_interface.cpp.
|
signal |
QMatrix4x4 KWaylandServer::SeatInterface::dragSurfaceTransformation | ( | ) | const |
- Returns
- The transformation applied to go from global to local coordinates for drag motion events.
- See also
- dragSurfaceTransformation
- Since
- 5.6
Definition at line 1394 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::endPointerPinchGesture | ( | ) |
- Since
- 5.29
Definition at line 1075 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::endPointerSwipeGesture | ( | ) |
The multi-finger swipe gesture ended.
This may happen when one or more fingers are lifted.
Definition at line 1014 of file seat_interface.cpp.
PointerInterface * KWaylandServer::SeatInterface::focusedPointer | ( | ) | const |
- Returns
- The PointerInterface belonging to the focused pointer surface, if any.
- See also
- setFocusedPointerSurface
Definition at line 782 of file seat_interface.cpp.
|
signal |
Emitted whenever the focused pointer changes.
- Since
- 5.6
SurfaceInterface * KWaylandServer::SeatInterface::focusedPointerSurface | ( | ) | const |
- Returns
- The currently focused pointer surface, that is the surface receiving pointer events.
- See also
- setFocusedPointerSurface
Definition at line 713 of file seat_interface.cpp.
QPointF KWaylandServer::SeatInterface::focusedPointerSurfacePosition | ( | ) | const |
- Returns
- The position of the focused pointer surface in global coordinates.
- See also
- setFocusedPointerSurfacePosition
- setFocusedPointerSurface
- focusedPointerSurfaceTransformation
Definition at line 801 of file seat_interface.cpp.
QMatrix4x4 KWaylandServer::SeatInterface::focusedPointerSurfaceTransformation | ( | ) | const |
- Returns
- The transformation applied to pointer position to go from global to local coordinates.
- Since
- 5.6
Definition at line 815 of file seat_interface.cpp.
SurfaceInterface * KWaylandServer::SeatInterface::focusedTextInputSurface | ( | ) | const |
- Returns
- The SurfaceInterface which is currently focused for text input.
- See also
- setFocusedTextInputSurface
- Since
- 5.23
Definition at line 1451 of file seat_interface.cpp.
|
signal |
Emitted whenever the focused text input changed.
- See also
- focusedTextInput
- Since
- 5.23
bool KWaylandServer::SeatInterface::hasImplicitPointerGrab | ( | quint32 | serial | ) | const |
- Returns
- true if there is a pressed button with the given
serial
- Since
- 5.6
Definition at line 1382 of file seat_interface.cpp.
bool KWaylandServer::SeatInterface::hasImplicitTouchGrab | ( | quint32 | serial | ) | const |
- Returns
- true if there is a touch sequence going on associated with a touch down of the given
serial
.
- Since
- 5.XX
Definition at line 1354 of file seat_interface.cpp.
bool KWaylandServer::SeatInterface::isDrag | ( | ) | const |
- Returns
- whether there is currently a drag'n'drop going on.
- Since
- 5.6
- See also
- isDragPointer
- isDragTouch
- dragStarted
- dragEnded
Definition at line 1364 of file seat_interface.cpp.
bool KWaylandServer::SeatInterface::isDragPointer | ( | ) | const |
- Returns
- whether the drag'n'drop is operated through the pointer device
- Since
- 5.6
- See also
- isDrag
- isDragTouch
Definition at line 1370 of file seat_interface.cpp.
bool KWaylandServer::SeatInterface::isDragTouch | ( | ) | const |
- Returns
- whether the drag'n'drop is operated through the touch device
- Since
- 5.6
- See also
- isDrag
- isDragPointer
Definition at line 1376 of file seat_interface.cpp.
bool KWaylandServer::SeatInterface::isPointerButtonPressed | ( | quint32 | button | ) | const |
- Returns
- whether the
button
is pressed
Definition at line 856 of file seat_interface.cpp.
bool KWaylandServer::SeatInterface::isPointerButtonPressed | ( | Qt::MouseButton | button | ) | const |
- Returns
- whether the
button
is pressed
Definition at line 851 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::pointerAxis | ( | Qt::Orientation | orientation, |
quint32 | delta | ||
) |
- See also
- pointerAxisV5
Definition at line 880 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::pointerAxisV5 | ( | Qt::Orientation | orientation, |
qreal | delta, | ||
qint32 | discreteDelta, | ||
PointerAxisSource | source | ||
) |
Sends axis events to the currently focused pointer surface.
- Parameters
-
orientation The scroll axis. delta The length of a vector along the specified axis orientation
.discreteDelta The number of discrete steps, e.g. mouse wheel clicks. source Describes how the axis event was physically generated.
- Since
- 5.59
- Todo:
- Drop V5 suffix with KF6.
Definition at line 866 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::pointerButtonPressed | ( | quint32 | button | ) |
Marks the button
as pressed.
If there is a focused pointer surface a button pressed event is sent to it.
- Parameters
-
button The Linux button code
Definition at line 903 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::pointerButtonPressed | ( | Qt::MouseButton | button | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 894 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::pointerButtonReleased | ( | quint32 | button | ) |
Marks the button
as released.
If there is a focused pointer surface a button release event is sent to it.
- Parameters
-
button The Linux button code
Definition at line 936 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::pointerButtonReleased | ( | Qt::MouseButton | button | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 927 of file seat_interface.cpp.
quint32 KWaylandServer::SeatInterface::pointerButtonSerial | ( | quint32 | button | ) | const |
- Returns
- the last serial for
button
.
Definition at line 963 of file seat_interface.cpp.
quint32 KWaylandServer::SeatInterface::pointerButtonSerial | ( | Qt::MouseButton | button | ) | const |
- Returns
- the last serial for
button
.
Definition at line 958 of file seat_interface.cpp.
QPointF KWaylandServer::SeatInterface::pointerPos | ( | ) | const |
- Returns
- the global pointer position
|
signal |
Emitted whenever the primary selection changes.
- See also
- primarySelection
void KWaylandServer::SeatInterface::relativePointerMotion | ( | const QSizeF & | delta, |
const QSizeF & | deltaNonAccelerated, | ||
quint64 | microseconds | ||
) |
A relative motion is in the same dimension as regular motion events, except they do not represent an absolute position.
For example, moving a pointer from (x, y) to (x', y') would have the equivalent relative motion (x' - x, y' - y). If a pointer motion caused the absolute pointer position to be clipped by for example the edge of the monitor, the relative motion is unaffected by the clipping and will represent the unclipped motion.
This method also contains non-accelerated motion deltas (deltaNonAccelerated
). The non-accelerated delta is, when applicable, the regular pointer motion delta as it was before having applied motion acceleration and other transformations such as normalization.
Note that the non-accelerated delta does not represent 'raw' events as they were read from some device. Pointer motion acceleration is device- and configuration-specific and non-accelerated deltas and accelerated deltas may have the same value on some devices.
Relative motions are not coupled to wl_pointer.motion events (see setPointerPos, and can be sent in combination with such events, but also independently. There may also be scenarios where wl_pointer.motion is sent, but there is no relative motion. The order of an absolute and relative motion event originating from the same physical motion is not guaranteed.
Sending relative pointer events only makes sense if the RelativePointerManagerInterface is created on the Display.
- Parameters
-
delta Motion vector deltaNonAccelerated non-accelerated motion vector microseconds timestamp with microseconds granularity
- See also
- setPointerPos
- Since
- 5.28
Definition at line 973 of file seat_interface.cpp.
AbstractDataSource * KWaylandServer::SeatInterface::selection | ( | ) | const |
- Returns
- The DataDeviceInterface holding the current clipboard selection.
- Since
- 5.24
- See also
- selectionChanged
- setSelection This may be null
Definition at line 1468 of file seat_interface.cpp.
|
signal |
void KWaylandServer::SeatInterface::setDragTarget | ( | SurfaceInterface * | surface, |
const QPointF & | globalPosition, | ||
const QMatrix4x4 & | inputTransformation | ||
) |
Sets the current drag target to surface
.
Sends a drag leave event to the current target and an enter event to surface
. The enter position is derived from globalPosition
and transformed by inputTransformation
.
- Since
- 5.6
Definition at line 663 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::setDragTarget | ( | SurfaceInterface * | surface, |
const QMatrix4x4 & | inputTransformation = QMatrix4x4() |
||
) |
Sets the current drag target to surface
.
Sends a drag leave event to the current target and an enter event to surface
. The enter position is derived from current global position and transformed by inputTransformation
.
- Since
- 5.6
Definition at line 701 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::setFocusedKeyboardSurface | ( | SurfaceInterface * | surface | ) |
Passes keyboard focus to surface
.
If the SeatInterface has the keyboard capability, also the focused text input surface will be set to surface
.
- See also
- focusedKeyboardSurface
- hasKeyboard
- setFocusedTextInputSurface
Definition at line 1111 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::setFocusedPointerSurface | ( | SurfaceInterface * | surface, |
const QPointF & | surfacePosition = QPoint() |
||
) |
Sets the focused pointer surface
.
All pointer events will be sent to the surface
till a new focused pointer surface gets installed. When the focus pointer surface changes a leave event is sent to the previous focused surface.
To unset the focused pointer surface pass nullptr
as surface
.
Pointer motion events are adjusted to the local position based on the surfacePosition
. If the surface changes it's position in the global coordinate system use setFocusedPointerSurfacePosition to update. The surface position is used to create the base transformation matrix to go from global to surface local coordinates. The default generated matrix is a translation with negative surfacePosition
.
- Parameters
-
surface The surface which should become the new focused pointer surface. surfacePosition The position of the surface in the global coordinate system
- See also
- setPointerPos
- focucedPointerSurface
- focusedPointer
- setFocusedPointerSurfacePosition
- focusedPointerSurfacePosition
- setFocusedPointerSurfaceTransformation
- focusedPointerSurfaceTransformation
Definition at line 719 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::setFocusedPointerSurface | ( | SurfaceInterface * | surface, |
const QMatrix4x4 & | transformation | ||
) |
Sets the focused pointer surface
.
All pointer events will be sent to the surface
till a new focused pointer surface gets installed. When the focus pointer surface changes a leave event is sent to the previous focused surface.
To unset the focused pointer surface pass nullptr
as surface
.
Pointer motion events are adjusted to the local position based on the transformation
. If the surface changes it's position in the global coordinate system use setFocusedPointerSurfaceTransformation to update.
- Parameters
-
surface The surface which should become the new focused pointer surface. transformation The transformation to transform global into local coordinates
- See also
- setPointerPos
- focucedPointerSurface
- focusedPointer
- setFocusedPointerSurfacePosition
- focusedPointerSurfacePosition
- setFocusedPointerSurfaceTransformation
- focusedPointerSurfaceTransformation
- Since
- 5.6
Definition at line 730 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::setFocusedPointerSurfacePosition | ( | const QPointF & | surfacePosition | ) |
Updates the global position of the currently focused pointer surface.
Updating the focused surface position also generates a new transformation matrix. The default generated matrix is a translation with negative surfacePosition
. If a different transformation is required a dedicated call to is required. surfacePosition The new global position of the focused pointer surface focusedPointerSurface setFocusedPointerSurface focusedPointerSurfaceTransformation setFocusedPointerSurfaceTransformation
Definition at line 791 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::setFocusedPointerSurfaceTransformation | ( | const QMatrix4x4 & | transformation | ) |
Sets the transformation
for going from global to local coordinates.
The default transformation gets generated from the surface position and reset whenever the surface position changes.
- See also
- focusedPointerSurfaceTransformation
- focusedPointerSurfacePosition
- setFocusedPointerSurfacePosition
- Since
- 5.6
Definition at line 807 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::setFocusedTextInputSurface | ( | SurfaceInterface * | surface | ) |
Passes text input focus to surface
.
If the SeatInterface has the keyboard capability this method will be invoked automatically when setting the focused keyboard surface.
In case there is a TextInputV2Interface for the surface
, the enter event will be triggered on the TextInputV2Interface for surface
. The focusedTextInput will be set to that TextInputV2Interface. If there is no TextInputV2Interface for that surface
, it might get updated later on. In both cases the signal focusedTextInputChanged will be emitted.
- See also
- focusedTextInputSurface
- focusedTextInput
- focusedTextInputChanged
- setFocusedKeyboardSurface
- Since
- 5.23
Definition at line 1422 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::setPointerPos | ( | const QPointF & | pos | ) |
Updates the global pointer pos
.
Sends a pointer motion event to the focused pointer surface.
Definition at line 637 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::setSelection | ( | AbstractDataSource * | selection | ) |
This method allows to manually set the dataDevice
for the current clipboard selection.
The clipboard selection is handled automatically in SeatInterface. If a DataDeviceInterface belonging to the current focused KeyboardInterface sets a selection, the current clipboard selection will be updated automatically. With this method it's possible to override the automatic clipboard update for e.g. the case of a clipboard manager.
- Parameters
-
dataDevice Sets the current clipboard selection.
- See also
- selection
- selectionChanged
- Since
- 5.24
Definition at line 1474 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::startPointerPinchGesture | ( | quint32 | fingerCount | ) |
Starts a multi-finch pinch gesture for the currently focused pointer surface.
Such gestures are normally reported through dedicated input devices such as touchpads.
The gesture is usually initiated by multiple fingers moving towards each other or away from each other, or by two or more fingers rotating around a logical center of gravity. The precise conditions of when such a gesture is detected are implementation-dependent.
Only one gesture (either swipe or pinch) can be active at a given time.
- Parameters
-
fingerCount The number of fingers involved in this multi-touch touchpad gesture
- See also
- PointerGesturesInterface
- focusedPointerSurface
- updatePointerPinchGesture
- endPointerPinchGesture
- cancelPointerPinchGesture
- startPointerSwipeGesture
- Since
- 5.29
Definition at line 1044 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::startPointerSwipeGesture | ( | quint32 | fingerCount | ) |
Starts a multi-finger swipe gesture for the currently focused pointer surface.
Such gestures are normally reported through dedicated input devices such as touchpads.
The gesture is usually initiated by multiple fingers moving in the same direction but once initiated the direction may change. The precise conditions of when such a gesture is detected are implementation-dependent.
Only one gesture (either swipe or pinch) can be active at a given time.
- Parameters
-
fingerCount The number of fingers involved in this multi-finger touchpad gesture
- See also
- PointerGesturesInterface
- focusedPointerSurface
- updatePointerSwipeGesture
- endPointerSwipeGesture
- cancelPointerSwipeGesture
- startPointerPinchGesture
- Since
- 5.29
Definition at line 983 of file seat_interface.cpp.
TextInputV2Interface * KWaylandServer::SeatInterface::textInputV2 | ( | ) | const |
The currently focused text input, may be null
even if there is a focused text input surface set.
The focused text input might not be enabled for the focusedTextInputSurface. It is recommended to check the enabled state before interacting with the TextInputV2Interface.
- See also
- focusedTextInputChanged
- focusedTextInputSurface
- Since
- 5.23
Definition at line 1457 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::updatePointerPinchGesture | ( | const QSizeF & | delta, |
qreal | scale, | ||
qreal | rotation | ||
) |
The position of the logical center, the rotation or the relative scale of this multi-finger pinch gesture changes.
- Parameters
-
delta coordinates are relative coordinates of the logical center of the gesture compared to the previous event. scale an absolute scale compared to the gesture start rotation relative angle in degrees clockwise compared to the previous start of update
- Since
- 5.29
Definition at line 1062 of file seat_interface.cpp.
void KWaylandServer::SeatInterface::updatePointerSwipeGesture | ( | const QSizeF & | delta | ) |
The position of the logical center of the currently active multi-finger swipe gesture changes.
- Parameters
-
delta coordinates are relative coordinates of the logical center of the gesture compared to the previous event.
- Since
- 5.29
Definition at line 1001 of file seat_interface.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 19 2021 23:11:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.