From a7cb0cb1506792d6893556bc976822e254a89106 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 9 Mar 2020 21:49:53 +0100 Subject: 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 --- test/test_utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') 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, -- cgit v1.2.1