-
Notifications
You must be signed in to change notification settings - Fork 43
Known issues and limitations
vmagnin edited this page May 12, 2022
·
2 revisions
gtk-fortran does not use the GObject introspection layer but instead uses its own Python script named cfwrapper.py
to parse the header files of the GTK libraries (more than 700 .h
files). It generates around 10000 Fortran interfaces (see Status for precise numbers). But gtk-fortran remains a partial binding:
- around 140 C variadic functions (also called varargs functions) can not be implemented in gtk-fortran. Happily GTK most of the time offers an alternative function with an array argument to ease language bindings (for example
gtk_list_store_new
/gtk_list_store_newv
). See Things to avoid: va_list. - Macro functions and constants (
#define
) are not parsed by the wrapper. Some were implemented in thegtk.f90
andgtk-sup.f90
files for convenience, like theTRUE
andFALSE
constants or theg_signal_connect
functions. - C structures (
struct
) are not parsed by the wrapper. A few are implemented in thegtk-sup.f90
file for convenience. - A few GTK types are not implemented.
- Some enums are excluded by the wrapper because of some parsing difficulties:
GSocketFamily
,GSocketMsgFlags
,GdkPixdataType
,GIOCondition
,GDBusInterfaceSkeletonFlags
,GdkSeatCapabilities
,GdkAxisFlags
. - Note that Fortran, contrarily to C, has no unsigned integers, so problems could occur if you pass great values between Fortran and GTK. See the
src/tests.f90
file.
If you need a GTK feature missing in gtk-fortran, you can generally write the interface yourself. You can learn by following the syntax used in the .f90
files of the src/
directory.
They are listed in the Issues tab. Note that most of them generally concerns the gtk-fortran examples rather than the library itself.
- 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