Changeset View
Changeset View
Standalone View
Standalone View
src/server/idleinhibit_interface.h
- This file was added.
1 | /**************************************************************************** | ||||
---|---|---|---|---|---|
2 | Copyright 2017 Martin Flöser <mgraesslin@kde.org> | ||||
3 | | ||||
4 | This library is free software; you can redistribute it and/or | ||||
5 | modify it under the terms of the GNU Lesser General Public | ||||
6 | License as published by the Free Software Foundation; either | ||||
7 | version 2.1 of the License, or (at your option) version 3, or any | ||||
8 | later version accepted by the membership of KDE e.V. (or its | ||||
9 | successor approved by the membership of KDE e.V.), which shall | ||||
10 | act as a proxy defined in Section 6 of version 3 of the license. | ||||
11 | | ||||
12 | This library is distributed in the hope that it will be useful, | ||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
15 | Lesser General Public License for more details. | ||||
16 | | ||||
17 | You should have received a copy of the GNU Lesser General Public | ||||
18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | ****************************************************************************/ | ||||
20 | #ifndef KWAYLAND_SERVER_IDLEINHIBIT_H | ||||
21 | #define KWAYLAND_SERVER_IDLEINHIBIT_H | ||||
22 | | ||||
23 | #include "global.h" | ||||
24 | #include "resource.h" | ||||
25 | | ||||
26 | #include <KWayland/Server/kwaylandserver_export.h> | ||||
27 | | ||||
28 | namespace KWayland | ||||
29 | { | ||||
30 | namespace Server | ||||
31 | { | ||||
32 | | ||||
33 | class Display; | ||||
34 | | ||||
35 | /** | ||||
36 | * Enum describing the interface versions the IdleInhibitManagerInterface can support. | ||||
37 | * | ||||
38 | * @since 5.41 | ||||
39 | **/ | ||||
40 | enum class IdleInhibitManagerInterfaceVersion { | ||||
41 | /** | ||||
42 | * zwp_idle_inhibit_manager_v1 | ||||
43 | **/ | ||||
44 | UnstableV1 | ||||
45 | }; | ||||
46 | | ||||
47 | /** | ||||
48 | * The IdleInhibitorManagerInterface is used by clients to inhibit idle on a | ||||
49 | * SurfaceInterface. Whether a SurfaceInterface inhibits idle is exposes through | ||||
50 | * @link{SurfaceInterface::inhibitsIdle}. | ||||
51 | * | ||||
52 | * @since 5.41 | ||||
53 | **/ | ||||
54 | class KWAYLANDSERVER_EXPORT IdleInhibitManagerInterface : public Global | ||||
55 | { | ||||
56 | Q_OBJECT | ||||
57 | public: | ||||
58 | virtual ~IdleInhibitManagerInterface(); | ||||
59 | | ||||
60 | /** | ||||
61 | * @returns The interface version used by this IdleInhibitManagerInterface | ||||
62 | **/ | ||||
63 | IdleInhibitManagerInterfaceVersion interfaceVersion() const; | ||||
64 | | ||||
65 | protected: | ||||
66 | class Private; | ||||
67 | explicit IdleInhibitManagerInterface(Private *d, QObject *parent = nullptr); | ||||
68 | | ||||
69 | private: | ||||
70 | Private *d_func() const; | ||||
71 | }; | ||||
72 | | ||||
73 | | ||||
74 | } | ||||
75 | } | ||||
76 | | ||||
77 | #endif |