From 91bb8bce1f1156712ca01e52ea0f9b27f82e4804 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 28 Nov 2018 18:01:02 +0000 Subject: [PATCH] Create default implementation of Fl_Screen_Driver::get_system_scheme() and use it for macOS and Windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13137 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Screen_Driver.H | 1 + src/Fl_Screen_Driver.cxx | 2 +- src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H | 1 - src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx | 6 ------ src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H | 1 - src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx | 6 ------ 6 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/Fl_Screen_Driver.H b/src/Fl_Screen_Driver.H index d20f429c9..6e4edcd0a 100644 --- a/src/Fl_Screen_Driver.H +++ b/src/Fl_Screen_Driver.H @@ -103,6 +103,7 @@ public: /* the default implementation of parse_color() may be enough */ virtual int parse_color(const char* p, uchar& r, uchar& g, uchar& b); virtual void get_system_colors() { } + /* the default implementation of get_system_scheme() may be enough */ virtual const char *get_system_scheme(); // --- global timers virtual void add_timeout(double time, Fl_Timeout_Handler cb, void *argp) { } diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx index 3411e8bc6..cb89ec2b8 100644 --- a/src/Fl_Screen_Driver.cxx +++ b/src/Fl_Screen_Driver.cxx @@ -137,7 +137,7 @@ int Fl_Screen_Driver::screen_num(int x, int y, int w, int h) const char *Fl_Screen_Driver::get_system_scheme() { - return 0L; + return fl_getenv("FLTK_SCHEME"); } /** The bullet character used by default by Fl_Secret_Input */ diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H index 579081e1f..f00d09f0b 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H @@ -77,7 +77,6 @@ public: virtual void grab(Fl_Window* win); // --- global colors virtual void get_system_colors(); - virtual const char *get_system_scheme(); // --- global timers virtual void add_timeout(double time, Fl_Timeout_Handler cb, void *argp); virtual void repeat_timeout(double time, Fl_Timeout_Handler cb, void *argp); diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx index 771122e83..ec24bc705 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx @@ -217,12 +217,6 @@ void Fl_Cocoa_Screen_Driver::get_system_colors() } -const char *Fl_Cocoa_Screen_Driver::get_system_scheme() -{ - return fl_getenv("FLTK_SCHEME"); -} - - int Fl_Cocoa_Screen_Driver::has_marked_text() { return true; } diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H index 1a1f19b7e..c86124a0e 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H @@ -69,7 +69,6 @@ public: virtual void grab(Fl_Window* win); // --- global colors virtual void get_system_colors(); - virtual const char *get_system_scheme(); // --- global timers virtual void add_timeout(double time, Fl_Timeout_Handler cb, void *argp); virtual void repeat_timeout(double time, Fl_Timeout_Handler cb, void *argp); diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index 1dcc53721..b96857257 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -341,12 +341,6 @@ void Fl_WinAPI_Screen_Driver::get_system_colors() } -const char *Fl_WinAPI_Screen_Driver::get_system_scheme() -{ - return fl_getenv("FLTK_SCHEME"); -} - - // ---- timers