Louvre
v2.13.0-1
C++ library for Wayland compositors
|
Idle state listener. More...
Public Member Functions | |
void | resetTimer () const noexcept |
Resets the internal timer. More... | |
UInt32 | timeout () const noexcept |
The timeout in milliseconds. More... | |
LClient * | client () const noexcept |
Client owner of the listener. More... | |
const Protocols::IdleNotify::RIdleNotification & | resource () const noexcept |
Associated Wayland resource. More... | |
Public Member Functions inherited from LObject | |
LObject (const LObject &) noexcept | |
Copy constructor. More... | |
LObject & | operator= (const LObject &) noexcept |
Assignment operator (each object has its own individual LWeak reference count). More... | |
void | setUserData (UIntPtr data) const noexcept |
Store an unsigned integer value/pointer. More... | |
UIntPtr | userData () const noexcept |
Retrieves the stored unsigned integer value/pointer. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from LObject | |
LObject () noexcept=default | |
Constructor of the LObject class. More... | |
virtual | ~LObject () noexcept |
Destructor of the LObject class. More... | |
void | notifyDestruction () noexcept |
Notifies the object destruction. More... | |
Idle state listener.
Clients using the Idle Notify protocol create an instance of this class to be notified when the user has been idle for a set amount of time. For example, swayidle uses this information to trigger screen lockers, screen savers, etc.
Each listener has its own timer with a fixed timeout() in milliseconds, defined by the client(). The timer should be reset with resetTimer() whenever a user event occurs (see LSeat::onEvent()).
If there is no user activity and the timeout() is reached, LSeat::onIdleListenerTimeout() is triggered.
Clients using the Idle Inhibit protocol can request to prevent the idle state if one of their surfaces is mapped and visible.
These surfaces can be accessed from LSeat::idleInhibitorSurfaces().
The auxiliary virtual method LSeat::isIdleStateInhibited() is used by the default implementation of LSeat::onIdleListenerTimeout() to check if the timer should be reset.
|
noexcept |
Resets the internal timer.
This method should be called each time an event indicating user activity occurs (see LSeat::onEvent()). When the timeout() is reached, LSeat::onIdleListenerTimeout() is triggered.
|
noexcept |
The timeout in milliseconds.
|
noexcept |
Client owner of the listener.
|
inlinenoexcept |
Associated Wayland resource.