From d7a93950b3af397580572adf2e366f3b162104a9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 23 Jan 2025 17:00:36 -0500 Subject: Rename puglPostRedisplay() to puglObscureView() For consistency with event types (since "obscure" is opposite "expose") and the upcoming puglObscureRegion(). --- doc/c/event-loop.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/c') diff --git a/doc/c/event-loop.rst b/doc/c/event-loop.rst index be4e315..430566f 100644 --- a/doc/c/event-loop.rst +++ b/doc/c/event-loop.rst @@ -23,12 +23,11 @@ while those that draw continuously may use a significant fraction of the frame p Redrawing ********* -Occasional redrawing can be requested by calling :func:`puglPostRedisplay` or :func:`puglPostRedisplayRect`. +Occasional redrawing can be requested by calling :func:`puglObscureView` or :func:`puglPostRedisplayRect`. After these are called, a :struct:`PuglExposeEvent` will be dispatched on the next call to :func:`puglUpdate`. -For continuous redrawing, -call :func:`puglPostRedisplay` while handling a :struct:`PuglUpdateEvent` event. +For continuous redrawing, obscure the view while handling a :struct:`PuglUpdateEvent` event. This event is sent just before views are redrawn, so it can be used as a hook to expand the update region right before the view is exposed. Anything else that needs to be done every frame can be handled similarly. -- cgit v1.2.1