6#include <PhosphorServiceIdle/phosphorserviceidle_export.h>
10#include <QLatin1String>
11#include <QVariantList>
25inline constexpr QLatin1String
Name(
"name");
26inline constexpr QLatin1String
TimeoutMs(
"timeoutMs");
53 Q_PROPERTY(
bool supported READ
isSupported CONSTANT)
75 [[nodiscard]] QVariantList
stages()
const;
133 std::unique_ptr<Private> d;
QVariantList stages() const
The idle ladder, as a list of { name: string, timeoutMs: int } maps, sorted by ascending timeout.
bool isSupported() const
Whether the compositor advertises the idle-notification protocol this service builds on.
int inhibit()
Acquire an idle inhibition.
bool release(int cookie)
Release a previously acquired inhibition.
void currentStageChanged()
bool isArmed() const
Did the current ladder actually ARM?
void setStages(const QVariantList &stages)
Reconfiguring the ladder to a DIFFERENT one resets the session to active.
QString currentStageName() const
Name of the current stage, or an empty string when active.
void resumed()
Returned to active from any idle stage.
int currentStage() const
0 when active; otherwise the 1-based index of the deepest stage currently reached.
void idled(int stage)
Entered idle stage stage (1-based).
IdleService(QObject *parent=nullptr)
Field names of one entry in the idle ladder passed to IdleService::setStages.
Definition IdleService.h:24
constexpr QLatin1String Name("name")
constexpr QLatin1String TimeoutMs("timeoutMs")
Definition IdleService.h:15