From 89af2b1e3910196c4cad47c3748c1a2920b3faf9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 Aug 2019 20:28:28 +0200 Subject: 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. --- pugl/detail/implementation.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'pugl/detail') 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 -- cgit v1.2.1