As shown in the table below, GTK has a range of bindings for various languages[1] that implement some or all of its feature set. GTK 2 is no longer supported, meaning some languages below do not have current GTK support.
Language | Name | Supported? | License | Notes | |||||
---|---|---|---|---|---|---|---|---|---|
2.24 | 3.12 | 4.0 | GIR | Official | |||||
Ada | GtkAda | ? | Supported up to 3.14.[3] [4] | ||||||
C | GTK | Native, no binding needed. | |||||||
C++ | gtkmm | ||||||||
C# and other CLI languages | Gtk# | ? | Support for GTK 2 is available up to 2.12.[5] | ||||||
GtkSharp | Support for GTK 3 is available up to 3.22. | ||||||||
Gir.Core | ? | ? | |||||||
Crystal | crystal-gobject | ||||||||
gtk4.cr | |||||||||
D | GtkD | ? | with exceptions[6] | Supported since 2.12 | |||||
Erlang | gtknode | ? | [7] | No, partly supported up to 2.16 | |||||
Fortran | gtk-fortran | Supported since 2.24. Supports GTK 3 and GTK 4. | |||||||
FreeBASIC | FreeBASIC GTK bindings | ? | with exception | Supported up to 3.4 and since 2.8, integrated into the core distribution. | |||||
Gambas | Gambas gb.gtk component | ? | Secondary to the primary Qt components | ||||||
Genie | Genie | language written for GObject system | |||||||
Go | go-gir-generator | ? | |||||||
gotk3 | ? | [8] | |||||||
Guile | guile-gnome | ? | supported up to 2.12, partly supported on 2.14 | ||||||
Haskell | Gtk2Hs | ? | Gtk2Hs is a set of Haskell bindings to many of the libraries included in the GTK/GNOME platform. | ||||||
haskell-gi | Generate Haskell bindings for GObject Introspection capable libraries | ||||||||
J | J GTK addon | ? | |||||||
Java and other JVM languages | java-gnome | Unavailable on Microsoft Windows | |||||||
Julia | Gtk.jl | ? | Includes Glib support | ||||||
JavaScript | Gjs | GNOME wiki, based on Mozilla's SpiderMonkey | |||||||
Node-Gtk | Dynamic Node.js binding to GObject libraries using GObject-Introspection. | ||||||||
Seed | ? | GNOME wiki, based on WebKit's JavaScriptCore | |||||||
Kotlin/Native | gtk-kt | gtk-kt | Partial due to being In development, Usable to an extent. | ||||||
Lua | LGI | ? | [9] | Dynamic Lua binding to GObject libraries using GObject-Introspection. | |||||
lgob | ? | lgob provides bindings of GObject-based libraries for Lua 5.1. | |||||||
Nim | [https: / github.com StefanSalewski gintro gintro] | gintro | High level GObject-Introspection based GTK3/GTK4 bindings for Nim language | ||||||
OCaml | LablGtk | ? | No, supported up to 2.16 | ||||||
ooRexx | RexxGTK | ? | Yes, 2.0 or later | ||||||
Objective-C | CoreGTK | ? | |||||||
ObGTK | ? | ||||||||
Objective-C GTK | ? | ||||||||
Pascal | Free Pascal gtk package | ? | with exception | Supported up to 2.24, integrated into the core distribution. Gtk 3.0 bindings are being developed in the Lazarus-ccr project.[10] | |||||
Perl | Gtk2-Perl | ||||||||
PHP | PHP-GTK | [11] | ? | PHP until 5.2, GTK is GTK2 | |||||
Prolog | PLGI | ? | Dynamic Prolog binding to GObject libraries using GObject-Introspection. | ||||||
Python | pgi | ? | GObject Introspection Bindings for PyPy. | ||||||
pygir-ctypes | ? | Pure Python GObject Introspection Repository (GIR) wrapper using ctypes. | |||||||
PyGObject | since 2.22[12] | ||||||||
PyGTK | static bindings, use PyGObject | ||||||||
R | RGtk2 | ? | RGtk2.pdf | ||||||
Racket | gir | ? | ? | ? | [13] | ||||
Ruby | GirFFI-Gtk | ? | GirFFI-based bindings for GTK. Supports both GTK+ 2 and GTK+ 3. | ||||||
Ruby-GNOME2 | Partial, supported up to 2.12, partly supported since 2.14[14] | ||||||||
Rust | gtk-rs | [15] | |||||||
gi-rust | ? | ||||||||
Smalltalk | GNU Smalltalk GTK+ bindings | ? | |||||||
Smalltalk YX GTK plugin | ? | ||||||||
SqueakGtk | ? | ||||||||
Standard ML | Giraffe Library | ? | |||||||
Tcl | Gnocl | ? | |||||||
Vala | Vala | language written for GObject system | |||||||
Wrapl | Wrapl GTK+ module | ? | No, but almost full up to 2.22 |