From 5bab46940c9dc6ad272e4cbf7970a7261aaff210 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 7 Jan 2022 16:34:44 +0100 Subject: Re-organize cross-platform support for text input methods. FLTK 1.3 supports complex text input methods (TIMs) for the 3 platforms (X11, Windows, macOS). This support has an interface with FLTK that is common for X11 and Windows, via (undocumented) functions fl_set_spot(), fl_set_status() and fl_reset_spot(). In contrast, and because it's been developed independently, the interface between the macOS TIM and FLTK 1.3 is completely different : static functions FL::insertion_point_location() and Fl::reset_marked_text(). The present change implements a single TIM/FLTK interface used by all platforms based on functions fl_set_spot() and fl_reset_spot(). The previous macOS-specific functions FL::insertion_point_location() and Fl::reset_marked_text() are maintained only for compatibility with 1.3 and deprecated. --- src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/drivers/Cocoa') diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H index a2ab981b4..dcd5c4f57 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H @@ -86,9 +86,9 @@ public: virtual int has_timeout(Fl_Timeout_Handler cb, void *argp); virtual void remove_timeout(Fl_Timeout_Handler cb, void *argp); virtual int has_marked_text() const; - virtual void reset_marked_text(); - virtual void insertion_point_location(int x, int y, int height); - int insertion_point_location(int *px, int *py, int *pheight); + static void reset_marked_text(); + static void insertion_point_location(int x, int y, int height); + static int insertion_point_location(int *px, int *py, int *pheight); virtual int dnd(int use_selection); virtual int compose(int &del); virtual int input_widget_handle_key(int key, unsigned mods, unsigned shift, Fl_Input *input); -- cgit v1.2.3