From bce944d1498eaa3b6940ee234c863b3548a66b37 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 24 Jan 2021 12:00:11 -0500 Subject: graphics! --- src/user/include/popups/info.h | 14 ++++++++++++++ src/user/include/popups/popup.h | 23 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/user/include/popups/info.h create mode 100644 src/user/include/popups/popup.h (limited to 'src/user/include/popups') diff --git a/src/user/include/popups/info.h b/src/user/include/popups/info.h new file mode 100644 index 0000000..2c4e83f --- /dev/null +++ b/src/user/include/popups/info.h @@ -0,0 +1,14 @@ +#ifndef POPUPS_INFO_H +#define POPUPS_INFO_H + +#include + +#include + +#include + +void info_popup(struct popup *into, const char *text, uint8_t fg, uint8_t bg); +void info_popupf(struct popup *into, const char *text, uint8_t fg, uint8_t bg, ...); +void info_popupf_v(struct popup *into, const char *text, uint8_t fg, uint8_t bg, va_list args); + +#endif \ No newline at end of file diff --git a/src/user/include/popups/popup.h b/src/user/include/popups/popup.h new file mode 100644 index 0000000..1a3c531 --- /dev/null +++ b/src/user/include/popups/popup.h @@ -0,0 +1,23 @@ +#ifndef POPUPS_POPUP_H +#define POPUPS_POPUP_H + +#include + +struct popup { + _window_handle_t handle; + uint8_t *pixbuf; + + bool has_quit; + struct key_packet quit_as; + + //terminated by one with .key_id == 0 + struct key_packet *quit_binds; + bool free_quit_binds; +}; + +void handle_actions(struct popup *p); +//deletes popup before returning +void make_modal(struct popup *p); +void delete_popup(struct popup *p); + +#endif \ No newline at end of file -- cgit v1.2.3