+ return gtk_events_pending() != 0;
+}
+
+bool wxGUIEventLoop::Dispatch()
+{
+ wxCHECK_MSG( IsRunning(), false, _T("can't call Dispatch() if not running") );
+
+ // gtk_main_iteration() returns TRUE only if gtk_main_quit() was called
+ return !gtk_main_iteration();
+}
+
+extern "C" {
+static gboolean wx_event_loop_timeout(void* data)
+{
+ bool* expired = static_cast<bool*>(data);
+ *expired = true;
+
+ // return FALSE to remove this timeout
+ return FALSE;
+}