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

#include <pointerconstraints_v1.h>

Inheritance diagram for KWin::ConfinedPointerV1Interface:

Public Types

enum class  LifeTime : uint { OneShot = 1 , Persistent = 2 }
 

Signals

void regionChanged ()
 
void confinedChanged ()
 

Public Member Functions

 ~ConfinedPointerV1Interface () override
 
LifeTime lifeTime () const
 
QRegion region () const
 
bool isConfined () const
 
void setConfined (bool confined)
 

Friends

class ConfinedPointerV1InterfacePrivate
 
class PointerConstraintsV1InterfacePrivate
 

Detailed Description

The ConfinedPointerV1Interface gets installed on a SurfaceInterface. The confinement indicates that the SurfaceInterface wants to confine the pointer to a region of the SurfaceInterface.

It is up to the compositor whether the confinement gets activated. To activate it needs to use ConfinedPointerV1Interface::setConfined. The compositor needs to ensure that the SurfaceInterface has pointer focus and that the pointer is inside the ConfinedPointerV1Interface::region when it activates the confinement.

From client side the confinement gets deactivated by destroying the ConfinedPointerV1Interface. From compositor side the confinement can be deactivated by setting ConfinedPointerV1Interface::setConfined to false.

Definition at line 176 of file pointerconstraints_v1.h.

Member Enumeration Documentation

◆ LifeTime

Enumerator
OneShot 
Persistent 

Definition at line 183 of file pointerconstraints_v1.h.

Constructor & Destructor Documentation

◆ ~ConfinedPointerV1Interface()

KWin::ConfinedPointerV1Interface::~ConfinedPointerV1Interface ( )
override

Definition at line 314 of file pointerconstraints_v1.cpp.

Member Function Documentation

◆ confinedChanged

void KWin::ConfinedPointerV1Interface::confinedChanged ( )
signal

Emitted whenever the isConfined state changes.

See also
isConfined
setConfined

◆ isConfined()

bool KWin::ConfinedPointerV1Interface::isConfined ( ) const

Whether the Compositor set this pointer confinement to be active.

See also
setConfined
confinedChanged

Definition at line 328 of file pointerconstraints_v1.cpp.

◆ lifeTime()

ConfinedPointerV1Interface::LifeTime KWin::ConfinedPointerV1Interface::lifeTime ( ) const

Definition at line 318 of file pointerconstraints_v1.cpp.

◆ region()

QRegion KWin::ConfinedPointerV1Interface::region ( ) const

The intersection of this region and the input region of the SurfaceInterface is used to determine where the pointer must be in order for the confinement to activate. It is up to the compositor whether to warp the pointer or require some kind of user interaction for the confinement to activate.

If the region is empty the SurfaceInterface input region is used.

See also
regionChanged
SurfaceInterface::input

Definition at line 323 of file pointerconstraints_v1.cpp.

◆ regionChanged

void KWin::ConfinedPointerV1Interface::regionChanged ( )
signal

Emitted whenever the region changes. This happens when the parent SurfaceInterface gets committed

See also
region

◆ setConfined()

void KWin::ConfinedPointerV1Interface::setConfined ( bool confined)

Activates or deactivates the confinement.

A pointer confinement can only be activated if the SurfaceInterface this ConfinedPointerV1Interface was created for has pointer focus and the pointer is inside the region.

Parameters
confinedWhether the confinement should be active
See also
isConfined
confinedChanged

Definition at line 333 of file pointerconstraints_v1.cpp.

Friends And Related Symbol Documentation

◆ ConfinedPointerV1InterfacePrivate

friend class ConfinedPointerV1InterfacePrivate
friend

Definition at line 241 of file pointerconstraints_v1.h.

◆ PointerConstraintsV1InterfacePrivate

Definition at line 242 of file pointerconstraints_v1.h.


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