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

Prevents the compositor from idling the output that the associated surface is visible on. More...

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

Inheritance diagram for PhosphorWayland::IdleInhibitor:
[legend]

Signals

void surfaceChanged ()
 
void activeChanged ()
 

Public Member Functions

 IdleInhibitor (QObject *parent=nullptr)
 
 ~IdleInhibitor () override
 
QWindow * surface () const
 
void setSurface (QWindow *window)
 
bool isActive () const
 

Static Public Member Functions

static bool isSupported ()
 

Detailed Description

Prevents the compositor from idling the output that the associated surface is visible on.

The inhibitor is active for as long as this object lives and the surface remains visible. Destroying the object (or the surface) lifts the inhibition.

Usage from QML (inside a window):

IdleInhibitor { surface: Window.window }

Until surface is set the inhibitor stays inactive (active is false); nothing happens and no inhibitor object is created.

Constructor & Destructor Documentation

◆ IdleInhibitor()

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

◆ ~IdleInhibitor()

PhosphorWayland::IdleInhibitor::~IdleInhibitor ( )
override

Member Function Documentation

◆ activeChanged

void PhosphorWayland::IdleInhibitor::activeChanged ( )
signal

◆ isActive()

bool PhosphorWayland::IdleInhibitor::isActive ( ) const

◆ isSupported()

static bool PhosphorWayland::IdleInhibitor::isSupported ( )
static

◆ setSurface()

void PhosphorWayland::IdleInhibitor::setSurface ( QWindow *  window)

◆ surface()

QWindow * PhosphorWayland::IdleInhibitor::surface ( ) const

◆ surfaceChanged

void PhosphorWayland::IdleInhibitor::surfaceChanged ( )
signal

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