diff options
author | Mikhail Burakov <mburakov@mailbox.org> | 2023-04-02 12:09:20 +0200 |
---|---|---|
committer | Mikhail Burakov <mburakov@mailbox.org> | 2023-04-07 13:47:39 +0200 |
commit | eecbacdc1ab1b29fee71f3a689e01cabe12b3730 (patch) | |
tree | 0b6c924678a31ed2f46061f7767a99bb40b57737 /window.h | |
parent | 972e03b4a09b790d9ed9c8102cc897a75c9bb751 (diff) |
Major rewrite of window to support input events
Diffstat (limited to 'window.h')
-rw-r--r-- | window.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -24,12 +24,18 @@ struct Window; struct Frame; -struct Window* WindowCreate(void); +struct WindowEventHandlers { + void (*OnClose)(void* user); + void (*OnKey)(void* user, unsigned key, bool pressed); +}; + +struct Window* WindowCreate( + const struct WindowEventHandlers* window_event_handlers, void* user); int WindowGetEventsFd(const struct Window* window); bool WindowProcessEvents(const struct Window* window); bool WindowAssignFrames(struct Window* window, size_t nframes, const struct Frame* frames); bool WindowShowFrame(struct Window* window, size_t index); -void WindowDestroy(struct Window** window); +void WindowDestroy(struct Window* window); #endif // RECEIVER_WINDOW_H_ |