diff options
author | David Robillard <d@drobilla.net> | 2019-10-27 11:20:47 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-11-03 21:03:18 +0100 |
commit | 14c7cb54a913be5a505148068582d9c56e3d1681 (patch) | |
tree | b23af8d477bb623ae743492367e8ebeb0a43e699 /pugl/detail/mac_cairo.m | |
parent | 84754fdb2ff35779378e032ec2f195a22d66fe30 (diff) | |
download | pugl-14c7cb54a913be5a505148068582d9c56e3d1681.tar.gz pugl-14c7cb54a913be5a505148068582d9c56e3d1681.tar.bz2 pugl-14c7cb54a913be5a505148068582d9c56e3d1681.zip |
Add stub implementations of backend functions
Towards having actual trivial backends, but in general allows backends to not
declare functions they don't care about which is nice and already a net
reduction of actual code.
Diffstat (limited to 'pugl/detail/mac_cairo.m')
-rw-r--r-- | pugl/detail/mac_cairo.m | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/pugl/detail/mac_cairo.m b/pugl/detail/mac_cairo.m index 143fbb0..1e4149c 100644 --- a/pugl/detail/mac_cairo.m +++ b/pugl/detail/mac_cairo.m @@ -21,6 +21,7 @@ #include "pugl/detail/implementation.h" #include "pugl/detail/mac.h" #include "pugl/pugl_cairo_backend.h" +#include "pugl/pugl_stub_backend.h" #include <cairo-quartz.h> @@ -62,12 +63,6 @@ @end static PuglStatus -puglMacCairoConfigure(PuglView* PUGL_UNUSED(view)) -{ - return PUGL_SUCCESS; -} - -static PuglStatus puglMacCairoCreate(PuglView* view) { PuglInternals* impl = view->impl; @@ -141,15 +136,6 @@ puglMacCairoLeave(PuglView* view, bool drawing) return PUGL_SUCCESS; } -static PuglStatus -puglMacCairoResize(PuglView* PUGL_UNUSED(view), - int PUGL_UNUSED(width), - int PUGL_UNUSED(height)) -{ - // No need to resize, the surface is created for the drawing context - return PUGL_SUCCESS; -} - static void* puglMacCairoGetContext(PuglView* view) { @@ -159,12 +145,12 @@ puglMacCairoGetContext(PuglView* view) const PuglBackend* puglCairoBackend(void) { static const PuglBackend backend = { - puglMacCairoConfigure, + puglStubConfigure, puglMacCairoCreate, puglMacCairoDestroy, puglMacCairoEnter, puglMacCairoLeave, - puglMacCairoResize, + puglStubResize, puglMacCairoGetContext }; |