#include "wx/app.h"
#endif // WX_PRECOMP
-#ifdef __DARWIN__
+#if wxOSX_USE_CARBON
#include <Carbon/Carbon.h>
#else
- #include <Carbon.h>
+ #include <CoreFoundation/CoreFoundation.h>
#endif
// ============================================================================
// wxEventLoop implementation
// high level functions for RunApplicationEventLoop() case
// ----------------------------------------------------------------------------
+
+
#if wxMAC_USE_RUN_APP_EVENT_LOOP
int wxGUIEventLoop::Run()
bool wxGUIEventLoop::Pending() const
{
+#if wxOSX_USE_CARBON
EventRef theEvent;
return ReceiveNextEvent
false, // don't remove the event from queue
&theEvent
) == noErr;
+#else
+ return true; // TODO
+#endif
}
bool wxGUIEventLoop::Dispatch()
{
- // TODO: we probably should do the dispatching directly from here but for
- // now it's easier to forward to wxApp which has all the code to do
- // it
if ( !wxTheApp )
return false;
+#if wxOSX_USE_CARBON
+ // TODO: we probably should do the dispatching directly from here but for
+ // now it's easier to forward to wxApp which has all the code to do
+ // it
wxTheApp->MacDoOneEvent();
+#else
+ CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, 0);
+#endif
return true;
}