82QWinEventNotifier::QWinEventNotifier(HANDLE hEvent,
QObject *
parent)
92QWinEventNotifier::~QWinEventNotifier()
107void QWinEventNotifier::setHandle(HANDLE hEvent)
111 d->handleToEvent = hEvent;
120HANDLE QWinEventNotifier::handle()
const
123 return d->handleToEvent;
132bool QWinEventNotifier::isEnabled()
const
145void QWinEventNotifier::setEnabled(
bool enable)
153 qWarning(
"QWinEventNotifier: Event notifiers cannot be enabled or disabled from another thread");
166 SetThreadpoolWait(
d->waitObject,
d->handleToEvent, NULL);
167 d->registered =
true;
168 }
else if (
d->registered) {
171 SetThreadpoolWait(
d->waitObject, NULL, NULL);
175 WaitForThreadpoolWaitCallbacks(
d->waitObject, TRUE);
176 d->registered =
false;
184bool QWinEventNotifier::event(
QEvent *
e)
204 d->registered =
false;
207 emit activated(
d->handleToEvent, QPrivateSignal());
209 if (alive &&
d->enabled && !
d->registered) {
210 SetThreadpoolWait(
d->waitObject,
d->handleToEvent, NULL);
211 d->registered =
true;
226 qErrnoWarning(
"QWinEventNotifier:: CreateThreadpollWait failed.");
235 PTP_WAIT wait, TP_WAIT_RESULT waitResult)
252#include "moc_qwineventnotifier.cpp"
T fetchAndStoreRelaxed(T newValue) noexcept
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
static QThread * currentThread()
QWinEventNotifierPrivate()
QAtomicInt winEventActPosted
virtual ~QWinEventNotifierPrivate()
static void CALLBACK waitCallback(PTP_CALLBACK_INSTANCE instance, PVOID context, PTP_WAIT wait, TP_WAIT_RESULT waitResult)
void qErrnoWarning(const char *msg,...)
Combined button and popup list for selecting options.
#define Q_ARG(Type, data)
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLfloat GLfloat GLfloat GLfloat h
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent