aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/mac_cairo.m
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-09-07 14:16:19 +0200
committerDavid Robillard <d@drobilla.net>2019-09-07 14:40:39 +0200
commitdc9f1d852d3fba8ddcf7bb535810ad384900fe06 (patch)
treeb3ea2e2b5be850fa3b42c476ae03f04d960b0433 /pugl/detail/mac_cairo.m
parent7162fa4f5656ad7dfe2d6fea02f9f33c5aa1b1cf (diff)
downloadpugl-dc9f1d852d3fba8ddcf7bb535810ad384900fe06.tar.gz
pugl-dc9f1d852d3fba8ddcf7bb535810ad384900fe06.tar.bz2
pugl-dc9f1d852d3fba8ddcf7bb535810ad384900fe06.zip
Clean up error handling
Diffstat (limited to 'pugl/detail/mac_cairo.m')
-rw-r--r--pugl/detail/mac_cairo.m28
1 files changed, 14 insertions, 14 deletions
diff --git a/pugl/detail/mac_cairo.m b/pugl/detail/mac_cairo.m
index fcb4f07..143fbb0 100644
--- a/pugl/detail/mac_cairo.m
+++ b/pugl/detail/mac_cairo.m
@@ -61,13 +61,13 @@
@end
-static int
+static PuglStatus
puglMacCairoConfigure(PuglView* PUGL_UNUSED(view))
{
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglMacCairoCreate(PuglView* view)
{
PuglInternals* impl = view->impl;
@@ -82,10 +82,10 @@ puglMacCairoCreate(PuglView* view)
}
impl->drawView = drawView;
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglMacCairoDestroy(PuglView* view)
{
PuglCairoView* const drawView = (PuglCairoView*)view->impl->drawView;
@@ -94,15 +94,15 @@ puglMacCairoDestroy(PuglView* view)
[drawView release];
view->impl->drawView = nil;
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglMacCairoEnter(PuglView* view, bool drawing)
{
PuglCairoView* const drawView = (PuglCairoView*)view->impl->drawView;
if (!drawing) {
- return 0;
+ return PUGL_SUCCESS;
}
assert(!drawView->surface);
@@ -115,15 +115,15 @@ puglMacCairoEnter(PuglView* view, bool drawing)
drawView->cr = cairo_create(drawView->surface);
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglMacCairoLeave(PuglView* view, bool drawing)
{
PuglCairoView* const drawView = (PuglCairoView*)view->impl->drawView;
if (!drawing) {
- return 0;
+ return PUGL_SUCCESS;
}
assert(drawView->surface);
@@ -138,16 +138,16 @@ puglMacCairoLeave(PuglView* view, bool drawing)
CGContextFlush(context);
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+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 0;
+ return PUGL_SUCCESS;
}
static void*