Skip to content

Known issues and limitations

vmagnin edited this page May 12, 2022 · 2 revisions

Limitations

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 the gtk.f90 and gtk-sup.f90 files for convenience, like the TRUE and FALSE constants or the g_signal_connect functions.
  • C structures (struct) are not parsed by the wrapper. A few are implemented in the gtk-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.

Opened issues

They are listed in the Issues tab. Note that most of them generally concerns the gtk-fortran examples rather than the library itself.

Clone this wiki locally