зеркало из https://github.com/mozilla/gecko-dev.git
Added code to allow mac process the event queues
This commit is contained in:
Родитель
f2ab30f209
Коммит
7d31b1f4dc
|
@ -37,6 +37,11 @@ public:
|
|||
NS_IMETHOD DestroyThreadEventQueue(void) = 0;
|
||||
|
||||
NS_IMETHOD GetThreadEventQueue(PRThread* aThread, PLEventQueue** aResult) = 0;
|
||||
|
||||
#ifdef XP_MAC
|
||||
// This is ment to be temporary until something better is worked out
|
||||
NS_IMETHOD ProcessEvents() = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* nsIEventQueueService_h___ */
|
||||
|
|
|
@ -109,6 +109,9 @@ public:
|
|||
NS_IMETHOD DestroyThreadEventQueue(void);
|
||||
NS_IMETHOD GetThreadEventQueue(PRThread* aThread, PLEventQueue** aResult);
|
||||
|
||||
#ifdef XP_MAC
|
||||
NS_IMETHOD ProcessEvents();
|
||||
#endif // XP_MAC
|
||||
protected:
|
||||
~nsEventQueueServiceImpl();
|
||||
|
||||
|
@ -240,7 +243,24 @@ done:
|
|||
PR_ExitMonitor(mEventQMonitor);
|
||||
return rv;
|
||||
}
|
||||
#ifdef XP_MAC
|
||||
// Callback from the enumeration of the HashTable.
|
||||
static PRBool EventDispatchingFunc(nsHashKey *aKey, void *aData, void* closure)
|
||||
{
|
||||
EventQueueEntry* entry = (EventQueueEntry*) aData;
|
||||
PL_ProcessPendingEvents( entry->GetEventQueue() );
|
||||
return true;
|
||||
}
|
||||
|
||||
// MAC specific. Will go away someday
|
||||
NS_IMETHODIMP nsEventQueueServiceImpl::ProcessEvents()
|
||||
{
|
||||
if ( mEventQTable )
|
||||
mEventQTable->Enumerate( EventDispatchingFunc, NULL );
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static nsEventQueueServiceImpl* gServiceInstance = NULL;
|
||||
|
|
|
@ -109,6 +109,9 @@ public:
|
|||
NS_IMETHOD DestroyThreadEventQueue(void);
|
||||
NS_IMETHOD GetThreadEventQueue(PRThread* aThread, PLEventQueue** aResult);
|
||||
|
||||
#ifdef XP_MAC
|
||||
NS_IMETHOD ProcessEvents();
|
||||
#endif // XP_MAC
|
||||
protected:
|
||||
~nsEventQueueServiceImpl();
|
||||
|
||||
|
@ -240,7 +243,24 @@ done:
|
|||
PR_ExitMonitor(mEventQMonitor);
|
||||
return rv;
|
||||
}
|
||||
#ifdef XP_MAC
|
||||
// Callback from the enumeration of the HashTable.
|
||||
static PRBool EventDispatchingFunc(nsHashKey *aKey, void *aData, void* closure)
|
||||
{
|
||||
EventQueueEntry* entry = (EventQueueEntry*) aData;
|
||||
PL_ProcessPendingEvents( entry->GetEventQueue() );
|
||||
return true;
|
||||
}
|
||||
|
||||
// MAC specific. Will go away someday
|
||||
NS_IMETHODIMP nsEventQueueServiceImpl::ProcessEvents()
|
||||
{
|
||||
if ( mEventQTable )
|
||||
mEventQTable->Enumerate( EventDispatchingFunc, NULL );
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static nsEventQueueServiceImpl* gServiceInstance = NULL;
|
||||
|
|
|
@ -37,6 +37,11 @@ public:
|
|||
NS_IMETHOD DestroyThreadEventQueue(void) = 0;
|
||||
|
||||
NS_IMETHOD GetThreadEventQueue(PRThread* aThread, PLEventQueue** aResult) = 0;
|
||||
|
||||
#ifdef XP_MAC
|
||||
// This is ment to be temporary until something better is worked out
|
||||
NS_IMETHOD ProcessEvents() = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* nsIEventQueueService_h___ */
|
||||
|
|
Загрузка…
Ссылка в новой задаче