summaryrefslogtreecommitdiff
path: root/src/Fl_Private.H
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2025-11-16 01:58:54 +0100
committerGitHub <noreply@github.com>2025-11-16 01:58:54 +0100
commit646bd5576497078f327f931ac5b5452d24866d2a (patch)
tree7a6060bc43cd9443639e8f3069151e224f918aa9 /src/Fl_Private.H
parent9afe9400bd8ce79f1c96b856539d91887e0d2bb1 (diff)
Refactor large static class Fl into an expandable namespace Fl (#1325)
* Change class Fl into namespace Fl. * Untangle Fl namespace into themed headers. * cut line count of FL/Fl.H in half * FL/core subdirectory now holds short headers grouped by functionality.
Diffstat (limited to 'src/Fl_Private.H')
-rw-r--r--src/Fl_Private.H77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/Fl_Private.H b/src/Fl_Private.H
new file mode 100644
index 000000000..becfbc17c
--- /dev/null
+++ b/src/Fl_Private.H
@@ -0,0 +1,77 @@
+//
+// Private header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2025 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// https://www.fltk.org/COPYING.php
+//
+// Please see the following page on how to report bugs and issues:
+//
+// https://www.fltk.org/bugs.php
+//
+
+/** \file src/Fl_Private.H
+ \brief Fl::Private namespace.
+*/
+
+#ifndef Fl_Private_H
+#define Fl_Private_H
+
+#include <FL/fl_config.h> // build configuration
+#include <FL/Fl.H>
+
+/**
+ FLTK private global variables and functions.
+ */
+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 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
+
+/**
+ The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
+
+ This is now used as part of a higher level system allowing multiple
+ idle callback functions to be called.
+ \see add_idle(), remove_idle()
+*/
+FL_EXPORT extern void (*idle_)();
+
+FL_EXPORT extern void run_idle();
+FL_EXPORT extern void run_checks();
+
+/**
+ Sets an idle callback (internal use only).
+
+ This method is now private and is used to store the idle callback.
+ The old, public set_idle() method was deprecated since 1.3.x and
+ is no longer available in FLTK 1.5.
+
+ See documentation: use Fl::add_idle() instead.
+*/
+FL_EXPORT inline void set_idle_(Fl_Old_Idle_Handler cb) { idle_ = cb; }
+
+#ifdef FLTK_HAVE_CAIRO
+
+FL_EXPORT extern cairo_t *cairo_make_current(void *gc);
+FL_EXPORT extern cairo_t *cairo_make_current(void *gc, int W, int H);
+FL_EXPORT extern Fl_Cairo_State cairo_state_;
+
+#endif // FLTK_HAVE_CAIRO
+
+} // namespace Private
+} // namespace Fl
+
+#endif // !Fl_Private_H