KWayland

idle.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_IDLE_H
7 #define KWAYLAND_IDLE_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Client/kwaylandclient_export.h>
12 
13 struct org_kde_kwin_idle;
14 struct org_kde_kwin_idle_timeout;
15 
16 namespace KWayland
17 {
18 namespace Client
19 {
20 
21 class EventQueue;
22 class IdleTimeout;
23 class Seat;
24 
53 class KWAYLANDCLIENT_EXPORT Idle : public QObject
54 {
55  Q_OBJECT
56 public:
63  explicit Idle(QObject *parent = nullptr);
64  virtual ~Idle();
65 
69  bool isValid() const;
75  void setup(org_kde_kwin_idle *manager);
81  void release();
96  void destroy();
97 
101  void setEventQueue(EventQueue *queue);
105  EventQueue *eventQueue();
106 
119  IdleTimeout *getTimeout(quint32 msecs, Seat *seat, QObject *parent = nullptr);
120 
121  operator org_kde_kwin_idle*();
122  operator org_kde_kwin_idle*() const;
123 
124 Q_SIGNALS:
133  void removed();
134 
135 private:
136  class Private;
138 };
139 
148 class KWAYLANDCLIENT_EXPORT IdleTimeout : public QObject
149 {
150  Q_OBJECT
151 public:
156  explicit IdleTimeout(QObject *parent = nullptr);
157  virtual ~IdleTimeout();
158 
164  void setup(org_kde_kwin_idle_timeout *timeout);
170  void release();
187  void destroy();
191  bool isValid() const;
192 
193  operator org_kde_kwin_idle_timeout*();
194  operator org_kde_kwin_idle_timeout*() const;
195 
201  void simulateUserActivity();
202 
203 Q_SIGNALS:
210  void idle();
215  void resumeFromIdle();
216 
217 private:
218  class Private;
220 };
221 
222 }
223 }
224 
225 #endif
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the wl_seat interface.
Definition: seat.h:52
Wrapper for the org_kde_kwin_idle_timeout interface.
Definition: idle.h:148
Wrapper for the org_kde_kwin_idle interface.
Definition: idle.h:53
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 22:50:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.