1// qabstracteventdispatcher.sip generated by MetaSIP
2//
3// This file is part of the QtCore Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QAbstractEventDispatcher : QObject
24{
25%TypeHeaderCode
26#include <qabstracteventdispatcher.h>
27%End
28
29public:
30    struct TimerInfo
31    {
32%TypeHeaderCode
33#include <qabstracteventdispatcher.h>
34%End
35
36        int timerId;
37        int interval;
38        Qt::TimerType timerType;
39        TimerInfo(int id, int i, Qt::TimerType t);
40    };
41
42    explicit QAbstractEventDispatcher(QObject *parent /TransferThis/ = 0);
43    virtual ~QAbstractEventDispatcher();
44    static QAbstractEventDispatcher *instance(QThread *thread = 0);
45    virtual bool processEvents(QEventLoop::ProcessEventsFlags flags) = 0 /ReleaseGIL/;
46    virtual bool hasPendingEvents() = 0;
47    virtual void registerSocketNotifier(QSocketNotifier *notifier) = 0;
48    virtual void unregisterSocketNotifier(QSocketNotifier *notifier) = 0;
49    int registerTimer(int interval, Qt::TimerType timerType /Constrained/, QObject *object);
50    virtual void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) = 0;
51    virtual bool unregisterTimer(int timerId) = 0;
52    virtual bool unregisterTimers(QObject *object) = 0;
53    virtual QList<QAbstractEventDispatcher::TimerInfo> registeredTimers(QObject *object) const = 0;
54    virtual void wakeUp() = 0;
55    virtual void interrupt() = 0;
56    virtual void flush() = 0;
57    virtual void startingUp();
58    virtual void closingDown();
59    virtual int remainingTime(int timerId) = 0;
60    void installNativeEventFilter(QAbstractNativeEventFilter *filterObj);
61    void removeNativeEventFilter(QAbstractNativeEventFilter *filterObj);
62%If (WS_WIN)
63    virtual bool registerEventNotifier(QWinEventNotifier *notifier) = 0;
64%End
65%If (WS_WIN)
66    virtual void unregisterEventNotifier(QWinEventNotifier *notifier) = 0;
67%End
68    bool filterNativeEvent(const QByteArray &eventType, void *message, long *result);
69
70signals:
71    void aboutToBlock();
72    void awake();
73};
74