diff options
author | David Robillard <d@drobilla.net> | 2020-03-09 21:49:53 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-09 21:49:53 +0100 |
commit | a7cb0cb1506792d6893556bc976822e254a89106 (patch) | |
tree | c6ea552a3fb0fbf711ecbfafc699030eda3f8158 /test | |
parent | ed301f0548438692269481096e6ef51c3ead01dc (diff) | |
download | pugl-a7cb0cb1506792d6893556bc976822e254a89106.tar.gz pugl-a7cb0cb1506792d6893556bc976822e254a89106.tar.bz2 pugl-a7cb0cb1506792d6893556bc976822e254a89106.zip |
Add create, destroy, map, and unmap events
These can be used to do things when a view is created or destroyed, in
particular set up the GL context in a more controlled way. Map and unmap
events are also added for when views are shown and hidden so application can
react to this as well.
Towards the deprecation of puglEnterContext() and puglLeaveContext(), which are
prone to abuse.
squash! Remove client event stuff
Diffstat (limited to 'test')
-rw-r--r-- | test/test_utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_utils.h b/test/test_utils.h index 80d279b..aca3376 100644 --- a/test/test_utils.h +++ b/test/test_utils.h @@ -124,6 +124,14 @@ printEvent(const PuglEvent* event, const char* prefix, const bool verbose) if (verbose) { switch (event->type) { + case PUGL_CREATE: + return fprintf(stderr, "%sCreate\n", prefix); + case PUGL_DESTROY: + return fprintf(stderr, "%sDestroy\n", prefix); + case PUGL_MAP: + return fprintf(stderr, "%sMap\n", prefix); + case PUGL_UNMAP: + return fprintf(stderr, "%sUnmap\n", prefix); case PUGL_CONFIGURE: return PRINT("%sConfigure " PFMT " " PFMT "\n", prefix, |