Qt 4.8
Public Functions | Public Variables | Static Public Variables | Static Private Functions | List of all members
QEventDispatcherMacPrivate Class Reference

#include <qeventdispatcher_mac_p.h>

Inheritance diagram for QEventDispatcherMacPrivate:
QAbstractEventDispatcherPrivate QObjectPrivate QObjectData

Public Functions

 QEventDispatcherMacPrivate ()
 
- 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

CFRunLoopObserverRef firstTimeObserver
 
int lastSerial
 
MacSocketHash macSockets
 
CFRunLoopSourceRef postedEventsSource
 
QList< void * > queuedUserInputEvents
 
QAtomicInt serialNumber
 
CFRunLoopObserverRef waitingObserver
 
- 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
 

Static Public Variables

static bool blockSendPostedEvents = false
 
static bool interrupt = false
 
static MacTimerHash macTimerHash
 

Static Private Functions

static void activateTimer (CFRunLoopTimerRef, void *info)
 
static void firstLoopEntry (CFRunLoopObserverRef ref, CFRunLoopActivity activity, void *info)
 
static Boolean postedEventSourceEqualCallback (const void *info1, const void *info2)
 
static void postedEventsSourcePerformCallback (void *info)
 
static void waitingObserverCallback (CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info)
 

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 160 of file qeventdispatcher_mac_p.h.

Constructors and Destructors

◆ QEventDispatcherMacPrivate()

QEventDispatcherMacPrivate::QEventDispatcherMacPrivate ( )

Definition at line 978 of file qeventdispatcher_mac.mm.

979 {
980 }

Functions

◆ activateTimer()

void QEventDispatcherMacPrivate::activateTimer ( CFRunLoopTimerRef  ,
void *  info 
)
staticprivate

Definition at line 125 of file qeventdispatcher_mac.mm.

Referenced by QEventDispatcherMac::registerTimer().

126 {
127  int timerID =
128 #ifdef Q_OS_MAC64
129  qint64(info);
130 #else
131  int(info);
132 #endif
133 
134  MacTimerInfo *tmr;
135  tmr = macTimerHash.value(timerID);
136  if (tmr == 0 || tmr->pending == true)
137  return; // Can't send another timer event if it's pending.
138 
139 
140  if (blockSendPostedEvents) {
142  } else {
143  tmr->pending = true;
144  QTimerEvent e(tmr->id);
145  qt_sendSpontaneousEvent(tmr->obj, &e);
146  // Get the value again in case the timer gets unregistered during the sendEvent.
147  tmr = macTimerHash.value(timerID);
148  if (tmr != 0)
149  tmr->pending = false;
150  }
151 
152 }
static mach_timebase_info_data_t info
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...
bool qt_sendSpontaneousEvent(QObject *, QEvent *)
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606
__int64 qint64
Definition: qglobal.h:942
The QTimerEvent class contains parameters that describe a timer event.
Definition: qcoreevent.h:341

◆ firstLoopEntry()

void QEventDispatcherMacPrivate::firstLoopEntry ( CFRunLoopObserverRef  ref,
CFRunLoopActivity  activity,
void *  info 
)
staticprivate

Definition at line 1073 of file qeventdispatcher_mac.mm.

Referenced by QEventDispatcherMac::QEventDispatcherMac().

1076 {
1077  Q_UNUSED(ref);
1078  Q_UNUSED(activity);
1079 #ifdef QT_MAC_USE_COCOA
1080  QApplicationPrivate::qt_initAfterNSAppStarted();
1081 #endif
1082  processPostedEvents(static_cast<QEventDispatcherMacPrivate *>(info), blockSendPostedEvents);
1083 }
static mach_timebase_info_data_t info
static void processPostedEvents(QEventDispatcherMacPrivate *const d, const bool blockSendPostedEvents)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ postedEventSourceEqualCallback()

Boolean QEventDispatcherMacPrivate::postedEventSourceEqualCallback ( const void *  info1,
const void *  info2 
)
staticprivate

Definition at line 1030 of file qeventdispatcher_mac.mm.

Referenced by QEventDispatcherMac::QEventDispatcherMac().

1031 {
1032  return info1 == info2;
1033 }

◆ postedEventsSourcePerformCallback()

void QEventDispatcherMacPrivate::postedEventsSourcePerformCallback ( void *  info)
staticprivate

Definition at line 1085 of file qeventdispatcher_mac.mm.

Referenced by QEventDispatcherMac::QEventDispatcherMac().

1086 {
1087  processPostedEvents(static_cast<QEventDispatcherMacPrivate *>(info), blockSendPostedEvents);
1088 }
static mach_timebase_info_data_t info
static void processPostedEvents(QEventDispatcherMacPrivate *const d, const bool blockSendPostedEvents)

◆ waitingObserverCallback()

void QEventDispatcherMacPrivate::waitingObserverCallback ( CFRunLoopObserverRef  observer,
CFRunLoopActivity  activity,
void *  info 
)
staticprivate

Definition at line 1021 of file qeventdispatcher_mac.mm.

Referenced by QEventDispatcherMac::QEventDispatcherMac().

1023 {
1024  if (activity == kCFRunLoopBeforeWaiting)
1025  emit static_cast<QEventDispatcherMac*>(info)->aboutToBlock();
1026  else
1027  emit static_cast<QEventDispatcherMac*>(info)->awake();
1028 }
static mach_timebase_info_data_t info
#define emit
Definition: qobjectdefs.h:76

Properties

◆ blockSendPostedEvents

bool QEventDispatcherMacPrivate::blockSendPostedEvents = false
static

Definition at line 172 of file qeventdispatcher_mac_p.h.

Referenced by activateTimer(), and QEventDispatcherMac::flush().

◆ firstTimeObserver

CFRunLoopObserverRef QEventDispatcherMacPrivate::firstTimeObserver

Definition at line 194 of file qeventdispatcher_mac_p.h.

◆ interrupt

bool QEventDispatcherMacPrivate::interrupt = false
static

◆ lastSerial

int QEventDispatcherMacPrivate::lastSerial

Definition at line 196 of file qeventdispatcher_mac_p.h.

Referenced by processPostedEvents().

◆ macSockets

MacSocketHash QEventDispatcherMacPrivate::macSockets

Definition at line 190 of file qeventdispatcher_mac_p.h.

Referenced by qt_mac_socket_callback().

◆ macTimerHash

MacTimerHash QEventDispatcherMacPrivate::macTimerHash
static

◆ postedEventsSource

CFRunLoopSourceRef QEventDispatcherMacPrivate::postedEventsSource

Definition at line 192 of file qeventdispatcher_mac_p.h.

Referenced by processPostedEvents().

◆ queuedUserInputEvents

QList<void *> QEventDispatcherMacPrivate::queuedUserInputEvents

Definition at line 191 of file qeventdispatcher_mac_p.h.

◆ serialNumber

QAtomicInt QEventDispatcherMacPrivate::serialNumber

Definition at line 195 of file qeventdispatcher_mac_p.h.

Referenced by processPostedEvents().

◆ waitingObserver

CFRunLoopObserverRef QEventDispatcherMacPrivate::waitingObserver

Definition at line 193 of file qeventdispatcher_mac_p.h.


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