aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-08-04 20:28:28 +0200
committerDavid Robillard <d@drobilla.net>2019-09-03 08:34:39 +0200
commit89af2b1e3910196c4cad47c3748c1a2920b3faf9 (patch)
tree1b9ffadabf823426ce62b7d8b77a303e3d6950f7 /pugl/detail
parentb0ac6dcb492b68404d800fe8ed0c7393d487fa4b (diff)
downloadpugl-89af2b1e3910196c4cad47c3748c1a2920b3faf9.tar.gz
pugl-89af2b1e3910196c4cad47c3748c1a2920b3faf9.tar.bz2
pugl-89af2b1e3910196c4cad47c3748c1a2920b3faf9.zip
Rename remaining init functions
This finishes the removal of the init/set split. While these ones are superficial, the general idea here is to provide general functions that work before or after window creation where possible. This prevents the situation where ever more dynamic counterparts to existing init functions get added over time.
Diffstat (limited to 'pugl/detail')
-rw-r--r--pugl/detail/implementation.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/pugl/detail/implementation.c b/pugl/detail/implementation.c
index 1f027a9..3cefa37 100644
--- a/pugl/detail/implementation.c
+++ b/pugl/detail/implementation.c
@@ -136,25 +136,28 @@ puglGetWorld(PuglView* view)
return view->world;
}
-void
-puglInitWindowHint(PuglView* view, PuglWindowHint hint, int value)
+PuglStatus
+puglSetViewHint(PuglView* view, PuglViewHint hint, int value)
{
if (hint < PUGL_NUM_WINDOW_HINTS) {
view->hints[hint] = value;
}
+
+ return PUGL_SUCCESS;
}
-void
-puglInitWindowParent(PuglView* view, PuglNativeWindow parent)
+PuglStatus
+puglSetParentWindow(PuglView* view, PuglNativeWindow parent)
{
view->parent = parent;
+ return PUGL_SUCCESS;
}
-int
-puglInitBackend(PuglView* view, const PuglBackend* backend)
+PuglStatus
+puglSetBackend(PuglView* view, const PuglBackend* backend)
{
view->backend = backend;
- return 0;
+ return PUGL_SUCCESS;
}
void