summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_glib_p.h
blob: 2376a7ed8bd2cb537ae9928b1cb54687f25387fd (plain)
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
// Copyright (C) 2016 The Qt Company Ltd.// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only#ifndef QEVENTDISPATCHER_GLIB_P_H#define QEVENTDISPATCHER_GLIB_P_H//// W A R N I N G// -------------//// This file is not part of the Qt API. It exists for the convenience// of the QLibrary class. This header file may change from// version to version without notice, or even be removed.//// We mean it.//#include"qabstracteventdispatcher.h"#include"qabstracteventdispatcher_p.h"typedefstruct _GMainContext GMainContext; QT_BEGIN_NAMESPACE class QEventDispatcherGlibPrivate;class Q_CORE_EXPORT QEventDispatcherGlib :public QAbstractEventDispatcherV2 { Q_OBJECT Q_DECLARE_PRIVATE(QEventDispatcherGlib)public:explicitQEventDispatcherGlib(QObject *parent =nullptr);explicitQEventDispatcherGlib(GMainContext *context, QObject *parent =nullptr);~QEventDispatcherGlib();boolprocessEvents(QEventLoop::ProcessEventsFlags flags) override;voidregisterSocketNotifier(QSocketNotifier *socketNotifier) final;voidunregisterSocketNotifier(QSocketNotifier *socketNotifier) final;voidregisterTimer(Qt::TimerId timerId, Duration interval,Qt::TimerType timerType, QObject *object) override final;boolunregisterTimer(Qt::TimerId timerId) override final;boolunregisterTimers(QObject *object) override final; QList<TimerInfoV2>timersForObject(QObject *object)const override final; Duration remainingTime(Qt::TimerId timerId)const override final;voidwakeUp() final;voidinterrupt() final;static boolversionSupported();protected:QEventDispatcherGlib(QEventDispatcherGlibPrivate &dd, QObject *parent);};struct GPostEventSource;struct GSocketNotifierSource;struct GTimerSource;struct GIdleTimerSource;class Q_CORE_EXPORT QEventDispatcherGlibPrivate :public QAbstractEventDispatcherPrivate {public:QEventDispatcherGlibPrivate(GMainContext *context =nullptr);~QEventDispatcherGlibPrivate() override; GMainContext *mainContext; GPostEventSource *postEventSource; GSocketNotifierSource *socketNotifierSource; GTimerSource *timerSource; GIdleTimerSource *idleTimerSource;bool wakeUpCalled =true;voidrunTimersOnceWithNormalPriority();}; QT_END_NAMESPACE #endif// QEVENTDISPATCHER_GLIB_P_H
close