From 93f4920cfc03d1a2a8c0df9c6d863cdf20c6ab32 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 22 Jul 2019 16:53:02 +0200 Subject: Add puglDispatchEvents() --- pugl/pugl.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'pugl/pugl.h') diff --git a/pugl/pugl.h b/pugl/pugl.h index 923d361..3639a96 100644 --- a/pugl/pugl.h +++ b/pugl/pugl.h @@ -471,6 +471,17 @@ puglGetTime(const PuglWorld* world); PUGL_API PuglStatus puglPollEvents(PuglWorld* world, double timeout); +/** + Dispatch any pending events to views. + + This processes all pending events, dispatching them to the appropriate + views. View event handlers will be called in the scope of this call. This + function does not block, if no events are pending it will return + immediately. +*/ +PUGL_API PuglStatus +puglDispatchEvents(PuglWorld* world); + /** @} @name Initialization @@ -756,8 +767,10 @@ puglWaitForEvent(PuglView* view); This handles input events as well as rendering, so it should be called regularly and rapidly enough to keep the UI responsive. This function does not block if no events are pending. + + @deprecated Use puglDispatchEvents(). */ -PUGL_API PuglStatus +PUGL_API PUGL_DEPRECATED_BY("puglDispatchEvents") PuglStatus puglProcessEvents(PuglView* view); /** -- cgit v1.2.1