7#ifndef XSYNCBASEDPOLLER_H
8#define XSYNCBASEDPOLLER_H
10#include "kabstractidletimepoller_p.h"
13#include <config-kidletime.h>
16#include <X11/extensions/sync.h>
21class XSyncBasedPoller :
public KAbstractIdleTimePoller
24 Q_PLUGIN_METADATA(IID KAbstractIdleTimePoller_iid FILE
"xcb.json")
25 Q_INTERFACES(KAbstractIdleTimePoller)
28 static XSyncBasedPoller *instance();
30 explicit XSyncBasedPoller(
QObject *parent =
nullptr);
31 ~XSyncBasedPoller()
override;
33 bool isAvailable()
override;
34 bool setUpPoller()
override;
35 void unloadPoller()
override;
37 bool xcbEvent(xcb_generic_event_t *event);
42 void addTimeout(
int nextTimeout)
override;
43 void removeTimeout(
int nextTimeout)
override;
45 int forcePollRequest()
override;
46 void catchIdleEvent()
override;
47 void stopCatchingIdleEvents()
override;
48 void simulateUserActivity()
override;
55 void setAlarm(Display *dpy, XSyncAlarm *alarm, XSyncCounter counter, XSyncTestType test, XSyncValue value);
59 xcb_connection_t *m_xcb_connection;
62 XSyncCounter m_idleCounter;
64 XSyncAlarm m_resetAlarm;
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:10:09 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.