summaryrefslogtreecommitdiff
path: root/src/c_fl_widget.cpp
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-01-12 01:14:58 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-01-12 01:14:58 +1300
commite93b9bbc02e2791f3a35b6f077fcbb8514c28aed (patch)
tree3661530027db6809a9cbad7b2477416009e00787 /src/c_fl_widget.cpp
parent53aa8144851913994b963ed611cca8885b8f9a9e (diff)
Refactored draw/handle methods in Widgets hierarchy, improved docs, added a few minor method bindings here and there
Diffstat (limited to 'src/c_fl_widget.cpp')
-rw-r--r--src/c_fl_widget.cpp13
1 files changed, 13 insertions, 0 deletions
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<Fl_Widget*>(w)->type();
+}
+
+void fl_widget_set_type(WIDGET w, unsigned char t) {
+ reinterpret_cast<Fl_Widget*>(w)->type(t);
+}
+
+
+
+
int fl_widget_damage(WIDGET w) {
return reinterpret_cast<Fl_Widget*>(w)->damage();
}