summaryrefslogtreecommitdiff
path: root/body/c_fl_event.cpp
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-02-18 12:54:42 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-02-18 12:54:42 +1300
commitd5fd3906e62969fce7fec7f2fccdc5a7436cbdbc (patch)
tree3f21adf51a8ea3aa75111c6653a6c8612608c096 /body/c_fl_event.cpp
parent36e546c1c9a9bb8e778fb637c17f94390b4d23c2 (diff)
Filled holes in FLTK, FLTK.Events, FLTK.Screen, tweaked Fl_Shortcut implementation
Diffstat (limited to 'body/c_fl_event.cpp')
-rw-r--r--body/c_fl_event.cpp51
1 files changed, 49 insertions, 2 deletions
diff --git a/body/c_fl_event.cpp b/body/c_fl_event.cpp
index d8760af..d88dfc2 100644
--- a/body/c_fl_event.cpp
+++ b/body/c_fl_event.cpp
@@ -16,10 +16,14 @@ void fl_event_add_handler(void * f) {
Fl::add_handler(reinterpret_cast<Fl_Event_Handler>(f));
}
-void fl_event_set_event_dispatch(void * f) {
+void fl_event_set_dispatch(void * f) {
Fl::event_dispatch(reinterpret_cast<Fl_Event_Dispatch>(f));
}
+int fl_event_handle_dispatch(int e, void * w) {
+ return Fl::handle(e, static_cast<Fl_Window*>(w));
+}
+
int fl_event_handle(int e, void * w) {
return Fl::handle_(e, static_cast<Fl_Window*>(w));
}
@@ -70,6 +74,17 @@ void fl_event_set_visible_focus(int f) {
+const char * fl_event_clipboard_text() {
+ return static_cast<const char*>(Fl::event_clipboard());
+}
+
+const char * fl_event_clipboard_type() {
+ return Fl::event_clipboard_type();
+}
+
+
+
+
int fl_event_compose(int &d) {
return Fl::compose(d);
}
@@ -86,6 +101,10 @@ int fl_event_length() {
return Fl::event_length();
}
+int fl_event_test_shortcut(unsigned int s) {
+ return Fl::test_shortcut(static_cast<Fl_Shortcut>(s));
+}
+
@@ -136,7 +155,11 @@ int fl_event_is_click() {
return Fl::event_is_click();
}
-int fl_event_is_clicks() {
+void fl_event_set_click(int c) {
+ Fl::event_is_click(c);
+}
+
+int fl_event_get_clicks() {
return Fl::event_clicks();
}
@@ -160,6 +183,30 @@ int fl_event_button3() {
return Fl::event_button3();
}
+int fl_event_button4() {
+#if FL_API_VERSION >= 10310
+ return Fl::event_button4();
+#else
+ return 0;
+#endif
+}
+
+int fl_event_button5() {
+#if FL_API_VERSION >= 10310
+ return Fl::event_button5();
+#else
+ return 0;
+#endif
+}
+
+int fl_event_buttons() {
+ return Fl::event_buttons();
+}
+
+int fl_event_inside2(void * c) {
+ return Fl::event_inside(static_cast<Fl_Widget*>(c));
+}
+
int fl_event_inside(int x, int y, int w, int h) {
return Fl::event_inside(x, y, w, h);
}