KWin
Loading...
Searching...
No Matches
Signals | Public Member Functions | Static Public Member Functions | Friends | List of all members
KWin::SeatInterface Class Reference

Represents a Seat on the Wayland Display. More...

#include <seat.h>

Inheritance diagram for KWin::SeatInterface:

Signals

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

Public Member Functions

 SeatInterface (Display *display, QObject *parent=nullptr)
 
virtual ~SeatInterface ()
 
Displaydisplay () const
 
QString name () const
 
bool hasPointer () const
 
bool hasKeyboard () const
 
bool hasTouch () const
 
void setName (const QString &name)
 
void setHasPointer (bool has)
 
void setHasKeyboard (bool has)
 
void setHasTouch (bool has)
 
void setTimestamp (std::chrono::microseconds time)
 
std::chrono::milliseconds timestamp () const
 
AbstractDropHandlerdropHandlerForSurface (SurfaceInterface *surface) const
 
void cancelDrag ()
 
void setFocusedKeyboardSurface (SurfaceInterface *surface)
 
SurfaceInterfacefocusedKeyboardSurface () const
 
KeyboardInterfacekeyboard () const
 
void notifyKeyboardKey (quint32 keyCode, KeyboardKeyState state)
 
void notifyKeyboardModifiers (quint32 depressed, quint32 latched, quint32 locked, quint32 group)
 
AbstractDataSourceselection () const
 
void setSelection (AbstractDataSource *selection)
 
AbstractDataSourceprimarySelection () const
 
void setPrimarySelection (AbstractDataSource *selection)
 
void startDrag (AbstractDataSource *source, SurfaceInterface *sourceSurface, int dragSerial=-1, DragAndDropIcon *dragIcon=nullptr)
 
DragAndDropIcondragIcon () const
 
Drag'n'Drop related methods
bool isDrag () const
 
bool isDragPointer () const
 
bool isDragTouch () const
 
QMatrix4x4 dragSurfaceTransformation () const
 
SurfaceInterfacedragSurface () const
 
AbstractDataSourcedragSource () const
 
XdgToplevelDragV1InterfacexdgTopleveldrag () const
 
void setDragTarget (AbstractDropHandler *dropTarget, SurfaceInterface *surface, const QPointF &globalPosition, const QMatrix4x4 &inputTransformation)
 
void setDragTarget (AbstractDropHandler *dropTarget, SurfaceInterface *surface, const QMatrix4x4 &inputTransformation=QMatrix4x4())
 
Pointer related methods
void notifyPointerMotion (const QPointF &pos)
 
QPointF pointerPos () const
 
void notifyPointerEnter (SurfaceInterface *surface, const QPointF &position, const QPointF &surfacePosition=QPointF())
 
void notifyPointerEnter (SurfaceInterface *surface, const QPointF &position, const QMatrix4x4 &transformation)
 
void notifyPointerLeave ()
 
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 deltaV120, PointerAxisSource source, PointerAxisRelativeDirection direction=PointerAxisRelativeDirection::Normal)
 
bool hasImplicitPointerGrab (quint32 serial) const
 
void relativePointerMotion (const QPointF &delta, const QPointF &deltaNonAccelerated, std::chrono::microseconds timestamp)
 
void startPointerSwipeGesture (quint32 fingerCount)
 
void updatePointerSwipeGesture (const QPointF &delta)
 
void endPointerSwipeGesture ()
 
void cancelPointerSwipeGesture ()
 
void startPointerPinchGesture (quint32 fingerCount)
 
void updatePointerPinchGesture (const QPointF &delta, qreal scale, qreal rotation)
 
void endPointerPinchGesture ()
 
void cancelPointerPinchGesture ()
 
void startPointerHoldGesture (quint32 fingerCount)
 
void endPointerHoldGesture ()
 
void cancelPointerHoldGesture ()
 
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
 
QPointF firstTouchPointPosition () const
 
bool hasImplicitTouchGrab (quint32 serial) const
 
Text input related methods.
void setFocusedTextInputSurface (SurfaceInterface *surface)
 
SurfaceInterfacefocusedTextInputSurface () const
 
TextInputV1InterfacetextInputV1 () const
 
TextInputV2InterfacetextInputV2 () const
 
TextInputV3InterfacetextInputV3 () const
 

Static Public Member Functions

static SeatInterfaceget (wl_resource *native)
 

Friends

class SeatInterfacePrivate
 

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();
Represents a Seat on the Wayland Display.
Definition seat.h:134
Display * display() const
Definition seat.cpp:424

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

// example for pointer
seat->setTimestamp(100);
seat->notifyPointerEnter(surface, QPointF(350, 210), QPointF(100, 200)); // surface at it's global position
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 133 of file seat.h.

Constructor & Destructor Documentation

◆ SeatInterface()

KWin::SeatInterface::SeatInterface ( Display * display,
QObject * parent = nullptr )
explicit

Definition at line 94 of file seat.cpp.

◆ ~SeatInterface()

KWin::SeatInterface::~SeatInterface ( )
virtual

Definition at line 102 of file seat.cpp.

Member Function Documentation

◆ cancelDrag()

void KWin::SeatInterface::cancelDrag ( )

If there is a current drag in progress, force it to cancel

Definition at line 183 of file seat.cpp.

◆ cancelPointerHoldGesture()

void KWin::SeatInterface::cancelPointerHoldGesture ( )

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

See also
startPointerHoldGesture
endPointerHoldGesture

Definition at line 898 of file seat.cpp.

◆ cancelPointerPinchGesture()

void KWin::SeatInterface::cancelPointerPinchGesture ( )

◆ cancelPointerSwipeGesture()

void KWin::SeatInterface::cancelPointerSwipeGesture ( )

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

See also
startPointerSwipeGesture
updatePointerSwipeGesture
endPointerSwipeGesture

Definition at line 814 of file seat.cpp.

◆ display()

Display * KWin::SeatInterface::display ( ) const

Definition at line 424 of file seat.cpp.

◆ dragDropped

void KWin::SeatInterface::dragDropped ( )
signal

Emitted when a drop ocurrs in a drag'n'drop operation. This is emitted before dragEnded

◆ dragEnded

void KWin::SeatInterface::dragEnded ( )
signal

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

See also
dragStarted

◆ dragIcon()

DragAndDropIcon * KWin::SeatInterface::dragIcon ( ) const

Returns the additional icon attached to the cursor during a drag-and-drop operation. This function returns null if no drag-and-drop is active or no icon has been attached.

Definition at line 1387 of file seat.cpp.

◆ dragSource()

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

Definition at line 1218 of file seat.cpp.

◆ dragStarted

void KWin::SeatInterface::dragStarted ( )
signal

Emitted when a drag'n'drop operation is started

See also
dragEnded

◆ dragSurface()

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

Definition at line 1213 of file seat.cpp.

◆ dragSurfaceChanged

void KWin::SeatInterface::dragSurfaceChanged ( )
signal

Emitted whenever the drag surface for motion events changed.

See also
dragSurface

◆ dragSurfaceTransformation()

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

Definition at line 1208 of file seat.cpp.

◆ dropHandlerForSurface()

AbstractDropHandler * KWin::SeatInterface::dropHandlerForSurface ( SurfaceInterface * surface) const

Definition at line 174 of file seat.cpp.

◆ endPointerHoldGesture()

void KWin::SeatInterface::endPointerHoldGesture ( )

The multi-finger hold gesture ended. This may happen when one or more fingers are lifted.

See also
startPointerHoldGesture
cancelPointerHoldGesture

Definition at line 886 of file seat.cpp.

◆ endPointerPinchGesture()

void KWin::SeatInterface::endPointerPinchGesture ( )

◆ endPointerSwipeGesture()

void KWin::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 802 of file seat.cpp.

◆ firstTouchPointPosition()

QPointF KWin::SeatInterface::firstTouchPointPosition ( ) const

Definition at line 1018 of file seat.cpp.

◆ focusedKeyboardSurface()

SurfaceInterface * KWin::SeatInterface::focusedKeyboardSurface ( ) const

Definition at line 910 of file seat.cpp.

◆ focusedKeyboardSurfaceAboutToChange

void KWin::SeatInterface::focusedKeyboardSurfaceAboutToChange ( SurfaceInterface * nextSurface)
signal

Emitted whenever the focused keyboard is about to change.

See also
focusedKeyboardSurface

◆ focusedPointerSurface()

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

Definition at line 550 of file seat.cpp.

◆ focusedPointerSurfacePosition()

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

Definition at line 631 of file seat.cpp.

◆ focusedPointerSurfaceTransformation()

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

Definition at line 643 of file seat.cpp.

◆ focusedTextInputSurface()

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

Definition at line 1259 of file seat.cpp.

◆ focusedTextInputSurfaceChanged

void KWin::SeatInterface::focusedTextInputSurfaceChanged ( )
signal

Emitted whenever the focused text input changed.

See also
focusedTextInput

◆ focusedTouchSurface()

SurfaceInterface * KWin::SeatInterface::focusedTouchSurface ( ) const

Definition at line 998 of file seat.cpp.

◆ focusedTouchSurfacePosition()

QPointF KWin::SeatInterface::focusedTouchSurfacePosition ( ) const

Definition at line 1003 of file seat.cpp.

◆ get()

SeatInterface * KWin::SeatInterface::get ( wl_resource * native)
static

Definition at line 429 of file seat.cpp.

◆ hasImplicitPointerGrab()

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

Definition at line 1197 of file seat.cpp.

◆ hasImplicitTouchGrab()

bool KWin::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 1173 of file seat.cpp.

◆ hasKeyboard()

bool KWin::SeatInterface::hasKeyboard ( ) const

Definition at line 414 of file seat.cpp.

◆ hasKeyboardChanged

void KWin::SeatInterface::hasKeyboardChanged ( bool )
signal

◆ hasPointer()

bool KWin::SeatInterface::hasPointer ( ) const

Definition at line 409 of file seat.cpp.

◆ hasPointerChanged

void KWin::SeatInterface::hasPointerChanged ( bool )
signal

◆ hasTouch()

bool KWin::SeatInterface::hasTouch ( ) const

Definition at line 419 of file seat.cpp.

◆ hasTouchChanged

void KWin::SeatInterface::hasTouchChanged ( bool )
signal

◆ isDrag()

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

Definition at line 1182 of file seat.cpp.

◆ isDragPointer()

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

Definition at line 1187 of file seat.cpp.

◆ isDragTouch()

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

Definition at line 1192 of file seat.cpp.

◆ isPointerButtonPressed() [1/2]

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

Definition at line 677 of file seat.cpp.

◆ isPointerButtonPressed() [2/2]

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

Definition at line 682 of file seat.cpp.

◆ isTouchSequence()

bool KWin::SeatInterface::isTouchSequence ( ) const

Definition at line 1008 of file seat.cpp.

◆ keyboard()

KeyboardInterface * KWin::SeatInterface::keyboard ( ) const

Definition at line 963 of file seat.cpp.

◆ name()

QString KWin::SeatInterface::name ( ) const

Definition at line 404 of file seat.cpp.

◆ nameChanged

void KWin::SeatInterface::nameChanged ( const QString & )
signal

◆ notifyKeyboardKey()

void KWin::SeatInterface::notifyKeyboardKey ( quint32 keyCode,
KeyboardKeyState state )

Definition at line 968 of file seat.cpp.

◆ notifyKeyboardModifiers()

void KWin::SeatInterface::notifyKeyboardModifiers ( quint32 depressed,
quint32 latched,
quint32 locked,
quint32 group )

Definition at line 976 of file seat.cpp.

◆ notifyPointerAxis()

void KWin::SeatInterface::notifyPointerAxis ( Qt::Orientation orientation,
qreal delta,
qint32 deltaV120,
PointerAxisSource source,
PointerAxisRelativeDirection direction = PointerAxisRelativeDirection::Normal )

Sends axis events to the currently focused pointer surface.

Parameters
orientationThe scroll axis.
deltaThe length of a vector along the specified axis orientation.
deltaV120The high-resolution scrolling axis value.
sourceDescribes how the axis event was physically generated.

Definition at line 691 of file seat.cpp.

◆ notifyPointerButton() [1/2]

void KWin::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 703 of file seat.cpp.

◆ notifyPointerButton() [2/2]

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

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

Definition at line 712 of file seat.cpp.

◆ notifyPointerEnter() [1/2]

void KWin::SeatInterface::notifyPointerEnter ( SurfaceInterface * surface,
const QPointF & position,
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 565 of file seat.cpp.

◆ notifyPointerEnter() [2/2]

void KWin::SeatInterface::notifyPointerEnter ( SurfaceInterface * surface,
const QPointF & position,
const QPointF & surfacePosition = QPointF() )

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 555 of file seat.cpp.

◆ notifyPointerFrame()

void KWin::SeatInterface::notifyPointerFrame ( )

Definition at line 744 of file seat.cpp.

◆ notifyPointerLeave()

void KWin::SeatInterface::notifyPointerLeave ( )

Definition at line 604 of file seat.cpp.

◆ notifyPointerMotion()

void KWin::SeatInterface::notifyPointerMotion ( const QPointF & pos)

Updates the global pointer pos.

Sends a pointer motion event to the focused pointer surface.

Definition at line 442 of file seat.cpp.

◆ notifyTouchCancel()

void KWin::SeatInterface::notifyTouchCancel ( )

Definition at line 984 of file seat.cpp.

◆ notifyTouchDown()

void KWin::SeatInterface::notifyTouchDown ( qint32 id,
const QPointF & globalPosition )

Definition at line 1060 of file seat.cpp.

◆ notifyTouchFrame()

void KWin::SeatInterface::notifyTouchFrame ( )

Definition at line 1165 of file seat.cpp.

◆ notifyTouchMotion()

void KWin::SeatInterface::notifyTouchMotion ( qint32 id,
const QPointF & globalPosition )

Definition at line 1094 of file seat.cpp.

◆ notifyTouchUp()

void KWin::SeatInterface::notifyTouchUp ( qint32 id)

Definition at line 1133 of file seat.cpp.

◆ pointer()

PointerInterface * KWin::SeatInterface::pointer ( ) const

Definition at line 648 of file seat.cpp.

◆ pointerButtonSerial() [1/2]

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

Definition at line 752 of file seat.cpp.

◆ pointerButtonSerial() [2/2]

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

Definition at line 757 of file seat.cpp.

◆ pointerPos()

QPointF KWin::SeatInterface::pointerPos ( ) const
Returns
the global pointer position

Definition at line 437 of file seat.cpp.

◆ pointerPosChanged

void KWin::SeatInterface::pointerPosChanged ( const QPointF & pos)
signal

◆ primarySelection()

AbstractDataSource * KWin::SeatInterface::primarySelection ( ) const

Definition at line 1314 of file seat.cpp.

◆ primarySelectionChanged

void KWin::SeatInterface::primarySelectionChanged ( KWin::AbstractDataSource * )
signal

Emitted whenever the primary selection changes

See also
primarySelection

◆ relativePointerMotion()

void KWin::SeatInterface::relativePointerMotion ( const QPointF & delta,
const QPointF & deltaNonAccelerated,
std::chrono::microseconds timestamp )

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 766 of file seat.cpp.

◆ selection()

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

Definition at line 1278 of file seat.cpp.

◆ selectionChanged

void KWin::SeatInterface::selectionChanged ( KWin::AbstractDataSource * )
signal

Emitted whenever the selection changes

See also
selection
setSelection

◆ setDragTarget() [1/2]

void KWin::SeatInterface::setDragTarget ( AbstractDropHandler * dropTarget,
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 540 of file seat.cpp.

◆ setDragTarget() [2/2]

void KWin::SeatInterface::setDragTarget ( AbstractDropHandler * dropTarget,
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 498 of file seat.cpp.

◆ setFocusedKeyboardSurface()

void KWin::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 915 of file seat.cpp.

◆ setFocusedPointerSurfacePosition()

void KWin::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 focusedPointerSurfaceTransformation setFocusedPointerSurfaceTransformation

Definition at line 622 of file seat.cpp.

◆ setFocusedPointerSurfaceTransformation()

void KWin::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 636 of file seat.cpp.

◆ setFocusedTextInputSurface()

void KWin::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 1231 of file seat.cpp.

◆ setFocusedTouchSurface()

void KWin::SeatInterface::setFocusedTouchSurface ( SurfaceInterface * surface,
const QPointF & surfacePosition = QPointF() )

Definition at line 1023 of file seat.cpp.

◆ setFocusedTouchSurfacePosition()

void KWin::SeatInterface::setFocusedTouchSurfacePosition ( const QPointF & surfacePosition)

Definition at line 1053 of file seat.cpp.

◆ setHasKeyboard()

void KWin::SeatInterface::setHasKeyboard ( bool has)

Definition at line 342 of file seat.cpp.

◆ setHasPointer()

void KWin::SeatInterface::setHasPointer ( bool has)

Definition at line 357 of file seat.cpp.

◆ setHasTouch()

void KWin::SeatInterface::setHasTouch ( bool has)

Definition at line 372 of file seat.cpp.

◆ setName()

void KWin::SeatInterface::setName ( const QString & name)

Definition at line 387 of file seat.cpp.

◆ setPrimarySelection()

void KWin::SeatInterface::setPrimarySelection ( AbstractDataSource * selection)

Definition at line 1319 of file seat.cpp.

◆ setSelection()

void KWin::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 1283 of file seat.cpp.

◆ setTimestamp()

void KWin::SeatInterface::setTimestamp ( std::chrono::microseconds time)

Definition at line 488 of file seat.cpp.

◆ startDrag()

void KWin::SeatInterface::startDrag ( AbstractDataSource * source,
SurfaceInterface * sourceSurface,
int dragSerial = -1,
DragAndDropIcon * dragIcon = nullptr )

Definition at line 1348 of file seat.cpp.

◆ startPointerHoldGesture()

void KWin::SeatInterface::startPointerHoldGesture ( quint32 fingerCount)

Starts a multi-finger hold 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 being held down on the touchpad. The precise conditions of when such a gesture is detected are implementation-dependent.

Only one gesture (either swipe or pinch or hold) can be active at a given time.

Parameters
fingerCountThe number of fingers involved in this multi-finger touchpad gesture
See also
PointerGesturesInterface
focusedPointerSurface
endPointerHoldeGesture
cancelPointerHoldGesture

Definition at line 874 of file seat.cpp.

◆ startPointerPinchGesture()

void KWin::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 or hold) 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 826 of file seat.cpp.

◆ startPointerSwipeGesture()

void KWin::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 or hold) 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 778 of file seat.cpp.

◆ textInputV1()

TextInputV1Interface * KWin::SeatInterface::textInputV1 ( ) const

Definition at line 1264 of file seat.cpp.

◆ textInputV2()

TextInputV2Interface * KWin::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 1269 of file seat.cpp.

◆ textInputV3()

TextInputV3Interface * KWin::SeatInterface::textInputV3 ( ) const

Definition at line 1274 of file seat.cpp.

◆ timestamp()

std::chrono::milliseconds KWin::SeatInterface::timestamp ( ) const

Definition at line 483 of file seat.cpp.

◆ timestampChanged

void KWin::SeatInterface::timestampChanged ( )
signal

◆ touch()

TouchInterface * KWin::SeatInterface::touch ( ) const

Definition at line 1013 of file seat.cpp.

◆ touchMoved

void KWin::SeatInterface::touchMoved ( qint32 id,
quint32 serial,
const QPointF & globalPosition )
signal

◆ updatePointerPinchGesture()

void KWin::SeatInterface::updatePointerPinchGesture ( const QPointF & 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 838 of file seat.cpp.

◆ updatePointerSwipeGesture()

void KWin::SeatInterface::updatePointerSwipeGesture ( const QPointF & 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 790 of file seat.cpp.

◆ xdgTopleveldrag()

XdgToplevelDragV1Interface * KWin::SeatInterface::xdgTopleveldrag ( ) const
Returns
the toplevel drag if the current drag is a toplevel drag

Definition at line 1223 of file seat.cpp.

Friends And Related Symbol Documentation

◆ SeatInterfacePrivate

friend class SeatInterfacePrivate
friend

Definition at line 718 of file seat.h.


The documentation for this class was generated from the following files: