KWayland

idle_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 #ifndef KWAYLAND_SERVER_IDLE_INTERFACE_H
7 #define KWAYLAND_SERVER_IDLE_INTERFACE_H
8 
9 #include <KWayland/Server/kwaylandserver_export.h>
10 #include "global.h"
11 #include "resource.h"
12 
13 namespace KWayland
14 {
15 namespace Server
16 {
17 
18 class Display;
19 class SeatInterface;
20 
41 class KWAYLANDSERVER_EXPORT IdleInterface : public Global
42 {
43  Q_OBJECT
44 public:
45  virtual ~IdleInterface();
46 
61  void inhibit();
62 
72  void uninhibit();
73 
81  bool isInhibited() const;
82 
90  void simulateUserActivity();
91 
92 Q_SIGNALS:
100  void inhibitedChanged();
101 
102 private:
103  explicit IdleInterface(Display *display, QObject *parent = nullptr);
104  friend class Display;
105  class Private;
106  Private *d_func() const;
107 };
108 
109 // TODO: KF6 make private class
110 class KWAYLANDSERVER_EXPORT IdleTimeoutInterface : public Resource
111 {
112  Q_OBJECT
113 public:
114  virtual ~IdleTimeoutInterface();
115 
116 private:
117  explicit IdleTimeoutInterface(SeatInterface *seat, IdleInterface *parent, wl_resource *parentResource);
118  friend class IdleInterface;
119  class Private;
120  Private *d_func() const;
121 };
122 
123 }
124 }
125 
126 #endif
Represents a Seat on the Wayland Display.
Class holding the Wayland server display loop.
Definition: display.h:89
Base class for all Globals.
Definition: global.h:46
Global representing the org_kde_kwin_idle interface.
Represents a bound Resource.
Definition: resource.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jul 9 2020 22:49:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.