qabstracteventdispatcher.sip 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // qabstracteventdispatcher.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtCore Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  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. // Qt v6.8 introduced QAbstractEventDispatcherV2 as a temporary class intended to
  22. // aid porting to Qt7 (where all timers will be based on std::chrono). We choose
  23. // not to implement them as PyQt is likely to use Python ints anyway.
  24. class QAbstractEventDispatcher : public QObject /Abstract/
  25. {
  26. %TypeHeaderCode
  27. #include <qabstracteventdispatcher.h>
  28. %End
  29. public:
  30. struct TimerInfo
  31. {
  32. %TypeHeaderCode
  33. #include <qabstracteventdispatcher.h>
  34. %End
  35. int timerId;
  36. int interval;
  37. Qt::TimerType timerType;
  38. TimerInfo(int id, int i, Qt::TimerType t);
  39. };
  40. explicit QAbstractEventDispatcher(QObject *parent /TransferThis/ = 0);
  41. virtual ~QAbstractEventDispatcher();
  42. static QAbstractEventDispatcher *instance(QThread *thread = 0);
  43. virtual bool processEvents(QEventLoop::ProcessEventsFlags flags) = 0 /ReleaseGIL/;
  44. int registerTimer(qint64 interval, Qt::TimerType timerType, QObject *object);
  45. virtual void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType, QObject *object) = 0;
  46. virtual bool unregisterTimer(int timerId) = 0;
  47. virtual bool unregisterTimers(QObject *object) = 0;
  48. virtual QList<QAbstractEventDispatcher::TimerInfo> registeredTimers(QObject *object) const = 0;
  49. virtual void wakeUp() = 0;
  50. virtual void interrupt() = 0;
  51. virtual void startingUp();
  52. virtual void closingDown();
  53. virtual int remainingTime(int timerId) = 0;
  54. void installNativeEventFilter(QAbstractNativeEventFilter *filterObj);
  55. void removeNativeEventFilter(QAbstractNativeEventFilter *filterObj);
  56. bool filterNativeEvent(const QByteArray &eventType, void *message, qintptr *result /Out/);
  57. signals:
  58. void aboutToBlock();
  59. void awake();
  60. };