FLTK logo

[master] 08d9b3e - Remove config_lib.h and runtime configuration info

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 08d9b3e - Remove config_lib.h and runtime configuration info "Albrecht Schlosser" Feb 27, 2021  
 
commit 08d9b3e10df815efc970ed348bc7a2a28d2fbb4a
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Sat Feb 27 15:09:12 2021 +0100
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Sat Feb 27 15:09:12 2021 +0100

    Remove config_lib.h and runtime configuration info
    
    ... as discussed in fltk.coredev.

 FL/Fl.H          | 30 +------------------
 src/Fl.cxx       | 81 +--------------------------------------------------
 src/config_lib.h | 88 --------------------------------------------------------
 test/cube.cxx    | 14 ++++-----
 4 files changed, 9 insertions(+), 204 deletions(-)

diff --git FL/Fl.H FL/Fl.H
index a5c4ea9..dfa9c57 100644
--- FL/Fl.H
+++ FL/Fl.H
@@ -1,7 +1,7 @@
 //
 // Main header file for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2020 by Bill Spitzak and others.
+// Copyright 1998-2021 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
@@ -171,34 +171,6 @@ public:
   */
   static void box_border_radius_max(int R) { box_border_radius_max_ = R < 5 ? 5 : R; }
 
-public: // run time information about compile time configuration
-  /** \defgroup cfg_gfx runtime graphics driver configuration */
-  /** @{ */
-  static bool cfg_gfx_xlib;   ///< X11 Xlib rendering available, usually on Linux systems
-  static bool cfg_gfx_quartz; ///< Quartz rendering available, usually on OS X systems
-  static bool cfg_gfx_gdi;    ///< GDI rendering available, usually on Windows systems
-  static bool cfg_gfx_opengl; ///< OpenGL rendering available, available on many platforms
-  static bool cfg_gfx_cairo;  ///< Cairo rendering available, available on many platforms
-  static bool cfg_gfx_directx;///< DirectX rendering available, usually on Windows systems
-  /** @} */
-  /** \defgroup cfg_prn runtime printer driver configuration */
-  /** @{ */
-  static bool cfg_prn_ps;     ///< PostScript rendering available, usually on Linux systems
-  static bool cfg_prn_quartz; ///< Quartz rendering available, usually on OS X systems
-  static bool cfg_prn_gdi;    ///< GDI rendering available, usually on Windows systems
-  /** @} */
-  /** \defgroup cfg_win runtime window and event manager configuration */
-  /** @{ */
-  static bool cfg_win_x11;    ///< X11 window management available, usually on Linux systems
-  static bool cfg_win_cocoa;  ///< Cocoa window management available, usually on OS X systems
-  static bool cfg_win_win32;  ///< Windows window management available, on low level Windows
-  /** @} */
-  /** \defgroup cfg_sys runtime system configuration */
-  /** @{ */
-  static bool cfg_sys_posix;  ///< Posix system available, usually on Linux and OS X systems, but also Cygwin
-  static bool cfg_sys_win32;  ///< Windows system available, on Windows
-  /** @} */
-
 public: // should be private!
 
 #ifndef FL_DOXYGEN
diff --git src/Fl.cxx src/Fl.cxx
index 225038b..da4fa47 100644
--- src/Fl.cxx
+++ src/Fl.cxx
@@ -1,7 +1,7 @@
 //
 // Main event handling code for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2020 by Bill Spitzak and others.
+// Copyright 1998-2021 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
@@ -18,8 +18,6 @@
  Implementation of the member functions of class Fl.
  */
 
-#include "config_lib.h"
-
 #include <FL/Fl.H>
 #include <FL/platform.H>
 #include "Fl_Screen_Driver.H"
@@ -38,83 +36,6 @@
 #endif // DEBUG || DEBUG_WATCH
 
 //
-// Runtime configuration flags
-//
-#ifdef FL_CFG_GFX_XLIB
-bool Fl::cfg_gfx_xlib = 1;
-#else
-bool Fl::cfg_gfx_xlib = 0;
-#endif
-#ifdef FL_CFG_GFX_QUARTZ
-bool Fl::cfg_gfx_quartz = 1;
-#else
-bool Fl::cfg_gfx_quartz = 0;
-#endif
-#ifdef FL_CFG_GFX_GDI
-bool Fl::cfg_gfx_gdi = 1;
-#else
-bool Fl::cfg_gfx_gdi = 0;
-#endif
-#ifdef FL_CFG_GFX_OPENGL
-bool Fl::cfg_gfx_opengl = 1;
-#else
-bool Fl::cfg_gfx_opengl = 0;
-#endif
-#ifdef FL_CFG_GFX_CAIRO
-bool Fl::cfg_gfx_cairo = 1;
-#else
-bool Fl::cfg_gfx_cairo = 0;
-#endif
-#ifdef FL_CFG_GFX_DIRECTX
-bool Fl::cfg_gfx_directx = 1;
-#else
-bool Fl::cfg_gfx_directx = 0;
-#endif
-
-#ifdef FL_CFG_PRN_PS
-bool Fl::cfg_prn_ps = 1;
-#else
-bool Fl::cfg_prn_ps = 0;
-#endif
-#ifdef FL_CFG_PRN_QUARTZ
-bool Fl::cfg_prn_quartz = 1;
-#else
-bool Fl::cfg_prn_quartz = 0;
-#endif
-#ifdef FL_CFG_PRN_GDI
-bool Fl::cfg_prn_gdi = 1;
-#else
-bool Fl::cfg_prn_gdi = 0;
-#endif
-
-#ifdef FL_CFG_WIN_X11
-bool Fl::cfg_win_x11 = 1;
-#else
-bool Fl::cfg_win_x11 = 0;
-#endif
-#ifdef FL_CFG_WIN_COCOA
-bool Fl::cfg_win_cocoa = 1;
-#else
-bool Fl::cfg_win_cocoa = 0;
-#endif
-#ifdef FL_CFG_WIN_WIN32
-bool Fl::cfg_win_win32 = 1;
-#else
-bool Fl::cfg_win_win32 = 0;
-#endif
-
-#ifdef FL_CFG_SYS_POSIX
-bool Fl::cfg_sys_posix = 1;
-#else
-bool Fl::cfg_sys_posix = 0;
-#endif
-#ifdef FL_CFG_SYS_WIN32
-bool Fl::cfg_sys_win32 = 1;
-#else
-bool Fl::cfg_sys_win32 = 0;
-#endif
-
-//
 // Globals...
 //
 
diff --git src/config_lib.h src/config_lib.h
deleted file mode 100644
index bbcfb75..0000000
--- src/config_lib.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Configuration file for the Fast Light Tool Kit (FLTK).
- *
- * Copyright 1998-2020 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
- */
-
-#ifndef FL_CONFIG_LIB_H
-#define FL_CONFIG_LIB_H
-
-#include <config.h>
-
-
-/* find the right graphics configuration */
-#if !defined(FL_CFG_GFX_XLIB) && !defined(FL_CFG_GFX_QUARTZ) && !defined(FL_CFG_GFX_GDI)
-
-#ifdef __APPLE__ /* default configurations */
-# define FL_CFG_GFX_QUARTZ
-# ifdef HAVE_GL
-#  define FL_CFG_GFX_OPENGL
-# endif
-#elif defined(_WIN32)
-# define FL_CFG_GFX_GDI
-# ifdef HAVE_GL
-#  define FL_CFG_GFX_OPENGL
-# endif
-#elif defined(USE_X11) /* X11 */
-# define FL_CFG_GFX_XLIB
-# ifdef HAVE_GL
-#  define FL_CFG_GFX_OPENGL
-# endif
-#endif
-
-#endif
-
-
-/* find the right printer driver configuration */
-#if !defined(FL_CFG_PRN_PS) && !defined(FL_CFG_PRN_QUARTZ) && !defined(FL_CFG_PRN_WIN32)
-
-#ifdef __APPLE__ /* default configurations */
-# define FL_CFG_PRN_QUARTZ
-#elif defined(_WIN32)
-# define FL_CFG_PRN_WIN32
-#elif defined(USE_X11) /* X11 */
-# define FL_CFG_PRN_PS
-#endif
-
-#endif
-
-
-/* find the right window manager configuration */
-#if !defined(FL_CFG_WIN_X11) && !defined(FL_CFG_WIN_COCOA) && !defined(FL_CFG_WIN_WIN32)
-
-#ifdef __APPLE__ /* default configurations */
-# define FL_CFG_WIN_COCOA
-#elif defined(_WIN32)
-# define FL_CFG_WIN_WIN32
-#elif defined(USE_X11) /* X11 */
-# define FL_CFG_WIN_X11
-#endif
-
-#endif
-
-
-/* find the right system configuration */
-#if !defined(FL_CFG_SYS_POSIX) && !defined(FL_CFG_SYS_WIN32)
-
-#ifdef __APPLE__ /* default configurations */
-# define FL_CFG_SYS_POSIX
-#elif defined(_WIN32)
-# define FL_CFG_SYS_WIN32
-#elif defined(USE_X11) /* X11 */
-# define FL_CFG_SYS_POSIX
-#endif
-
-#endif
-
-
-#endif
diff --git test/cube.cxx test/cube.cxx
index f7052b4..c067d49 100644
--- test/cube.cxx
+++ test/cube.cxx
@@ -119,7 +119,9 @@ void cube_box::draw() {
 
   // if an OpenGL graphics driver is installed, give it a chance
   // to draw additional graphics
-  if (Fl::cfg_gfx_opengl) Fl_Gl_Window::draw();
+#if HAVE_GL
+  Fl_Gl_Window::draw();
+#endif
 }
 
 int cube_box::handle(int e) {
@@ -234,12 +236,10 @@ void makeform(const char *name) {
 
 #if HAVE_GL
   // try to overlay a button onto an OpenGL window
-  if (Fl::cfg_gfx_opengl) {
-    lt_cube->begin();
-    Fl_Button *test = new Fl_Button(35, 105, 100, 30, "Test");
-    test->box(FL_ROUND_UP_BOX);
-    lt_cube->end();
-  }
+  lt_cube->begin();
+  Fl_Button *test = new Fl_Button(35, 105, 100, 30, "Test");
+  test->box(FL_ROUND_UP_BOX);
+  lt_cube->end();
 #endif // HAVE_GL
 }
 
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.