summaryrefslogtreecommitdiff
path: root/src/user/popups/popup.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-11 22:00:22 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-11 22:00:22 -0500
commit5fcf57739e68a8b5053e03778aaee0eed445babd (patch)
treee7a8bab18668d112e58b1b48190195035c71fa8a /src/user/popups/popup.c
parent0f2398d1f622cce37925f52d978d92e6cce1c7a9 (diff)
downloadportland-os-5fcf57739e68a8b5053e03778aaee0eed445babd.tar.gz
settings editor, and lots of changes in service of that
Diffstat (limited to 'src/user/popups/popup.c')
-rw-r--r--src/user/popups/popup.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/user/popups/popup.c b/src/user/popups/popup.c
deleted file mode 100644
index 9cdccb4..0000000
--- a/src/user/popups/popup.c
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <popups/popup.h>
-
-#include <knob/format.h>
-#include <knob/heap.h>
-
-#include <pland/syscall.h>
-
-void handle_actions(struct popup *p) {
- if (p->has_quit)
- return;
- struct window_action a;
- while (1) {
- _get_win_action(p->handle, &a);
- if (a.action_type == NOT_READY)
- return;
- if ((a.action_type == KEY_DOWN)) {
- //syslogf("got key 0x%2x, 0x%3x", a.as_key.key_id, a.as_key.modifiers);
- for (const struct key_packet *kp = p->quit_binds; kp->key_id; ++kp) {
- //syslogf("checking against 0x%2x, 0x%3x", kp->key_id, kp->modifiers);
- if ((a.as_key.key_id == kp->key_id) && (a.as_key.modifiers == kp->modifiers)) {
- p->has_quit = true;
- p->quit_as = a.as_key;
- return;
- }
- }
- }
- }
-}
-
-void delete_popup(struct popup *p) {
- _delete_window(p->handle);
- free_block(p->pixbuf);
-}
-
-void make_modal(struct popup *p) {
- handle_actions(p);
- while (!p->has_quit) {
- _wait_for_action();
- _yield_task();
- handle_actions(p);
- }
- delete_popup(p);
-} \ No newline at end of file