Added code to allow mac process the event queues

This commit is contained in:
davidm%netscape.com 1999-04-12 22:47:48 +00:00
Родитель f2ab30f209
Коммит 7d31b1f4dc
4 изменённых файлов: 50 добавлений и 0 удалений

Просмотреть файл

@ -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___ */