From e324057cbd9b02704172bb5db4163f4a0c276288 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Sun, 12 Jan 2025 15:11:40 +1300 Subject: Closed a few gaps in the APIs of Window derivatives --- src/c_fl_double_window.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/c_fl_double_window.cpp') diff --git a/src/c_fl_double_window.cpp b/src/c_fl_double_window.cpp index 4bbe48b..93c3f49 100644 --- a/src/c_fl_double_window.cpp +++ b/src/c_fl_double_window.cpp @@ -18,6 +18,17 @@ extern "C" int widget_handle_hook(void * ud, int e); +// Non-friend protected access + +class Friend_Double_Window : Fl_Double_Window { +public: + // Only needed for the (int) version + using Fl_Double_Window::flush; +}; + + + + // Attaching all relevant hooks and friends class My_Double_Window : public Fl_Double_Window { @@ -77,6 +88,11 @@ void fl_double_window_flush(DOUBLEWINDOW d) { reinterpret_cast(d)->flush(); } +void fl_double_window_flush2(DOUBLEWINDOW d, int e) { + void (Fl_Double_Window::*myflush)(int) = &Friend_Double_Window::flush; + (reinterpret_cast(d)->*myflush)(e); +} + -- cgit