KWayland::Server::SeatInterface

KWayland::Server::SeatInterface Class Reference

#include <seat_interface.h>

Inheritance diagram for KWayland::Server::SeatInterface:

Properties

bool keyboard
 
QString name
 
bool pointer
 
QPointF pointerPos
 
quint32 timestamp
 
bool touch
 
bool tourch
 
- Properties inherited from QObject
 objectName
 

Signals

void dragEnded ()
 
void dragStarted ()
 
void dragSurfaceChanged ()
 
void focusedPointerChanged (KWayland::Server::PointerInterface *)
 
void focusedTextInputChanged ()
 
void hasKeyboardChanged (bool)
 
void hasPointerChanged (bool)
 
void hasTouchChanged (bool)
 
void keyboardCreated (KWayland::Server::KeyboardInterface *)
 
void nameChanged (const QString &)
 
void pointerCreated (KWayland::Server::PointerInterface *)
 
void pointerPosChanged (const QPointF &pos)
 
void selectionChanged (DataDeviceInterface *)
 
void timestampChanged (quint32)
 
void touchCreated (KWayland::Server::TouchInterface *)
 
void touchMoved (qint32 id, quint32 serial, const QPointF &globalPosition)
 
- Signals inherited from KWayland::Server::Global
void aboutToDestroyGlobal ()
 

Public Member Functions

bool hasKeyboard () const
 
bool hasPointer () const
 
bool hasTouch () const
 
QString name () const
 
DataDeviceInterfaceselection () const
 
void setHasKeyboard (bool has)
 
void setHasPointer (bool has)
 
void setHasTouch (bool has)
 
void setName (const QString &name)
 
void setSelection (DataDeviceInterface *dataDevice)
 
void setTimestamp (quint32 time)
 
quint32 timestamp () const
 
Drag'n'Drop related methods
bool isDrag () const
 
bool isDragPointer () const
 
bool isDragTouch () const
 
QMatrix4x4 dragSurfaceTransformation () const
 
SurfaceInterfacedragSurface () const
 
PointerInterfacedragPointer () const
 
DataDeviceInterfacedragSource () 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)
 
SurfaceInterfacefocusedPointerSurface () const
 
PointerInterfacefocusedPointer () 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 ()
 
keyboard related methods
void setKeymap (int fd, quint32 size)
 
void setKeymapData (const QByteArray &content)
 
void keyPressed (quint32 key)
 
void keyReleased (quint32 key)
 
void updateKeyboardModifiers (quint32 depressed, quint32 latched, quint32 locked, quint32 group)
 
void setKeyRepeatInfo (qint32 charactersPerSecond, qint32 delay)
 
quint32 depressedModifiers () const
 
quint32 latchedModifiers () const
 
quint32 lockedModifiers () const
 
quint32 groupModifiers () const
 
quint32 lastModifiersSerial () const
 
int KWAYLANDSERVER_DEPRECATED keymapFileDescriptor () const
 
quint32 KWAYLANDSERVER_DEPRECATED keymapSize () const
 
bool isKeymapXkbCompatible () const
 
QVector< quint32 > pressedKeys () const
 
qint32 keyRepeatRate () const
 
qint32 keyRepeatDelay () const
 
void setFocusedKeyboardSurface (SurfaceInterface *surface)
 
SurfaceInterfacefocusedKeyboardSurface () const
 
KeyboardInterfacefocusedKeyboard () const
 
touch related methods
void setFocusedTouchSurface (SurfaceInterface *surface, const QPointF &surfacePosition=QPointF())
 
SurfaceInterfacefocusedTouchSurface () const
 
TouchInterfacefocusedTouch () 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)
 
SurfaceInterfacefocusedTextInputSurface () const
 
TextInputInterfacefocusedTextInput () const
 
- Public Member Functions inherited from KWayland::Server::Global
void create ()
 
void destroy ()
 
Displaydisplay ()
 
bool isValid () const
 
 operator wl_global * ()
 
 operator wl_global * () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () 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< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
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 &regExp, 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 QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () 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
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
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)
 
QThreadthread () const const
 

Static Public Member Functions

static SeatInterfaceget (wl_resource *native)
 
- Static Public Member Functions inherited from QObject
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

- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from KWayland::Server::Global
 Global (Private *d, QObject *parent=nullptr)
 
- Protected Member Functions inherited from QObject
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
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Attributes inherited from KWayland::Server::Global
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.

SeatInterface *seat = display->createSeat();
// set up
seat->setName(QStringLiteral("seat0"));
seat->setHasPointer(true);
seat->setHasKeyboard(true);
seat->setHasTouch(false);
// now fully create
seat->create();

To forward input events one needs to set the focused surface, update time stamp and then forward the actual events:

// example for pointer
seat->setFocusedPointerSurface(surface, QPointF(100, 200)); // surface at it's global position
seat->setTimestamp(100);
seat->setPointerPos(QPointF(350, 210)); // global pos, local pos in surface: 250,10
seat->setTimestamp(110);
seat->pointerButtonPressed(Qt::LeftButton);
seat->setTimestamp(120);
seat->pointerButtonReleased(Qt::LeftButton);
See also
KeyboardInterface
PointerInterface
TouchInterface
SurfaceInterface

Definition at line 104 of file seat_interface.h.

Property Documentation

bool KWayland::Server::SeatInterface::keyboard
readwrite

Whether the SeatInterface supports a keyboard device.

Definition at line 118 of file seat_interface.h.

QString KWayland::Server::SeatInterface::name
readwrite

The name of the Seat.

Definition at line 110 of file seat_interface.h.

bool KWayland::Server::SeatInterface::pointer
readwrite

Whether the SeatInterface supports a pointer device.

Definition at line 114 of file seat_interface.h.

QPointF KWayland::Server::SeatInterface::pointerPos
readwrite

The global pointer position.

Definition at line 131 of file seat_interface.h.

quint32 KWayland::Server::SeatInterface::timestamp
readwrite

The current timestamp passed to the input events.

Definition at line 135 of file seat_interface.h.

bool KWayland::Server::SeatInterface::touch
readwrite

Whether the SeatInterface supports a touch device.

Definition at line 127 of file seat_interface.h.

bool KWayland::Server::SeatInterface::tourch
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 KWayland::Server::SeatInterface::cancelPointerPinchGesture ( )
void KWayland::Server::SeatInterface::cancelPointerSwipeGesture ( )

The multi-finger swipe gestures ended and got cancelled by the Wayland compositor.

See also
startPointerSwipeGesture
updatePointerSwipeGesture
endPointerSwipeGesture
Since
5.29

Definition at line 1000 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::dragEnded ( )
signal

Emitted when a drag'n'drop operation ended, either by dropping or canceling.

Since
5.6
See also
dragStarted
PointerInterface * KWayland::Server::SeatInterface::dragPointer ( ) const
Returns
The PointerInterface which triggered the drag operation
Since
5.6
See also
isDragPointer

Definition at line 1527 of file seat_interface.cpp.

DataDeviceInterface * KWayland::Server::SeatInterface::dragSource ( ) const
Returns
The DataDeviceInterface which started the drag and drop operation.
See also
isDrag
Since
5.6

Definition at line 1537 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::dragStarted ( )
signal

Emitted when a drag'n'drop operation is started.

Since
5.6
See also
dragEnded
SurfaceInterface * KWayland::Server::SeatInterface::dragSurface ( ) const
Returns
The currently focused Surface for drag motion events.
Since
5.6
See also
dragSurfaceTransformation
dragSurfaceChanged

Definition at line 1521 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::dragSurfaceChanged ( )
signal

Emitted whenever the drag surface for motion events changed.

Since
5.6
See also
dragSurface
QMatrix4x4 KWayland::Server::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 1515 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::endPointerPinchGesture ( )
void KWayland::Server::SeatInterface::endPointerSwipeGesture ( )

The multi-finger swipe gesture ended.

This may happen when one or more fingers are lifted.

See also
startPointerSwipeGesture
updatePointerSwipeGesture
cancelPointerSwipeGesture
5.29

Definition at line 985 of file seat_interface.cpp.

PointerInterface * KWayland::Server::SeatInterface::focusedPointer ( ) const
Returns
The PointerInterface belonging to the focused pointer surface, if any.
See also
setFocusedPointerSurface

Definition at line 751 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::focusedPointerChanged ( KWayland::Server::PointerInterface )
signal

Emitted whenever the focused pointer changes.

Since
5.6
SurfaceInterface * KWayland::Server::SeatInterface::focusedPointerSurface ( ) const
Returns
The currently focused pointer surface, that is the surface receiving pointer events.
See also
setFocusedPointerSurface

Definition at line 682 of file seat_interface.cpp.

QPointF KWayland::Server::SeatInterface::focusedPointerSurfacePosition ( ) const
Returns
The position of the focused pointer surface in global coordinates.
See also
setFocusedPointerSurfacePosition
setFocusedPointerSurface
focusedPointerSurfaceTransformation

Definition at line 770 of file seat_interface.cpp.

QMatrix4x4 KWayland::Server::SeatInterface::focusedPointerSurfaceTransformation ( ) const
Returns
The transformation applied to pointer position to go from global to local coordinates.
See also
setFocusedPointerSurfaceTransformation
Since
5.6

Definition at line 784 of file seat_interface.cpp.

TextInputInterface * KWayland::Server::SeatInterface::focusedTextInput ( ) 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 TextInputInterface.

See also
focusedTextInputChanged
focusedTextInputSurface
Since
5.23

Definition at line 1585 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::focusedTextInputChanged ( )
signal

Emitted whenever the focused text input changed.

See also
focusedTextInput
Since
5.23
SurfaceInterface * KWayland::Server::SeatInterface::focusedTextInputSurface ( ) const
Returns
The SurfaceInterface which is currently focused for text input.
See also
setFocusedTextInputSurface
Since
5.23

Definition at line 1579 of file seat_interface.cpp.

bool KWayland::Server::SeatInterface::hasImplicitPointerGrab ( quint32  serial) const
Returns
true if there is a pressed button with the given serial
Since
5.6

Definition at line 1503 of file seat_interface.cpp.

bool KWayland::Server::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 1475 of file seat_interface.cpp.

bool KWayland::Server::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 1485 of file seat_interface.cpp.

bool KWayland::Server::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 1491 of file seat_interface.cpp.

bool KWayland::Server::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 1497 of file seat_interface.cpp.

bool KWayland::Server::SeatInterface::isPointerButtonPressed ( quint32  button) const
Returns
whether the button is pressed

Definition at line 825 of file seat_interface.cpp.

bool KWayland::Server::SeatInterface::isPointerButtonPressed ( Qt::MouseButton  button) const
Returns
whether the button is pressed

Definition at line 820 of file seat_interface.cpp.

int KWayland::Server::SeatInterface::keymapFileDescriptor ( ) const
Deprecated:
since 5.69

Definition at line 1229 of file seat_interface.cpp.

quint32 KWayland::Server::SeatInterface::keymapSize ( ) const
Deprecated:
since 5.69

Definition at line 1236 of file seat_interface.cpp.

qint32 KWayland::Server::SeatInterface::keyRepeatDelay ( ) const
Returns
The delay on key press before starting repeating keys
Since
5.5
See also
keyRepeatRate
setKeyRepeatInfo

Definition at line 1210 of file seat_interface.cpp.

qint32 KWayland::Server::SeatInterface::keyRepeatRate ( ) const
Returns
The key repeat in character per second
Since
5.5
See also
setKeyRepeatInfo
keyRepeatDelay

Definition at line 1216 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::pointerAxis ( Qt::Orientation  orientation,
quint32  delta 
)
See also
pointerAxisV5

Definition at line 849 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::pointerAxisV5 ( Qt::Orientation  orientation,
qreal  delta,
qint32  discreteDelta,
PointerAxisSource  source 
)

Sends axis events to the currently focused pointer surface.

Parameters
orientationThe scroll axis.
deltaThe length of a vector along the specified axis orientation.
discreteDeltaThe number of discrete steps, e.g. mouse wheel clicks.
sourceDescribes how the axis event was physically generated.
Since
5.59
Todo:
Drop V5 suffix with KF6.

Definition at line 835 of file seat_interface.cpp.

void KWayland::Server::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
buttonThe Linux button code

Definition at line 872 of file seat_interface.cpp.

void KWayland::Server::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 863 of file seat_interface.cpp.

void KWayland::Server::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
buttonThe Linux button code

Definition at line 907 of file seat_interface.cpp.

void KWayland::Server::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 898 of file seat_interface.cpp.

quint32 KWayland::Server::SeatInterface::pointerButtonSerial ( quint32  button) const
Returns
the last serial for button.

Definition at line 934 of file seat_interface.cpp.

quint32 KWayland::Server::SeatInterface::pointerButtonSerial ( Qt::MouseButton  button) const
Returns
the last serial for button.

Definition at line 929 of file seat_interface.cpp.

QPointF KWayland::Server::SeatInterface::pointerPos ( ) const
Returns
the global pointer position
void KWayland::Server::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
deltaMotion vector
deltaNonAcceleratednon-accelerated motion vector
microsecondstimestamp with microseconds granularity
See also
setPointerPos
Since
5.28

Definition at line 944 of file seat_interface.cpp.

DataDeviceInterface * KWayland::Server::SeatInterface::selection ( ) const
Returns
The DataDeviceInterface holding the current clipboard selection.
Since
5.24
See also
selectionChanged
setSelection

Definition at line 1591 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::selectionChanged ( DataDeviceInterface )
signal

Emitted whenever the selection changes.

Since
5.56
See also
selection
setSelection
void KWayland::Server::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 641 of file seat_interface.cpp.

void KWayland::Server::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 670 of file seat_interface.cpp.

void KWayland::Server::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 1110 of file seat_interface.cpp.

void KWayland::Server::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
surfaceThe surface which should become the new focused pointer surface.
surfacePositionThe position of the surface in the global coordinate system
See also
setPointerPos
focucedPointerSurface
focusedPointer
setFocusedPointerSurfacePosition
focusedPointerSurfacePosition
setFocusedPointerSurfaceTransformation
focusedPointerSurfaceTransformation

Definition at line 688 of file seat_interface.cpp.

void KWayland::Server::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
surfaceThe surface which should become the new focused pointer surface.
transformationThe transformation to transform global into local coordinates
See also
setPointerPos
focucedPointerSurface
focusedPointer
setFocusedPointerSurfacePosition
focusedPointerSurfacePosition
setFocusedPointerSurfaceTransformation
focusedPointerSurfaceTransformation
Since
5.6

Definition at line 699 of file seat_interface.cpp.

void KWayland::Server::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 760 of file seat_interface.cpp.

void KWayland::Server::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 776 of file seat_interface.cpp.

void KWayland::Server::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 TextInputInterface for the surface, the enter event will be triggered on the TextInputInterface for surface. The focusedTextInput will be set to that TextInputInterface. If there is no TextInputInterface 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 1543 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::setKeymap ( int  fd,
quint32  size 
)
Deprecated:
since 5.69, use setKeymapData

Definition at line 1151 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::setKeymapData ( const QByteArray content)

Sets the xkb keymap with content for this Seat.

The content gets sent to all registered KeyboardInterfaces

Since
5.69

Definition at line 1165 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::setKeyRepeatInfo ( qint32  charactersPerSecond,
qint32  delay 
)

Sets the key repeat information to be forwarded to all bound keyboards.

To disable key repeat set a charactersPerSecond of 0.

Requires wl_seat version 4.

Parameters
charactersPerSecondThe characters per second rate, value of 0 disables key repeating
delayThe delay on key press before starting repeating keys
Since
5.5

Definition at line 1200 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::setPointerPos ( const QPointF pos)

Updates the global pointer pos.

Sends a pointer motion event to the focused pointer surface.

Definition at line 615 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::setSelection ( DataDeviceInterface dataDevice)

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
dataDeviceSets the current clipboard selection.
See also
selection
selectionChanged
Since
5.24

Definition at line 1597 of file seat_interface.cpp.

void KWayland::Server::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
fingerCountThe number of fingers involved in this multi-touch touchpad gesture
See also
PointerGesturesInterface
focusedPointerSurface
updatePointerPinchGesture
endPointerPinchGesture
cancelPointerPinchGesture
startPointerSwipeGesture
Since
5.29

Definition at line 1015 of file seat_interface.cpp.

void KWayland::Server::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
fingerCountThe number of fingers involved in this multi-finger touchpad gesture
See also
PointerGesturesInterface
focusedPointerSurface
updatePointerSwipeGesture
endPointerSwipeGesture
cancelPointerSwipeGesture
startPointerPinchGesture
Since
5.29

Definition at line 954 of file seat_interface.cpp.

void KWayland::Server::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
deltacoordinates are relative coordinates of the logical center of the gesture compared to the previous event.
scalean absolute scale compared to the gesture start
rotationrelative angle in degrees clockwise compared to the previous start of update
See also
startPointerPinchGesture
endPointerPinchGesture
cancelPointerPinchGesture
Since
5.29

Definition at line 1033 of file seat_interface.cpp.

void KWayland::Server::SeatInterface::updatePointerSwipeGesture ( const QSizeF delta)

The position of the logical center of the currently active multi-finger swipe gesture changes.

Parameters
deltacoordinates are relative coordinates of the logical center of the gesture compared to the previous event.
See also
startPointerSwipeGesture
endPointerSwipeGesture
cancelPointerSwipeGesture
Since
5.29

Definition at line 972 of file seat_interface.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 22:50:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.