- wxMacAutoreleasePool autoreleasepool;
- EventRef theEvent;
-
- s_inReceiveEvent = true ;
- OSStatus status = ReceiveNextEvent(0, NULL, sleepTime, true, &theEvent) ;
- s_inReceiveEvent = false ;
-
- switch (status)
- {
- case eventLoopTimedOutErr :
- if ( wxTheApp->ProcessIdle() )
- sleepTime = kEventDurationNoWait ;
- else
- sleepTime = kEventDurationSecond;
- break;
-
- case eventLoopQuitErr :
- // according to QA1061 this may also occur
- // when a WakeUp Process is executed
- break;
-
- default:
- MacHandleOneEvent( theEvent ) ;
- ReleaseEvent( theEvent );
- sleepTime = kEventDurationNoWait ;
- break;
- }
- // repeaters
-
- DeletePendingObjects() ;