KWaylandServer

dpms_interface.h
1 /*
2  SPDX-FileCopyrightText: 2015 Martin Gräßlin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #pragma once
7 
8 #include <QObject>
9 
10 #include <KWaylandServer/kwaylandserver_export.h>
11 
12 namespace KWaylandServer
13 {
14 class Display;
15 class DpmsManagerInterfacePrivate;
16 
17 /**
18  * @brief Global for server side Display Power Management Signaling interface.
19  *
20  * A DpmsManagerInterface allows a client to query the DPMS state
21  * on a given OutputInterface and request changes to it.
22  * Server-side the interaction happens only via the OutputInterface,
23  * for clients the Dpms class provides the API.
24  * This global implements org_kde_kwin_dpms_manager.
25  *
26  * To create a DpmsManagerInterface use:
27  * @code
28  * auto manager = display->createDpmsManager();
29  * manager->create();
30  * @endcode
31  *
32  * To interact with Dpms use one needs to mark it as enabled and set the
33  * proper mode on the OutputInterface.
34  * @code
35  * // We have our OutputInterface called output.
36  * output->setDpmsSupported(true);
37  * output->setDpmsMode(OutputInterface::DpmsMode::On);
38  * @endcode
39  *
40  * To connect to Dpms change requests use:
41  * @code
42  * connect(output, &OutputInterface::dpmsModeRequested,
43  * [] (KWaylandServer::OutputInterface::DpmsMode requestedMode) { qDebug() << "Mode change requested"; });
44  * @endcode
45  *
46  * @see Display
47  * @see OutputInterface
48  */
49 class KWAYLANDSERVER_EXPORT DpmsManagerInterface : public QObject
50 {
51  Q_OBJECT
52 
53 public:
54  explicit DpmsManagerInterface(Display *display, QObject *parent = nullptr);
55  ~DpmsManagerInterface() override;
56 
57 private:
59 };
60 
61 }
Global for server side Display Power Management Signaling interface.
Class holding the Wayland server display loop.
Definition: display.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 23:10:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.