aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/win.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-10-20 22:01:48 +0200
committerDavid Robillard <d@drobilla.net>2020-10-20 22:01:48 +0200
commit83c4baa25e24920cc6da2e1f87118bc47ed35851 (patch)
tree8d46a9270071ea883e30ab57ba502edd4be8c038 /pugl/detail/win.h
parenta87395423915f913b819291b3b4920501cccdf95 (diff)
downloadpugl-83c4baa25e24920cc6da2e1f87118bc47ed35851.tar.gz
pugl-83c4baa25e24920cc6da2e1f87118bc47ed35851.tar.bz2
pugl-83c4baa25e24920cc6da2e1f87118bc47ed35851.zip
Split stub backends into separate files
This makes things more consistent between platforms and backends.
Diffstat (limited to 'pugl/detail/win.h')
-rw-r--r--pugl/detail/win.h27
1 files changed, 6 insertions, 21 deletions
diff --git a/pugl/detail/win.h b/pugl/detail/win.h
index 547bd02..b0d92e0 100644
--- a/pugl/detail/win.h
+++ b/pugl/detail/win.h
@@ -137,26 +137,11 @@ puglWinCreateWindow(PuglView* const view,
return PUGL_SUCCESS;
}
-static inline PuglStatus
-puglWinStubConfigure(PuglView* view)
-{
- PuglInternals* const impl = view->impl;
- PuglStatus st = PUGL_SUCCESS;
-
- if ((st = puglWinCreateWindow(view, "Pugl", &impl->hwnd, &impl->hdc))) {
- return st;
- }
+PuglStatus
+puglWinStubConfigure(PuglView* view);
- impl->pfd = puglWinGetPixelFormatDescriptor(view->hints);
- impl->pfId = ChoosePixelFormat(impl->hdc, &impl->pfd);
+PuglStatus
+puglWinStubEnter(PuglView* view, const PuglEventExpose* expose);
- if (!SetPixelFormat(impl->hdc, impl->pfId, &impl->pfd)) {
- ReleaseDC(impl->hwnd, impl->hdc);
- DestroyWindow(impl->hwnd);
- impl->hwnd = NULL;
- impl->hdc = NULL;
- return PUGL_SET_FORMAT_FAILED;
- }
-
- return PUGL_SUCCESS;
-}
+PuglStatus
+puglWinStubLeave(PuglView* view, const PuglEventExpose* expose);