Commit Graph

12043 Commits

Author SHA1 Message Date
Albrecht Schlosser
4d0c1a2a28 Add more documentation about ABI checking and a script to do it
misc/abi-check: This new script can be used (on Linux) to check ABI
  compatibility between patch releases. It does everything required
  in one execution (after installing the prerequisites once).
  Documentation is included in the script. It may be modified for
  other platforms, or ABI checking can be done manually.

README.abi-version.txt: add a chapter regarding ABI checks

misc/abi-compliance-checker.txt: update documentation on how to run
  misc/abi-check. In previous versions (1.4) building was done using
  configure/make. Thus this file was almost completely rewritten.

documentation/src/migration_1_4.dox: an unrelated but tiny correction.
2025-05-11 22:16:16 +02:00
Albrecht Schlosser
facda9a087 Remove obsolete class Fl_String
Note: it's still in branch-1.4 and in git history for reference
2025-05-11 16:47:45 +02:00
Matthias Melcher
82b2001735 Fix unused parameter 2025-05-11 12:48:10 +02:00
Matthias Melcher
c28237d756 Set default DPI to 300 in fl_write_png
Previously, the DPI value was completely random, resulting
in some interesting scaling when reading the png in other apps.
2025-05-11 12:34:04 +02:00
Matthias Melcher
74b0dc7d95 Fix address sanitizer exception for macOS native file chooser
The `memcmp` call would crash in Adress sanitizer if the memory compare
would run into an undefined buffer. `memcmp` is not guaranteed to stop
reading a buffer if a difference is found.
2025-05-11 12:30:22 +02:00
ManoloFLTK
95709ae0ad Wayland: remove crash when resizing hidden subwindow 2025-05-10 21:22:29 +02:00
Greg Ercolano
f8a7e299b0 Fl_Terminal doc fixes, private->protected for utf8_char_at_*() 2025-05-09 09:29:10 -07:00
ManoloFLTK
bca167d03a Fix erroneous #include directive 2025-05-09 10:14:57 +02:00
ManoloFLTK
043bac6f8d Remove declaration of Fl_Scalable_Graphics_Driver from FL/Fl_Graphics_Driver.H
and declare it in non-public header src/Fl_Scalable_Graphics_Driver.H which also
declares classes Fl_Font_Descriptor and Fl_Fontdesc.
2025-05-09 09:51:36 +02:00
Albrecht Schlosser
bcf51371d2 Simplify CMake build config for test and demo programs
Define platform specific library names as CMake variables so they can
be used to build demo programs w/o platform specific instructions.

This includes optional components (e.g. OpenGL) and the MSVC specific
extra object library (call_main) and the fact that we build only one
"monolithic" shared library with MSVC.

Also, enable building FLTK Forms library in CI builds.
2025-05-08 21:34:13 +02:00
Albrecht Schlosser
4d55983833 Remove hardcoded version numbers (part 2) and more documentation
The goal is to change the version number for a new release only in
CMakeLists.txt. This is the second step.

This commit also adds a chapter "Migrating Code from FLTK 1.4 to 1.5".

Details:

- documentation/CMakeLists.txt: configure 'version.dox'
- fluid/documentation/CMakeLists.txt: same as above
- documentation/Doxyfile.in: add "Migrating Code from FLTK 1.4 to 1.5"
- documentation/src/index.dox: include 'version.dox' and 'migrating...'
- fluid/documentation/src/index.dox: same as above
- documentation/src/preface.dox: include 'version.dox'
- documentation/version.dox.in: input to CMake configure 'version.dox'
- fluid/documentation/version.dox.in: same as above
- documentation/src/migration_1_4.dox: update links
- documentation/src/migration_1_5.dox: new documentation chapter
2025-05-07 21:21:35 +02:00
Albrecht Schlosser
d54dbd3d6c Fix a typo and improve formatting in README.md 2025-05-06 20:11:31 +02:00
Albrecht Schlosser
53491f2ca0 Remove hardcoded version numbers: part 1
The goal is to change the version number for a new release only in
CMakeLists.txt. This is the first step.

Details:

- CMake/gen_config.cmake: this new file is included to generate the
  header files config.h (private, root directory), and FL/fl_config.h
  (public, can be installed). This file implements also ABI version
  checks (removed from FL/Enumerations.H and with more checks).
  Warnings are issued if the chosen ABI version is invalid.
- CMake/export.cmake: code to generate 'config.h' was moved to
  CMake/gen_config.cmake.
- CMake/options.cmake: set default of FLTK_BUILD_FORMS=OFF + comments
- CMakeLists.txt: move generation of FL/fl_config.h to gen_config.cmake,
  add API and ABI versions to CMake summary,
- FL/Enumerations.H: remove most of the version number details which
  are now included in FL/fl_config.h. This needed also some doxygen
  related changes.
- README.CMake.txt: improve docs of FL_ABI_VERSION and some more.
  Reflect the new default of CMake option FLTK_BUILD_FORMS (OFF).
- documentation/Doxyfile.in: add FL/fl_config.h to file list. This
  file is created in the build tree (and may be "installed").
- fl_config.h.in: add version number details that have been moved here
  from Enumerations.H (used to generate FL/fl_config.h).
2025-05-06 19:25:53 +02:00
Albrecht Schlosser
9ba11949ca Rename config header input files to better names
Up to FLTK 1.4 we had two distinct input files for each header file:
one for configure and one for CMake. Since 1.5 we have only one input
file for each header which can now have a more appropriate name.

1) configh.cmake.in   -> config.h.in
2) fl_config.cmake.in -> fl_config.h.in
2025-05-05 14:52:02 +02:00
Albrecht Schlosser
d7c705864e Documentation: clarify version numbers and fix minor issues
Remove references to "current" version numbers, use 1.2.3 as example
for clarity and to simplify version number updates.

Also: minor textual fixes (typos), unwrap lines, etc..

Todo: Documentation states:
  "This file is not actively maintained any more, but is left here
   as a reference, until the doxygen documentation is completed."

  Check if the documentation generated by doxygen from source files
  contains everything needed so this file can be removed.
2025-05-01 19:18:48 +02:00
Albrecht Schlosser
719642b5d6 Fix Doxygen warning for older Doxygen versions
Note: doxygen versions < 1.9.6 are not recommended for PDF docs
      but *may* work for HTML documentation.
2025-04-29 20:16:11 +02:00
Albrecht Schlosser
e0802889d4 macOS: disable automatic code signing when using Xcode
This is the default. Users can still override this if they have
  a valid certificate.
2025-04-28 18:36:09 +02:00
Matthias Melcher
9af8abc080 Fix forgotten run_pdflatex call (1.5) 2025-04-23 15:47:31 +02:00
Albrecht Schlosser
1066b69c8e Fix "fully support ... own shared libraries" (#1238)
- If shared libraries are built, then fluid, fltk-options, and the
  "games" are linked against the shared FLTK libraries. On some
  platforms the static and the shared versions of fluid and
  fltk-options are built. The games are only built if
  FLTK_BUILD_TEST is enabled.

- The CMake 'install' target now installs the games (if built)
  and their man pages on all platforms (no matter if that is
  useful, for instance on Windows).

- On macOS 'CMAKE_INSTALL_RPATH' is set so *installed* programs
  automatically find their shared FLTK libraries. The "shared"
  versions of fluid and fltk-options got their own '.plist' files.
  This works for both the executables themselves as well as those
  included in bundles. There may be more to do on the macOS platform.
2025-04-21 19:50:12 +02:00
Matthias Melcher
48e22d246d Fluid: update documentation scripts
TeX and pdf generation untested at this point
2025-04-18 21:40:37 +02:00
Albrecht Schlosser
374f22b8bf Remove unused code from Fl_Wayland_Window_Driver (#1248)
This commit removes the unused static method

  Fl_Wayland_Window_Driver::resize_after_screen_change(void *data)

and related data as discussed in the context of PR #1248.
2025-04-18 18:23:28 +02:00
Timothy Lee
002b69f8fe Fix "heap-use-after-free" in resize_after_screen_change() (#1248)
When a native window is destroyed, make sure the callback to
Fl_WinAPI_Window_Driver::resize_after_screen_change() is removed.

Added by Albrecht-S:

Thanks for the original fix to Timothy Lee (@timothytylee).

src/drivers/X11/Fl_X11_Window_Driver.cxx: equivalent fix for X11
  as discussed on GitHub PR #1248
2025-04-18 18:15:06 +02:00
Matthias Melcher
219c623b4b Fluid: hiding MergeBack form the main menu.
Hiding menuitem if option is not available.
Also testing the new FL_BEFORE_MENU event.
2025-04-15 15:28:37 +02:00
Matthias Melcher
fc91880faf
Reactivating Mergeback functionality. (#1226)
Reactivated code.
Various fixes.
New documentation.
2025-04-15 14:47:24 +02:00
Matthias Melcher
63db80c078 Fluid: avoid bad function pointer casting warning in Clang 17. 2025-04-15 14:38:45 +02:00
Matthias Melcher
76e76ba80a Revised version of the glpuzzle man page. 2025-04-07 00:29:41 +02:00
Greg Ercolano
ed57306a43 Adjusted .fl files too, regen code (#1245) 2025-04-06 08:21:31 -07:00
Mohammed Alyousef
8b8d92a313
Fixes error: two consecutive '[' tokens on g++ with objcpp files (#1246)
Applying MoAlyousef's PR. -erco
2025-04-05 15:05:39 -07:00
Greg Ercolano
70a104131a Solve Mac 10.10.5 fluid build errors (#1245) 2025-04-05 14:53:24 -07:00
Albrecht Schlosser
61f132845b CMake: simplify fluid build
- define variable MAIN_FILES to avoid repetition
- make target_include_directories(fluid-lib) PUBLIC rather than PRIVATE
2025-04-04 15:54:36 +02:00
Albrecht Schlosser
eb1e0f423d Update man pages of games (demo programs), add glpuzzle.man
Prepare for installation of `games` demo programs. Fix inconsistencies
and typos in man pages. In the future the man pages can be installed
together with the executables. This will be done in a later commit.

documentation/src/glpuzzle.man: new file.
2025-04-04 15:50:36 +02:00
Albrecht Schlosser
f0a5146359 Remove reference to 'configure', fix typos
Note: this file is not used in normal compilation, it can be used
to help debugging. I'm not sure if it's still helpful, but anyway...
2025-04-04 14:44:21 +02:00
ManoloFLTK
3cd3537ef8 Update bundled libdecor to last upstream version (Apr 4, 2025) 2025-04-04 12:06:00 +02:00
Albrecht Schlosser
fb48bc22cc Remove redundant Fl_Group::clear() from ~Fl_Scroll()
Fl_Group::clear() is called in Fl_Group's d'tor anyway.

Technically we don't need to remove hscrollbar and scrollbar because
they are destroyed (and thus removed from Fl_Group) before Fl_Group's
d'tor is executed but this is left for clarity and to guarantee the
order (see comment).
2025-04-03 17:11:25 +02:00
ManoloFLTK
c340c4a2bd Fix "Minor drawing artifact at scale 200% under X11 session" (#1243) 2025-04-03 11:28:02 +02:00
ManoloFLTK
71caca84d9 Merge remote-tracking branch 'refs/remotes/origin/master' 2025-04-03 11:23:57 +02:00
Aaron M. Ucko
678c850272 Use CMake's built-in timestamp formatting.
It notably honors SOURCE_DATE_EPOCH if set, making for reproducible
output.  For even better reproducibility, use UTC.  (Unlike the date
command's output, the result is already always in English.)  Extend
this approach to the book, introducing appropriately formatted
PDF_DATE and TODAY variables for its PDF metadata and title page
respectively and making make_pdf configurable.
2025-04-02 20:25:07 +02:00
Albrecht Schlosser
794d493eb6 CMake: check version for some properties in fl_debug_target()
Debug only, if fl_debug_target() is used:

Prior to CMake 3.19 some properties of "INTERFACE_LIBRARY targets"
can't be read with get_property(). These properties are now
excluded if the CMake version is lower than 3.19.
2025-04-02 19:59:56 +02:00
Aaron M. Ucko
8b28e38942 options.cmake: Check Threads_FOUND, not CMAKE_HAVE_THREADS_LIBRARY
The former's been available since CMake v2.8 and documented since v3.17;
the latter was never documented and quietly went away in CMake v3.24.
2025-04-01 19:12:10 +02:00
Matthias Melcher
f4978a0149 Adding the FL_MENU_CHATTY flag to Fl_Menu_Item.
If set, menu items will also call the callback when highlighting changes.
The reason is given with Fl::callback_reason(). #941
2025-04-01 17:00:56 +02:00
Matthias Melcher
0eb6bb8e6d Fixing a few more compiler warnings. 2025-03-30 00:51:34 +01:00
Matthias Melcher
bd9d1bc038 Fixes a couple of compiler warnings on AppleClang. 2025-03-30 00:38:10 +01:00
Matthias Melcher
b2b5e47ede Somewhat better example for dynamic tooltip. 2025-03-30 00:25:18 +01:00
Matthias Melcher
61c2b798be Adding missing overrides 2025-03-29 23:52:29 +01:00
Matthias Melcher
5dd1062df5 Adding FL_BEFORE_MENU event to classes derived from Fl_Menu_ 2025-03-29 23:36:19 +01:00
Matthias Melcher
b7189192e2 Adds a new event FL_TOOLTIP_EVENT...
... and Fl_Tootip::override_text() to allow users to dynamically
generate tooltips.
2025-03-29 22:40:18 +01:00
Albrecht Schlosser
cb86a37676 Allow FL_ABI_VERSION = FL_API_VERSION + 1
... so users can enable ABI features designated for the *next* release
when using FLTK from Git (or snapshots) before the API version has
been raised for that release.
2025-03-29 21:03:18 +01:00
Greg Ercolano
9e1e043af3 Changed two connector methods to virtual
For reference, see fltk.general thread started Mar 26 2025, entitled:
    "Make some Fl_Tree_Item methods virtual?"
2025-03-28 12:54:16 -07:00
Albrecht Schlosser
1f715f8766 Update fltk-config.in (minor comment changes only) 2025-03-27 16:14:29 +01:00
Albrecht Schlosser
6db6a9d8b8 Remove reference to 'configure' from comment
Explain details of the mentioned 'hack' referring to and citing
parts of the original commit log.
2025-03-27 15:04:55 +01:00