As shown in the table below, GTK has a range of bindings for various programming languages[1] that implement some or all of its feature set. GTK 2 is unsupported now, so some languages below lack current GTK support.

Language Name Supported? License Notes
2.24 3.12 4.0 GIR
Ada GtkAda Partial Partial ? Yes GPL-3 Supported up to 3.14.[3][4]
C GTK Yes Yes Yes N/a LGPL-2.1 Native, no binding needed.
C++ gtkmm Yes Yes Yes No LGPL-2.1
C# and other CLI languages GtkSharp No Yes No No LGPL-2.1 Support for GTK 3 is available up to 3.22.
Gir.Core No No Partial Partial MIT
Crystal crystal-gobject No Yes Partial Yes BSD
gtk4.cr No No Yes Yes MIT
D GtkD Yes Yes No Yes LGPL-3 with exceptions[5] Supported since 2.12
Erlang gtknode Partial No No No MIT [6] No, partly supported up to 2.16
Fortran gtk-fortran Partial Partial Partial No GPL-3 Supported since 2.24. Supports GTK 3 and GTK 4.
FreeBASIC FreeBASIC GTK bindings Yes Partial No No LGPL-3 with exception Supported up to 3.4 and since 2.8, integrated into the core distribution.
Gambas Gambas gb.gtk component Yes Partial ? No GPL-2 Secondary to the primary Qt components
Genie Genie Yes Yes Yes Yes LGPL-2.1 language written for GObject system
Go go-gir-generator ? ? ? Yes GPL-3
gotk3 No Partial ? No ISC[7]
Guile guile-gnome Partial No ? No GPL-2 supported up to 2.12, partly supported on 2.14
Haskell Gtk2Hs Yes Partial ? No LGPL-2.1 Gtk2Hs is a set of Haskell bindings to many of the libraries included in the GTK/GNOME platform.
haskell-gi No Yes Yes Yes LGPL-2.1 Generate Haskell bindings for GObject Introspection capable libraries
J J GTK addon[link removed] Partial No ? No GPL-3
Java and other JVM languages java-gnome Yes Yes No No GPL-2 with exception Unavailable on Microsoft Windows
Java-GI No No Yes Yes LGPL-2.1 Works with OpenJDK 25 or later
Julia Gtk4.jl Yes Yes Yes No MIT Includes Glib support
JavaScript Gjs Yes Yes Yes Yes MIT GNOME wiki, based on Mozilla's SpiderMonkey
Node-Gtk No Yes Partial Yes MIT
Seed Yes Yes ? Yes LGPL-2.1 GNOME wiki, based on WebKit's JavaScriptCore
Kotlin/Native gtk-kt No Partial Partial Partial AGPL-3.0
gtk-kn No No No Partial LGPL-3
Lua LGI Partial Yes Yes Yes MIT[8]
lgob No Yes ? Yes LGPL-3
Nim gintro No Yes Yes Yes MIT
OCaml LablGtk Partial Partial ? No LGPL-2.1 with exception Supported up to 2.16
ooRexx RexxGTK Partial No ? No CPL Yes, 2.0 or later
Objective-C CoreGTK No Partial ? No LGPL-2.1
ObGTK Partial No ? No LGPL-2.1
Objective-C GTK Partial No ? No LGPL-2.1
Pascal Free Pascal gtk package Yes Yes ? No LGPL-3 with exception Supported up to 2.24, integrated into the core distribution. Gtk 3.0 bindings are being developed in the Lazarus-ccr project.[9]
Perl Gtk2-Perl Yes Yes No Yes LGPL-2.1
PHP PHP-GTK Partial Partial[10] ? No LGPL-2.1 PHP until 5.2, GTK is GTK2
Prolog PLGI Partial Yes ? Yes LGPL-2.1
Python pgi Partial Partial ? Yes LGPL-2.1 GObject Introspection Bindings for PyPy.
pygir-ctypes Partial Partial ? Yes BSD
PyGObject Yes Yes Yes Yes LGPL-2.1 since 2.22[11]
PyGTK Yes No No No LGPL-2.1
R RGtk2 Partial No ? No GPL-2 RGtk2.pdf Archived 2016-03-09 at the Wayback Machine
Racket gir ? ? ? Yes MIT[12]
Ruby GirFFI-Gtk Partial Partial ? Yes LGPL-2.1
Ruby-GNOME2 Archived 2008-08-21 at the Wayback Machine Partial Yes Yes No MIT License Partial, supported up to 2.12, partly supported since 2.14[13]
Rust gtk-rs No Yes Yes Yes MIT[14]
gi-rust No Yes ? Yes LGPL-2.1
Smalltalk GNU Smalltalk GTK+ bindings Yes No ? No GPL-2
Smalltalk YX GTK plugin Yes No ? No MIT
SqueakGtk Partial No ? No MIT
Standard ML Giraffe Library No Yes ? Yes LGPL-2.1
Tcl Gnocl Yes No ? No BSD
Vala Vala Yes Yes Yes Yes LGPL-2.1 Language written for GObject system
Wrapl Wrapl GTK+ module Partial No ? No GPL-3 No, but almost full up to 2.22

See also

References

  1. ^ "Language Bindings". The GTK Project. Archived from the original on 2011-07-13. Retrieved 2013-05-18.
  2. ^ "GObject Introspection".
  3. ^ "1. Introduction: What is GtkAda ? — GtkAda 22.0w documentation".
  4. ^ "10. Object-oriented features — GtkAda 22.0w documentation".
  5. ^ "GtkD License LGPL-3 with additional exceptions". GitHub. 19 November 2021.
  6. ^ "gtknode license". GitHub. 11 March 2021.
  7. ^ "gotk3 license". GitHub. 17 August 2021.
  8. ^ "LGI license". GitHub. 20 November 2021.
  9. ^ "Gtk+3 - Lazarus wiki". wiki.freepascal.org. Retrieved 2025-09-19.
  10. ^ Alexandre Pereira Bühler (2015-06-22). "Attention: created branch dev-php-gtk3". PHP-GTK General Mailing List.
  11. ^ "PyGObject History". Retrieved 2013-08-29.
  12. ^ "1. Main interface". GitHub. 6 February 2022.
  13. ^ Ruby-GNOME2 Project Team. "gtk3 / Rubygems". Retrieved 2013-05-07.{{cite web}}: CS1 maint: numeric names: authors list (link)
  14. ^ "GTK-rs license". GitHub. 17 November 2021.