From 02d2704a0be7443907f5752c00b71feb58cc11dd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 1 Sep 2016 22:26:22 -0400 Subject: Add PUGL_CLOSE event This allows purely event-driven applications to handle window close. Something more extensible for WM message seems like it might be a good idea here, but I can't think of specific uses, so this will do. --- pugl/event.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pugl/event.h') diff --git a/pugl/event.h b/pugl/event.h index 2c48369..8ed1b2e 100644 --- a/pugl/event.h +++ b/pugl/event.h @@ -38,6 +38,7 @@ typedef enum { PUGL_BUTTON_RELEASE, PUGL_CONFIGURE, PUGL_EXPOSE, + PUGL_CLOSE, PUGL_KEY_PRESS, PUGL_KEY_RELEASE, PUGL_ENTER_NOTIFY, @@ -116,6 +117,15 @@ typedef struct { int count; /**< Number of expose events to follow. */ } PuglEventExpose; +/** + Window close event. +*/ +typedef struct { + PuglEventType type; /**< PUGL_CLOSE. */ + PuglView* view; /**< View that received this event. */ + uint32_t flags; /**< Bitwise OR of PuglEventFlag values. */ +} PuglEventClose; + /** Key press/release event. -- cgit v1.2.3