aboutsummaryrefslogtreecommitdiff
path: root/subprojects/d2tk/pugl/doc/c/shutting-down.rst
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2021-04-14 11:04:53 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2021-04-14 11:04:53 +0200
commit3007dd352c553ce465ec3746fb022ac0d9aad26a (patch)
treeb0163d7d3edd3b19eeeb4317ad45b98351aeb5fb /subprojects/d2tk/pugl/doc/c/shutting-down.rst
parent80ecee6c568afa4448e8a69f997fc40d2f0ff13e (diff)
parent0348c6d4b26e2970723c56913f217d737a435b3a (diff)
downloadmephisto.lv2-3007dd352c553ce465ec3746fb022ac0d9aad26a.tar.xz
Merge commit '0348c6d4b26e2970723c56913f217d737a435b3a'
Diffstat (limited to 'subprojects/d2tk/pugl/doc/c/shutting-down.rst')
-rw-r--r--subprojects/d2tk/pugl/doc/c/shutting-down.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/subprojects/d2tk/pugl/doc/c/shutting-down.rst b/subprojects/d2tk/pugl/doc/c/shutting-down.rst
new file mode 100644
index 0000000..dfb56cd
--- /dev/null
+++ b/subprojects/d2tk/pugl/doc/c/shutting-down.rst
@@ -0,0 +1,20 @@
+.. default-domain:: c
+.. highlight:: c
+
+#############
+Shutting Down
+#############
+
+When a view is closed,
+it will receive a :struct:`PuglEventClose`.
+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`.
+
+When the main event loop has finished running,
+any views and the world need to be destroyed, in that order.
+For example:
+
+.. code-block:: c
+
+ puglFreeView(view);
+ puglFreeWorld(world);