diff options
author | David Robillard <d@drobilla.net> | 2021-05-25 12:07:17 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-05-25 12:12:59 -0400 |
commit | e6183b3dbe6b83d642cad1dfb296083ce8c53360 (patch) | |
tree | 60ec2f11586489bcd81364654d6964d399484596 /doc/c | |
parent | 040e94b26395451b78f5cbe0b7f208afcf28af1b (diff) | |
download | pugl-e6183b3dbe6b83d642cad1dfb296083ce8c53360.tar.gz pugl-e6183b3dbe6b83d642cad1dfb296083ce8c53360.tar.bz2 pugl-e6183b3dbe6b83d642cad1dfb296083ce8c53360.zip |
Rename event structs in a more readable style
Aside from reading more naturally, this avoids clashes with types that are not
events, like PuglEventFlags. This is also more consistent with the C++
bindings, where "EventExpose" would be quite strange, for example.
Apologies for the noise. Aliases to the old names will be preserved in the
deprecated API like other things for a short while.
Diffstat (limited to 'doc/c')
-rw-r--r-- | doc/c/event-loop.rst | 8 | ||||
-rw-r--r-- | doc/c/events.rst | 10 | ||||
-rw-r--r-- | doc/c/shutting-down.rst | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/doc/c/event-loop.rst b/doc/c/event-loop.rst index 3b9915f..be4e315 100644 --- a/doc/c/event-loop.rst +++ b/doc/c/event-loop.rst @@ -25,10 +25,10 @@ Redrawing Occasional redrawing can be requested by calling :func:`puglPostRedisplay` or :func:`puglPostRedisplayRect`. After these are called, -a :struct:`PuglEventExpose` will be dispatched on the next call to :func:`puglUpdate`. +a :struct:`PuglExposeEvent` will be dispatched on the next call to :func:`puglUpdate`. For continuous redrawing, -call :func:`puglPostRedisplay` while handling a :struct:`PuglEventUpdate` event. +call :func:`puglPostRedisplay` 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. @@ -88,10 +88,10 @@ has displayed the window menu. This means that :func:`puglUpdate` will block until the resize is finished, or the menu is closed. -Pugl dispatches :struct:`PuglEventLoopEnter` and :struct:`PuglEventLoopLeave` events to notify the application of this situation. +Pugl dispatches :struct:`PuglLoopEnterEvent` and :struct:`PuglLoopLeaveEvent` events to notify the application of this situation. If you want to continuously redraw during resizing on these platforms, you can schedule a timer with :func:`puglStartTimer` when the recursive loop is entered, -and post redisplays when handling the :struct:`PuglEventTimer`. +and post redisplays when handling the :struct:`PuglTimerEvent`. Be sure to remove the timer with :func:`puglStopTimer` when the recursive loop is finished. On X11, there are no recursive event loops, diff --git a/doc/c/events.rst b/doc/c/events.rst index bf964db..86f7c63 100644 --- a/doc/c/events.rst +++ b/doc/c/events.rst @@ -60,7 +60,7 @@ and handles exposure internally to provide optimized and consistent behavior acr Cairo Context ------------- -A Cairo context is created for each :struct:`PuglEventExpose`, +A Cairo context is created for each :struct:`PuglExposeEvent`, and only exists during the handling of that event. Null is returned by :func:`puglGetContext` at any other time. @@ -69,10 +69,10 @@ OpenGL Context The OpenGL context is only active during the handling of these events: -- :struct:`PuglEventCreate` -- :struct:`PuglEventDestroy` -- :struct:`PuglEventConfigure` -- :struct:`PuglEventExpose` +- :struct:`PuglCreateEvent` +- :struct:`PuglDestroyEvent` +- :struct:`PuglConfigureEvent` +- :struct:`PuglExposeEvent` As always, drawing is only possible during an expose. diff --git a/doc/c/shutting-down.rst b/doc/c/shutting-down.rst index dfb56cd..a04c771 100644 --- a/doc/c/shutting-down.rst +++ b/doc/c/shutting-down.rst @@ -6,7 +6,7 @@ Shutting Down ############# When a view is closed, -it will receive a :struct:`PuglEventClose`. +it will receive a :struct:`PuglCloseEvent`. An application may also set a flag based on user input or other conditions, which can be used to break out of the main loop and stop calling :func:`puglUpdate`. |