#include "wx/pen.h"
#include "wx/brush.h"
#include "wx/cursor.h"
+#include "wx/intl.h"
#include "wx/icon.h"
#include "wx/palette.h"
#include "wx/dc.h"
#endif
+#ifndef __UNIX__
// test the minimal configuration necessary
long theSystem ;
}
}
*/
+#endif
// if we encountered any problems so far, give the error code and exit immediately
}
// Yield to other processes
+
+static bool gs_inYield = FALSE;
+
bool wxYield()
{
+#ifdef __WXDEBUG__
+ if (gs_inYield)
+ wxFAIL_MSG( wxT("wxYield called recursively" ) );
+#endif
+
+ gs_inYield = TRUE;
+
#if wxUSE_THREADS
- YieldToAnyThread() ;
+ YieldToAnyThread() ;
#endif
- EventRecord event ;
+ EventRecord event ;
long sleepTime = 0 ; //::GetCaretTime();
}
wxMacProcessNotifierAndPendingEvents() ;
- return TRUE;
+
+ gs_inYield = FALSE;
+
+ return TRUE;
+}
+
+// Yield to incoming messages; but fail silently if recursion is detected.
+bool wxYieldIfNeeded()
+{
+ if (gs_inYield)
+ return FALSE;
+
+ return wxYield();
}
// platform specifics