From 17473af7e8ed13e0a9399a69442f9839e5d83aef Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Thu, 9 Jan 2025 14:58:19 +1300 Subject: Used C FFI to make Extra_Init and Extra_Final calls more consistent --- src/c_fl_menu_button.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/c_fl_menu_button.cpp') diff --git a/src/c_fl_menu_button.cpp b/src/c_fl_menu_button.cpp index bc85ac9..fd78df4 100644 --- a/src/c_fl_menu_button.cpp +++ b/src/c_fl_menu_button.cpp @@ -11,6 +11,22 @@ +// Telprot stopovers + +extern "C" void menu_button_extra_init_hook + (void * aobj, int x, int y, int w, int h, const char * l); +void fl_menu_button_extra_init(void * adaobj, int x, int y, int w, int h, const char * label) { + menu_button_extra_init_hook(adaobj, x, y, w, h, label); +} + +extern "C" void menu_button_extra_final_hook(void * aobj); +void fl_menu_button_extra_final(void * adaobj) { + menu_button_extra_final_hook(adaobj); +} + + + + class My_Menu_Button : public Fl_Menu_Button { public: using Fl_Menu_Button::Fl_Menu_Button; -- cgit