Skip to content

Commit 4f44802

Browse files
author
dashodanger
committed
Update FLTK to latest release (Windows builds); update CI
1 parent 3424fdf commit 4f44802

File tree

240 files changed

+6501
-3232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+6501
-3232
lines changed

.github/workflows/cmake.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ jobs:
7676
obsidian.exe
7777
retention-days: ${{env.RETENTION_DAYS}}
7878
build-linux:
79-
runs-on: ubuntu-latest
79+
runs-on: ubuntu-24.04
8080
steps:
8181
- uses: actions/checkout@v4
8282
- name: Install dependencies
8383
run: |
8484
sudo apt-get update
85-
sudo apt-get install -y libxft-dev libfontconfig1-dev libgl-dev
85+
sudo apt-get install -y libxft-dev libfontconfig1-dev libgl-dev libfltk1.3-dev
8686
- name: Configure CMake Ubuntu
8787
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
8888
- name: Build Ubuntu
@@ -108,6 +108,8 @@ jobs:
108108
runs-on: macos-latest
109109
steps:
110110
- uses: actions/checkout@v4
111+
- name: Install HomeBrew FLTK
112+
run: brew install fltk
111113
- name: Configure CMake MacOS
112114
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
113115
- name: Build MacOS

libraries/fltk/ANNOUNCEMENT

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,49 @@
1-
FLTK 1.4 is based on the final release of FLTK 1.3.4.
1+
FLTK 1.4 is based on the final release of FLTK 1.3.4. Later updates
2+
have been backported to 1.3.5 - 1.3.10.
23

3-
Technically the branch was forked earlier, but all changes in FLTK 1.3.4
4-
have also been (modified and) committed in branch-1.3-porting, which is
5-
the base of branch-1.4.
6-
7-
FLTK 1.4 is intended to be mostly API compatible with FLTK 1.3.4 so
4+
FLTK 1.4 is intended to be mostly API compatible with FLTK 1.3.x so
85
you don't need to change source code when you switch to FLTK 1.4.
6+
However, all programs must be recompiled with FLTK 1.4 because the
7+
ABI (Application Binary Interface) has changed.
8+
9+
Potential source code conflicts are documented in chapter "Migrating
10+
Code from FLTK 1.3 to 1.4" of the user documentation [1].
11+
12+
FLTK 1.4 adds some new widgets (e.g. Fl_Flex, Fl_Grid) for flexible GUI
13+
layout, Fl_Scheme_Choice for scheme selection by users, and more.
14+
Other widgets (Fl_Tabs, Fl_Tile, Fl_Spinner etc.) have been improved
15+
for better user experience.
16+
17+
FLTK 1.4 supports HighDPI displays under Linux/Unix and Windows and
18+
improves HighDPI support on macOS. The initial screen scaling factor is
19+
read from the system and application windows can be zoomed (in/out/reset)
20+
by the user with ctrl/+/-/0 shortcuts, respectively.
21+
22+
CMake support has been improved significantly and requires CMake 3.15 or
23+
higher, autotools/configure/make is still supported. The latter will be
24+
dropped in the next minor release (1.5.0).
25+
26+
macOS is supported up to 15.0 "Sequoia".
27+
28+
The platform dependent code in FLTK 1.4 was rewritten to enable easier
29+
porting to new platforms. Basically all platform dependent code has
30+
been isolated and implemented in virtual methods of "driver" classes.
31+
For details see 'src/drivers' and subdirectories.
32+
33+
FLTK is now compatible with the Wayland platform on current Linux
34+
distributions and FreeBSD. The default build of the library on these
35+
platforms supports both X11 and Wayland in a "hybrid" library. Programs
36+
compiled and linked to this library start using Wayland if it is
37+
available at runtime and fall back to using X11 if not. Programs using
38+
X11 specific code that are not yet ported to Wayland can still be used
39+
on pure X11 systems or by disabling the Wayland support on startup so
40+
they fall back to using X11 only. This requires 'XWayland' support on
41+
Wayland enabled (Linux) systems.
942

10-
However, the platform dependent code in FLTK 1.4 was rewritten to enable
11-
better porting to new platforms. Basically all platform dependent code
12-
has been isolated and implemented in virtual methods of "driver" classes.
13-
See src/drivers and subdirectories.
43+
The current development branch on GitHub [2] is `master`. This will be
44+
changed to `branch-1.4` when development of FLTK 1.5.0 begins and 1.4
45+
will be switched to maintenance mode.
1446

15-
More to come ...
47+
[1] https://www.fltk.org/doc-1.4/ (HTML) and
48+
https://www.fltk.org/doc-1.4/fltk.pdf (PDF)
49+
[2] https://github.com/fltk/fltk.git

libraries/fltk/CHANGES.txt

Lines changed: 148 additions & 19 deletions
Large diffs are not rendered by default.

libraries/fltk/CHANGES_1.3.txt

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,187 @@
1+
CHANGES IN FLTK 1.3.9 RELEASED: Dec 09 2023
2+
3+
FLTK 1.3.9 is a maintenance release with some fixes and enhancements.
4+
5+
Highlights in this release:
6+
7+
- Support macOS up to macOS 14 "Sonoma".
8+
- Update bundled libraries to current versions (see below).
9+
- Introduce bundled image library "prefixing" to avoid conflicts
10+
with system libraries.
11+
- New CMake option FLTK_MSVC_RUNTIME_DLL to select Visual Studio
12+
Runtime version: DLL (/MDx) or static (/MTx), see README.CMake.txt
13+
14+
15+
Bundled library versions (see also README.bundled-libs.txt):
16+
17+
Library Version Release date
18+
---------------------------------------------
19+
jpeg jpeg-9e 2022-01-16
20+
png libpng-1.6.40 2023-06-21
21+
zlib zlib-1.3 2023-08-18
22+
23+
24+
Details:
25+
26+
Albrecht Schlosser:
27+
Backport X11 INCR protocol fixes from 1.4.0 (issue #451)
28+
X11: Suppress compiler warnings when using gcc or clang
29+
Fix crash if a program exits before it opens a window (STR 3484).
30+
Fix compilation error with current Visual Studio 2022
31+
Windows: #define WIN32 if not defined by user
32+
Backport warning fixes from 1.4.0 in src/fl_draw.cxx (#693)
33+
Fix compiler warning as pointed out in PR #693
34+
Fix another compiler warning (#693)
35+
Remove unused variable, fix "type issue" (#445, part 2)
36+
Fix stack buffer overflow found by address sanitizer
37+
Fix "gtk+ rendering" (GitHub Issue #443)
38+
Fix doxygen warnings
39+
Bump version numbers, prepare release 1.3.9
40+
Fix several compiler warnings
41+
Update bundled image libraries and zlib to current versions
42+
Update README, README.CMake.txt, and some support files
43+
Fix compiler warnings: backported from 1.4 (git 'master')
44+
CMake/MSVC: remove confusing recommendation to rerun CMake
45+
Documentation: remove dark color on title page
46+
Raise CMake minimum required version to 3.15 and more
47+
48+
ManoloFLTK:
49+
macOS platform: Issue #325 "Disabling IM disables Greek and Cyrillic layouts"
50+
Fix fullscreen window level corner cases on macOS
51+
Fix issue #373 apparent with macOS platform and SDK ≤ 10.13
52+
Issue #452: Fl::get_font_name failure on OS-X.
53+
Issue #454: crash in Fl::get_font_name().
54+
Issue #469: Fl_Sys_Menu_Bar menu item shortcuts using Esc or Tab don't work on Mac
55+
Fix "Focus is lost leaving full screen on macOS 13" (#608)
56+
Add support of macOS Ventura 13.0 and macOS Sonoma 14.0
57+
macOS: remove configure option --enable-x11 and CMake OPTION_APPLE_X11;
58+
this functionality remains in FLTK 1.4.
59+
configure.ac: make sure local-png and local-zlib always run together
60+
Remove the -mwindows argument from CFLAGS and CXXFLAGS
61+
62+
Matthias Melcher:
63+
Issue #188: Fix reference counts and search for Fl_Shared_Image original
64+
65+
YX:
66+
Fix IME problem (issue #270)
67+
68+
69+
CHANGES IN FLTK 1.3.8 RELEASED: Nov 20 2021
70+
71+
FLTK 1.3.8 is a maintenance release with some fixes and enhancements.
72+
73+
Details:
74+
75+
Albrecht Schlosser:
76+
Make "FLTK_CONSOLIDATE_MOTION" user-definable (issue #76)
77+
Fix compiler warnings (backported from 1.4)
78+
Add new dialog fl_choice_n() with extended return values (#282)
79+
80+
ManoloFLTK:
81+
Account for deprecation of [NSBitmapImageRep initWithFocusedViewRect:]
82+
in macOS 10.14
83+
macOS: fix fullscreen window when other windows were created before
84+
Fix issue #287: "FLTK 1.3.6 doesn't handle fullscreen on macOS"
85+
Fix issue #288: "FLTK 1.3.6+ doesn't notify window movement on macOS"
86+
Fix issue #279: "HiDpi issue on macOS with retina display"
87+
macOS: Allow building with non-Apple compiler that may not support blocks
88+
89+
90+
CHANGES IN FLTK 1.3.7 RELEASED: Jul 25 2021
91+
92+
FLTK 1.3.7 is a maintenance release for macOS only. It fixes one
93+
regression introduced in FLTK 1.3.6 and two long standing timer
94+
issues on macOS.
95+
96+
Other platforms than macOS are not concerned.
97+
98+
Changes:
99+
100+
Avoid premature FL_RELEASE event at start of drag-n-drop operation
101+
Fix a timer inconsistency and prevent a crash
102+
Fl::add_timeout() must always create a new timer (#248)
103+
104+
105+
106+
CHANGES IN FLTK 1.3.6 RELEASED: May 15 2021
107+
108+
There have been no changes since FLTK 1.3.6rc2.
109+
110+
111+
CHANGES IN FLTK 1.3.6rc2 RELEASED: May 04 2021
112+
113+
FLTK 1.3.6rc2 fixes some minor issues of 1.3.6rc1, particularly macOS
114+
bundle generation. It addresses an issue that bundles can't be executed
115+
on macOS 11.3 Big Sur if built with configure/make after downloading
116+
the release tarball because of the macOS "quarantine" feature.
117+
118+
Details:
119+
120+
Albrecht Schlosser:
121+
Rename file 'VERSION' to 'fltk_version.dat' (#191)
122+
Fix version number in doxygen docs
123+
Fix build with Cairo for CMake < 3.13
124+
CMake: fix old (pre 3.13) link_directories() usage
125+
Enhance CMake build configuration summary
126+
Refactor macOS bundle generation to avoid "quarantine"
127+
Fix a new compiler warning
128+
129+
130+
CHANGES IN FLTK 1.3.6rc1 RELEASED: Apr 26 2021
131+
132+
FLTK 1.3.6 is a maintenance release with new macOS Big Sur support
133+
and some bug fixes. macOS Big Sur is supported on both Intel and the
134+
new Apple Silicon (M1) chips.
135+
136+
CMake support has been improved but is not yet "perfect". Documentation
137+
has been enhanced, bundled image libraries have been updated to current
138+
versions.
139+
140+
The following lists are subsets of all commits. References in '(...)'
141+
are either STR numbers (STR xxxx) or GitHub Issues or Pull Requests
142+
(#nnn).
143+
144+
145+
Bug fixes and other improvements
146+
147+
Albrecht Schlosser:
148+
Fix Fl::add_timeout() in draw() under Linux (STR 3188)
149+
X11: Fix X Input Methods (XIM) (STR 3502, 3192)
150+
Fix overly restrictive JPEG filter (#81)
151+
Fix DND in read-only Fl_Input (Fl_Output) (#113)
152+
Fix offscreen drawing under X11 (STR 3384)
153+
Fix potential fluid crashes (STR 3420) + memory leak
154+
Fix X11 copy-paste and drag-and-drop target selection (#182)
155+
Fix CMake install procedure (#212)
156+
Avoid "Bogus FL_MOVE/FL_DRAG events" (#76)
157+
CMake: Document FLTKConfig.cmake and set FLTK_INCLUDE_DIR
158+
159+
Greg Ercolano:
160+
Fix issue92, added -d debug flag to fluid (#92)
161+
Merge pull request #176 from ComputerNerd/errmsg-fix-13
162+
163+
ManoloFLTK:
164+
X11: add support for copy+paste of image within one app
165+
Windows: add bitmap version of graphics when copying to clipboard
166+
Fix use of Xrender extension with old, 16-bit framebuffers.
167+
Fix for Fl_Native_File_Chooser under macOS 10.15 Catalina and ...
168+
Restore macOS capacity to turn window fullscreen encompassing several screens.
169+
Improve Fl_Copy_Surface under macOS
170+
Set OPTION_USE_SYSTEM_LIBPNG/JPEG off under macOS by default
171+
Have Fl_Pack::draw() call Fl_Group::init_sizes() on its parent group.
172+
CMake support of the Darwin+XQuartz test platform
173+
Add support of macOS "Big Sur" 11.0
174+
Fix when building with SDK 10.15 and running with 11.0 Big Sur
175+
Backport fix for issue #185 "Shared Image reload() loses initial dimensions" from branch 1.4
176+
Fix fl_endpoints() for macOS platform that was not effective.
177+
Fix stack corruption when loading GIF (pull request #200)
178+
Restore ./configure --enable-x11 on macOS
179+
Fix crash when terminating any macOS app by cmd-Q
180+
181+
OKAMURA, Yasunobu:
182+
Fix JIS Keyboard dead keys
183+
184+
1185
CHANGES IN FLTK 1.3.5 RELEASED: Mar 03 2019
2186

3187
Bug fixes and other improvements
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
#include <AvailabilityMacros.h>
3+
#if __MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
4+
#error __MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
5+
#endif
6+
int main(int argc, char** argv) { return 0; }

libraries/fltk/CMake/options.cmake

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,23 @@ set(FL_ABI_VERSION ${FLTK_ABI_VERSION})
8585
# Note: this might be handled better by the 'MSVC_RUNTIME_LIBRARY'
8686
# target property for each target rather than setting a global
8787
# CMake variable - but this version does the latter.
88+
# This also applies when using LLVM/clang on Windows (#1058).
8889
#######################################################################
8990

90-
if(MSVC)
91+
if(WIN32 AND NOT MINGW AND NOT MSYS)
9192
option(FLTK_MSVC_RUNTIME_DLL "use MSVC Runtime-DLL (/MDx)" ON)
9293
if(FLTK_MSVC_RUNTIME_DLL)
9394
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
9495
else()
9596
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
9697
endif()
97-
endif(MSVC)
98+
else(WIN32 AND NOT MINGW AND NOT MSYS)
99+
# suppress CMake warning if the user sets FLTK_MSVC_RUNTIME_DLL on other platforms
100+
if(DEFINED FLTK_MSVC_RUNTIME_DLL)
101+
unset(FLTK_MSVC_RUNTIME_DLL)
102+
unset(FLTK_MSVC_RUNTIME_DLL CACHE)
103+
endif()
104+
endif(WIN32 AND NOT MINGW AND NOT MSYS)
98105

99106
#######################################################################
100107

@@ -111,15 +118,21 @@ endif(APPLE)
111118
# Bundled Library Options
112119
#######################################################################
113120

114-
option(FLTK_USE_SYSTEM_LIBJPEG "use system libjpeg" OFF)
115-
option(FLTK_USE_SYSTEM_LIBPNG "use system libpng" OFF)
116-
option(FLTK_USE_SYSTEM_ZLIB "use system zlib" OFF)
121+
if(WIN32 OR (APPLE AND NOT FLTK_BACKEND_X11))
122+
option(FLTK_USE_SYSTEM_LIBJPEG "use system libjpeg" OFF)
123+
option(FLTK_USE_SYSTEM_LIBPNG "use system libpng" OFF)
124+
option(FLTK_USE_SYSTEM_ZLIB "use system zlib" OFF)
125+
else()
126+
option(FLTK_USE_SYSTEM_LIBJPEG "use system libjpeg" ON)
127+
option(FLTK_USE_SYSTEM_LIBPNG "use system libpng" ON)
128+
option(FLTK_USE_SYSTEM_ZLIB "use system zlib" ON)
129+
endif()
117130

118131
# Set default values of internal build options
119132

120-
set(FLTK_USE_BUNDLED_JPEG TRUE)
121-
set(FLTK_USE_BUNDLED_PNG TRUE)
122-
set(FLTK_USE_BUNDLED_ZLIB TRUE)
133+
set(FLTK_USE_BUNDLED_JPEG FALSE)
134+
set(FLTK_USE_BUNDLED_PNG FALSE)
135+
set(FLTK_USE_BUNDLED_ZLIB FALSE)
123136

124137
# Collect libraries to build fltk_images (starting empty)
125138

@@ -418,7 +431,7 @@ option(FLTK_USE_POLL "use poll if available" OFF)
418431
mark_as_advanced(FLTK_USE_POLL)
419432

420433
if(FLTK_USE_POLL)
421-
check_function_exists(poll USE_POLL)
434+
check_symbol_exists(poll "poll.h" USE_POLL)
422435
endif(FLTK_USE_POLL)
423436

424437
#######################################################################
@@ -605,7 +618,7 @@ endif(FLTK_OPTION_SVG)
605618

606619
#######################################################################
607620

608-
# FIXME: GL libs have already been searched in resources.cmake
621+
# FIXME: GLU libs have already been searched in resources.cmake
609622

610623
set(HAVE_GL LIB_GL OR LIB_MesaGL)
611624
set(FLTK_USE_GL FALSE)
@@ -675,8 +688,8 @@ set(FLTK_GL_FOUND FALSE)
675688

676689
if(OPENGL_FOUND)
677690
set(FLTK_GL_FOUND TRUE)
678-
find_path(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR} ${X11_INCLUDE_DIR})
679-
set(CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR}/GL ${OPENGL_GLU_INCLUDE_DIR})
691+
find_path(FLTK_OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR} ${X11_INCLUDE_DIR})
692+
set(CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR}/GL ${FLTK_OPENGL_GLU_INCLUDE_DIR})
680693

681694
if(WIN32)
682695
list(APPEND GLLIBS -lglu32 -lopengl32)
@@ -693,7 +706,7 @@ if(OPENGL_FOUND)
693706
# check if function glXGetProcAddressARB exists
694707
set(TEMP_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
695708
set(CMAKE_REQUIRED_LIBRARIES ${OPENGL_LIBRARIES})
696-
check_function_exists(glXGetProcAddressARB HAVE_GLXGETPROCADDRESSARB)
709+
check_symbol_exists(glXGetProcAddressARB "glx.h" HAVE_GLXGETPROCADDRESSARB)
697710
set(CMAKE_REQUIRED_LIBRARIES ${TEMP_REQUIRED_LIBRARIES})
698711
unset(TEMP_REQUIRED_LIBRARIES)
699712
endif(OPENGL_FOUND)

0 commit comments

Comments
 (0)