KWaylandServer::SeatInterface

Search for usage in LXR

KWaylandServer::SeatInterface Class Reference

#include <seat_interface.h>

Inheritance diagram for KWaylandServer::SeatInterface:

Properties

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

Signals

void dragDropped ()
 
void dragEnded ()
 
void dragStarted ()
 
void dragSurfaceChanged ()
 
void focusedTextInputSurfaceChanged ()
 
void hasKeyboardChanged (bool)
 
void hasPointerChanged (bool)
 
void hasTouchChanged (bool)
 
void nameChanged (const QString &)
 
void pointerPosChanged (const QPointF &pos)
 
void primarySelectionChanged (KWaylandServer::AbstractDataSource *)
 
void selectionChanged (KWaylandServer::AbstractDataSource *)
 
void timestampChanged (quint32)
 
void touchMoved (qint32 id, quint32 serial, const QPointF &globalPosition)
 

Public Member Functions

 SeatInterface (Display *display, QObject *parent=nullptr)
 
Displaydisplay () const
 
SurfaceInterfacefocusedKeyboardSurface () const
 
bool hasKeyboard () const
 
bool hasPointer () const
 
bool hasTouch () const
 
KeyboardInterfacekeyboard () const
 
QString name () const
 
void notifyKeyboardKey (quint32 keyCode, KeyboardKeyState state)
 
void notifyKeyboardModifiers (quint32 depressed, quint32 latched, quint32 locked, quint32 group)
 
KWaylandServer::AbstractDataSourceselection () 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
 
SurfaceInterfacedragSurface () 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 notifyPointerMotion (const QPointF &pos)
 
QPointF pointerPos () const
 
void setFocusedPointerSurface (SurfaceInterface *surface, const QPointF &surfacePosition=QPoint())
 
void setFocusedPointerSurface (SurfaceInterface *surface, const QMatrix4x4 &transformation)
 
SurfaceInterfacefocusedPointerSurface () const
 
PointerInterfacepointer () const
 
void setFocusedPointerSurfacePosition (const QPointF &surfacePosition)
 
QPointF focusedPointerSurfacePosition () const
 
void setFocusedPointerSurfaceTransformation (const QMatrix4x4 &transformation)
 
QMatrix4x4 focusedPointerSurfaceTransformation () const
 
void notifyPointerButton (quint32 button, PointerButtonState state)
 
void notifyPointerButton (Qt::MouseButton button, PointerButtonState state)
 
void notifyPointerFrame ()
 
bool isPointerButtonPressed (quint32 button) const
 
bool isPointerButtonPressed (Qt::MouseButton button) const
 
quint32 pointerButtonSerial (quint32 button) const
 
quint32 pointerButtonSerial (Qt::MouseButton button) const
 
void notifyPointerAxis (Qt::Orientation orientation, qreal delta, qint32 discreteDelta, PointerAxisSource source)
 
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())
 
SurfaceInterfacefocusedTouchSurface () const
 
TouchInterfacetouch () const
 
void setFocusedTouchSurfacePosition (const QPointF &surfacePosition)
 
QPointF focusedTouchSurfacePosition () const
 
void notifyTouchDown (qint32 id, const QPointF &globalPosition)
 
void notifyTouchUp (qint32 id)
 
void notifyTouchMotion (qint32 id, const QPointF &globalPosition)
 
void notifyTouchFrame ()
 
void notifyTouchCancel ()
 
bool isTouchSequence () const
 
bool hasImplicitTouchGrab (quint32 serial) const
 
Text input related methods.
void setFocusedTextInputSurface (SurfaceInterface *surface)
 
SurfaceInterfacefocusedTextInputSurface () const
 
TextInputV2InterfacetextInputV2 () const
 
TextInputV3InterfacetextInputV3 () 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 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)
 

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->notifyPointerMotion(QPointF(350, 210)); // global pos, local pos in surface: 250,10
seat->notifyPointerFrame();
seat->setTimestamp(110);
seat->notifyPointerButton(Qt::LeftButton, PointerButtonState::Pressed);
seat->notifyPointerFrame();
seat->setTimestamp(120);
seat->notifyPointerButton(Qt::LeftButton, PointerButtonState::Released);
seat->notifyPointerFrame();
See also
KeyboardInterface
PointerInterface
TouchInterface
SurfaceInterface

Definition at line 123 of file seat_interface.h.

Property Documentation

KeyboardInterface * KWaylandServer::SeatInterface::keyboard
readwrite

Whether the SeatInterface supports a keyboard device.

Definition at line 137 of file seat_interface.h.

QString KWaylandServer::SeatInterface::name
readwrite

The name of the Seat.

Definition at line 129 of file seat_interface.h.

PointerInterface * KWaylandServer::SeatInterface::pointer
readwrite

Whether the SeatInterface supports a pointer device.

Definition at line 133 of file seat_interface.h.

QPointF KWaylandServer::SeatInterface::pointerPos
readwrite

The global pointer position.

Definition at line 150 of file seat_interface.h.

quint32 KWaylandServer::SeatInterface::timestamp
readwrite

The current timestamp passed to the input events.

Definition at line 154 of file seat_interface.h.

TouchInterface * KWaylandServer::SeatInterface::touch
readwrite

Whether the SeatInterface supports a touch device.

Definition at line 146 of file seat_interface.h.

bool KWaylandServer::SeatInterface::tourch
readwrite

Whether the SeatInterface supports a touch device.

Deprecated:
Since 5.5, use touch

Definition at line 142 of file seat_interface.h.

Member Function Documentation

void KWaylandServer::SeatInterface::cancelPointerPinchGesture ( )
void KWaylandServer::SeatInterface::cancelPointerSwipeGesture ( )

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

See also
startPointerSwipeGesture
updatePointerSwipeGesture
endPointerSwipeGesture

Definition at line 842 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::dragDropped ( )
signal

Emitted when a drop ocurrs in a drag'n'drop operation.

This is emitted before dragEnded

void KWaylandServer::SeatInterface::dragEnded ( )
signal

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

See also
dragStarted
DataDeviceInterface * KWaylandServer::SeatInterface::dragSource ( ) const
Returns
The DataDeviceInterface which started the drag and drop operation.
See also
isDrag

Definition at line 1192 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::dragStarted ( )
signal

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

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

Definition at line 1187 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::dragSurfaceChanged ( )
signal

Emitted whenever the drag surface for motion events changed.

See also
dragSurface
QMatrix4x4 KWaylandServer::SeatInterface::dragSurfaceTransformation ( ) const
Returns
The transformation applied to go from global to local coordinates for drag motion events.
See also
dragSurfaceTransformation

Definition at line 1182 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::endPointerPinchGesture ( )
void KWaylandServer::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 830 of file seat_interface.cpp.

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

Definition at line 584 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 649 of file seat_interface.cpp.

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

Definition at line 661 of file seat_interface.cpp.

SurfaceInterface * KWaylandServer::SeatInterface::focusedTextInputSurface ( ) const
Returns
The SurfaceInterface which is currently focused for text input.
See also
setFocusedTextInputSurface

Definition at line 1225 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::focusedTextInputSurfaceChanged ( )
signal

Emitted whenever the focused text input changed.

See also
focusedTextInput
bool KWaylandServer::SeatInterface::hasImplicitPointerGrab ( quint32  serial) const
Returns
true if there is a pressed button with the given serial

Definition at line 1171 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.

Definition at line 1147 of file seat_interface.cpp.

bool KWaylandServer::SeatInterface::isDrag ( ) const
Returns
whether there is currently a drag'n'drop going on.
See also
isDragPointer
isDragTouch
dragStarted
dragEnded

Definition at line 1156 of file seat_interface.cpp.

bool KWaylandServer::SeatInterface::isDragPointer ( ) const
Returns
whether the drag'n'drop is operated through the pointer device
See also
isDrag
isDragTouch

Definition at line 1161 of file seat_interface.cpp.

bool KWaylandServer::SeatInterface::isDragTouch ( ) const
Returns
whether the drag'n'drop is operated through the touch device
See also
isDrag
isDragPointer

Definition at line 1166 of file seat_interface.cpp.

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

Definition at line 704 of file seat_interface.cpp.

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

Definition at line 699 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::notifyPointerAxis ( 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.

Definition at line 713 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::notifyPointerButton ( quint32  button,
PointerButtonState  state 
)

Marks the specified button as pressed or released based on state.

Definition at line 734 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::notifyPointerButton ( Qt::MouseButton  button,
PointerButtonState  state 
)

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 725 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::notifyPointerMotion ( const QPointF pos)

Updates the global pointer pos.

Sends a pointer motion event to the focused pointer surface.

Definition at line 478 of file seat_interface.cpp.

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

Definition at line 785 of file seat_interface.cpp.

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

Definition at line 780 of file seat_interface.cpp.

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

Definition at line 794 of file seat_interface.cpp.

AbstractDataSource * KWaylandServer::SeatInterface::selection ( ) const
Returns
The DataDeviceInterface holding the current clipboard selection.
See also
selectionChanged
setSelection This may be null

Definition at line 1239 of file seat_interface.cpp.

void KWaylandServer::SeatInterface::selectionChanged ( KWaylandServer::AbstractDataSource )
signal

Emitted whenever the selection changes.

See also
selection
setSelection
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.

Definition at line 535 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.

Definition at line 573 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 907 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
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 589 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
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

Definition at line 599 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 640 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

Definition at line 654 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

Definition at line 1197 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
dataDeviceSets the current clipboard selection.
See also
selection
selectionChanged

Definition at line 1244 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
fingerCountThe number of fingers involved in this multi-touch touchpad gesture
See also
PointerGesturesInterface
focusedPointerSurface
updatePointerPinchGesture
endPointerPinchGesture
cancelPointerPinchGesture
startPointerSwipeGesture

Definition at line 854 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
fingerCountThe number of fingers involved in this multi-finger touchpad gesture
See also
PointerGesturesInterface
focusedPointerSurface
updatePointerSwipeGesture
endPointerSwipeGesture
cancelPointerSwipeGesture
startPointerPinchGesture

Definition at line 806 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

Definition at line 1230 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
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

Definition at line 866 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
deltacoordinates are relative coordinates of the logical center of the gesture compared to the previous event.
See also
startPointerSwipeGesture
endPointerSwipeGesture
cancelPointerSwipeGesture

Definition at line 818 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-2021 The KDE developers.
Generated on Tue Jun 22 2021 23:07:47 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.