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
typedef
struct
_GSource
GSource
;
24
25
QT_BEGIN_NAMESPACE
26
27
class
QEventDispatcherGlibPrivate;
28
29
class
Q_CORE_EXPORT
QEventDispatcherGlib
:
public
QAbstractEventDispatcherV2
30
{
31
Q_OBJECT
32
Q_DECLARE_PRIVATE(QEventDispatcherGlib)
33
34
public
:
35
explicit
QEventDispatcherGlib(QObject *parent =
nullptr
);
36
explicit
QEventDispatcherGlib(GMainContext *context, QObject *parent =
nullptr
);
37
~QEventDispatcherGlib();
38
39
bool
processEvents(QEventLoop::ProcessEventsFlags flags) override;
40
41
void
registerSocketNotifier(QSocketNotifier *socketNotifier) final;
42
void
unregisterSocketNotifier(QSocketNotifier *socketNotifier) final;
43
44
void
registerTimer(Qt::TimerId timerId, Duration interval, Qt::TimerType timerType,
45
QObject *object) override final;
46
bool
unregisterTimer(Qt::TimerId timerId) override final;
47
bool
unregisterTimers(QObject *object) override final;
48
QList<TimerInfoV2> timersForObject(QObject *object)
const
override final;
49
Duration remainingTime(Qt::TimerId timerId)
const
override final;
50
51
void
wakeUp() final;
52
void
interrupt() final;
53
54
static
bool
versionSupported();
55
56
protected
:
57
QEventDispatcherGlib(QEventDispatcherGlibPrivate &dd, QObject *parent);
58
};
59
60
struct
GPostEventSource
;
61
struct
GSocketNotifierSource
;
62
struct
GTimerSource
;
63
struct
GIdleTimerSource
;
64
65
class
Q_CORE_EXPORT
QEventDispatcherGlibPrivate
:
public
QAbstractEventDispatcherPrivate
66
{
67
68
public
:
69
QEventDispatcherGlibPrivate(GMainContext *context =
nullptr
);
70
~QEventDispatcherGlibPrivate() override;
71
72
GMainContext *mainContext;
73
GPostEventSource *postEventSource;
74
GSocketNotifierSource *socketNotifierSource;
75
GTimerSource *timerSource;
76
GIdleTimerSource *idleTimerSource;
77
bool
wakeUpCalled =
true
;
78
79
// Sets the source's name and makes it recursive, then attaches it to
80
// mainContext and registers it with this dispatcher. Subclasses must use
81
// this (and destroySource()) for the sources they add, so that
82
// processEvents() can include them in its guarantees. Sources must be
83
// left at G_PRIORITY_DEFAULT.
84
void
attachSource(GSource *source,
const
char
*name);
85
void
destroySource(GSource *source);
86
87
void
runTimersOnceWithNormalPriority();
88
};
89
90
QT_END_NAMESPACE
91
92
#
endif
// QEVENTDISPATCHER_GLIB_P_H
QEventDispatcherGlibPrivate
Definition
qeventdispatcher_glib_p.h:66
QEventDispatcherGlib
Definition
qeventdispatcher_glib_p.h:30
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
GSource
struct _GSource GSource
Definition
qeventdispatcher_glib_p.h:23
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