From e93b9bbc02e2791f3a35b6f077fcbb8514c28aed Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Sun, 12 Jan 2025 01:14:58 +1300 Subject: Refactored draw/handle methods in Widgets hierarchy, improved docs, added a few minor method bindings here and there --- src/c_fl_widget.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/c_fl_widget.cpp') diff --git a/src/c_fl_widget.cpp b/src/c_fl_widget.cpp index 61e5a96..db7312d 100644 --- a/src/c_fl_widget.cpp +++ b/src/c_fl_widget.cpp @@ -55,6 +55,8 @@ int My_Widget::handle(int e) { +// Flattened C API + WIDGET new_fl_widget(int x, int y, int w, int h, char* label) { My_Widget *wd = new My_Widget(x, y, w, h, label); return wd; @@ -340,6 +342,17 @@ void fl_widget_set_deimage(WIDGET w, void * img) { +unsigned char fl_widget_get_type(WIDGET w) { + return reinterpret_cast(w)->type(); +} + +void fl_widget_set_type(WIDGET w, unsigned char t) { + reinterpret_cast(w)->type(t); +} + + + + int fl_widget_damage(WIDGET w) { return reinterpret_cast(w)->damage(); } -- cgit