Move FLTK_USE_SVG from config.h to FL/fl_config.h

This commit is contained in:
ManoloFLTK 2024-02-09 13:36:16 +01:00
parent 3895068aa1
commit ffeaeec5bd
5 changed files with 29 additions and 24 deletions

View File

@ -2,7 +2,7 @@
/* /*
* Configuration file for the Fast Light Tool Kit (FLTK). * Configuration file for the Fast Light Tool Kit (FLTK).
* *
* Copyright 1998-2021 by Bill Spitzak and others. * Copyright 1998-2024 by Bill Spitzak and others.
* *
* This library is free software. Distribution and use rights are outlined in * 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 * the file "COPYING" which should have been included with this file. If this
@ -264,13 +264,6 @@
#cmakedefine HAVE_PNG_GET_VALID 1 #cmakedefine HAVE_PNG_GET_VALID 1
#cmakedefine HAVE_PNG_SET_TRNS_TO_ALPHA 1 #cmakedefine HAVE_PNG_SET_TRNS_TO_ALPHA 1
/*
* FLTK_USE_SVG
*
* Do we want FLTK to read and write SVG-formatted files ?
*/
#cmakedefine FLTK_USE_SVG 1
/* /*
* Do we have POSIX threading? * Do we have POSIX threading?

View File

@ -1,7 +1,7 @@
/* /*
* Configuration file for the Fast Light Tool Kit (FLTK). * Configuration file for the Fast Light Tool Kit (FLTK).
* *
* Copyright 1998-2021 by Bill Spitzak and others. * Copyright 1998-2024 by Bill Spitzak and others.
* *
* This library is free software. Distribution and use rights are outlined in * 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 * the file "COPYING" which should have been included with this file. If this
@ -263,13 +263,6 @@
#undef HAVE_PNG_GET_VALID #undef HAVE_PNG_GET_VALID
#undef HAVE_PNG_SET_TRNS_TO_ALPHA #undef HAVE_PNG_SET_TRNS_TO_ALPHA
/*
* FLTK_USE_SVG
*
* Do we want FLTK to read and write SVG-formatted files ?
*/
#undef FLTK_USE_SVG
/* /*
* Do we have POSIX threading? * Do we have POSIX threading?

View File

@ -2,7 +2,7 @@
/* /*
* Build configuration file for the Fast Light Tool Kit (FLTK). * Build configuration file for the Fast Light Tool Kit (FLTK).
* *
* Copyright 1998-2023 by Bill Spitzak and others. * Copyright 1998-2024 by Bill Spitzak and others.
* *
* This library is free software. Distribution and use rights are outlined in * 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 * the file "COPYING" which should have been included with this file. If this
@ -97,4 +97,15 @@
#cmakedefine01 FLTK_USE_STD #cmakedefine01 FLTK_USE_STD
/*
* FLTK_USE_SVG
*
* Do we want FLTK to read and write SVG-formatted files ?
*
*/
#cmakedefine01 FLTK_USE_SVG
#endif /* _FL_fl_config_h_ */ #endif /* _FL_fl_config_h_ */

View File

@ -1,7 +1,7 @@
/* /*
* Build configuration file for the Fast Light Tool Kit (FLTK). * Build configuration file for the Fast Light Tool Kit (FLTK).
* *
* Copyright 1998-2023 by Bill Spitzak and others. * Copyright 1998-2024 by Bill Spitzak and others.
* *
* This library is free software. Distribution and use rights are outlined in * 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 * the file "COPYING" which should have been included with this file. If this
@ -96,4 +96,15 @@
#define FLTK_USE_STD 0 #define FLTK_USE_STD 0
/*
* FLTK_USE_SVG
*
* Do we want FLTK to read and write SVG-formatted files ?
*
*/
#undef FLTK_USE_SVG
#endif /* _FL_fl_config_h_ */ #endif /* _FL_fl_config_h_ */

View File

@ -1,7 +1,7 @@
// //
// A shared image test program for the Fast Light Tool Kit (FLTK). // A shared image test program for the Fast Light Tool Kit (FLTK).
// //
// Copyright 1998-2023 by Bill Spitzak and others. // Copyright 1998-2024 by Bill Spitzak and others.
// //
// This library is free software. Distribution and use rights are outlined in // 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 // the file "COPYING" which should have been included with this file. If this
@ -14,7 +14,7 @@
// https://www.fltk.org/bugs.php // https://www.fltk.org/bugs.php
// //
#include <config.h> #include <FL/platform.H>
#include <FL/Fl.H> #include <FL/Fl.H>
#include <FL/Fl_Box.H> #include <FL/Fl_Box.H>
#include <FL/Fl_Double_Window.H> #include <FL/Fl_Double_Window.H>
@ -91,10 +91,7 @@ void button_cb(Fl_Widget *,void *) {
fl_file_chooser_callback(file_cb); fl_file_chooser_callback(file_cb);
const char *fname = fl_file_chooser("Image file?","*.{bm,bmp,gif,ico,jpg,pbm,pgm,png,ppm,xbm,xpm" const char *fname = fl_file_chooser("Image file?","*.{bm,bmp,gif,ico,jpg,pbm,pgm,png,ppm,xbm,xpm"
#ifdef FLTK_USE_SVG #ifdef FLTK_USE_SVG
",svg" ",svg,svgz"
#ifdef HAVE_LIBZ
",svgz"
#endif // HAVE_LIBZ
#endif // FLTK_USE_SVG #endif // FLTK_USE_SVG
"}", name); "}", name);
puts(fname ? fname : "(null)"); fflush(stdout); puts(fname ? fname : "(null)"); fflush(stdout);