summaryrefslogtreecommitdiff
path: root/src/user/mdemo
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/mdemo
parent0f2398d1f622cce37925f52d978d92e6cce1c7a9 (diff)
downloadportland-os-5fcf57739e68a8b5053e03778aaee0eed445babd.tar.gz
settings editor, and lots of changes in service of that
Diffstat (limited to 'src/user/mdemo')
-rw-r--r--src/user/mdemo/main.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/user/mdemo/main.c b/src/user/mdemo/main.c
deleted file mode 100644
index fc7de80..0000000
--- a/src/user/mdemo/main.c
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <pland/syscall.h>
-#include <popups/info.h>
-
-#define TEXT_COLOR ((_pixel_t){.r = 0x00, .g = 0x00, .b = 0x00})
-#define BG_COLOR ((_pixel_t){.r = 0xbf, .g = 0xbf, .b = 0xbf})
-
-static const char *const mb_names[] = {
- "left", "right", "middle"
-};
-
-void main() {
- struct popup main_win;
- info_popup(&main_win, "Click me!", TEXT_COLOR, BG_COLOR);
-
- while (1) {
- struct window_action winact;
- _get_win_action(main_win.handle, &winact);
-
- switch (winact.action_type) {
- struct popup modal;
- case NOT_READY:
- _wait_for_action();
- _yield_task();
- continue;
-
- case KEY_DOWN:
- return;
-
- case MOUSE_DOWN:
- info_popupf(&modal,
- "Got %s click at (%d, %d)!",
- TEXT_COLOR, BG_COLOR,
- mb_names[winact.as_mouse.which],
- winact.as_mouse.x, winact.as_mouse.y);
- make_modal(&modal);
- continue;
-
- default:
- continue;
- }
- }
-} \ No newline at end of file