diff options
author | David Robillard <d@drobilla.net> | 2019-08-04 20:28:28 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-09-03 08:34:39 +0200 |
commit | 89af2b1e3910196c4cad47c3748c1a2920b3faf9 (patch) | |
tree | 1b9ffadabf823426ce62b7d8b77a303e3d6950f7 /test/pugl_test.c | |
parent | b0ac6dcb492b68404d800fe8ed0c7393d487fa4b (diff) | |
download | pugl-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 'test/pugl_test.c')
-rw-r--r-- | test/pugl_test.c | 24 |
1 files changed, 12 insertions, 12 deletions
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); |