]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/evtloop.mm
bring in the definition of wxSizer, making non-precomp builds working again after...
[wxWidgets.git] / src / osx / cocoa / evtloop.mm
index d7082f1578cf4b9436de470737818cf244b45dba..1d607f9eaf4022a5dc0b0f58b96d897dc5a248ea 100644 (file)
@@ -92,3 +92,20 @@ bool wxGUIEventLoop::Dispatch()
 
     return true;
 }
+
+int wxGUIEventLoop::DispatchTimeout(unsigned long timeout)
+{
+    wxMacAutoreleasePool autoreleasepool;
+
+    NSEvent *event = [NSApp
+                nextEventMatchingMask:NSAnyEventMask
+                untilDate:[NSDate dateWithTimeIntervalSinceNow: timeout/1000]
+                inMode:NSDefaultRunLoopMode
+                dequeue: YES];
+    if ( !event )
+        return -1;
+
+    [NSApp sendEvent: event];
+
+    return true;
+}