From 02870242eea8b729b3dbd6d23eb77372f61c6318 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sun, 19 Jun 2022 10:23:24 +0200 Subject: Move input method support to Fl_Screen_Driver from Fl_Graphics_Driver --- src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H | 2 ++ src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx | 8 ++++++++ 2 files changed, 10 insertions(+) (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 74e1a8123..a2303d0be 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H @@ -100,6 +100,8 @@ public: virtual void copy(const char *stuff, int len, int clipboard, const char *type); virtual void paste(Fl_Widget &receiver, int clipboard, const char *type); virtual int clipboard_contains(const char *type); + virtual void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win); + virtual void reset_spot(); private: float scale_; }; diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx index 33f92a6db..01c3b0f95 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx @@ -381,3 +381,11 @@ Fl_RGB_Image *Fl_Cocoa_Screen_Driver::read_win_rectangle(int X, int Y, int w, in rgb->alloc_array = 1; return rgb; } + +void Fl_Cocoa_Screen_Driver::set_spot(int /*font*/, int size, int X, int Y, int /*W*/, int /*H*/, Fl_Window* /*win*/) { + Fl_Cocoa_Screen_Driver::insertion_point_location(X, Y, size); +} + +void Fl_Cocoa_Screen_Driver::reset_spot() { + Fl_Cocoa_Screen_Driver::reset_marked_text(); +} -- cgit v1.2.3