Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qeventdispatcher_glib_p.h
Go to the documentation of this file.
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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QEVENTDISPATCHER_GLIB_P_H
6
#
define
QEVENTDISPATCHER_GLIB_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists for the convenience
13
// of the QLibrary class. This header file may change from
14
// version to version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
"qabstracteventdispatcher.h"
20
#
include
"qabstracteventdispatcher_p.h"
21
22
typedef
struct
_GMainContext
GMainContext
;
23
24
QT_BEGIN_NAMESPACE
25
26
class
QEventDispatcherGlibPrivate;
27
28
class
Q_CORE_EXPORT
QEventDispatcherGlib
:
public
QAbstractEventDispatcherV2
29
{
30
Q_OBJECT
31
Q_DECLARE_PRIVATE(QEventDispatcherGlib)
32
33
public
:
34
explicit
QEventDispatcherGlib(QObject *parent =
nullptr
);
35
explicit
QEventDispatcherGlib(GMainContext *context, QObject *parent =
nullptr
);
36
~QEventDispatcherGlib();
37
38
bool
processEvents(QEventLoop::ProcessEventsFlags flags) override;
39
40
void
registerSocketNotifier(QSocketNotifier *socketNotifier) final;
41
void
unregisterSocketNotifier(QSocketNotifier *socketNotifier) final;
42
43
void
registerTimer(Qt::TimerId timerId, Duration interval, Qt::TimerType timerType,
44
QObject *object) override final;
45
bool
unregisterTimer(Qt::TimerId timerId) override final;
46
bool
unregisterTimers(QObject *object) override final;
47
QList<TimerInfoV2> timersForObject(QObject *object)
const
override final;
48
Duration remainingTime(Qt::TimerId timerId)
const
override final;
49
50
void
wakeUp() final;
51
void
interrupt() final;
52
53
static
bool
versionSupported();
54
55
protected
:
56
QEventDispatcherGlib(QEventDispatcherGlibPrivate &dd, QObject *parent);
57
};
58
59
struct
GPostEventSource
;
60
struct
GSocketNotifierSource
;
61
struct
GTimerSource
;
62
struct
GIdleTimerSource
;
63
64
class
Q_CORE_EXPORT
QEventDispatcherGlibPrivate
:
public
QAbstractEventDispatcherPrivate
65
{
66
67
public
:
68
QEventDispatcherGlibPrivate(GMainContext *context =
nullptr
);
69
~QEventDispatcherGlibPrivate() override;
70
71
GMainContext *mainContext;
72
GPostEventSource *postEventSource;
73
GSocketNotifierSource *socketNotifierSource;
74
GTimerSource *timerSource;
75
GIdleTimerSource *idleTimerSource;
76
bool
wakeUpCalled =
true
;
77
78
void
runTimersOnceWithNormalPriority();
79
};
80
81
QT_END_NAMESPACE
82
83
#
endif
// QEVENTDISPATCHER_GLIB_P_H
QEventDispatcherGlibPrivate
Definition
qeventdispatcher_glib_p.h:65
QEventDispatcherGlib
Definition
qeventdispatcher_glib_p.h:29
timerSourcePrepareHelper
static gboolean timerSourcePrepareHelper(GTimerSource *src, gint *timeout)
Definition
qeventdispatcher_glib.cpp:102
postEventSourceDispatch
static gboolean postEventSourceDispatch(GSource *s, GSourceFunc, gpointer)
Definition
qeventdispatcher_glib.cpp:245
timerSourceCheck
static gboolean timerSourceCheck(GSource *source)
Definition
qeventdispatcher_glib.cpp:140
idleTimerSourcePrepare
static gboolean idleTimerSourcePrepare(GSource *source, gint *timeout)
Definition
qeventdispatcher_glib.cpp:173
socketNotifierSourcePrepare
static gboolean socketNotifierSourcePrepare(GSource *, gint *timeout)
Definition
qeventdispatcher_glib.cpp:38
idleTimerSourceDispatch
static gboolean idleTimerSourceDispatch(GSource *source, GSourceFunc, gpointer)
Definition
qeventdispatcher_glib.cpp:198
postEventSourcePrepare
static gboolean postEventSourcePrepare(GSource *s, gint *timeout)
Definition
qeventdispatcher_glib.cpp:223
idleTimerSourceCheck
static gboolean idleTimerSourceCheck(GSource *source)
Definition
qeventdispatcher_glib.cpp:187
timerSourceCheckHelper
static gboolean timerSourceCheckHelper(GTimerSource *src)
Definition
qeventdispatcher_glib.cpp:115
socketNotifierSourceCheck
static gboolean socketNotifierSourceCheck(GSource *source)
Definition
qeventdispatcher_glib.cpp:45
postEventSourceCheck
static gboolean postEventSourceCheck(GSource *source)
Definition
qeventdispatcher_glib.cpp:240
socketNotifierSourceDispatch
static gboolean socketNotifierSourceDispatch(GSource *source, GSourceFunc, gpointer)
Definition
qeventdispatcher_glib.cpp:69
timerSourcePrepare
static gboolean timerSourcePrepare(GSource *source, gint *timeout)
Definition
qeventdispatcher_glib.cpp:124
timerSourceDispatch
static gboolean timerSourceDispatch(GSource *source, GSourceFunc, gpointer)
Definition
qeventdispatcher_glib.cpp:148
GMainContext
struct _GMainContext GMainContext
Definition
qeventdispatcher_glib_p.h:22
GIdleTimerSource
Definition
qeventdispatcher_glib.cpp:168
GIdleTimerSource::source
GSource source
Definition
qeventdispatcher_glib.cpp:169
GIdleTimerSource::timerSource
GTimerSource * timerSource
Definition
qeventdispatcher_glib.cpp:170
GPostEventSource
Definition
qeventdispatcher_glib.cpp:215
GPostEventSource::serialNumber
QAtomicInt serialNumber
Definition
qeventdispatcher_glib.cpp:217
GPostEventSource::d
QEventDispatcherGlibPrivate * d
Definition
qeventdispatcher_glib.cpp:220
GPostEventSource::lastSerialNumber
int lastSerialNumber
Definition
qeventdispatcher_glib.cpp:218
GPostEventSource::source
GSource source
Definition
qeventdispatcher_glib.cpp:216
GPostEventSource::pendingSerialNumber
int pendingSerialNumber
Definition
qeventdispatcher_glib.cpp:219
GSocketNotifierSource
Definition
qeventdispatcher_glib.cpp:32
GSocketNotifierSource::source
GSource source
Definition
qeventdispatcher_glib.cpp:33
GSocketNotifierSource::pollfds
QList< GPollFDWithQSocketNotifier * > pollfds
Definition
qeventdispatcher_glib.cpp:34
GSocketNotifierSource::activeNotifierPos
qsizetype activeNotifierPos
Definition
qeventdispatcher_glib.cpp:35
GTimerSource
Definition
qeventdispatcher_glib.cpp:95
GTimerSource::timerList
QTimerInfoList timerList
Definition
qeventdispatcher_glib.cpp:97
GTimerSource::processEventsFlags
QEventLoop::ProcessEventsFlags processEventsFlags
Definition
qeventdispatcher_glib.cpp:98
GTimerSource::runWithIdlePriority
bool runWithIdlePriority
Definition
qeventdispatcher_glib.cpp:99
GTimerSource::source
GSource source
Definition
qeventdispatcher_glib.cpp:96
qtbase
src
corelib
kernel
qeventdispatcher_glib_p.h
Generated on
for Qt by
1.18.0