3 * Copyright 2022 Tomasz Mon <desowin@gmail.com>
5 * SPDX-License-Identifier: GPL-2.0-or-later
8 #ifndef GLIB_MAINLOOP_ON_QEVENTLOOP_H
9 #define GLIB_MAINLOOP_ON_QEVENTLOOP_H
13 #include <QWaitCondition>
15 class GLibPoller
: public QThread
20 explicit GLibPoller(GMainContext
*context
);
26 QWaitCondition dispatched_
;
30 int allocated_fds_
, nfds_
;
35 friend class GLibMainloopOnQEventLoop
;
38 class GLibMainloopOnQEventLoop
: public QObject
43 explicit GLibMainloopOnQEventLoop(QObject
*parent
);
44 ~GLibMainloopOnQEventLoop();
47 void checkAndDispatch();
50 static void setup(QObject
*parent
);
56 #endif /* GLIB_MAINLOOP_ON_QEVENTLOOP_H */