KWin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KWin::DpmsManagerInterface Class Reference

Global for server side Display Power Management Signaling interface. More...

#include <dpms.h>

Inheritance diagram for KWin::DpmsManagerInterface:

Public Member Functions

 DpmsManagerInterface (Display *display, QObject *parent=nullptr)
 
 ~DpmsManagerInterface () override
 

Detailed Description

Global for server side Display Power Management Signaling interface.

A DpmsManagerInterface allows a client to query the DPMS state on a given OutputInterface and request changes to it. Server-side the interaction happens only via the OutputInterface, for clients the Dpms class provides the API. This global implements org_kde_kwin_dpms_manager.

To create a DpmsManagerInterface use:

auto manager = display->createDpmsManager();
manager->create();

To interact with Dpms use one needs to mark it as enabled and set the proper mode on the OutputInterface.

// We have our OutputInterface called output.
output->setDpmsSupported(true);
output->setDpmsMode(Output::DpmsMode::On);

To connect to Dpms change requests use:

connect(output, &Output::DpmsModeRequested,
[] (Output::DpmsMode requestedMode) { qDebug() << "Mode change requested"; });
See also
Display
OutputInterface

Definition at line 51 of file dpms.h.

Constructor & Destructor Documentation

◆ DpmsManagerInterface()

KWin::DpmsManagerInterface::DpmsManagerInterface ( Display * display,
QObject * parent = nullptr )
explicit

Definition at line 64 of file dpms.cpp.

◆ ~DpmsManagerInterface()

KWin::DpmsManagerInterface::~DpmsManagerInterface ( )
overridedefault

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