From 5049953041cbc9592f0470eb185e1448b69835d6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 27 Jul 2019 00:59:16 +0200 Subject: 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. --- pugl/pugl_cairo_backend.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pugl/pugl_cairo_backend.h') 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); -- cgit v1.2.1