aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-09-14 10:54:38 +0200
committerDavid Robillard <d@drobilla.net>2019-09-14 11:19:55 +0200
commitfd68302be2387caf21871cc512c9ebb4db33ee30 (patch)
treec66ad0d164da29ab93cf72f172152ce2c3af5745 /pugl
parentdd6a9c09695161814d53fc2402178eaab348ca85 (diff)
downloadpugl-fd68302be2387caf21871cc512c9ebb4db33ee30.tar.gz
pugl-fd68302be2387caf21871cc512c9ebb4db33ee30.tar.bz2
pugl-fd68302be2387caf21871cc512c9ebb4db33ee30.zip
Windows: Fix Cairo backend build
Diffstat (limited to 'pugl')
-rw-r--r--pugl/detail/win_cairo.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/pugl/detail/win_cairo.c b/pugl/detail/win_cairo.c
index 741f4cf..497711b 100644
--- a/pugl/detail/win_cairo.c
+++ b/pugl/detail/win_cairo.c
@@ -34,7 +34,7 @@ typedef struct {
HBITMAP drawBitmap;
} PuglWinCairoSurface;
-static int
+static PuglStatus
puglWinCairoCreateDrawContext(PuglView* view)
{
PuglInternals* const impl = view->impl;
@@ -55,10 +55,10 @@ puglWinCairoCreateDrawContext(PuglView* view)
}
cairo_save(surface->cr);
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglWinCairoDestroyDrawContext(PuglView* view)
{
PuglInternals* const impl = view->impl;
@@ -74,10 +74,10 @@ puglWinCairoDestroyDrawContext(PuglView* view)
surface->drawDc = NULL;
surface->drawBitmap = NULL;
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglWinCairoConfigure(PuglView* view)
{
PuglInternals* const impl = view->impl;
@@ -101,16 +101,16 @@ puglWinCairoConfigure(PuglView* view)
impl->surface = (PuglWinCairoSurface*)calloc(
1, sizeof(PuglWinCairoSurface));
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglWinCairoCreate(PuglView* view)
{
return puglWinCairoCreateDrawContext(view);
}
-static int
+static PuglStatus
puglWinCairoDestroy(PuglView* view)
{
PuglInternals* const impl = view->impl;
@@ -120,32 +120,32 @@ puglWinCairoDestroy(PuglView* view)
free(surface);
impl->surface = NULL;
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglWinCairoEnter(PuglView* view, bool drawing)
{
PuglInternals* const impl = view->impl;
PuglWinCairoSurface* const surface = (PuglWinCairoSurface*)impl->surface;
if (!drawing) {
- return 0;
+ return PUGL_SUCCESS;
}
PAINTSTRUCT ps;
BeginPaint(view->impl->hwnd, &ps);
cairo_save(surface->cr);
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglWinCairoLeave(PuglView* view, bool drawing)
{
PuglInternals* const impl = view->impl;
PuglWinCairoSurface* const surface = (PuglWinCairoSurface*)impl->surface;
if (!drawing) {
- return 0;
+ return PUGL_SUCCESS;
}
cairo_restore(surface->cr);
@@ -158,21 +158,21 @@ puglWinCairoLeave(PuglView* view, bool drawing)
EndPaint(view->impl->hwnd, &ps);
SwapBuffers(view->impl->hdc);
- return 0;
+ return PUGL_SUCCESS;
}
-static int
+static PuglStatus
puglWinCairoResize(PuglView* view,
int PUGL_UNUSED(width),
int PUGL_UNUSED(height))
{
- int st = 0;
+ PuglStatus st = PUGL_SUCCESS;
if ((st = puglWinCairoDestroyDrawContext(view)) ||
(st = puglWinCairoCreateDrawContext(view))) {
return st;
}
- return 0;
+ return PUGL_SUCCESS;
}
static void*