1 /* 2 SPDX-FileCopyrightText: 2009 Nokia Corporation and /or its subsidiary(-ies). 3 Contact: Qt Software Information (qt-info@nokia.com) 4 5 This file is part of the QtCore module of the Qt Toolkit. 6 7 $QT_BEGIN_LICENSE:LGPL$ 8 Commercial Usage 9 Licensees holding valid Qt Commercial licenses may use this file in 10 accordance with the Qt Commercial License Agreement provided with the 11 Software or, alternatively, in accordance with the terms contained in 12 a written agreement between you and Nokia. 13 14 GNU Lesser General Public License Usage 15 Alternatively, this file may be used under the terms of the GNU Lesser 16 General Public License version 2.1 as published by the Free Software 17 Foundation and appearing in the file LICENSE.LGPL included in the 18 packaging of this file. Please review the following information to 19 ensure the GNU Lesser General Public License version 2.1 requirements 20 will be met: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 21 22 In addition, as a special exception, Nokia gives you certain 23 additional rights. These rights are described in the Nokia Qt LGPL 24 Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 25 package. 26 27 GNU General Public License Usage 28 Alternatively, this file may be used under the terms of the GNU 29 General Public License version 3.0 as published by the Free Software 30 Foundation and appearing in the file LICENSE.GPL included in the 31 packaging of this file. Please review the following information to 32 ensure the GNU General Public License version 3.0 requirements will be 33 met: https://www.gnu.org/licenses/gpl-3.0.html. 34 35 If you are unsure which license is appropriate for your use, please 36 contact the sales department at qt-sales@nokia.com. 37 $QT_END_LICENSE$ 38 39 */ 40 41 #ifndef QEVENTDISPATCHER_WIN_P_H 42 #define QEVENTDISPATCHER_WIN_P_H 43 44 // 45 // W A R N I N G 46 // ------------- 47 // 48 // This file is not part of the Qt API. It exists purely as an 49 // implementation detail. This header file may change from version to 50 // version without notice, or even be removed. 51 // 52 // We mean it. 53 // 54 55 #include "QtCore/qabstracteventdispatcher.h" 56 #include "QtCore/qt_windows.h" 57 58 #include "k3b_export.h" 59 60 QT_BEGIN_NAMESPACE 61 62 class QWinEventNotifier; 63 class QEventDispatcherWin32Private; 64 65 // forward declaration 66 LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp); 67 68 class LIBK3B_EXPORT QEventDispatcherWin32 : public QAbstractEventDispatcher 69 { 70 Q_OBJECT 71 Q_DECLARE_PRIVATE(QEventDispatcherWin32) 72 73 void createInternalHwnd(); 74 friend class QGuiEventDispatcherWin32; 75 76 public: 77 explicit QEventDispatcherWin32(QObject *parent = 0); 78 ~QEventDispatcherWin32(); 79 80 bool processEvents(QEventLoop::ProcessEventsFlags flags); 81 bool hasPendingEvents(); 82 83 void registerSocketNotifier(QSocketNotifier *notifier); 84 void unregisterSocketNotifier(QSocketNotifier *notifier); 85 86 void registerTimer(int timerId, int interval, QObject *object); 87 bool unregisterTimer(int timerId); 88 bool unregisterTimers(QObject *object); 89 QList<TimerInfo> registeredTimers(QObject *object) const; 90 91 bool registerEventNotifier(QWinEventNotifier *notifier); 92 void unregisterEventNotifier(QWinEventNotifier *notifier); 93 void activateEventNotifiers(); 94 95 void wakeUp(); 96 void interrupt(); 97 void flush(); 98 99 void startingUp(); 100 void closingDown(); 101 102 bool event(QEvent *e); 103 104 private: 105 friend LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp); 106 }; 107 108 QT_END_NAMESPACE 109 110 #endif // QEVENTDISPATCHER_WIN_P_H 111