1/* This file is part of the KDE libraries
2 * SPDX-FileCopyrightText: 2009 Dario Freddi <drf at kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7#ifndef XSCREENSAVERBASEDPOLLER_H
8#define XSCREENSAVERBASEDPOLLER_H
9
10#include "kwindowbasedidletimepoller_p.h"
11
12#include "screensaver_interface.h"
13
14class XScreensaverBasedPoller : public KWindowBasedIdleTimePoller
15{
16 Q_OBJECT
17 Q_PLUGIN_METADATA(IID KAbstractIdleTimePoller_iid FILE "xcb.json")
18 Q_INTERFACES(KAbstractIdleTimePoller)
19
20public:
21 explicit XScreensaverBasedPoller(QObject *parent = nullptr);
22 ~XScreensaverBasedPoller() override;
23
24public Q_SLOTS:
25 void simulateUserActivity() override;
26
27private:
28 bool additionalSetUp() override;
29
30private Q_SLOTS:
31 void screensaverActivated(bool activated);
32 int getIdleTime() override;
33
34private:
35 OrgFreedesktopScreenSaverInterface *m_screenSaverIface;
36};
37
38#endif /* XSCREENSAVERBASEDPOLLER_H_ */
39

source code of kidletime/src/plugins/xscreensaver/xscreensaverbasedpoller.h