Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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#ifndef QXCBEVENTDISPATCHER_H
4#define QXCBEVENTDISPATCHER_H
5
6#include <QtCore/QObject>
7#include <QtCore/QEventLoop>
8
9#include <QtCore/private/qeventdispatcher_unix_p.h>
10#if QT_CONFIG(glib)
11#include <QtCore/private/qeventdispatcher_glib_p.h>
12#include <glib.h>
13#endif
14
16
17class QXcbConnection;
18
20{
22public:
25 bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
26
27private:
28 QXcbConnection *m_connection;
29};
30
31#if QT_CONFIG(glib)
32
33struct XcbEventSource;
34class QXcbGlibEventDispatcherPrivate;
35
36class QXcbGlibEventDispatcher : public QEventDispatcherGlib
37{
39 Q_DECLARE_PRIVATE(QXcbGlibEventDispatcher)
40
41public:
42 explicit QXcbGlibEventDispatcher(QXcbConnection *connection, QObject *parent = nullptr);
43 ~QXcbGlibEventDispatcher();
44
45 bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
46 QEventLoop::ProcessEventsFlags flags() const { return m_flags; }
47
48private:
49 XcbEventSource *m_xcbEventSource;
50 GSourceFuncs m_xcbEventSourceFuncs;
51 QEventLoop::ProcessEventsFlags m_flags;
52};
53
54class QXcbGlibEventDispatcherPrivate : public QEventDispatcherGlibPrivate
55{
56 Q_DECLARE_PUBLIC(QXcbGlibEventDispatcher)
57
58public:
59 QXcbGlibEventDispatcherPrivate();
60};
61
62#endif // QT_CONFIG(glib)
63
69
71
72#endif // QXCBEVENTDISPATCHER_H
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
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.
QXcbUnixEventDispatcher(QXcbConnection *connection, QObject *parent=nullptr)
Combined button and popup list for selecting options.
DBusConnection * connection
GLbitfield flags
#define Q_OBJECT