Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwineventnotifier_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QWINEVENTNOTIFIER_P_H
5#define QWINEVENTNOTIFIER_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 purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
19
20#include <private/qobject_p.h>
21#include <QtCore/qatomic.h>
22#include <QtCore/qt_windows.h>
23
24QT_BEGIN_NAMESPACE
25
26class QWinEventNotifierPrivate : public QObjectPrivate
27{
28 Q_DECLARE_PUBLIC(QWinEventNotifier)
29public:
30 QWinEventNotifierPrivate() : QWinEventNotifierPrivate(0, false) {}
31 QWinEventNotifierPrivate(HANDLE h, bool e);
32 virtual ~QWinEventNotifierPrivate();
33
34 static void CALLBACK waitCallback(PTP_CALLBACK_INSTANCE instance, PVOID context,
35 PTP_WAIT wait, TP_WAIT_RESULT waitResult);
36
37 HANDLE handleToEvent;
38 PTP_WAIT waitObject = NULL;
39
40 enum PostingState { NotPosted = 0, Posted, IgnorePosted };
41 QAtomicInt winEventActPosted;
42 bool enabled;
43 bool registered;
44};
45
46QT_END_NAMESPACE
47
48#endif // QWINEVENTNOTIFIER_P_H