-
Notifications
You must be signed in to change notification settings - Fork 43
History
The project was born from the frustration I felt while migrating to Linux in the mid 2000's after having enjoyed Visual Fortran for years. I needed a visual interface to display results in real time and the requirements were: cross-platform, using only standard Fortran, and under a free license. In December 2010, I was inspired by Tobias Burnus' post on comp.lang.fortran newsgroup (2nd May 2007 13:10) where he gave an example of a Fortran 2003 program creating a minimalist GUI (an empty GTK+ 2 window) using the iso_c_binding
module. I posted a message on the 27th December 2010 and got into contact with Jerry DeLisle, a GFortran developer, on the 29th. We launched together the project on GitHub in January 2011. Other contributors then joined, especially James Tappin and Jens Hunger.
The first example, gtkhello2.f90, was posted on the 24th January 2011. We started the project with GTK+ 2 but this screenshot was taken with GTK+ 3, which was released on the 10th February 2011:
The first interfaces were written by hand, one by one, then I soon realized it could be automatized as I had just learned Python and regular expressions. The first version of the cfwrapper.py
script is dated from the 28th January 2011. It was then developed to parse all GTK libraries, until around 10000 interfaces could be automatically generated.
In March 2011, J. Tappin began working on the High Level library. And in April-May, J. Hunger explored the GtkBuilder API and began working on the gtkf-sketcher application. The same year, J. Tappin also brought the CMake building system and the PLplot interface.
gtk-fortran was soon cited in a footnote in the following book (page 100) as a platform-independent solution in development:
- Markus, Arjen. Modern Fortran in Practice. 1st ed. Cambridge: Cambridge University Press, 2012, http://dx.doi.org/10.1017/CBO9781139084796.
2014 and 2015 were very calm. In 2016, the Python wrapper was refactored to ease maintenance. The CMake files were cleaned and unified in GTK 2 and GTK 3 branches. In the following years, gtk-fortran releases tried to follow the Ubuntu releases rhythm when our workload made it possible.
In 2019, the CMake system was parallelized by Chinoune Mehdi, an appreciable feature because developing the library implies numerous builds! Work was necessary to adapt gtk-fortran to major changes in the Fortran bindings of PLplot. And an attempt to replace CMake by Meson was abandoned.
Preparing for the future GTK 4 was a motivation to improve the whole library. A software paper was published in the Journal of Open Source Software in 2019.
gtk-fortran was cited in Milan Curcic's book in a list of examples of libraries using the modern Fortran interoperability with C:
- Curcic, Milan. Modern Fortran - Building efficient parallel applications. Manning Publications, Manning Early Access Program (MEAP), May 2020 (estimated), ISBN 9781617295287.
Milan was then a co-founder of the Fortran-lang community which aims to gather Fortran programmers to develop the Fortran ecosystem. Following that encounter, gtk-fortran was presented in July at FortranCon 2020, "the first International Conference targeting the development for and with the Fortran programming language":
- the video presentation on YouTube: gtk-fortran: a GTK / Fortran binding.
- The PDF of the presentation.
GTK 4.0 was released in December 2020 and gtk-fortran 4.0.0 was released in April 2021, after one year of hard work, especially migrating the examples and the HL library.
In June 2021, a new repository gtk-fortran-extra was created under MIT license. One objective was to keep the size of the gtk-fortran repository reasonable, and another one was to offer more examples but with a non-GPL license.
In May 2022, the work on improving the wiki documentation with tutorials was pushed one step beyond by refactoring the whole documentation following the Diátaxis framework (Tutorials, How-to, Reference, Explanation).
Another stepping stone, was the demonstration in gtk-fortran-extra/parallel_app/ of modern Fortran parallel features (coarrays, events, teams, collective routines) used with gtk-fortran.
At Spring 2023, the cfwrapper began becoming a more general tool to generate Fortran interfaces for other C libraries.
- Installation
- My first gtk-fortran application
- Drawing an image in a PNG file (without GUI)
- A program also usable without GUI
- Using Glade3 and gtkf-sketcher (GTK 3)
- Using gtk-fortran as a fpm dependency
- Debugging with GtkInspector
- Learning from examples
- Video tutorials
- How to start my own project from a gtk-fortran example
- git basics
- CMake basics
- Alternatives to CMake
- How to migrate to GTK 4
- How to contribute to gtk-fortran
- How to hack the cfwrapper