diff options
author | David Robillard <d@drobilla.net> | 2016-09-01 22:26:22 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-09-01 22:26:22 -0400 |
commit | 02d2704a0be7443907f5752c00b71feb58cc11dd (patch) | |
tree | f2d22fd08c10b2ff1f7762d0dc8feb3561aafa5d /pugl/event.h | |
parent | 252421757e4e8ca9f482f2885ef9c09492c06757 (diff) |
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.
Diffstat (limited to 'pugl/event.h')
-rw-r--r-- | pugl/event.h | 10 |
1 files changed, 10 insertions, 0 deletions
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, @@ -117,6 +118,15 @@ typedef struct { } 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. Keys that correspond to a Unicode character have `character` and `utf8` set. |