aboutsummaryrefslogtreecommitdiff
path: root/test
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 /test
parentb0ac6dcb492b68404d800fe8ed0c7393d487fa4b (diff)
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 'test')
-rw-r--r--test/pugl_cairo_test.c6
-rw-r--r--test/pugl_test.c24
2 files changed, 15 insertions, 15 deletions
diff --git a/test/pugl_cairo_test.c b/test/pugl_cairo_test.c
index 52cbbbd..278a74d 100644
--- a/test/pugl_cairo_test.c
+++ b/test/pugl_cairo_test.c
@@ -212,10 +212,10 @@ main(int argc, char** argv)
PuglView* view = puglNewView(world);
puglSetFrame(view, frame);
puglSetMinSize(view, 256, 256);
- puglInitWindowHint(view, PUGL_RESIZABLE, resizable);
- puglInitBackend(view, puglCairoBackend());
+ puglSetViewHint(view, PUGL_RESIZABLE, resizable);
+ puglSetBackend(view, puglCairoBackend());
- puglInitWindowHint(view, PUGL_IGNORE_KEY_REPEAT, ignoreKeyRepeat);
+ puglSetViewHint(view, PUGL_IGNORE_KEY_REPEAT, ignoreKeyRepeat);
puglSetEventFunc(view, onEvent);
if (puglCreateWindow(view, "Pugl Test")) {
diff --git a/test/pugl_test.c b/test/pugl_test.c
index e291df7..6c4e3e8 100644
--- a/test/pugl_test.c
+++ b/test/pugl_test.c
@@ -320,13 +320,13 @@ main(int argc, char** argv)
puglSetFrame(app.parent, parentFrame);
puglSetMinSize(app.parent, borderWidth * 3, borderWidth * 3);
puglSetAspectRatio(app.parent, 1, 1, 16, 9);
- puglInitBackend(app.parent, puglGlBackend());
+ puglSetBackend(app.parent, puglGlBackend());
- puglInitWindowHint(app.parent, PUGL_RESIZABLE, resizable);
- puglInitWindowHint(app.parent, PUGL_SAMPLES, samples);
- puglInitWindowHint(app.parent, PUGL_DOUBLE_BUFFER, doubleBuffer);
- puglInitWindowHint(app.parent, PUGL_SWAP_INTERVAL, doubleBuffer);
- puglInitWindowHint(app.parent, PUGL_IGNORE_KEY_REPEAT, ignoreKeyRepeat);
+ puglSetViewHint(app.parent, PUGL_RESIZABLE, resizable);
+ puglSetViewHint(app.parent, PUGL_SAMPLES, samples);
+ puglSetViewHint(app.parent, PUGL_DOUBLE_BUFFER, doubleBuffer);
+ puglSetViewHint(app.parent, PUGL_SWAP_INTERVAL, doubleBuffer);
+ puglSetViewHint(app.parent, PUGL_IGNORE_KEY_REPEAT, ignoreKeyRepeat);
puglSetHandle(app.parent, &app);
puglSetEventFunc(app.parent, onParentEvent);
@@ -338,13 +338,13 @@ main(int argc, char** argv)
}
puglSetFrame(app.child, getChildFrame(parentFrame));
- puglInitWindowParent(app.child, puglGetNativeWindow(app.parent));
+ puglSetParentWindow(app.child, puglGetNativeWindow(app.parent));
- puglInitWindowHint(app.child, PUGL_SAMPLES, samples);
- puglInitWindowHint(app.child, PUGL_DOUBLE_BUFFER, doubleBuffer);
- puglInitWindowHint(app.child, PUGL_SWAP_INTERVAL, 0);
- puglInitBackend(app.child, puglGlBackend());
- puglInitWindowHint(app.child, PUGL_IGNORE_KEY_REPEAT, ignoreKeyRepeat);
+ puglSetViewHint(app.child, PUGL_SAMPLES, samples);
+ puglSetViewHint(app.child, PUGL_DOUBLE_BUFFER, doubleBuffer);
+ puglSetViewHint(app.child, PUGL_SWAP_INTERVAL, 0);
+ puglSetBackend(app.child, puglGlBackend());
+ puglSetViewHint(app.child, PUGL_IGNORE_KEY_REPEAT, ignoreKeyRepeat);
puglSetHandle(app.child, &app);
puglSetEventFunc(app.child, onEvent);