summaryrefslogtreecommitdiff
path: root/c_fl_widget.cpp
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2016-09-07 02:15:57 +1000
committerJed Barber <jjbarber@y7mail.com>2016-09-07 02:15:57 +1000
commite9add081b396a0cbfdf59df9d340afe44d9b9544 (patch)
treead5a4cb0d3e7a5ee228f7e5d954a78dc1c0e6f22 /c_fl_widget.cpp
parentdac7e747e5c61d78deffdccc986d202e9f0d63bb (diff)
Now using widget user data to refer back to Ada side of things, will enable easy implementation of callbacks
Diffstat (limited to 'c_fl_widget.cpp')
-rw-r--r--c_fl_widget.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/c_fl_widget.cpp b/c_fl_widget.cpp
index 9acc52f..a503dc1 100644
--- a/c_fl_widget.cpp
+++ b/c_fl_widget.cpp
@@ -4,6 +4,20 @@
#include "c_fl_widget.h"
+
+
+void * fl_widget_get_user_data(WIDGET w) {
+ return reinterpret_cast<Fl_Widget*>(w)->user_data();
+}
+
+
+void fl_widget_set_user_data(WIDGET w, void * d) {
+ reinterpret_cast<Fl_Widget*>(w)->user_data(d);
+}
+
+
+
+
int fl_widget_get_box(WIDGET w) {
return reinterpret_cast<Fl_Widget*>(w)->box();
}
@@ -53,3 +67,8 @@ void fl_widget_set_label_type(WIDGET w, int l) {
reinterpret_cast<Fl_Widget*>(w)->labeltype(static_cast<Fl_Labeltype>(l));
}
+
+void * fl_widget_get_parent(WIDGET w) {
+ return reinterpret_cast<Fl_Widget*>(w)->parent();
+}
+