Qt 6.x
The Qt SDK
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
4#ifndef QEVENTDISPATCHER_GLIB_P_H
5#define QEVENTDISPATCHER_GLIB_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 for the convenience
12// of the QLibrary class. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
20
21typedef struct _GMainContext GMainContext;
22
24
26
28{
30 Q_DECLARE_PRIVATE(QEventDispatcherGlib)
31
32public:
33 explicit QEventDispatcherGlib(QObject *parent = nullptr);
36
37 bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
38
39 void registerSocketNotifier(QSocketNotifier *socketNotifier) final;
40 void unregisterSocketNotifier(QSocketNotifier *socketNotifier) final;
41
42 void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType, QObject *object) final;
43 bool unregisterTimer(int timerId) final;
44 bool unregisterTimers(QObject *object) final;
45 QList<TimerInfo> registeredTimers(QObject *object) const final;
46
47 int remainingTime(int timerId) final;
48
49 void wakeUp() final;
50 void interrupt() final;
51
52 static bool versionSupported();
53
54protected:
56};
57
58struct GPostEventSource;
60struct GTimerSource;
61struct GIdleTimerSource;
62
64{
65
66public:
73 bool wakeUpCalled = true;
74
75 void runTimersOnceWithNormalPriority();
76};
77
79
80#endif // QEVENTDISPATCHER_GLIB_P_H
virtual void registerSocketNotifier(QSocketNotifier *notifier)=0
Registers notifier with the event loop.
virtual void unregisterSocketNotifier(QSocketNotifier *notifier)=0
Unregisters notifier from the event dispatcher.
virtual void wakeUp()=0
\threadsafe
virtual int remainingTime(int timerId)=0
Returns the remaining time in milliseconds with the given timerId.
virtual bool unregisterTimer(int timerId)=0
Unregisters the timer with the given timerId.
virtual bool processEvents(QEventLoop::ProcessEventsFlags flags)=0
Processes pending events that match flags until there are no more events to process.
virtual QList< TimerInfo > registeredTimers(QObject *object) const =0
Returns a list of registered timers for object.
int registerTimer(qint64 interval, Qt::TimerType timerType, QObject *object)
Registers a timer with the specified interval and timerType for the given object and returns the time...
virtual bool unregisterTimers(QObject *object)=0
Unregisters all the timers associated with the given object.
virtual void interrupt()=0
Interrupts event dispatching.
GSocketNotifierSource * socketNotifierSource
Definition qlist.h:74
\inmodule QtCore
Definition qobject.h:90
\inmodule QtCore
struct _GMainContext GMainContext
Combined button and popup list for selecting options.
TimerType
static void * context
GLbitfield flags
#define Q_OBJECT
long long qint64
Definition qtypes.h:55
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent