diff options
author | David Robillard <d@drobilla.net> | 2025-01-23 17:00:36 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-01-23 18:02:52 -0500 |
commit | d7a93950b3af397580572adf2e366f3b162104a9 (patch) | |
tree | bc555c1c5449680ab9436799e5968d26948675fc /include/pugl/pugl.h | |
parent | 985dfb99f6a017a2d4629631ee76f74d6ca9eb14 (diff) | |
download | pugl-d7a93950b3af397580572adf2e366f3b162104a9.tar.gz pugl-d7a93950b3af397580572adf2e366f3b162104a9.tar.bz2 pugl-d7a93950b3af397580572adf2e366f3b162104a9.zip |
Rename puglPostRedisplay() to puglObscureView()
For consistency with event types (since "obscure" is opposite "expose") and the
upcoming puglObscureRegion().
Diffstat (limited to 'include/pugl/pugl.h')
-rw-r--r-- | include/pugl/pugl.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index b70b91d..49e5fe5 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -298,9 +298,9 @@ typedef PuglAnyEvent PuglCloseEvent; This event is sent to every view near the end of a main loop iteration when any pending exposures are about to be redrawn. It is typically used to mark - regions to expose with puglPostRedisplay() or puglPostRedisplayRect(). For - example, to continuously animate, a view calls puglPostRedisplay() when an - update event is received, and it will then shortly receive an expose event. + regions to expose with puglObscureView() or puglPostRedisplayRect(). For + example, to continuously animate, obscure the view when an update event is + received, and it will receive an expose event shortly afterwards. */ typedef PuglAnyEvent PuglUpdateEvent; @@ -1422,13 +1422,13 @@ puglGetContext(PuglView* view); */ PUGL_API PuglStatus -puglPostRedisplay(PuglView* view); +puglObscureView(PuglView* view); /** Request a redisplay of the given rectangle within the view. - This has the same semantics as puglPostRedisplay(), but allows giving a - precise region for redrawing only a portion of the view. + This has the same semantics as puglObscureView(), but allows giving a precise + region for redrawing only a portion of the view. */ PUGL_API PuglStatus @@ -2194,6 +2194,22 @@ puglGetParentWindow(PuglView* view) return puglGetParent(view); } +/** + Request a redisplay for the entire view. + + This will cause an expose event to be dispatched later. If called from + within the event handler, the expose should arrive at the end of the current + event loop iteration, though this is not strictly guaranteed on all + platforms. If called elsewhere, an expose will be enqueued to be processed + in the next event loop iteration. +*/ +static inline PUGL_DEPRECATED_BY("puglObscureView") +PuglStatus +puglPostRedisplay(PuglView* view) +{ + return puglObscureView(view); +} + #endif // PUGL_DISABLE_DEPRECATED /** |