List of language bindings for GTK#Gtk#
{{short description|none}}
{{Cleanup bare URLs|date=August 2022}}
As shown in the table below, GTK has a range of bindings for various languages{{cite web |url=http://www.gtk.org/language-bindings.php |title=Language Bindings |publisher=The GTK Project |accessdate=2013-05-18 |archive-url=https://web.archive.org/web/20110713100421/http://www.gtk.org/language-bindings.php |archive-date=2011-07-13 |url-status=dead }} 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.
- GObject (GOB) was initially written as a central component of GTK, but outsourced into GLib.
- GObject Introspection is a middleware layer between C libraries (using GObject) and language bindings, e.g. PyGObject uses this, while PyGTK does not.{{cite web |url=https://wiki.gnome.org/Projects/GObjectIntrospection |title=GObject Introspection}}
- Official GNOME Bindings follow the GNOME release schedule which guarantees API stability and time-based releases.
- Glade Interface Designer
class="wikitable sortable" style="font-size: 90%;"
! rowspan=2 | Language ! rowspan=2 | Name ! colspan="5" | Supported? ! rowspan=2 | License ! rowspan=2 | Notes | |||||
2.24
! 3.12 ! 4.0 ! GIR ! Official | |||||
---|---|---|---|---|---|
Ada
| [https://www.adacore.com/gtkada GtkAda] | {{Partial}} | {{Partial}}
|? | {{Yes}} | {{No}}
| {{Free|GPL-3}} | Supported up to 3.14.{{Cite web|url=http://docs.adacore.com/gtkada-docs/gtkada_ug/_build/html/intro.html|title = 1. Introduction: What is GtkAda ? — GtkAda 22.0w documentation}}{{Cite web|url=https://docs.adacore.com/gtkada-docs/gtkada_ug/_build/html/object_oriented.html|title = 10. Object-oriented features — GtkAda 22.0w documentation}} | ||
C
| GTK | {{Yes}} | {{Yes}} | {{Yes}} | {{N/A}} | {{Yes}}
| {{Free|LGPL-2.1}} | Native, no binding needed. | |
C++
| gtkmm | {{Yes}} | {{Yes}} | {{Yes}} | {{No}} | {{Yes}}
| {{Free|LGPL-2.1}} | | |
rowspan=3 | C# and other CLI languages
| Gtk# | {{Partial}} | {{No}}
|? | {{No}} | {{Yes}}
| {{Free|LGPL-2.1}} | Support for GTK 2 is available up to 2.12.{{Cite web|url=https://www.mono-project.com/docs/gui/gtksharp/|title = GtkSharp | Mono}} | ||
[https://github.com/GtkSharp/GtkSharp GtkSharp]
| {{No}} | {{Yes}}
| {{No}} | {{No}} | {{No}}
| {{Free|LGPL-2.1}} | Support for GTK 3 is available up to 3.22. | ||
[https://github.com/gircore/gir.core Gir.Core]
|? | ?
| {{Partial}} | {{Partial}} | {{No}}
| {{Free|MIT}} | | ||
rowspan=2 | Crystal
| [https://github.com/jhass/crystal-gobject crystal-gobject] | {{No}} | {{Yes}}
| {{Partial}} | {{Yes}} | {{No}}
| {{Free|BSD}} | | ||
[https://github.com/hugopl/gtk4.cr gtk4.cr]
| {{No}} | {{No}}
| {{Yes}} | {{Yes}} | {{No}}
| {{Free|MIT}} | | ||
D
| [http://gtkd.org/ GtkD] | {{Yes}} | {{Yes}}
|? | {{Yes}} | {{No}}
| {{Free|LGPL-3}} with exceptions{{cite web |url=https://github.com/gtkd-developers/GtkD/blob/master/COPYING |title=GtkD License LGPL-3 with additional exceptions|website=GitHub|date=19 November 2021}} | Supported since 2.12 | ||
Erlang
| [https://github.com/massemanet/gtknode gtknode] | {{Partial}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|MIT}}{{cite web |url=https://github.com/massemanet/gtknode/blob/master/COPYING |title=gtknode license|website=GitHub|date=11 March 2021}} | No, partly supported up to 2.16 | ||
Fortran
| [https://github.com/vmagnin/gtk-fortran/wiki gtk-fortran] | {{Partial}} | {{Partial}} | {{Partial}} | {{No}} | {{No}}
| {{Free|GPL-3}} | Supported since 2.24. Supports GTK 3 and GTK 4. | |
FreeBASIC
| [http://www.freebasic.net/ FreeBASIC] GTK bindings | {{Yes}} | {{Partial}}
|? | {{No}} | {{No}}
| {{Free|LGPL-3}} with exception | Supported up to 3.4 and since 2.8, integrated into the core distribution. | ||
Gambas
| [http://gambaswiki.org/wiki/comp/gb.gtk Gambas gb.gtk component] | {{Yes}} | {{Partial}}
|? | {{No}} | {{No}}
| {{Free|GPL-2}} | Secondary to the primary Qt components | ||
Genie
| [https://wiki.gnome.org/Projects/Genie Genie] | {{Yes}} | {{Yes}}
| {{Yes}} | {{Yes}} | {{Yes}}
| {{Free|LGPL-2.1}} | language written for GObject system | ||
rowspan=2 | Go
| [https://github.com/linuxdeepin/go-gir-generator/ go-gir-generator] | {{?}} | {{?}}
|? | {{Yes}} | {{No}}
| {{Free|GPL-3}} | | ||
[https://blog.conformal.com/gotk3-gtk3-the-go-way/ gotk3]
| {{No}} | {{Partial}}
|? | {{No}} | {{No}}
| {{Free|ISC}}{{cite web |url=https://github.com/conformal/gotk3/blob/master/LICENSE |title=gotk3 license|website=GitHub|date=17 August 2021}} | | ||
Guile
| [https://www.gnu.org/software/guile-gnome/ guile-gnome] | {{Partial}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|GPL-2}} | supported up to 2.12, partly supported on 2.14 | ||
rowspan=2 | Haskell
| [http://projects.haskell.org/gtk2hs/ Gtk2Hs] | {{Yes}} | {{Partial}}
|? | {{No}} | {{No}}
| {{Free|LGPL-2.1}} | Gtk2Hs is a set of Haskell bindings to many of the libraries included in the GTK/GNOME platform. | ||
[https://github.com/haskell-gi/haskell-gi haskell-gi]
| {{No}} | {{Yes}}
| {{Yes}} | {{Yes}} | {{No}}
| {{Free|LGPL-2.1}} | Generate Haskell bindings for GObject Introspection capable libraries | ||
J
| [https://archive.today/20140514030513/http://www.jsoftware.com/jwiki/Interfaces/GTK J GTK addon] | {{Partial}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|GPL-3}} | | ||
Java and other JVM languages
| {{Yes}} | {{Yes}}
| {{No}} | {{No}} | {{Yes}}
| {{Free|GPL-2 with exception}} | Unavailable on Microsoft Windows | ||
Julia
| [https://github.com/JuliaGtk/Gtk4.jl Gtk4.jl] | {{Yes}} | {{Yes}}
| {{Yes}} | {{No}} | {{No}}
| {{Free|MIT}} | Includes Glib support | ||
rowspan=3 | JavaScript
| [https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md Gjs] | {{Yes}} | {{Yes}}
|{{Yes}} | {{Yes}} | {{Yes}}
| {{Free|MIT}} | [https://wiki.gnome.org/JavaScript GNOME wiki], based on Mozilla's SpiderMonkey | ||
[https://github.com/romgrk/node-gtk Node-Gtk]
| {{No}} | {{Yes}}
| {{Partial}} | {{Yes}} | {{No}}
| {{Free|MIT}} | Dynamic Node.js binding to GObject libraries using GObject-Introspection. | ||
Seed
| {{Yes}} | {{Yes}}
|? | {{Yes}} | {{Yes}}
| {{Free|LGPL-2.1}} | [https://wiki.gnome.org/JavaScript GNOME wiki], based on WebKit's JavaScriptCore | ||
rowspan=2 |[https://kotlinlang.org/docs/native-overview.html Kotlin/Native]
|[https://gitlab.com/gtk-kt/gtk-kt gtk-kt]| [https://gitlab.com/gtk-kt/gtk-kt gtk-kt] | {{No}} | {{Partial}} | {{Partial}} | {{Partial}} | {{No}}
| {{Free|AGPL-3.0}} |Partial due to being In development, Usable to an extent. |
[https://gtk-kt.org gtk-kn]| [https://gitlab.com/gtk-kn/gtk-kn gtk-kn] | {{No}} | {{No}} | {{No}} | {{Partial}} | {{No}}
| {{Free|LGPL-3}} |Partial due to being In development, Usable to an extent. |
rowspan="2" | Lua
| [https://github.com/pavouk/lgi LGI] | {{Partial}} | {{Yes}}
|? | {{Yes}} | {{No}}
| {{Free|MIT}}{{cite web |url=https://github.com/pavouk/lgi/blob/master/LICENSE |title=LGI license|website=GitHub|date=20 November 2021}} | Dynamic Lua binding to GObject libraries using GObject-Introspection. | ||
[https://bitbucket.org/lucashnegri/lgob lgob]
| {{No}} | {{Yes}}
|? | {{Yes}} | {{No}}
| {{Free|LGPL-3}} | lgob provides bindings of GObject-based libraries for Lua 5.1. | ||
Nim
| [https: / github.com StefanSalewski gintro gintro] |[https://github.com/StefanSalewski/gintro gintro] | {{No}} | {{Yes}}
| {{Yes}} | {{Yes}} | {{No}}
| {{Free|MIT}} | High level GObject-Introspection based GTK3/GTK4 bindings for Nim language | |
OCaml
| [https://github.com/garrigue/lablgtk LablGtk] | {{Partial}} | {{Partial}}
|? | {{No}} | {{No}}
| {{Free|LGPL-2.1 with exception}} | No, supported up to 2.16 | ||
ooRexx
| RexxGTK | {{Partial}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|CPL}} | Yes, 2.0 or later | ||
rowspan="3" | Objective-C
| [https://github.com/coregtk/coregtk/wiki CoreGTK] | {{No}} | {{Partial}}
|? | {{No}} | {{No}}
| {{Free|LGPL-2.1}} | | ||
[https://code.google.com/p/obgtk/ ObGTK]
| {{Partial}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|LGPL-2.1}} | | ||
Objective-C GTK
| {{Partial}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|LGPL-2.1}} | | ||
Pascal
| Free Pascal [https://web.archive.org/web/20140328101507/http://www.freepascal.org/packages/gtk.html gtk package] | {{Yes}} | {{Yes}}
|? | {{No}} | {{No}}
| {{Free|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.http://wiki.freepascal.org/Gtk%2B3 | ||
Perl
| {{Yes}} | {{Yes}}
| {{No}} | {{Yes}} | {{Yes}}
| {{Free|LGPL-2.1}} | | ||
PHP
| PHP-GTK | {{Partial}} | {{Partial}}{{cite web|url=https://marc.info/?l=php-gtk-general&m=143498753322311|title=Attention: created branch dev-php-gtk3|author=Alexandre Pereira Bühler|publisher=PHP-GTK General Mailing List|date=2015-06-22}}
|? | {{No}} | {{No}}
| {{Free|LGPL-2.1}} | PHP until 5.2, GTK is GTK2 | ||
Prolog
| [https://github.com/keriharris/plgi PLGI] | {{Partial}} | {{Yes}}
|? | {{Yes}} | {{No}}
| {{Free|LGPL-2.1}} | Dynamic Prolog binding to GObject libraries using GObject-Introspection. | ||
rowspan="4" | Python
| [https://github.com/lazka/pgi pgi] | {{Partial}} | {{Partial}}
|? | {{Yes}} | {{No}}
| {{Free|LGPL-2.1}} | GObject Introspection Bindings for PyPy. | ||
[https://code.google.com/p/pygir-ctypes/ pygir-ctypes]
| {{Partial}} | {{Partial}}
|? | {{Yes}} | {{No}}
| {{Free|BSD}} | Pure Python GObject Introspection Repository (GIR) wrapper using ctypes. | ||
PyGObject
| {{Yes}} | {{Yes}}
| {{Yes}} | {{Yes}} | {{Yes}}
| {{Free|LGPL-2.1}} | ||
PyGTK
| {{Yes}} | {{No}}
| {{No}} | {{No}} | {{Yes}}
| {{Free|LGPL-2.1}} | static bindings, use PyGObject | ||
R
| RGtk2 | {{Partial}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|GPL-2}} | [https://cran.r-project.org/web/packages/RGtk2/RGtk2.pdf RGtk2.pdf] {{Webarchive|url=https://web.archive.org/web/20160309182848/https://cran.r-project.org/web/packages/RGtk2/RGtk2.pdf |date=2016-03-09 }} | ||
Racket
| [https://docs.racket-lang.org/gir/index.html gir] |? | ?
|? | {{Yes}} | {{No}}
| {{Free|MIT}}{{Cite web | url=https://github.com/Kalimehtar/gir/blob/master/LICENSE | title=1. Main interface | website=GitHub | date=6 February 2022 }} | | ||
rowspan="2" | Ruby
| [https://github.com/mvz/gir_ffi-gtk GirFFI-Gtk] | {{Partial}} | {{Partial}}
|? | {{Yes}} | {{No}}
| {{Free|LGPL-2.1}} | GirFFI-based bindings for GTK. Supports both GTK+ 2 and GTK+ 3. | ||
[https://ruby-gnome2.sourceforge.jp/ Ruby-GNOME2] {{Webarchive|url=https://web.archive.org/web/20080821034603/http://ruby-gnome2.sourceforge.jp/ |date=2008-08-21 }}
| {{Partial}} | {{Yes}}
| {{Yes}} | {{No}} | {{No}}
| {{Free|MIT License}} | Partial, supported up to 2.12, partly supported since 2.14{{cite web |url=https://rubygems.org/gems/gtk3 |title=gtk3 / Rubygems |access-date=2013-05-07 |author=Ruby-GNOME2 Project Team}} | ||
rowspan="2" | Rust
| [https://github.com/gtk-rs gtk-rs] | {{No}} | {{Yes}}
| {{Yes}} | {{Yes}} | {{No}}
| {{Free|MIT}}{{cite web |url=https://github.com/gtk-rs/gtk/blob/master/LICENSE |title=GTK-rs license|website=GitHub|date=17 November 2021}} | | ||
[https://github.com/gi-rust/grust gi-rust]
| {{No}} | {{Yes}}
|? | {{Yes}} | {{No}}
| {{Free|LGPL-2.1}} | | ||
rowspan="3" | Smalltalk
| GNU Smalltalk [http://smalltalk.gnu.org/tags/gtk GTK+ bindings] | {{Yes}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|GPL-2}} | | ||
Smalltalk YX GTK plugin
| {{Yes}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|MIT}} | | ||
[http://squeakgtk.pbworks.com/ SqueakGtk]
| {{Partial}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|MIT}} | | ||
Standard ML
| [http://giraffelibrary.org/ Giraffe Library] | {{No}} | {{Yes}}
|? | {{Yes}} | {{No}}
| {{Free|LGPL-2.1}} | | ||
Tcl
| [http://www.gnocl.org/ Gnocl] | {{Yes}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|BSD}} | | ||
Vala
| [https://wiki.gnome.org/Projects/Vala Vala] | {{Yes}} | {{Yes}}
|{{Yes}} | {{Yes}} | {{Yes}}
| {{Free|LGPL-2.1}} | language written for GObject system | ||
Wrapl
| [http://wrapl.sourceforge.net/samples/gtk.html Wrapl GTK+ module] | {{Partial}} | {{No}}
|? | {{No}} | {{No}}
| {{Free|GPL-3}} | No, but almost full up to 2.22 |
Gtk#
{{Infobox software
| name = Gtk#
| logo = Gtk Sharp Logo.png
| developer = Xamarin
| released = {{Start date and age|2004|03|12}}
| latest release date = {{Start date and age|2016|09|22}}
| latest preview version = 2.99.3 (for GTK3)
| latest preview date = {{Start date and age|2014|06|06}}
| repo = https://github.com/mono/gtk-sharp
| programming language = C#, XML, Perl, C
| operating system = Windows, macOS, Linux
| genre = Widget toolkit
| license = GNU Lesser General Public License
| website = {{URL|mono-project.com/GtkSharp}}
}}Gtk# is a set of .NET Framework bindings for the GTK graphical user interface (GUI) toolkit and assorted GNOME libraries. The library facilitates building graphical GNOME applications using Mono or any other compliant Common Language Runtime (CLR). Gtk# is an event-driven system like any other modern windowing library where every widget allows associating handler methods, which get called when certain events occur.{{Citation needed|date=February 2023}}
Applications built using Gtk# will run on many platforms including Linux, Windows and macOS. 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 an X11 server.{{cite web |title=Download Gtk# |url=http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.22.msi |url-status=dead |archive-url=https://web.archive.org/web/20131214121832/http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.22.msi |archive-date=December 14, 2013 |access-date=December 23, 2014 |publisher=The GTK+ Project}}
Glade Interface Designer can be used with the Glade# bindings to easily design GUI applications. A GUI designer named Stetic is integrated with the MonoDevelop integrated development environment (IDE).
In addition to support the standard GTK/GNOME stack of development tools, the {{mono|gtk-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|date=February 2023}}
{{As of|2020|09}}, 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 the Banshee media player in Ubuntu 12.04.{{cite web |title='Bansheegeddon' may see Banshee, Mono dropped from Ubuntu default |url=http://www.itworld.com/article/2734148/it-management/-bansheegeddon--may-see-banshee--mono-dropped-from-ubuntu-default.html |url-status=dead |archive-url=https://web.archive.org/web/20150710205702/http://www.itworld.com/article/2734148/it-management/-bansheegeddon--may-see-banshee--mono-dropped-from-ubuntu-default.html |archive-date=July 10, 2015 |access-date=August 31, 2015 |website=ITWorld}}