// Author: Vadim Zeitlin
// Modified by:
// Created: 2006-01-12
-// RCS-ID: $Id$
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
}
}
-void wxGUIEventLoop::DoRun()
+void wxGUIEventLoop::WakeUp()
+{
+ OSStatus err = noErr;
+ wxMacCarbonEvent wakeupEvent;
+ wakeupEvent.Create( 'WXMC', 'WXMC', GetCurrentEventTime(),
+ kEventAttributeNone );
+ err = PostEventToQueue(GetMainEventQueue(), wakeupEvent,
+ kEventPriorityHigh );
+}
+
+void wxGUIEventLoop::OSXDoRun()
{
wxMacAutoreleasePool autoreleasepool;
- RunApplicationEventLoop();
+
+ while (!m_shouldExit)
+ {
+ RunApplicationEventLoop();
+ }
+
+ // Force enclosing event loop to temporarily exit and check
+ // if it should be stopped.
+ QuitApplicationEventLoop();
}
-void wxGUIEventLoop::DoStop()
+void wxGUIEventLoop::OSXDoStop()
{
QuitApplicationEventLoop();
}
// END move into a evtloop_osx.cpp
-void wxModalEventLoop::DoRun()
+void wxModalEventLoop::OSXDoRun()
{
wxWindowDisabler disabler(m_modalWindow);
wxMacAutoreleasePool autoreleasepool;
}
-void wxModalEventLoop::DoStop()
+void wxModalEventLoop::OSXDoStop()
{
wxMacAutoreleasePool autoreleasepool;
QuitAppModalLoopForWindow(m_modalNativeWindow);