| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QEVENTDISPATCHER_GLIB_QPA_P_H |
| 5 | #define QEVENTDISPATCHER_GLIB_QPA_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtCore/private/qeventdispatcher_glib_p.h> |
| 19 | #include <QtGui/qtguiglobal.h> |
| 20 | |
| 21 | typedef struct _GMainContext GMainContext; |
| 22 | |
| 23 | QT_BEGIN_NAMESPACE |
| 24 | class QPAEventDispatcherGlibPrivate; |
| 25 | |
| 26 | class Q_GUI_EXPORT QPAEventDispatcherGlib : public QEventDispatcherGlib |
| 27 | { |
| 28 | Q_OBJECT |
| 29 | Q_DECLARE_PRIVATE(QPAEventDispatcherGlib) |
| 30 | |
| 31 | public: |
| 32 | explicit QPAEventDispatcherGlib(QObject *parent = nullptr); |
| 33 | ~QPAEventDispatcherGlib(); |
| 34 | |
| 35 | bool processEvents(QEventLoop::ProcessEventsFlags flags) override; |
| 36 | QEventLoop::ProcessEventsFlags m_flags; |
| 37 | }; |
| 38 | |
| 39 | struct GUserEventSource; |
| 40 | |
| 41 | class QPAEventDispatcherGlibPrivate : public QEventDispatcherGlibPrivate |
| 42 | { |
| 43 | Q_DECLARE_PUBLIC(QPAEventDispatcherGlib) |
| 44 | public: |
| 45 | QPAEventDispatcherGlibPrivate(GMainContext *context = nullptr); |
| 46 | ~QPAEventDispatcherGlibPrivate() override; |
| 47 | |
| 48 | GUserEventSource *userEventSource; |
| 49 | }; |
| 50 | |
| 51 | |
| 52 | QT_END_NAMESPACE |
| 53 | |
| 54 | #endif // QEVENTDISPATCHER_GLIB_QPA_P_H |
| 55 |
