aboutsummaryrefslogtreecommitdiff
path: root/body/c_fl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'body/c_fl.cpp')
-rw-r--r--body/c_fl.cpp149
1 files changed, 120 insertions, 29 deletions
diff --git a/body/c_fl.cpp b/body/c_fl.cpp
index ec5f7e5..7bfc444 100644
--- a/body/c_fl.cpp
+++ b/body/c_fl.cpp
@@ -6,6 +6,7 @@
#include <FL/Enumerations.H>
#include <FL/Fl.H>
+#include <FL/Fl_Widget.H>
#include "c_fl.h"
@@ -51,84 +52,174 @@ size_t c_pointer_size() {
+const int fl_enum_num_red = FL_NUM_RED;
+const int fl_enum_num_green = FL_NUM_GREEN;
+const int fl_enum_num_blue = FL_NUM_BLUE;
+const int fl_enum_num_gray = FL_NUM_GRAY;
+
+
+
+
+const unsigned int fl_enum_button1 = FL_BUTTON1;
+const unsigned int fl_enum_button2 = FL_BUTTON2;
+const unsigned int fl_enum_button3 = FL_BUTTON3;
+#if FL_API_VERSION >= 10310
+const unsigned int fl_enum_button4 = FL_BUTTON4;
+const unsigned int fl_enum_button5 = FL_BUTTON5;
+#else
+// woo, limited backwards compatibility
+const unsigned int fl_enum_button4 = 8;
+const unsigned int fl_enum_button5 = 16;
+#endif
+const unsigned int fl_enum_buttons = FL_BUTTONS;
+
+
+
+
+const int fl_enum_left_mouse = FL_LEFT_MOUSE;
+const int fl_enum_middle_mouse = FL_MIDDLE_MOUSE;
+const int fl_enum_right_mouse = FL_RIGHT_MOUSE;
+#if FL_API_VERSION >= 10310
+const int fl_enum_back_mouse = FL_BACK_MOUSE;
+const int fl_enum_forward_mouse = FL_FORWARD_MOUSE;
+#else
+// woo, limited backwards compatibility
+const int fl_enum_back_mouse = 4;
+const int fl_enum_forward_mouse = 5;
+#endif
+
+
+
+
+unsigned int fl_enum_rgb_color2(unsigned char l) {
+ return static_cast<unsigned int>(fl_rgb_color(l));
+}
+
unsigned int fl_enum_rgb_color(unsigned char r, unsigned char g, unsigned char b) {
- return fl_rgb_color(r, g, b);
+ return static_cast<unsigned int>(fl_rgb_color(r, g, b));
}
+unsigned int fl_enum_color_cube(int r, int g, int b) {
+ return static_cast<unsigned int>(fl_color_cube(r, g, b));
+}
+unsigned int fl_enum_gray_ramp(int l) {
+ return static_cast<unsigned int>(fl_gray_ramp(l));
+}
+unsigned int fl_enum_darker(unsigned int c) {
+ return static_cast<unsigned int>(fl_darker(static_cast<Fl_Color>(c)));
+}
-int fl_abi_check(int v) {
- return Fl::abi_check(v);
+unsigned int fl_enum_lighter(unsigned int c) {
+ return static_cast<unsigned int>(fl_lighter(static_cast<Fl_Color>(c)));
}
-int fl_abi_version() {
- return Fl::abi_version();
+unsigned int fl_enum_contrast(unsigned int f, unsigned int b) {
+ return static_cast<unsigned int>(fl_contrast
+ (static_cast<Fl_Color>(f), static_cast<Fl_Color>(b)));
}
-int fl_api_version() {
- return Fl::api_version();
+unsigned int fl_enum_inactive(unsigned int c) {
+ return static_cast<unsigned int>(fl_inactive(static_cast<Fl_Color>(c)));
}
-double fl_version() {
- return Fl::version();
+unsigned int fl_enum_color_average(unsigned int c1, unsigned int c2, float w) {
+ return static_cast<unsigned int>(fl_color_average
+ (static_cast<Fl_Color>(c1), static_cast<Fl_Color>(c2), w));
}
-void fl_awake() {
- Fl::awake();
+int fl_enum_box(int b) {
+ return static_cast<int>(fl_box(static_cast<Fl_Boxtype>(b)));
}
-void fl_lock() {
- Fl::lock();
+int fl_enum_frame(int b) {
+ return static_cast<int>(fl_frame(static_cast<Fl_Boxtype>(b)));
}
-void fl_unlock() {
- Fl::unlock();
+int fl_enum_down(int b) {
+ return static_cast<int>(fl_down(static_cast<Fl_Boxtype>(b)));
}
-int fl_get_damage() {
- return Fl::damage();
+const char * const fl_clip_image_char_ptr = Fl::clipboard_image;
+
+const char * const fl_clip_plain_text_char_ptr = Fl::clipboard_plain_text;
+
+
+
+
+int fl_abi_check(int v) {
+ return Fl::abi_check(v);
+}
+
+int fl_abi_version() {
+ return Fl::abi_version();
}
-void fl_set_damage(int v) {
- Fl::damage(v);
+int fl_api_version() {
+ return Fl::api_version();
}
-void fl_flush() {
- Fl::flush();
+double fl_version() {
+ return Fl::version();
}
-void fl_redraw() {
- Fl::redraw();
+
+
+
+short fl_inside_callback = 0;
+
+void fl_delete_widget(void * w) {
+ Fl::delete_widget(static_cast<Fl_Widget*>(w));
}
int fl_check() {
- return Fl::check();
+ short temp = fl_inside_callback;
+ fl_inside_callback = 1;
+ int ret = Fl::check();
+ fl_inside_callback = temp;
+ return ret;
}
int fl_ready() {
- return Fl::ready();
+ short temp = fl_inside_callback;
+ fl_inside_callback = 1;
+ int ret = Fl::ready();
+ fl_inside_callback = temp;
+ return ret;
}
int fl_wait() {
- return Fl::wait();
+ short temp = fl_inside_callback;
+ fl_inside_callback = 1;
+ int ret = Fl::wait();
+ fl_inside_callback = temp;
+ return ret;
}
-int fl_wait2(double s) {
- return Fl::wait(s);
+double fl_wait2(double s) {
+ short temp = fl_inside_callback;
+ fl_inside_callback = 1;
+ double ret = Fl::wait(s);
+ fl_inside_callback = temp;
+ return ret;
}
int fl_run() {
- return Fl::run();
+ short temp = fl_inside_callback;
+ fl_inside_callback = 1;
+ int ret = Fl::run();
+ fl_inside_callback = temp;
+ return ret;
}