From 9be7bab7cf3c63cafa07e5a70d6c59559ffdc1de Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 9 Mar 2020 21:49:58 +0100 Subject: Add PuglEventClient and puglSendEvent() This event makes it possible to send an arbitrary event to a view, which is useful for many things. In particular, this method of communication with views will wake up the event loop, unlike hacks in applications that share data in some other way. --- 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 aca3376..7dc6e6e 100644 --- a/test/test_utils.h +++ b/test/test_utils.h @@ -14,8 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#define __STDC_FORMAT_MACROS 1 + #include "pugl/pugl.h" +#include #include #include #include @@ -118,6 +121,11 @@ printEvent(const PuglEvent* event, const char* prefix, const bool verbose) return PRINT("%sFocus out%s\n", prefix, event->focus.grab ? " (ungrab)" : ""); + case PUGL_CLIENT: + return PRINT("%sClient %" PRIXPTR " %" PRIXPTR "\n", + prefix, + event->client.data1, + event->client.data2); default: break; } -- cgit v1.2.1