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/include/cxx/raleigh/window.h | |
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/include/cxx/raleigh/window.h')
-rw-r--r-- | src/user/include/cxx/raleigh/window.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/user/include/cxx/raleigh/window.h b/src/user/include/cxx/raleigh/window.h index 21ae511..0dd9341 100644 --- a/src/user/include/cxx/raleigh/window.h +++ b/src/user/include/cxx/raleigh/window.h @@ -7,6 +7,8 @@ namespace raleigh { #include <raleigh/runtime.h> #include <raleigh/widget.h> +#include <structs/dllist.h> +#include <structs/duple.h> #include <pland/syscall.h> #include <raleigh/util.h> @@ -16,7 +18,10 @@ namespace raleigh { public: //pass on_close to specify a close handler. if on_close returns false, the window will not be closed. window(widget &root, _pixel_t bg_color=RGB(bf, bf, bf), bool (*on_close)(window &)=0); + void add_keybind(struct key_packet kp, void (*handler)(window &)); + void notify_needs_paint(widget &from); + void notify_widget_size_change(widget &from, coord old_size); enum try_actions_return_t {NONE, GOOD, DELETE}; try_actions_return_t try_actions(); void show(); @@ -31,6 +36,7 @@ namespace raleigh { bool needs_repaint; void paint_full(); bool (*on_close)(window &); + dllist<duple<struct key_packet, void (*)(window &)>> keybinds; }; } |