As shown in the table below,GTK has a range ofbindings for variousprogramming 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 | Official | ||||
| Ada | GtkAda | Partial | Partial | ? | Yes | No | GPL-3 | Supported up to 3.14.[3][4] |
| C | GTK | Yes | Yes | Yes | N/a | Yes | LGPL-2.1 | Native, no binding needed. |
| C++ | gtkmm | Yes | Yes | Yes | No | Yes | LGPL-2.1 | |
| C# and otherCLI languages | Gtk# | Partial | No | ? | No | Yes | LGPL-2.1 | Support for GTK 2 is available up to 2.12.[5] |
| GtkSharp | No | Yes | No | No | No | LGPL-2.1 | Support for GTK 3 is available up to 3.22. | |
| Gir.Core | ? | ? | Partial | Partial | No | MIT | ||
| Crystal | crystal-gobject | No | Yes | Partial | Yes | No | BSD | |
| gtk4.cr | No | No | Yes | Yes | No | MIT | ||
| D | GtkD | Yes | Yes | ? | Yes | No | LGPL-3 with exceptions[6] | Supported since 2.12 |
| Erlang | gtknode | Partial | No | ? | No | No | MIT[7] | No, partly supported up to 2.16 |
| Fortran | gtk-fortran | Partial | Partial | Partial | No | 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 | No | GPL-2 | Secondary to the primaryQt components |
| Genie | Genie | Yes | Yes | Yes | Yes | Yes | LGPL-2.1 | language written for GObject system |
| Go | go-gir-generator | ? | ? | ? | Yes | No | GPL-3 | |
| gotk3 | No | Partial | ? | No | No | ISC[8] | ||
| Guile | guile-gnome | Partial | No | ? | No | No | GPL-2 | supported up to 2.12, partly supported on 2.14 |
| Haskell | Gtk2Hs | Yes | Partial | ? | No | 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 | No | LGPL-2.1 | Generate Haskell bindings for GObject Introspection capable libraries | |
| J | J GTK addon | Partial | No | ? | No | No | GPL-3 | |
| Java and otherJVM languages | java-gnome | Yes | Yes | No | No | Yes | GPL-2 with exception | Unavailable on Microsoft Windows |
| Julia | Gtk4.jl | Yes | Yes | Yes | No | No | MIT | Includes Glib support |
| JavaScript | Gjs | Yes | Yes | Yes | Yes | Yes | MIT | GNOME wiki, based on Mozilla'sSpiderMonkey |
| Node-Gtk | No | Yes | Partial | Yes | No | MIT | Dynamic Node.js binding to GObject libraries using GObject-Introspection. | |
| Seed | Yes | Yes | ? | Yes | Yes | LGPL-2.1 | GNOME wiki, based on WebKit'sJavaScriptCore | |
| Kotlin/Native | gtk-kt | No | Partial | Partial | Partial | No | AGPL-3.0 | Partial due to being In development, Usable to an extent. |
| gtk-kn | No | No | No | Partial | No | LGPL-3 | Partial due to being In development, Usable to an extent. | |
| Lua | LGI | Partial | Yes | Yes | Yes | No | MIT[9] | Dynamic Lua binding to GObject libraries using GObject-Introspection. |
| lgob | No | Yes | ? | Yes | No | LGPL-3 | lgob provides bindings of GObject-based libraries for Lua 5.1. | |
| Nim | gintro | No | Yes | Yes | Yes | No | MIT | High level GObject-Introspection based GTK3/GTK4 bindings for Nim language |
| OCaml | LablGtk | Partial | Partial | ? | No | No | LGPL-2.1 with exception | No, supported up to 2.16 |
| ooRexx | RexxGTK | Partial | No | ? | No | No | CPL | Yes, 2.0 or later |
| Objective-C | CoreGTK | No | Partial | ? | No | No | LGPL-2.1 | |
| ObGTK | Partial | No | ? | No | No | LGPL-2.1 | ||
| Objective-C GTK | Partial | No | ? | No | No | LGPL-2.1 | ||
| Pascal | Free Pascalgtk package | Yes | Yes | ? | No | 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.[10] |
| Perl | Gtk2-Perl | Yes | Yes | No | Yes | Yes | LGPL-2.1 | |
| PHP | PHP-GTK | Partial | Partial[11] | ? | No | No | LGPL-2.1 | PHP until 5.2, GTK is GTK2 |
| Prolog | PLGI | Partial | Yes | ? | Yes | No | LGPL-2.1 | Dynamic Prolog binding to GObject libraries using GObject-Introspection. |
| Python | pgi | Partial | Partial | ? | Yes | No | LGPL-2.1 | GObject Introspection Bindings for PyPy. |
| pygir-ctypes | Partial | Partial | ? | Yes | No | BSD | Pure Python GObject Introspection Repository (GIR) wrapper using ctypes. | |
| PyGObject | Yes | Yes | Yes | Yes | Yes | LGPL-2.1 | since 2.22[12] | |
| PyGTK | Yes | No | No | No | Yes | LGPL-2.1 | static bindings, use PyGObject | |
| R | RGtk2 | Partial | No | ? | No | No | GPL-2 | RGtk2.pdfArchived 2016-03-09 at theWayback Machine |
| Racket | gir | ? | ? | ? | Yes | No | MIT[13] | |
| Ruby | GirFFI-Gtk | Partial | Partial | ? | Yes | No | LGPL-2.1 | GirFFI-based bindings for GTK. Supports both GTK+ 2 and GTK+ 3. |
| Ruby-GNOME2Archived 2008-08-21 at theWayback Machine | Partial | Yes | Yes | No | No | MIT License | Partial, supported up to 2.12, partly supported since 2.14[14] | |
| Rust | gtk-rs | No | Yes | Yes | Yes | No | MIT[15] | |
| gi-rust | No | Yes | ? | Yes | No | LGPL-2.1 | ||
| Smalltalk | GNU SmalltalkGTK+ bindings | Yes | No | ? | No | No | GPL-2 | |
| Smalltalk YX GTK plugin | Yes | No | ? | No | No | MIT | ||
| SqueakGtk | Partial | No | ? | No | No | MIT | ||
| Standard ML | Giraffe Library | No | Yes | ? | Yes | No | LGPL-2.1 | |
| Tcl | Gnocl | Yes | No | ? | No | No | BSD | |
| Vala | Vala | Yes | Yes | Yes | Yes | Yes | LGPL-2.1 | language written for GObject system |
| Wrapl | Wrapl GTK+ module | Partial | No | ? | No | No | GPL-3 | No, but almost full up to 2.22 |
| Gtk# | |
|---|---|
![]() | |
| Developer | Xamarin |
| Initial release | March 12, 2004; 21 years ago (2004-03-12) |
| Stable release | |
| Preview release | |
| Written in | C#,XML,Perl,C |
| Operating system | Windows,macOS,Linux |
| Type | Widget toolkit |
| License | GNU Lesser General Public License |
| Website | mono-project |
| Repository | github |
Gtk# is a set of.NET Framework bindings for the GTKgraphical user interface (GUI)toolkit and assortedGNOMElibraries. The library facilitates building graphical GNOME applications usingMono or any other compliantCommon Language Runtime (CLR). Gtk# is an event-driven system like any other modern windowing library where everywidget allows associating handler methods, which get called when certain events occur.[citation needed]
Applications built using Gtk# will run on many platforms includingLinux,Windows andmacOS. The Mono packages for Windows include GTK, Gtk# and a native theme to make applications look like native Windows applications. Starting with Mono 1.9, running Gtk# applications on macOS no longer requires running anX11 server.[17]
Glade Interface Designer can be used with the Glade# bindings to easily design GUI applications. A GUI designer namedStetic is integrated with theMonoDevelopintegrated development environment (IDE).
In addition to support the standard GTK/GNOME stack of development tools, thegtk-dotnet.dll assembly provides a bridge to consume functionality available on the .NET stack. At this point this includes the functionality to use System.Drawing to draw on a widget.[citation needed]
As of September 2020[update], Gtk# support for Gtk3 remains in the preview phase and forked projects, such as GtkSharp, have been founded to provide full Gtk3 support for C# and other CLI languages. The lack of a released version of Gtk# with support for Gtk3 was cited as a reason to remove theBanshee media player in Ubuntu 12.04.[18]
{{cite web}}: CS1 maint: numeric names: authors list (link)