diff options
author | Benji Dial <benji6283@gmail.com> | 2021-03-08 14:46:19 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-03-08 14:46:19 -0500 |
commit | 8221fd5451f094defa9866f98026b74a969f7693 (patch) | |
tree | 9f0e9595fd15bdecbe667f823deded7428547b44 /src/user/meminfo/meminfo.c | |
parent | 1a5ece4f52ef17c7c868e95eb26e98137d5cab6f (diff) | |
download | portland-os-8221fd5451f094defa9866f98026b74a969f7693.tar.gz |
resizable widgets, default widget implementation for some functions, reimplementing meminfo in raleigh
Diffstat (limited to 'src/user/meminfo/meminfo.c')
-rw-r--r-- | src/user/meminfo/meminfo.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/user/meminfo/meminfo.c b/src/user/meminfo/meminfo.c deleted file mode 100644 index 3c3c45b..0000000 --- a/src/user/meminfo/meminfo.c +++ /dev/null @@ -1,31 +0,0 @@ -#include <popups/info.h> - -#include <pland/syscall.h> - -static const struct key_packet meminfo_quits[] = { - { .key_id = KEY_ESCAPE, .modifiers = NO_MODS }, - { .key_id = KEY_F5, .modifiers = NO_MODS }, - { .key_id = 0 } -}; - -void main() { - struct popup p; -redo: - info_popupf(&p, - "kernel memory free: %uk\n" - "userspace memory free: %uk / %uk\n" - "Escape to quit, F5 to refresh.", - (_pixel_t){.r = 0, .g = 0, .b = 0}, - (_pixel_t){.r = 0xbf, .g = 0xbf, .b = 0xbf}, - _kernel_dynamic_area_left() * 4, - _total_userspace_left() * 4, - _total_userspace_size() * 4 - ); - //hacky, i should really make info_popup take an arg - p.quit_binds = meminfo_quits; - make_modal(&p); - if (p.quit_as.key_id == KEY_F5) - //i should make popups have changable text - //(make a new pixbuf but reuse the window) - goto redo; -}
\ No newline at end of file |