Since I announced gtk-fortran 4.6 one year ago, three releases were made: 4.7.0, 4.7.1 and now 4.8.0. Let’s resume what’s new. \sqrt[gtk]{fortran} = 4.8 provides Fortran interfaces to the latests GTK 4.18, GLib 2.82, Cairo 1.18, etc. It was tested with GFortran under Linux, macOS, FreeBSD, MSYS2/Windows, Debian 32 bits and Intel ifx under Linux.
Fixed
- For years, the examples using GTK lists were crashing under MSYS2/Windows. Finally, it was discovered that it was due to the declaration of the
GValue
opaque structure in thesrc/gtk-sup.f90
file. The GValue structure (which contains a value and its “kind”) is now defined as threec_int64_t
instead of along int
and twoc_int64_t
integers, which was too small in Windows (along int
is 64 bits in Linux but 32 bits in Windows, at least with GCC). The exampleshl_list1.f90
,hl_list_n.f90
,hl_list_renderers.f90
,hl_tree.f90
andlist_demo.f90
are now working in Windows, as you can see with this screenshot of thehl_list_renderers.f90
demo contributed by J. Tappin in 2012:
-
In the cfwrapper Python script, two bugs concerning the creation of the Fortran interfaces have been fixed:
- C pointers toward enums were not recognized as pointers, and moreover enums having a name included in a GTK type name could cause bad bindings (for example
GtkSelectionMode
andGtkSelectionModel
). The interfaces of 98 functions were fixed by simply moving a few lines of code. GVariant
andGVariantType
types are now correctly used when declared with a double*
in C. A GVariant is a kind of data container defined in the GNOME GLib, a library underlying GTK.
- C pointers toward enums were not recognized as pointers, and moreover enums having a name included in a GTK type name could cause bad bindings (for example
Miscellaneous
- A special release with the same bug fixes was also made in the gtk3 branch: gtk-fortran 3.24.49 with the latest interfaces to the GTK collection of libraries (except of course GTK 3 itself whose API is not evolving anymore).
- The conda-forge repo is stuck to the 4.6.0 version, as the building still fails maybe because of some modifications related to CMake or pkg-config in conda-forge.
- Reminder: gtk-fortran can be used as a fpm dependency although the main build system is still CMake. But improving the support for fpm (building the examples, installation in the system, etc.) is in my longterm TODO list.
- LFortran can not yet build gtk-fortran, especially because
c_long_double
types are not yet implemented. At least, it is the first encountered error.