Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qxcbeventdispatcher.h
Go to the documentation of this file.
1// Copyright (C) 2018 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// Qt-Security score:significant reason:default
4
5#pragma once
6
7#include <QtCore/QObject>
8#include <QtCore/QEventLoop>
9
10#include <QtCore/private/qeventdispatcher_unix_p.h>
11#if QT_CONFIG(glib)
12#include <QtCore/private/qeventdispatcher_glib_p.h>
13#include <glib.h>
14#endif
15
16QT_BEGIN_NAMESPACE
17
18class QXcbConnection;
19
21{
23public:
26 bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
27
28private:
29 QXcbConnection *m_connection;
30};
31
32#if QT_CONFIG(glib)
33
34struct XcbEventSource;
35class QXcbGlibEventDispatcherPrivate;
36
37class QXcbGlibEventDispatcher : public QEventDispatcherGlib
38{
39 Q_OBJECT
40 Q_DECLARE_PRIVATE(QXcbGlibEventDispatcher)
41
42public:
43 explicit QXcbGlibEventDispatcher(QXcbConnection *connection, QObject *parent = nullptr);
44 ~QXcbGlibEventDispatcher();
45
46 bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
47 QEventLoop::ProcessEventsFlags flags() const { return m_flags; }
48
49private:
50 XcbEventSource *m_xcbEventSource;
51 GSourceFuncs m_xcbEventSourceFuncs;
52 QEventLoop::ProcessEventsFlags m_flags;
53};
54
55class QXcbGlibEventDispatcherPrivate : public QEventDispatcherGlibPrivate
56{
57 Q_DECLARE_PUBLIC(QXcbGlibEventDispatcher)
58
59public:
60 QXcbGlibEventDispatcherPrivate();
61};
62
63#endif // QT_CONFIG(glib)
64
66{
67public:
68 static QAbstractEventDispatcher *createEventDispatcher(QXcbConnection *connection);
69};
70
71QT_END_NAMESPACE
QObject * parent
Definition qobject.h:73
static QAbstractEventDispatcher * createEventDispatcher(QXcbConnection *connection)
bool processEvents(QEventLoop::ProcessEventsFlags flags) override
Processes pending events that match flags until there are no more events to process.