-
Notifications
You must be signed in to change notification settings - Fork 44
Home
The gtk-fortran project provides bindings to the Fortran language for the GTK libraries (GTK, Cairo, GdkPixbuf, GLib...) and is licensed under GNU GPLv3 (see Licenses for more details). Like GTK and Fortran, it is cross-platform (Linux, macOS, BSD, MSYS2/Windows).
With gtk-fortran you can build GTK graphical user interfaces (GUI), you can use GdkPixbuf to draw bitmaps, you can use Cairo to make vectorial drawing and also integrate scientific plotting via its additional PLplot interface. But it's not all about graphical interface, since you can also access the numerous functions of the generalist GLib library (regular expressions, hash, strings, hash tables, file utilities...).
The gtk-fortran library can either be built and installed with CMake or be used as a simple Fortran Package Manager fpm dependency. It is also available on conda-forge. Its documentation and examples are designed to help you learn and use gtk-fortran and GTK.
Tutorials Get started with gtk-fortran (installation, writing your first application, etc.) |
How-to Guides for common tasks |
Explanation What is gtk-fortran |
Reference Technical information, APIs... |
- 2022-05-10: the wiki documentation is being refactored using the Diátaxis framework (Tutorials, How-to, Reference, Explanation).
- 2022-05-09: new How to start my own project from a gtk-fortran example?, including license considerations.
- 2022-04-28: the HL documentation has been entirely updated.
- 2022-04-24: release of gtk-fortran 4.2.1, with interfaces to GTK 4.6.2 and GLib 2.72.1. Can now be used as a fpm dependency (see Tutorial 5). Also available on conda-forge.
- 2021-11-13: a new example has been added in the gtk-fortran-extra repository (MIT license). It is a Fortran generator of figures similar to the iconic Joy Division's Unknown Pleasures cover (CP 1919 pulsar signal), using the Cairo library.
- 2021-06-03: a new repository https://github.com/vmagnin/gtk-fortran-extra offers more examples (under MIT license) demonstrating how you can obtain an application that can be built with or without its GUI.
- 2020-09-03: the video of our presentation at FortranCon 2020 is now online: gtk-fortran: a GTK / Fortran binding.
You can acknowledge the use of gtk-fortran by citing this paper:
Vincent Magnin, James Tappin, Jens Hunger, Jerry De Lisle, "gtk-fortran: a GTK+ binding to build Graphical User Interfaces in Fortran", Journal of Open Source Software, 4(34), 1109, 12th January 2019, https://doi.org/10.21105/joss.01109
- 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