Added code to allow mac process the event queues

git-svn-id: svn://10.0.0.236/trunk@27231 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
davidm%netscape.com
1999-04-12 22:47:48 +00:00
parent e8acb5497a
commit bb167a18a2
4 changed files with 50 additions and 0 deletions

View File

@@ -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;