aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_cairo_backend.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-27 00:59:16 +0200
committerDavid Robillard <d@drobilla.net>2019-07-29 01:59:15 +0200
commit5049953041cbc9592f0470eb185e1448b69835d6 (patch)
tree8752948797a3cb00fb411b97902517e0dee625ac /pugl/pugl_cairo_backend.h
parent657a30d29edbf28c2d12788114c988156cfd6996 (diff)
downloadpugl-5049953041cbc9592f0470eb185e1448b69835d6.tar.gz
pugl-5049953041cbc9592f0470eb185e1448b69835d6.tar.bz2
pugl-5049953041cbc9592f0470eb185e1448b69835d6.zip
Completely separate backends from platform implementation
This removes PuglContextType and allows the user to pass a backend directly. Normally this would come from one of the two accessors declared in the headers, but it would be possible to add backends without changing any of the existing code at all. Unfortunately, it is not possible to preserve backwards compatibility and achieve the ultimate goal of linking only to the required dependencies, so puglInitContextType() has just been removed.
Diffstat (limited to 'pugl/pugl_cairo_backend.h')
-rw-r--r--pugl/pugl_cairo_backend.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/pugl/pugl_cairo_backend.h b/pugl/pugl_cairo_backend.h
index b48915e..3330c08 100644
--- a/pugl/pugl_cairo_backend.h
+++ b/pugl/pugl_cairo_backend.h
@@ -14,15 +14,24 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/**
+ @file pugl_cairo_backend.h Declaration of Cairo backend accessor.
+*/
+
#ifndef PUGL_CAIRO_BACKEND_H
#define PUGL_CAIRO_BACKEND_H
-#include "pugl/pugl_internal_types.h"
+#include "pugl/pugl.h"
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ Cairo graphics backend accessor.
+
+ Pass the return value to puglInitBackend() to draw to a view with Cairo.
+*/
PUGL_API const PuglBackend*
puglCairoBackend(void);