Qt 4.8
Public Functions | Public Variables | List of all members
QEventDispatcherWin32Private Class Reference
Inheritance diagram for QEventDispatcherWin32Private:
QAbstractEventDispatcherPrivate QObjectPrivate QObjectData

Public Functions

void activateEventNotifier (QWinEventNotifier *wen)
 
void doWsaAsyncSelect (int socket)
 
 QEventDispatcherWin32Private ()
 
void registerTimer (WinTimerInfo *t)
 
void sendTimerEvent (int timerId)
 
void unregisterTimer (WinTimerInfo *t, bool closingDown=false)
 
 ~QEventDispatcherWin32Private ()
 
- Public Functions inherited from QAbstractEventDispatcherPrivate
void init ()
 
 QAbstractEventDispatcherPrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Public Variables

HHOOK getMessageHook
 
HWND internalHwnd
 
bool interrupt
 
int lastSerialNumber
 
QList< MSGqueuedSocketEvents
 
QList< MSGqueuedUserInputEvents
 
int sendPostedEventsWindowsTimerId
 
QAtomicInt serialNumber
 
QSNDict sn_except
 
QSNDict sn_read
 
QSNDict sn_write
 
DWORD threadId
 
WinTimerDict timerDict
 
WinTimerVec timerVec
 
QAtomicInt wakeUps
 
QList< QWinEventNotifier * > winEventNotifierList
 
- Public Variables inherited from QAbstractEventDispatcherPrivate
QAbstractEventDispatcher::EventFilter event_filter
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QAbstractEventDispatcherPrivate
static int allocateTimerId ()
 
static void releaseTimerId (int id)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Detailed Description

Definition at line 339 of file qeventdispatcher_win.cpp.

Constructors and Destructors

◆ QEventDispatcherWin32Private()

QEventDispatcherWin32Private::QEventDispatcherWin32Private ( )

◆ ~QEventDispatcherWin32Private()

QEventDispatcherWin32Private::~QEventDispatcherWin32Private ( )

Definition at line 386 of file qeventdispatcher_win.cpp.

387 {
388  if (internalHwnd)
389  DestroyWindow(internalHwnd);
390  QString className = QLatin1String("QEventDispatcherWin32_Internal_Widget") + QString::number(quintptr(qt_internal_proc));
391  UnregisterClass((wchar_t*)className.utf16(), qWinAppInst());
392 }
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qstring.cpp:6448
QIntegerForSizeof< void * >::Unsigned quintptr
Definition: qglobal.h:986
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
const char * className
Definition: qwizard.cpp:137
HINSTANCE qWinAppInst()
LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
const ushort * utf16() const
Returns the QString as a &#39;\0\&#39;-terminated array of unsigned shorts.
Definition: qstring.cpp:5290

Functions

◆ activateEventNotifier()

void QEventDispatcherWin32Private::activateEventNotifier ( QWinEventNotifier wen)

Definition at line 394 of file qeventdispatcher_win.cpp.

395 {
398 }
EventRef event
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56

◆ doWsaAsyncSelect()

void QEventDispatcherWin32Private::doWsaAsyncSelect ( int  socket)

Definition at line 665 of file qeventdispatcher_win.cpp.

666 {
668  int sn_event = 0;
669  if (sn_read.contains(socket))
670  sn_event |= FD_READ | FD_CLOSE | FD_ACCEPT;
671  if (sn_write.contains(socket))
672  sn_event |= FD_WRITE | FD_CONNECT;
673  if (sn_except.contains(socket))
674  sn_event |= FD_OOB;
675  // BoundsChecker may emit a warning for WSAAsyncSelect when sn_event == 0
676  // This is a BoundsChecker bug and not a Qt bug
677  WSAAsyncSelect(socket, internalHwnd, sn_event ? unsigned(WM_QT_SOCKETNOTIFIER) : unsigned(0), sn_event);
678 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
Definition: qhash.h:872
int WSAAsyncSelect(SOCKET sock, HWND handle, unsigned int msg, long ev)

◆ registerTimer()

void QEventDispatcherWin32Private::registerTimer ( WinTimerInfo t)

Definition at line 605 of file qeventdispatcher_win.cpp.

606 {
608 
610 
611  int ok = 0;
612  if (t->interval > 20 || !t->interval || !qtimeSetEvent) {
613  ok = 1;
614  if (!t->interval) // optimization for single-shot-zero-timer
616  else
617  ok = SetTimer(internalHwnd, t->timerId, (uint) t->interval, 0);
618  } else {
620  TIME_CALLBACK_FUNCTION | TIME_PERIODIC | TIME_KILL_SYNCHRONOUS);
621  if (ok == 0) { // fall back to normal timer if no more multimedia timers available
622  ok = SetTimer(internalHwnd, t->timerId, (uint) t->interval, 0);
623  }
624  }
625 
626  if (ok == 0)
627  qErrnoWarning("QEventDispatcherWin32::registerTimer: Failed to create a timer");
628 }
static void postEvent(QObject *receiver, QEvent *event)
Adds the event event, with the object receiver as the receiver of the event, to an event queue and re...
void WINAPI QT_WIN_CALLBACK qt_fast_timer_proc(uint timerId, uint, DWORD_PTR user, DWORD_PTR, DWORD_PTR)
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
#define TIME_KILL_SYNCHRONOUS
#define Q_Q(Class)
Definition: qglobal.h:2483
static ptimeSetEvent qtimeSetEvent
unsigned int uint
Definition: qglobal.h:996
#define DWORD_PTR
void qErrnoWarning(const char *msg,...)
Definition: qglobal.cpp:2954

◆ sendTimerEvent()

void QEventDispatcherWin32Private::sendTimerEvent ( int  timerId)

Definition at line 647 of file qeventdispatcher_win.cpp.

Referenced by qt_internal_proc().

648 {
649  WinTimerInfo *t = timerDict.value(timerId);
650  if (t && !t->inTimerEvent) {
651  // send event, but don't allow it to recurse
652  t->inTimerEvent = true;
653 
654  QTimerEvent e(t->timerId);
656 
657  // timer could have been removed
658  t = timerDict.value(timerId);
659  if (t) {
660  t->inTimerEvent = false;
661  }
662  }
663 }
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
The QTimerEvent class contains parameters that describe a timer event.
Definition: qcoreevent.h:341

◆ unregisterTimer()

void QEventDispatcherWin32Private::unregisterTimer ( WinTimerInfo t,
bool  closingDown = false 
)

Definition at line 630 of file qeventdispatcher_win.cpp.

631 {
632  // mark timer as unused
633  if (!QObjectPrivate::get(t->obj)->inThreadChangeEvent && !closingDown)
635 
636  if (t->interval == 0) {
638  } else if (t->fastTimerId != 0) {
641  } else if (internalHwnd) {
642  KillTimer(internalHwnd, t->timerId);
643  }
644  delete t;
645 }
static ptimeKillEvent qtimeKillEvent
static QObjectPrivate * get(QObject *o)
Definition: qobject_p.h:177
uint inThreadChangeEvent
Definition: qobject.h:103
static void removePostedTimerEvent(QObject *object, int timerId)

Properties

◆ getMessageHook

HHOOK QEventDispatcherWin32Private::getMessageHook

Definition at line 352 of file qeventdispatcher_win.cpp.

◆ internalHwnd

HWND QEventDispatcherWin32Private::internalHwnd

◆ interrupt

bool QEventDispatcherWin32Private::interrupt

Definition at line 348 of file qeventdispatcher_win.cpp.

◆ lastSerialNumber

int QEventDispatcherWin32Private::lastSerialNumber

Definition at line 356 of file qeventdispatcher_win.cpp.

Referenced by qt_internal_proc().

◆ queuedSocketEvents

QList<MSG> QEventDispatcherWin32Private::queuedSocketEvents

Definition at line 376 of file qeventdispatcher_win.cpp.

◆ queuedUserInputEvents

QList<MSG> QEventDispatcherWin32Private::queuedUserInputEvents

Definition at line 375 of file qeventdispatcher_win.cpp.

◆ sendPostedEventsWindowsTimerId

int QEventDispatcherWin32Private::sendPostedEventsWindowsTimerId

Definition at line 356 of file qeventdispatcher_win.cpp.

Referenced by qt_GetMessageHook(), and qt_internal_proc().

◆ serialNumber

QAtomicInt QEventDispatcherWin32Private::serialNumber

Definition at line 355 of file qeventdispatcher_win.cpp.

Referenced by qt_GetMessageHook(), and qt_internal_proc().

◆ sn_except

QSNDict QEventDispatcherWin32Private::sn_except

Definition at line 369 of file qeventdispatcher_win.cpp.

Referenced by doWsaAsyncSelect(), and qt_internal_proc().

◆ sn_read

QSNDict QEventDispatcherWin32Private::sn_read

Definition at line 367 of file qeventdispatcher_win.cpp.

Referenced by doWsaAsyncSelect(), and qt_internal_proc().

◆ sn_write

QSNDict QEventDispatcherWin32Private::sn_write

Definition at line 368 of file qeventdispatcher_win.cpp.

Referenced by doWsaAsyncSelect(), and qt_internal_proc().

◆ threadId

DWORD QEventDispatcherWin32Private::threadId

Definition at line 346 of file qeventdispatcher_win.cpp.

◆ timerDict

WinTimerDict QEventDispatcherWin32Private::timerDict

Definition at line 361 of file qeventdispatcher_win.cpp.

Referenced by sendTimerEvent().

◆ timerVec

WinTimerVec QEventDispatcherWin32Private::timerVec

Definition at line 360 of file qeventdispatcher_win.cpp.

◆ wakeUps

QAtomicInt QEventDispatcherWin32Private::wakeUps

Definition at line 357 of file qeventdispatcher_win.cpp.

◆ winEventNotifierList

QList<QWinEventNotifier *> QEventDispatcherWin32Private::winEventNotifierList

Definition at line 372 of file qeventdispatcher_win.cpp.


The documentation for this class was generated from the following file: