From 496f17c3804c79d304aa6095b92768593d1cc700 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 22 Jul 2019 16:53:36 +0200 Subject: Add puglPollEvents() This allows waiting for events for any view in the world. It also improves on puglWaitForEvent() by the addition of a time parameter that allows indefinite blocking, non-blocking polling, and blocking polling with a timeout. --- test/pugl_cairo_test.c | 2 +- test/pugl_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/pugl_cairo_test.c b/test/pugl_cairo_test.c index 7779069..6d85c54 100644 --- a/test/pugl_cairo_test.c +++ b/test/pugl_cairo_test.c @@ -227,7 +227,7 @@ main(int argc, char** argv) if (continuous) { puglPostRedisplay(view); } else { - puglWaitForEvent(view); + puglPollEvents(world, -1); } puglProcessEvents(view); diff --git a/test/pugl_test.c b/test/pugl_test.c index c4df272..66fd97d 100644 --- a/test/pugl_test.c +++ b/test/pugl_test.c @@ -212,7 +212,7 @@ main(int argc, char** argv) if (app.continuous) { puglPostRedisplay(view); } else { - puglWaitForEvent(view); + puglPollEvents(app.world, -1); } puglProcessEvents(view); -- cgit v1.2.1