Commit Graph

50 Commits

Author SHA1 Message Date
ManoloFLTK abfc8ee52f Fix: Fl_Native_File_Chooser::filter_value() [Kdialog] always returns 0 (#899)
- remove build option FLTK_USE_KDIALOG replaced by an Fl::option() option
- new run-time option OPTION_FNFC_USES_KDIALOG
- make options OPTION_FNFC_USES_KDIALOG and OPTION_FNFC_USES_ZENITY
false by default
- add mention of new program fltk-options in the doc of Fl::option()
- change logic of choice of the native file chooser under X11/Wayland:
the zenity and kdialog choosers are opt-in; otherwise the GTK file chooser
is used, unless opted out with  OPTION_FNFC_USES_GTK
- document that zenity may be interesting for sandboxed apps
- document that both zenity and kdialog make member functions
Fl_Native_File_Chooser::filter_value() inoperable
2024-04-22 16:34:08 +02:00
Albrecht Schlosser e5c4c1415b Add replacement for potentially missing trunc() (#944)
- add configure + CMake checks to define HAVE_TRUNC in config.h

- src/Fl_Timeout.cxx: add local replacement function
2024-04-02 16:03:29 +02:00
Albrecht Schlosser d3a3ab40b7 Replace setenv() with putenv() on old systems (+937)
Add system check for setenv() function in configure and CMake.
2024-03-18 22:29:50 +01:00
ManoloFLTK ffeaeec5bd Move FLTK_USE_SVG from config.h to FL/fl_config.h 2024-02-09 13:36:16 +01:00
ManoloFLTK 160eb2926d Remove usage of __APPLE_QUARTZ__ (#673) 2023-02-06 21:42:40 +01:00
ManoloFLTK 41f37613ec Derive Fl_Zenity_Native_File_Chooser_Driver from Fl_Kdialog_Native_…
Also add Fl::option(OPTION_FNFC_USES_ZENITY)
2022-12-16 16:21:23 +01:00
Trent McPheron 576271fb04 Add Zenity-based file chooser based on the KDialog one (HugLifeTiZ)
If available, it is used on Linux regardless of the current desktop because
it offers free XDG portal integration, which means it picks the correct file
chooser on all desktops, and allows for meaningful file selection in sandbox
environments like Flatpak.
2022-12-16 16:21:23 +01:00
Albrecht Schlosser cc6a7d008b Remove obsolete config variable 'HAVE_LIBPNG_PNG_H'
This variable has never been used in the code. Configure and CMake
look for a *working* libpng (HAVE_PNG) and set variable HAVE_PNG_H
if the header <png.h> can be included.

The alternative to include <libpng/png.h> is always used in the #else
clause and doesn't need its own config variable. Configure and CMake
log what they find, hence this extra variable is not necessary.
2022-04-04 21:10:25 +02:00
Albrecht Schlosser 04ccc8cc46 Remove experimental platforms Android, Pico, SDL (PR #376)
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule"
https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
2022-01-23 18:12:47 +01:00
Albrecht Schlosser 5438954d8c Generate FL/fl_config.h rather than FL/abi-version.h
... as discussed in fltk.coredev in thread "RFC: introduce public
config header <FL/fl_config.h>", see:
https://groups.google.com/g/fltkcoredev/c/xLCs1AIXMVo/m/MHZpQggzAQAJ

- Rename abi-version.h to fl_config.h, rename input files,
  update dependencies, .gitignore, CMake, configure and Makefiles.

- Include Cairo options in FL/fl_config.h

- Rename FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT for consistency.

- Include <FL/fl_config.h> in config.h and wherever necessary,
  fix include order (move FL/Fl.H to the top) and more.

- Move USE_X11 to fl_config.h and rename to FLTK_USE_X11

- Do not include <config.h> in Cairo demo program which is no
  longer required in Cairo programs since FLTK 1.4.0
2021-12-18 22:44:08 +01:00
ManoloFLTK 4bc25f7f9d Fix for issue #278 - continued : add CMake OPTION_USE_KDIALOG
Use of the kdialog command by class Fl_Naive_File_Chooser can now be turned off
at build-time through CMake OPTION_USE_KDIALOG.

If building via configure + make, set #define USE_KDIALOG to 0 in config.h before make.
2021-12-08 09:41:06 +01:00
ManoloFLTK eb8b016fab Fix for issue #254: remove hardware overlay support . 2021-11-26 15:16:15 +01:00
ManoloFLTK 84cf249482 Fix for issue #253: Remove xdbe support 2021-11-26 15:01:54 +01:00
Albrecht Schlosser c6eccf6137 Call pthread's recursive mutex on Linux (Issue #245)
Add CMake test for PTHREAD_MUTEX_RECURSIVE

Add autoconf/configure compile test for PTHREAD_MUTEX_RECURSIVE

Replace "#ifdef PTHREAD_MUTEX_RECURSIVE"
   with "#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE"
and define HAVE_PTHREAD_MUTEX_RECURSIVE in config.h
2021-07-21 12:16:20 +02:00
Albrecht Schlosser 26c46cc022 Prevent CMake from expanding comments
Unfortunately CMake doesn't check for comments and expands the
example syntax! Is this a CMake bug? Anyway, this is fixed now.
2021-07-08 14:30:13 +02:00
Albrecht Schlosser 5cca79489b Harmonize and document syntax of config.h source files
- configh.in: add and improve comments, reorder statements
- configh.cmake.in: add comments, fix whitespace

- src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx:
  fix trailing whitespace
2021-07-08 13:59:47 +02:00
ManoloFLTK b027d2ba57 Windows platform: use GDI+ to antialias oblique lines and curves. 2021-05-31 08:28:06 +02:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
ManoloFLTK 26e6c3f930 Add classes Fl_SVG_File_Surface and Fl_EPS_File_Surface to draw to SVG and EPS.
Test programs device and pixmap_browser use these new classes.
Class Fl_SVG_File_Surface can be optionally made non functional using the
--disable-svg configure option or turning off OPTION_USE_SVG in CMake.
Class Fl_EPS_File_Surface can be optionally made non functional using the
--disable-print configure option or turning off OPTION_PRINT_SUPPORT in CMake.
2020-06-27 09:56:00 +02:00
Matthias Melcher b1598dc703 Removed macro FL_PORTING, as it has been more confusing than helpful.
The original intention of FL_PORTING was to mark all places in the
source code where changes are required to port FLTK to a new platform.
Thanks to the driver system, this approach has become somewhat
misleading, so I removed all references.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 17:04:18 +00:00
Manolo Gouy 1a28d85dc3 Add new Fl_SVG_Image class to support scalable vector graphics images using the (modified) nanosvg software.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:14:25 +00:00
Albrecht Schlosser 3145e06585 Fix CMake config.h and compiler warnings.
Fixed warnings: -Wsign-compare, -Wunused-but-set-variable.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12155 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-23 15:40:25 +00:00
Manolo Gouy 461750c38e X11 platform: Add optional use of the pango library to draw text, gaining the possibility to draw text in any script supported by Unicode.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12153 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-21 15:05:02 +00:00
Manolo Gouy 21781c3fe9 Add --enable-print option to configure to allow building without print support on X11 platforms.
Also, the NO_PRINT_SUPPORT preprocessor variable is renamed FL_NO_PRINT_SUPPORT.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12131 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-01 17:31:29 +00:00
Albrecht Schlosser d11db7adfa Add missing configure options to configh.in.
Make config.h generated by configure and CMake better comparable.

Note: these options were defined in configh.cmake.in and implemented
only in CMake. Implementation in configure is still missing though.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-30 14:13:01 +00:00
Matthias Melcher 53859c584f Add support for SDL as a base library on OS X.
This commit adds the basic setup in CMake to allow SDL as a base
library for FLTK on OS X (and probably for other platforms as well).

The SDL library driver set is derived from yet another new driver
set named 'Pico'. 'Pico' is a base class for a driver that will
allow porting of FLTK with the tinyest amount of effort. This 
implementation of the SDL driver shall be documented very well
to explain the porting process.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-02 00:54:37 +00:00
Matthias Melcher 478d633620 More device and driver setup.
- building the base structure to have a screen driver, a window driver, and a system driver
- still pondering over the exact implementation

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 13:04:24 +00:00
Matthias Melcher 572b7fe0b8 Starting CMake config to blend out filechoose and filename handling (shrins fltk massively if not needed)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11146 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 12:22:38 +00:00
Manolo Gouy a8a777ff26 New CMake option OPTION_PRINT_SUPPORT turned ON by default
When the option is off, file config.h defines NO_PRINT_SUPPORT 
which in turn produces a library without print support, that is, 
class Fl_Printer does nothing.
When off, the FLTK library is somewhat smaller.
Can be turned off only when the X11 library is used.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-05 16:34:42 +00:00
Albrecht Schlosser 0a6be0a83f Fix compiler warnings (STR 2988), porting from branch-1.3.
This commit is the accumulated patch introduced in branch 1.3
in svn r 11094, 11095, and 11096.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 04:33:54 +00:00
Albrecht Schlosser 3beb45165a [CMake] config.h, part 2 - full compatibility with autoconf.
This commit makes the file config.h generated by CMake 100% compatible
with the one generated by autoconf/configure.

Fixes in this commit:
 - Set FLTK_DATADIR and FLTK_DOCDIR with the same default values.
   Note: needs some cleanup, option values are not clear, '/fltk'
   is currently appended in export.cmake (needs improvement).
 - Simulation of autoconf macro AC_HEADER_DIRENT for correct
   definition of only one 'dirent' header file.
 - Fix more function checks:
    - dlsym
    - png_get_valid
    - png_set_tRNS_to_alpha
 - Improve "Big Endian" check for __APPLE__ (mac_endianness.h).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10985 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-30 21:13:07 +00:00
Albrecht Schlosser 4f5e6e7732 Harmonize configure and CMake build system (part 1).
The files "config.h" generated by configure and CMake are now almost
identical, except a few comments and some still missing or failing
config tests, for instance checks for some functions in libraries.
[Note: tested and compared on Linux.]

configh.cmake.in: Fixed many #cmakedefine and #cmakedefine01 statements
  so they #define their variables as 0 or 1, or /* #undef */ it, resp.,
  as it is done in the configure build.

Added tests:
  - libXrender

Fixed tests:
  - function glXGetProcAddressARB

Todo (still failing tests in CMake):
  - HAVE_PNG_GET_VALID
  - HAVE_PNG_SET_TRNS_TO_ALPHA
  - HAVE_DLSYM

Other remaining issues:
  - compiler flags introduced in configure/make build
  - HAVE_SYS_NDIR_H - maybe missing test in configure ?
  - HAVE_SYS_DIR_H  - maybe missing test in configure ?
  - HAVE_NDIR_H     - maybe missing test in configure ?
  - WORDS_BIGENDIAN and #include <mac_endianness.h> ...
    i.e. Mac OS X specific #include needed or not ?



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10984 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-30 14:37:35 +00:00
Albrecht Schlosser 17c4817592 Add configure and CMake checks for X11/Xregion.h.
Configure and CMake now both check if X11/Xregion.h exists on the
build system and set HAVE_X11_XREGION_H in config.h accordingly.

src/Fl_Pixmap.cxx: modified to use the configure test as proposed by Manolo
in fltk.coredev on Dec 13 2015 in thread "Using X11 backend on OS X".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-30 12:10:15 +00:00
Pierre Ossman 332dc1b7ac Add method to set any custom cursor, based on a Fl_RGB_Image object.
Also change our fallback cursors to use this method, so that fallback
cursors are handled in a platform independent manner. STR #2660.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-16 11:17:57 +00:00
Pierre Ossman 1d6cc80d59 STR 2636. Add ability to get notifications whenever the
clipboard changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9974 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-11 12:54:40 +00:00
Albrecht Schlosser e9767cce34 Removed autoconf/configure and CMake tests and defines for
unused function strtoll() [resolves one part of STR #2965].


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9923 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-05-22 10:40:58 +00:00
Greg Ercolano 4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Manolo Gouy bc509d32eb Fix STR #2504 (first part). Replaced HAVE _CAIRO by FLTK_HAVE_CAIRO and USE_CAIRO
by FLTK_USE_CAIRO everywhere.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-06 10:24:58 +00:00
Albrecht Schlosser 8c56fc7e22 Updated CMake files with patches from Michael Surette (STR #2317).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7919 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-30 10:34:43 +00:00
Greg Ercolano 4327734e69 More copyright 2010 mods.
Used: vi `grep -r 'Copyright .*Spitzak' . | grep -v 2010 | grep -v '/\.svn' | cut -d: -f1`


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7913 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-29 18:18:27 +00:00
Manolo Gouy c077050d05 Fixed cmake under Mac OS X
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7867 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-17 16:47:54 +00:00
Greg Ercolano 4fd11eba88 Changed references to fltk-bugs@fltk.org -> STR form.
Todo: LGPL license file references (COPYING, license.dox, etc)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-28 03:15:47 +00:00
Albrecht Schlosser a0d26b634a Mostly rewritten CMake files by Michael Surette. They are more complete
than what we had previously, but may need some more testing. The latest
changes (removing old APPLE_QD definitions and code) might need another
update.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7451 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 22:33:58 +00:00
Albrecht Schlosser 1c6e95b545 CMake support: added platform test for HAVE_SCANDIR_POSIX,
added $Id$ tags and added copyright to (some of the) CMake files.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7012 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-01-16 14:18:18 +00:00
Matthias Melcher 167d767e0f Changed the copyright to 2009 for header files. Still todo: src and test directory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6614 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 16:11:32 +00:00
Matthias Melcher 6a143b1f61 Applying 1.1.9 changes to the 1.3 branch.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6108 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-04-22 18:11:51 +00:00
Matthias Melcher 458d1dc75d Attempt to make 'localeconv()' part of the configuration process. VC6 works, but I'll need feedback for all other platforms... . Trying OS X in a few minutes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4454 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-07-24 18:41:30 +00:00
Michael R Sweet add37faa25 Copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:55:12 +00:00
Michael R Sweet ca005c4067 Documentation updates (STR #568)
More CMake updates (STR #499)

The Watcom C++ compiler needed a small change (STR #567)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3869 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-10-18 20:29:58 +00:00
Michael R Sweet 1ca225e19d Added (unsupported) CMake files (STR #499)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3829 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-09-13 02:12:41 +00:00