aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/implementation.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-09 21:50:03 +0100
committerDavid Robillard <d@drobilla.net>2020-03-09 22:17:44 +0100
commit5c02f37c8d1dd74f3b72f1fb0b2a77f4d1dc2da9 (patch)
treee65d93c60a4a6f28f5218753036425330c687519 /pugl/detail/implementation.c
parent7099dc568ccbe206ceb6f861263f49adc8e4aef3 (diff)
downloadpugl-5c02f37c8d1dd74f3b72f1fb0b2a77f4d1dc2da9.tar.gz
pugl-5c02f37c8d1dd74f3b72f1fb0b2a77f4d1dc2da9.tar.bz2
pugl-5c02f37c8d1dd74f3b72f1fb0b2a77f4d1dc2da9.zip
Deprecate puglEnterContext() and puglLeaveContext()
These are prone to abuse, and have caused confusion with people who try to use them like in other libraries that support explicit drawing in the main loop. The drawing parameter was also wrong, and these were already just compatibility veneers since the internal context API needs to be more expressive. So, now that PUGL_CREATE and PUGL_DESTROY exist, they can be deprecated to force clients to draw only at the correct time.
Diffstat (limited to 'pugl/detail/implementation.c')
-rw-r--r--pugl/detail/implementation.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pugl/detail/implementation.c b/pugl/detail/implementation.c
index 8deb50a..6433faa 100644
--- a/pugl/detail/implementation.c
+++ b/pugl/detail/implementation.c
@@ -243,6 +243,8 @@ puglGetContext(PuglView* view)
return view->backend->getContext(view);
}
+#ifndef PUGL_DISABLE_DEPRECATED
+
PuglStatus
puglEnterContext(PuglView* view, bool drawing)
{
@@ -265,6 +267,8 @@ puglLeaveContext(PuglView* view, bool drawing)
return PUGL_SUCCESS;
}
+#endif
+
PuglStatus
puglSetEventFunc(PuglView* view, PuglEventFunc eventFunc)
{