Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorWayland::IdleNotifier Class Reference

#include <phosphor-wayland/include/PhosphorWayland/IdleNotifier.h>

Inheritance diagram for PhosphorWayland::IdleNotifier:
[legend]

Signals

void timeoutChanged ()
 
void idleChanged ()
 
void idled ()
 
void resumed ()
 

Public Member Functions

 IdleNotifier (QObject *parent=nullptr)
 
 ~IdleNotifier () override
 
void setTimeout (std::chrono::milliseconds timeout)
 
std::chrono::milliseconds timeout () const
 
bool isIdle () const
 
bool isArmed () const
 Whether an ext-idle-notification object is actually ARMED right now.
 

Static Public Member Functions

static bool isSupported ()
 

Constructor & Destructor Documentation

◆ IdleNotifier()

PhosphorWayland::IdleNotifier::IdleNotifier ( QObject *  parent = nullptr)
explicit

◆ ~IdleNotifier()

PhosphorWayland::IdleNotifier::~IdleNotifier ( )
override

Member Function Documentation

◆ idleChanged

void PhosphorWayland::IdleNotifier::idleChanged ( )
signal

◆ idled

void PhosphorWayland::IdleNotifier::idled ( )
signal

◆ isArmed()

bool PhosphorWayland::IdleNotifier::isArmed ( ) const

Whether an ext-idle-notification object is actually ARMED right now.

Distinct from isSupported(), and the difference is the whole point: the compositor can advertise the protocol while arming still fails, because arming needs a seat and the seat's input devices may not have been advertised yet (a daemon that starts before the compositor finishes bringing the seat up). Arming then silently does nothing, isSupported() keeps saying true, and idle detection is dead for the session with one warning to show for it. A caller that wants to retry has to be able to ask.

◆ isIdle()

bool PhosphorWayland::IdleNotifier::isIdle ( ) const

◆ isSupported()

static bool PhosphorWayland::IdleNotifier::isSupported ( )
static

◆ resumed

void PhosphorWayland::IdleNotifier::resumed ( )
signal

◆ setTimeout()

void PhosphorWayland::IdleNotifier::setTimeout ( std::chrono::milliseconds  timeout)

◆ timeout()

std::chrono::milliseconds PhosphorWayland::IdleNotifier::timeout ( ) const

◆ timeoutChanged

void PhosphorWayland::IdleNotifier::timeoutChanged ( )
signal

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