aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/pugl/pugl.h4
-rw-r--r--src/implementation.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h
index c13fa69..71578a9 100644
--- a/include/pugl/pugl.h
+++ b/include/pugl/pugl.h
@@ -877,6 +877,10 @@ PUGL_API
PuglStatus
puglSetBackend(PuglView* view, const PuglBackend* backend);
+/// Return the graphics backend used by a view
+const PuglBackend*
+puglGetBackend(const PuglView* view);
+
/// Set the function to call when an event occurs
PUGL_API
PuglStatus
diff --git a/src/implementation.c b/src/implementation.c
index 145d53b..2644412 100644
--- a/src/implementation.c
+++ b/src/implementation.c
@@ -265,6 +265,12 @@ puglSetBackend(PuglView* view, const PuglBackend* backend)
return PUGL_SUCCESS;
}
+const PuglBackend*
+puglGetBackend(const PuglView* view)
+{
+ return view->backend;
+}
+
void
puglSetHandle(PuglView* view, PuglHandle handle)
{