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 /doc | |
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 'doc')
-rw-r--r-- | doc/c/event-loop.rst | 5 | ||||
-rw-r--r-- | doc/cpp/event-loop.rst | 5 |
2 files changed, 4 insertions, 6 deletions
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. diff --git a/doc/cpp/event-loop.rst b/doc/cpp/event-loop.rst index 1d2ac41..3223069 100644 --- a/doc/cpp/event-loop.rst +++ b/doc/cpp/event-loop.rst @@ -24,14 +24,13 @@ while those that draw continuously may use a significant fraction of the frame p Redrawing ********* -Occasional redrawing can be requested by calling :func:`View::postRedisplay` or :func:`View::postRedisplayRect`. +Occasional redrawing can be requested by calling :func:`View::obscure`. After these are called, a :type:`ExposeEvent` will be dispatched on the next call to :func:`World::update`. Note, however, that this will not wake up a blocked :func:`World::update` call on MacOS (which does not handle drawing via events). -For continuous redrawing, -call :func:`View::postRedisplay` while handling a :type:`UpdateEvent`. +For continuous redrawing, obscure the view while handling a :type:`UpdateEvent`. 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. |