summaryrefslogtreecommitdiff
path: root/src/user/include/popups
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-01-24 12:00:11 -0500
committerBenji Dial <benji6283@gmail.com>2021-01-24 12:00:11 -0500
commitbce944d1498eaa3b6940ee234c863b3548a66b37 (patch)
treeea40c087ab4f0f236aee8d158cf68550f5209f72 /src/user/include/popups
parentca731aa747214919df7b3dfe3478dbe787ce5b68 (diff)
downloadportland-os-bce944d1498eaa3b6940ee234c863b3548a66b37.tar.gz
graphics!
Diffstat (limited to 'src/user/include/popups')
-rw-r--r--src/user/include/popups/info.h14
-rw-r--r--src/user/include/popups/popup.h23
2 files changed, 37 insertions, 0 deletions
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 <popups/popup.h>
+
+#include <pland/syscall.h>
+
+#include <stdarg.h>
+
+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 <pland/syscall.h>
+
+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