aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/mac.m
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-22 16:53:02 +0200
committerDavid Robillard <d@drobilla.net>2019-09-03 08:32:16 +0200
commit93f4920cfc03d1a2a8c0df9c6d863cdf20c6ab32 (patch)
tree64ef7427a32b88183bae8720b07fc9258b769b3e /pugl/detail/mac.m
parent496f17c3804c79d304aa6095b92768593d1cc700 (diff)
downloadpugl-93f4920cfc03d1a2a8c0df9c6d863cdf20c6ab32.tar.gz
pugl-93f4920cfc03d1a2a8c0df9c6d863cdf20c6ab32.tar.bz2
pugl-93f4920cfc03d1a2a8c0df9c6d863cdf20c6ab32.zip
Add puglDispatchEvents()
Diffstat (limited to 'pugl/detail/mac.m')
-rw-r--r--pugl/detail/mac.m20
1 files changed, 13 insertions, 7 deletions
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m
index 74b207a..3fa700e 100644
--- a/pugl/detail/mac.m
+++ b/pugl/detail/mac.m
@@ -842,20 +842,26 @@ puglWaitForEvent(PuglView* view)
return puglPollEvents(view->world, -1.0);
}
-PuglStatus
-puglProcessEvents(PuglView* view)
+PUGL_API PuglStatus
+puglDispatchEvents(PuglWorld* world)
{
for (NSEvent* ev = NULL;
- (ev = [view->impl->window nextEventMatchingMask:NSAnyEventMask
- untilDate:nil
- inMode:NSDefaultRunLoopMode
- dequeue:YES]);) {
- [view->world->impl->app sendEvent: ev];
+ (ev = [world->impl->app nextEventMatchingMask:NSAnyEventMask
+ untilDate:nil
+ inMode:NSDefaultRunLoopMode
+ dequeue:YES]);) {
+ [world->impl->app sendEvent: ev];
}
return PUGL_SUCCESS;
}
+PuglStatus
+puglProcessEvents(PuglView* view)
+{
+ return puglDispatchEvents(view->world);
+}
+
PuglGlFunc
puglGetProcAddress(const char *name)
{