summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
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/Fl.cxx
parentcf813db2428ec77de88b06996712aad48de04219 (diff)
wip
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx100
1 files changed, 50 insertions, 50 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()