|
commit 27c175dad8470229a512540edaae24787c65c3b7
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Jan 7 07:50:23 2022 +0100
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Jan 7 07:50:36 2022 +0100
Add virtual void Fl_Graphics_Driver::set_status() and implement for X11 platform.
FL/Fl_Graphics_Driver.H | 2 ++
src/Fl_Graphics_Driver.cxx | 2 ++
src/Fl_cocoa.mm | 5 -----
src/Fl_win32.cxx | 2 --
src/Fl_x.cxx | 2 +-
src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H | 1 +
src/fl_font.cxx | 5 +++++
7 files changed, 11 insertions(+), 8 deletions(-)
diff --git FL/Fl_Graphics_Driver.H FL/Fl_Graphics_Driver.H
index 480b3c9..fe1e8d0 100644
--- FL/Fl_Graphics_Driver.H
+++ FL/Fl_Graphics_Driver.H
@@ -356,8 +356,10 @@ public:
virtual float scale_font_for_PostScript(Fl_Font_Descriptor *desc, int s);
// default implementation may be enough
virtual float scale_bitmap_for_PostScript();
+ // next 3 are related to X Input Method
virtual void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win);
virtual void reset_spot();
+ virtual void set_status(int X, int Y, int W, int H);
// each platform implements these 3 functions its own way
virtual void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h);
virtual Fl_Region XRectangleRegion(int x, int y, int w, int h);
diff --git src/Fl_Graphics_Driver.cxx src/Fl_Graphics_Driver.cxx
index 8329355..4601568 100644
--- src/Fl_Graphics_Driver.cxx
+++ src/Fl_Graphics_Driver.cxx
@@ -124,6 +124,8 @@ void Fl_Graphics_Driver::set_spot(int font, int size, int X, int Y, int W, int H
// nothing to do, reimplement in driver if needed
}
+void Fl_Graphics_Driver::set_status(int X, int Y, int W, int H) {}
+
/** see fl_reset_spot() */
void Fl_Graphics_Driver::reset_spot()
diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index ad4e21c..faab623 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -141,11 +141,6 @@ static CFStringRef kTISPropertyInputSourceType;
typedef void (*KeyScript_type)(short);
static KeyScript_type KeyScript;
-/* fltk-utf8 placekeepers */
-void fl_set_status(int x, int y, int w, int h)
-{
-}
-
/*
* Mac keyboard lookup table
diff --git src/Fl_win32.cxx src/Fl_win32.cxx
index 9b972a9..20fc5ea 100644
--- src/Fl_win32.cxx
+++ src/Fl_win32.cxx
@@ -328,8 +328,6 @@ static struct FD {
extern unsigned int fl_codepage;
-void fl_set_status(int x, int y, int w, int h) {}
-
void Fl_WinAPI_System_Driver::add_fd(int n, int events, void (*cb)(FL_SOCKET, void *), void *v) {
remove_fd(n, events);
int i = nfds++;
diff --git src/Fl_x.cxx src/Fl_x.cxx
index 55c249e..f76d459 100644
--- src/Fl_x.cxx
+++ src/Fl_x.cxx
@@ -585,7 +585,7 @@ static void fl_new_ic()
}
-void fl_set_status(int x, int y, int w, int h)
+void Fl_Xlib_Graphics_Driver::set_status(int x, int y, int w, int h)
{
XVaNestedList status_attr;
status_area.x = x;
diff --git src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H
index 4dbf3c3..f7619ef 100644
--- src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H
+++ src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H
@@ -208,6 +208,7 @@ protected:
virtual float scale_bitmap_for_PostScript();
virtual void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win);
virtual void reset_spot();
+ virtual void set_status(int X, int Y, int W, int H);
virtual const char* get_font_name(Fl_Font fnum, int* ap);
virtual int get_font_sizes(Fl_Font fnum, int*& sizep);
#if !USE_XFT
diff --git src/fl_font.cxx src/fl_font.cxx
index 24d547e..df7df43 100644
--- src/fl_font.cxx
+++ src/fl_font.cxx
@@ -58,3 +58,8 @@ void fl_reset_spot()
{
Fl_Graphics_Driver::default_driver().reset_spot();
}
+
+void fl_set_status(int X, int Y, int W, int H)
+{
+ Fl_Graphics_Driver::default_driver().set_status(X, Y, W, H);
+}
[ Direct Link to Message ] | |