summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 12:53:10 +0500
committermaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 12:53:10 +0500
commit51cf34eb8fdef936328c565276615880997e28bb (patch)
tree27ded00e3ff593dbcf84af7e62bf410802523eb2 /src
parentcf813db2428ec77de88b06996712aad48de04219 (diff)
wip
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx100
-rw-r--r--src/Fl_Cairo.cxx32
-rw-r--r--src/Fl_Private.H41
-rw-r--r--src/Fl_System_Driver.cxx4
-rw-r--r--src/Fl_add_idle.cxx4
-rw-r--r--src/drivers/X11/fl_X11_platform_init.cxx8
-rw-r--r--src/fl_boxtype.cxx12
7 files changed, 95 insertions, 106 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index ac5b6a601..45509a0f6 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -71,10 +71,10 @@ void *Fl::e_clipboard_data = NULL;
Fl_Event_Dispatch Fl::e_dispatch = 0;
Fl_Callback_Reason Fl::callback_reason_ = FL_REASON_UNKNOWN;
-unsigned char Fl::Private::options_[] = { 0, 0 };
-unsigned char Fl::Private::options_read_ = 0;
+unsigned char Fl_Private_options_[] = { 0, 0 };
+unsigned char Fl_Private_options_read_ = 0;
-int Fl::Private::selection_to_clipboard_ = 0;
+int Fl_Private_selection_to_clipboard_ = 0;
Fl_Window *fl_xfocus = NULL; // which window X thinks has focus
Fl_Window *fl_xmousewin; // which window X thinks has FL_ENTER
@@ -114,7 +114,7 @@ char const * const Fl::clipboard_image = "image";
\see copy(const char *, int, int, const char *)
*/
void Fl::selection_to_clipboard(int mode) {
- Private::selection_to_clipboard_ = mode ? 1 : 0;
+ Fl_Private_selection_to_clipboard_ = mode ? 1 : 0;
}
/**
@@ -123,7 +123,7 @@ void Fl::selection_to_clipboard(int mode) {
\see void selection_to_clipboard(int)
*/
int Fl::selection_to_clipboard() {
- return Private::selection_to_clipboard_;
+ return Fl_Private_selection_to_clipboard_;
}
//
@@ -538,7 +538,7 @@ int Fl::has_check(Fl_Timeout_Handler cb, void *argp) {
return 0;
}
-void Fl::Private::run_checks()
+void Fl_Private_run_checks()
{
// checks are a bit messy so that add/remove and wait may be called
// from inside them without causing an infinite loop:
@@ -618,7 +618,7 @@ void fl_trigger_clipboard_notify(int source) {
////////////////////////////////////////////////////////////////
// idle/wait/run/check/ready:
-void (*Fl::Private::idle_)(); // see Fl::add_idle.cxx for the add/remove functions
+void (*Fl_Private_idle_)(); // see Fl::add_idle.cxx for the add/remove functions
/**
Returns whether at least one idle callback is currently set.
@@ -633,7 +633,7 @@ void (*Fl::Private::idle_)(); // see Fl::add_idle.cxx for the add/remove functio
\retval false No idle callback is currently set.
*/
bool Fl::idle() {
- return (Private::idle_ != 0);
+ return (Fl_Private_idle_ != 0);
}
/*
@@ -652,7 +652,7 @@ bool Fl::idle() {
the first idle callback and appends it to the end of the list of idle
callbacks. For details see static function call_idle() in Fl_add_idle.cxx.
- If it is NULL then no idle callbacks are active and Fl::Private::run_idle() returns
+ If it is NULL then no idle callbacks are active and Fl_Private_run_idle() returns
immediately.
Note: idle callbacks can be queued in nested FLTK event loops like
@@ -663,11 +663,11 @@ bool Fl::idle() {
if an event (timeout or button click etc.) handler calls Fl::add_idle()
or even in Fl::flush() if a draw() method calls Fl::add_idle().
*/
-void Fl::Private::run_idle() {
+void Fl_Private_run_idle() {
static char in_idle;
- if (Fl::Private::idle_ && !in_idle) {
+ if (Fl_Private_idle_ && !in_idle) {
in_idle = 1;
- Fl::Private::idle_(); // call the idle callback stored in Fl::Private::idle_ == Fl::idle()
+ Fl_Private_idle_(); // call the idle callback stored in Fl_Private_idle_ == Fl::idle()
in_idle = 0;
}
}
@@ -787,7 +787,7 @@ void Fl::hide_all_windows() {
}
}
-int Fl::Private::program_should_quit_ = 0;
+int Fl_Private_program_should_quit_ = 0;
/** Returns non-zero when a request for program termination was received and accepted.
On the MacOS platform, the "Quit xxx" item of the application menu is such a request,
@@ -796,7 +796,7 @@ int Fl::Private::program_should_quit_ = 0;
\version 1.4.0
*/
int Fl::program_should_quit() {
- return Private::program_should_quit_;
+ return Fl_Private_program_should_quit_;
}
/** Indicate to the FLTK library whether a program termination request was received and accepted.
@@ -805,7 +805,7 @@ int Fl::program_should_quit() {
\version 1.4.0
*/
void Fl::program_should_quit(int should_i) {
- Private::program_should_quit_ = should_i;
+ Fl_Private_program_should_quit_ = should_i;
}
@@ -2120,74 +2120,74 @@ void Fl::clear_widget_pointer(Fl_Widget const *w)
*/
bool Fl::option(Fl_Option opt)
{
- if (!Private::options_read_) {
+ if (!Fl_Private_options_read_) {
int tmp;
{ // first, read the system wide preferences
Fl_Preferences prefs(Fl_Preferences::CORE_SYSTEM, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
opt_prefs.get("ArrowFocus", tmp, 0); // default: off
- Private::options_[OPTION_ARROW_FOCUS] = tmp;
+ Fl_Private_options_[OPTION_ARROW_FOCUS] = tmp;
//opt_prefs.get("NativeFilechooser", tmp, 1); // default: on
- //Private::options_[OPTION_NATIVE_FILECHOOSER] = tmp;
+ //Fl_Private_options_[OPTION_NATIVE_FILECHOOSER] = tmp;
//opt_prefs.get("FilechooserPreview", tmp, 1); // default: on
- //Private::options_[OPTION_FILECHOOSER_PREVIEW] = tmp;
+ //Fl_Private_options_[OPTION_FILECHOOSER_PREVIEW] = tmp;
opt_prefs.get("VisibleFocus", tmp, 1); // default: on
- Private::options_[OPTION_VISIBLE_FOCUS] = tmp;
+ Fl_Private_options_[OPTION_VISIBLE_FOCUS] = tmp;
opt_prefs.get("DNDText", tmp, 1); // default: on
- Private::options_[OPTION_DND_TEXT] = tmp;
+ Fl_Private_options_[OPTION_DND_TEXT] = tmp;
opt_prefs.get("ShowTooltips", tmp, 1); // default: on
- Private::options_[OPTION_SHOW_TOOLTIPS] = tmp;
+ Fl_Private_options_[OPTION_SHOW_TOOLTIPS] = tmp;
opt_prefs.get("FNFCUsesGTK", tmp, 1); // default: on
- Private::options_[OPTION_FNFC_USES_GTK] = tmp;
+ Fl_Private_options_[OPTION_FNFC_USES_GTK] = tmp;
opt_prefs.get("PrintUsesGTK", tmp, 1); // default: on
- Private::options_[OPTION_PRINTER_USES_GTK] = tmp;
+ Fl_Private_options_[OPTION_PRINTER_USES_GTK] = tmp;
opt_prefs.get("ShowZoomFactor", tmp, 1); // default: on
- Private::options_[OPTION_SHOW_SCALING] = tmp;
+ Fl_Private_options_[OPTION_SHOW_SCALING] = tmp;
opt_prefs.get("UseZenity", tmp, 0); // default: off
- Private::options_[OPTION_FNFC_USES_ZENITY] = tmp;
+ Fl_Private_options_[OPTION_FNFC_USES_ZENITY] = tmp;
opt_prefs.get("UseKdialog", tmp, 0); // default: off
- Private::options_[OPTION_FNFC_USES_KDIALOG] = tmp;
+ Fl_Private_options_[OPTION_FNFC_USES_KDIALOG] = tmp;
opt_prefs.get("SimpleZoomShortcut", tmp, 0); // default: off
- Private::options_[OPTION_SIMPLE_ZOOM_SHORTCUT] = tmp;
+ Fl_Private_options_[OPTION_SIMPLE_ZOOM_SHORTCUT] = tmp;
}
{ // next, check the user preferences
// system options only, if the option is set ( >= 0 )
Fl_Preferences prefs(Fl_Preferences::CORE_USER, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
opt_prefs.get("ArrowFocus", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_ARROW_FOCUS] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_ARROW_FOCUS] = tmp;
//opt_prefs.get("NativeFilechooser", tmp, -1);
- //if (tmp >= 0) Private::options_[OPTION_NATIVE_FILECHOOSER] = tmp;
+ //if (tmp >= 0) Fl_Private_options_[OPTION_NATIVE_FILECHOOSER] = tmp;
//opt_prefs.get("FilechooserPreview", tmp, -1);
- //if (tmp >= 0) Private::options_[OPTION_FILECHOOSER_PREVIEW] = tmp;
+ //if (tmp >= 0) Fl_Private_options_[OPTION_FILECHOOSER_PREVIEW] = tmp;
opt_prefs.get("VisibleFocus", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_VISIBLE_FOCUS] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_VISIBLE_FOCUS] = tmp;
opt_prefs.get("DNDText", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_DND_TEXT] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_DND_TEXT] = tmp;
opt_prefs.get("ShowTooltips", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_SHOW_TOOLTIPS] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_SHOW_TOOLTIPS] = tmp;
opt_prefs.get("FNFCUsesGTK", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_FNFC_USES_GTK] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_FNFC_USES_GTK] = tmp;
opt_prefs.get("PrintUsesGTK", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_PRINTER_USES_GTK] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_PRINTER_USES_GTK] = tmp;
opt_prefs.get("ShowZoomFactor", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_SHOW_SCALING] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_SHOW_SCALING] = tmp;
opt_prefs.get("UseZenity", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_FNFC_USES_ZENITY] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_FNFC_USES_ZENITY] = tmp;
opt_prefs.get("UseKdialog", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_FNFC_USES_KDIALOG] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_FNFC_USES_KDIALOG] = tmp;
opt_prefs.get("SimpleZoomShortcut", tmp, -1);
- if (tmp >= 0) Private::options_[OPTION_SIMPLE_ZOOM_SHORTCUT] = tmp;
+ if (tmp >= 0) Fl_Private_options_[OPTION_SIMPLE_ZOOM_SHORTCUT] = tmp;
}
{ // now, if the developer has registered this app, we could ask for per-application preferences
}
- Private::options_read_ = 1;
+ Fl_Private_options_read_ = 1;
}
if (opt<0 || opt>=OPTION_LAST)
return false;
- return (bool)(Private::options_[opt]!=0);
+ return (bool)(Fl_Private_options_[opt]!=0);
}
/**
@@ -2216,11 +2216,11 @@ void Fl::option(Fl_Option opt, bool val)
{
if (opt<0 || opt>=OPTION_LAST)
return;
- if (!Private::options_read_) {
+ if (!Fl_Private_options_read_) {
// make sure that the options_ array is filled in
option(opt);
}
- Private::options_[opt] = val;
+ Fl_Private_options_[opt] = val;
}
@@ -2243,14 +2243,14 @@ Fl_Widget_Tracker::~Fl_Widget_Tracker()
Fl::release_widget_pointer(wp_); // remove pointer from watch list
}
-int Fl::Private::use_high_res_GL_ = 0;
+int Fl_Private_use_high_res_GL_ = 0;
/** sets whether GL windows should be drawn at high resolution on Apple
computers with retina displays
\version 1.3.4
*/
void Fl::use_high_res_GL(int val) {
- Private::use_high_res_GL_ = val;
+ Fl_Private_use_high_res_GL_ = val;
}
/** returns whether GL windows should be drawn at high resolution on Apple
@@ -2259,10 +2259,10 @@ void Fl::use_high_res_GL(int val) {
\version 1.3.4
*/
int Fl::use_high_res_GL() {
- return Private::use_high_res_GL_;
+ return Fl_Private_use_high_res_GL_;
}
-int Fl::Private::draw_GL_text_with_textures_ = 1;
+int Fl_Private_draw_GL_text_with_textures_ = 1;
/** sets whether OpenGL uses textures to draw all text.
By default, FLTK draws OpenGL text using textures, if the necessary
@@ -2276,7 +2276,7 @@ int Fl::Private::draw_GL_text_with_textures_ = 1;
\version 1.4.0
*/
void Fl::draw_GL_text_with_textures(int val) {
- Private::draw_GL_text_with_textures_ = val;
+ Fl_Private_draw_GL_text_with_textures_ = val;
}
/** returns whether whether OpenGL uses textures to draw all text.
@@ -2285,7 +2285,7 @@ void Fl::draw_GL_text_with_textures(int val) {
\version 1.4.0
*/
int Fl::draw_GL_text_with_textures() {
- return Private::draw_GL_text_with_textures_;
+ return Fl_Private_draw_GL_text_with_textures_;
}
int Fl::dnd()
diff --git a/src/Fl_Cairo.cxx b/src/Fl_Cairo.cxx
index 2387fa19a..be19dede7 100644
--- a/src/Fl_Cairo.cxx
+++ b/src/Fl_Cairo.cxx
@@ -33,7 +33,7 @@
// static initialization
-Fl_Cairo_State Fl::Private::cairo_state_; ///< current Cairo context information
+Fl_Cairo_State Fl_Private_cairo_state_; ///< current Cairo context information
/** When FLTK_HAVE_CAIRO is defined and cairo_autolink_context() is true,
any current window dc is linked to a current Cairo context.
@@ -51,7 +51,7 @@ Fl_Cairo_State Fl::Private::cairo_state_; ///< current Cairo context information
\note Only available if built with CMake option FLTK_OPTION_CAIRO_WINDOW=ON.
*/
void Fl::cairo_autolink_context(bool alink) {
- Private::cairo_state_.autolink(alink);
+ Fl_Private_cairo_state_.autolink(alink);
}
/**
@@ -63,12 +63,12 @@ void Fl::cairo_autolink_context(bool alink) {
\note Only available if built with CMake option FLTK_OPTION_CAIRO_EXT=ON.
*/
bool Fl::cairo_autolink_context() {
- return Private::cairo_state_.autolink();
+ return Fl_Private_cairo_state_.autolink();
}
/** Gets the current Cairo context linked with a fltk window. */
cairo_t *Fl::cairo_cc() {
- return Private::cairo_state_.cc();
+ return Fl_Private_cairo_state_.cc();
}
/** Sets the current Cairo context to \p c.
@@ -77,7 +77,7 @@ cairo_t *Fl::cairo_cc() {
\note Only available if built with CMake option FLTK_OPTION_CAIRO_WINDOW=ON.
*/
void Fl::cairo_cc(cairo_t *c, bool own /* = false */) {
- Private::cairo_state_.cc(c, own);
+ Fl_Private_cairo_state_.cc(c, own);
}
@@ -121,18 +121,18 @@ cairo_t *Fl::cairo_make_current(Fl_Window *wi) {
if (fl_gc == 0) { // means remove current cc
Fl::cairo_cc(0); // destroy any previous cc
- Fl::Private::cairo_state_.window(0);
+ Fl_Private_cairo_state_.window(0);
return 0;
}
// don't re-create a context if it's the same gc/window combination
- if (fl_gc == Fl::Private::cairo_state_.gc() && fl_xid(wi) == (Window)Fl::Private::cairo_state_.window())
+ if (fl_gc == Fl_Private_cairo_state_.gc() && fl_xid(wi) == (Window)Fl_Private_cairo_state_.window())
return Fl::cairo_cc();
// Scale the Cairo context appropriately
float scale = Fl::screen_scale(wi->screen_num());
- cairo_ctxt = Fl::Private::cairo_make_current(0, wi->w() * scale, wi->h() * scale);
- Fl::Private::cairo_state_.window((void *)fl_xid(wi));
+ cairo_ctxt = Fl_Private_cairo_make_current(0, wi->w() * scale, wi->h() * scale);
+ Fl_Private_cairo_state_.window((void *)fl_xid(wi));
cairo_scale(cairo_ctxt, scale, scale);
return cairo_ctxt;
}
@@ -151,17 +151,17 @@ static cairo_surface_t *cairo_create_surface(void *gc, int W, int H) {
\note Only available if CMake FLTK_OPTION_CAIRO_WINDOW is enabled.
*/
-cairo_t *Fl::Private::cairo_make_current(void *gc, int W, int H) {
- if (gc == Fl::Private::cairo_state_.gc() &&
- fl_window == (Window)Fl::Private::cairo_state_.window() &&
- cairo_state_.cc() != 0) // no need to create a cc, just return that one
- return cairo_state_.cc();
+cairo_t *Fl_Private_cairo_make_current(void *gc, int W, int H) {
+ if (gc == Fl_Private_cairo_state_.gc() &&
+ fl_window == (Window)Fl_Private_cairo_state_.window() &&
+ Fl_Private_cairo_state_.cc() != 0) // no need to create a cc, just return that one
+ return Fl_Private_cairo_state_.cc();
// we need to (re-)create a fresh cc ...
- cairo_state_.gc(gc); // keep track for next time
+ Fl_Private_cairo_state_.gc(gc); // keep track for next time
cairo_surface_t *s = cairo_create_surface(gc, W, H);
cairo_t *c = cairo_create(s);
- cairo_state_.cc(c); // and purge any previously owned context
+ Fl_Private_cairo_state_.cc(c); // and purge any previously owned context
cairo_surface_destroy(s);
return c;
}
diff --git a/src/Fl_Private.H b/src/Fl_Private.H
index 11c4b5dd9..c86ac930f 100644
--- a/src/Fl_Private.H
+++ b/src/Fl_Private.H
@@ -15,7 +15,7 @@
//
/** \file src/Fl_Private.H
- \brief Fl::Private namespace.
+ \brief FLTK private global variables and functions.
*/
#ifndef Fl_Private_H
@@ -24,21 +24,20 @@
#include <FL/fl_config.h> // build configuration
#include <FL/Fl.H>
-/**
+/*
FLTK private global variables and functions.
+ All prefixed with Fl_Private_ instead of using namespace.
*/
-namespace Fl {
-namespace Private {
-FL_EXPORT extern int use_high_res_GL_;
-FL_EXPORT extern int draw_GL_text_with_textures_;
-FL_EXPORT extern int box_shadow_width_;
-FL_EXPORT extern int box_border_radius_max_;
-FL_EXPORT extern int selection_to_clipboard_;
+FL_EXPORT extern int Fl_Private_use_high_res_GL_;
+FL_EXPORT extern int Fl_Private_draw_GL_text_with_textures_;
+FL_EXPORT extern int Fl_Private_box_shadow_width_;
+FL_EXPORT extern int Fl_Private_box_border_radius_max_;
+FL_EXPORT extern int Fl_Private_selection_to_clipboard_;
-FL_EXPORT extern unsigned char options_[OPTION_LAST];
-FL_EXPORT extern unsigned char options_read_;
-FL_EXPORT extern int program_should_quit_; // non-zero means the program was asked to cleanly terminate
+FL_EXPORT extern unsigned char Fl_Private_options_[Fl::OPTION_LAST];
+FL_EXPORT extern unsigned char Fl_Private_options_read_;
+FL_EXPORT extern int Fl_Private_program_should_quit_; // non-zero means the program was asked to cleanly terminate
/**
The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
@@ -47,10 +46,10 @@ FL_EXPORT extern int program_should_quit_; // non-zero means the program was ask
idle callback functions to be called.
\see add_idle(), remove_idle()
*/
-FL_EXPORT extern void (*idle_)();
+FL_EXPORT extern void (*Fl_Private_idle_)();
-FL_EXPORT extern void run_idle();
-FL_EXPORT extern void run_checks();
+FL_EXPORT extern void Fl_Private_run_idle();
+FL_EXPORT extern void Fl_Private_run_checks();
/**
Sets an idle callback (internal use only).
@@ -61,19 +60,13 @@ FL_EXPORT extern void run_checks();
See documentation: use Fl::add_idle() instead.
*/
-FL_EXPORT inline void set_idle_(Fl_Old_Idle_Handler cb) { idle_ = cb; }
+FL_EXPORT inline void Fl_Private_set_idle_(Fl_Old_Idle_Handler cb) { Fl_Private_idle_ = cb; }
#ifdef FLTK_HAVE_CAIRO
-#if 0 // this non-public function appears not to be used anywhere in FLTK
- FL_EXPORT extern cairo_t *cairo_make_current(void *gc);
-#endif
-FL_EXPORT extern cairo_t *cairo_make_current(void *gc, int W, int H);
-FL_EXPORT extern Fl_Cairo_State cairo_state_;
+FL_EXPORT extern cairo_t *Fl_Private_cairo_make_current(void *gc, int W, int H);
+FL_EXPORT extern Fl_Cairo_State Fl_Private_cairo_state_;
#endif // FLTK_HAVE_CAIRO
-} // namespace Private
-} // namespace Fl
-
#endif // !Fl_Private_H
diff --git a/src/Fl_System_Driver.cxx b/src/Fl_System_Driver.cxx
index 2e98c29ec..c93794711 100644
--- a/src/Fl_System_Driver.cxx
+++ b/src/Fl_System_Driver.cxx
@@ -357,8 +357,8 @@ double Fl_System_Driver::wait(double time_to_wait) {
Fl::do_widget_deletion();
Fl_Timeout::do_timeouts();
- Fl::Private::run_checks();
- Fl::Private::run_idle();
+ Fl_Private_run_checks();
+ Fl_Private_run_idle();
// The idle function may turn off idle() if *all* idle callbacks
// are removed from the callback queue (ring), we can then wait.
diff --git a/src/Fl_add_idle.cxx b/src/Fl_add_idle.cxx
index 5c1f7be12..64b0b205b 100644
--- a/src/Fl_add_idle.cxx
+++ b/src/Fl_add_idle.cxx
@@ -83,7 +83,7 @@ void Fl::add_idle(Fl_Idle_Handler cb, void* data) {
} else {
first = last = p;
p->next = p;
- Private::set_idle_(call_idle);
+ Fl_Private_set_idle_(call_idle);
}
}
@@ -161,7 +161,7 @@ void Fl::remove_idle(Fl_Idle_Handler cb, void* data) {
}
if (l == p) { // only one
first = last = 0;
- Private::set_idle_(0);
+ Fl_Private_set_idle_(0);
} else {
last = l;
first = l->next = p->next;
diff --git a/src/drivers/X11/fl_X11_platform_init.cxx b/src/drivers/X11/fl_X11_platform_init.cxx
index 6a2851900..49947c1f3 100644
--- a/src/drivers/X11/fl_X11_platform_init.cxx
+++ b/src/drivers/X11/fl_X11_platform_init.cxx
@@ -76,10 +76,6 @@ Fl_Image_Surface_Driver *Fl_Image_Surface_Driver::newImageSurfaceDriver(int w, i
}
#if defined(FLTK_HAVE_PEN_SUPPORT)
-namespace Fl {
-namespace Pen {
-Driver default_driver;
-Driver& driver = default_driver;
-} // namespace Pen
-} // namespace Fl
+static Fl_Pen_Driver fl_pen_default_driver;
+Fl_Pen_Driver *fl_pen_driver = &fl_pen_default_driver;
#endif // FLTK_HAVE_PEN_SUPPORT
diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx
index a9c44be08..fe2dba385 100644
--- a/src/fl_boxtype.cxx
+++ b/src/fl_boxtype.cxx
@@ -46,13 +46,13 @@ static const uchar inactive_ramp[24] = {
51, 51, 52, 52};
static int draw_it_active = 1;
-int Fl::Private::box_border_radius_max_ = 15;
+int Fl_Private_box_border_radius_max_ = 15;
/** Get the maximum border radius of all "rounded" boxtypes in pixels.
\since 1.4.0
*/
int Fl::box_border_radius_max() {
- return Private::box_border_radius_max_;
+ return Fl_Private_box_border_radius_max_;
}
/** Set the maximum border radius of all "rounded" boxtypes in pixels.
@@ -68,16 +68,16 @@ int Fl::box_border_radius_max() {
\since 1.4.0
*/
void Fl::box_border_radius_max(int R) {
- Private::box_border_radius_max_ = R < 5 ? 5 : R;
+ Fl_Private_box_border_radius_max_ = R < 5 ? 5 : R;
}
-int Fl::Private::box_shadow_width_ = 3;
+int Fl_Private_box_shadow_width_ = 3;
/** Get the box shadow width of all "shadow" boxtypes in pixels.
\since 1.4.0
*/
int Fl::box_shadow_width() {
- return Private::box_shadow_width_;
+ return Fl_Private_box_shadow_width_;
}
/** Set the box shadow width of all "shadow" boxtypes in pixels.
@@ -85,7 +85,7 @@ int Fl::box_shadow_width() {
\since 1.4.0
*/
void Fl::box_shadow_width(int W) {
- Private::box_shadow_width_ = W < 1 ? 1 : W;
+ Fl_Private_box_shadow_width_ = W < 1 ? 1 : W;
}
/**