зеркало из https://github.com/mozilla/gecko-dev.git
Adding a new method that will allow caller to check if there pending events in the elder queue. r=sfraser@netscape.com, danm@netscape.com, b=76075
This commit is contained in:
Родитель
474638a2eb
Коммит
eb4c3841af
|
@ -337,6 +337,19 @@ nsEventQueueImpl::IsQueueNative(PRBool *aResult)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventQueueImpl::PendingEvents(PRBool *aResult)
|
||||
{
|
||||
*aResult = PL_EventAvailable(mEventQueue);
|
||||
if (!*aResult && mElderQueue) {
|
||||
nsCOMPtr<nsIEventQueue> elder(do_QueryInterface(mElderQueue));
|
||||
if (elder)
|
||||
return elder->EventAvailable(*aResult);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventQueueImpl::ProcessPendingEvents()
|
||||
{
|
||||
|
|
|
@ -63,6 +63,7 @@ interface nsIEventQueue : nsISupports
|
|||
[noscript] void postSynchronousEvent(in PLEventPtr aEvent,
|
||||
out voidPtr aResult);
|
||||
|
||||
boolean pendingEvents();
|
||||
void processPendingEvents();
|
||||
void eventLoop();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче