GTK
GTK (formerly GIMP ToolKit and GTK+ ) is a free and open-source widget toolkit for creating graphical user interfaces (GUIs) targeted at Linux and specifically GNOME (though with some use in other desktop environments).
≈ 10 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
GTK (formerly GIMP ToolKit and GTK+ ) is a free and open-source widget toolkit for creating graphical user interfaces (GUIs) targeted at Linux and specifically GNOME (though with some use in other desktop environments). It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. The GTK team releases new versions on a regular basis.
GTK 4 and GTK 3 are actively maintained, while GTK 2 is no longer supported. GTK 1 is independently maintained by the CinePaint project.
GTK (formerly GIMP ToolKit and GTK+ ) is a free and open-source widget toolkit for creating graphical user interfaces (GUIs) targeted at Linux and specifically GNOME (though with some use in other desktop environments). It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. The GTK team releases new versions on a regular basis.
GTK 4 and GTK 3 are actively maintained, while GTK 2 is no longer supported. GTK 1 is independently maintained by the CinePaint project.
Software architecture
, GDK, ATK, GIO, Cairo and GLib ]] contains back-ends to X11, Wayland, Broadway (HTTP), Quartz, and GDI and relies on Cairo for the rendering. Its new SceneGraph is work-in-progress.]]GTK is an object-oriented widget toolkit written primarily in C; it uses GObject (the GLib object system) for object orientation.
The library provides a set of graphical control elements (widgets) for creating graphical user interfaces. While GTK is primarily used on Linux and Unix-like systems via Wayland and the X11, it is cross-platform and supports Microsoft Windows (via the Windows API), macOS (via Quartz), and web browsers through the Broadway HTML5 backend.
Modern versions of GTK (GTK 4) utilize the GTK Scene Graph Kit (GSK) rendering engine, drawing graphical elements via Vulkan or OpenGL hardware acceleration. GTK also features a CSS engine that allows developers and users to customize widget appearance at both the application and system levels.
GTK Drawing Kit (GDK)
GDK acts as a wrapper around the low-level functions provided by the underlying windowing and graphics systems.
GTK Scene Graph Kit (GSK)
GSK is the rendering and scene graph API for GTK. GSK lies between the graphical control elements (widgets) and the rendering. GSK was finally merged into GTK version 3.90 released March 20171.
Language bindings
Language bindings are available for using GTK from languages other than C, including C++, Genie, JavaScript, Perl, Python, Vala, and others.
GUI designers
]] There are several GUI designers for GTK. Here is a selection of GTK GUI designers: Cambalache – a successor to Glade, supports GTK 4. Glade – supports GtkBuilder, which is a GTK built-in GUI description format.
(not actively maintained) Gazpacho – GUI builder for the GTK toolkit written in Python Crow Designer – relies on its own GuiXml format and GuiLoader library. Stetic – part of MonoDevelop, oriented toward Gtk#. Gambas (since version 2.0 atop BASIC) Xojo Lazarus (on Linux defaults to interfacing with GTK 2)
GTK Inspector
The GTK Inspector is a built-in interactive debugging tool in GTK, allowing developers to inspect and modify UI elements, test CSS changes, and analyze widget structure in real time. It can be enabled using the Control + Shift + I or Control + Shift + D shortcuts, or by setting the GTK_DEBUG=interactive environment variable. It was introduced with GTK version 3.14.
Development
GTK is mainly developed by The GNOME Project, which also develops the GNOME Development Platform and the GNOME Desktop Environment. GTK is mainly written in C. Many language bindings are available. GNOME developers and users gather at an annual GNOME Users And Developers European Conference GUADEC meeting to discuss GNOME's current state and future direction.
GNOME incorporates standards and programs from freedesktop.org to better interoperate with other desktops. Many GNOME applications have been ported to GTK 4, which was released in December 20201, however some still use GTK+ 3 (GIMP being a major one).
Build automation
The master branch of GTK utilizes Meson for its build automation. GTK (and GNOME, GLib, etc.) formerly utilized the GNU Build System (named Autotools) as the build automation system of choice. Since August 14, 2017, the Autotools build system files have been dropped.
Criticism
The most common criticism of GTK is the lack of backward-compatibility in major updates, most notably in the application programming interface (API) and theming. As a result, application and theme developers often have to rewrite parts of their code to ensure compatibility with newer versions of GTK.
The compatibility breaks between minor releases during the GTK 3.x development cycle was explained in 2013 by Benjamin Otte as due to strong pressures to innovate, such as providing the features modern users expect and supporting the increasingly influential Wayland display server protocol. Before its release, Benjamin Otte said that GTK 4 would lower the pressure to innovate and move GTK towards stability.
Similarly, recent changes to theming are specifically intended to improve and stabilise that part of the API, meaning some investment now should be rewarded later. However, in 2025, GTK 5 is described in the official documentation as "a major new version of GTK that breaks both API and ABI compared to GTK 4.x.", like GTK 3 and 4.
Aurélien Gâteau started Gwenview as an GTK application but switched to Qt early in development. Dirk Hohndel, codeveloper of Subsurface and member of Intel's Open-Source Technology Center, criticized the GTK developers for being abrasive and ignoring most community requests.
Hong Jen Yee, the creator of LXDE, expressed disdain for the GTK3 toolkit's radical breaking API changes and increased memory usage, leading him to port the project to Qt, renaming it LXQt. The Audacious music player moved to Qt in version 3.6.
The reasons stated by the developers for this include a transition to client-side window decorations, which they claim cause the application to look "GNOME-y and out of place." Wireshark has switched to Qt due to not having a good experience with GTK's cross-platform support. EasyEffects, a popular audio equalizer, is being ported to Qt.
Use
requires applications to be adapted to Wayland as well.]] 2.8 – GTK is responsible for managing the interface components of the program, including the menus, buttons, and input fields.]]
Applications
Some notable applications that use GTK as a widget toolkit include: Ardour, a digital audio workstation (DAW) Deluge, a BitTorrent client Foliate, an ebook reader GIMP, a raster graphics editor for which GTK was created GNOME Core Applications, a collection of applications as a standard bundle of the GNOME desktop environment GNOME Circle, a collection of applications created to work within the GNOME ecosystem GNOME Evolution, a personal information manager HandBrake, digital video transcoder Inkscape, a vector graphics editor LibreOffice, an office suite Lutris, a game manager Mozilla Firefox, a web browser Mozilla Thunderbird, a personal information manager Pitivi, a video editor PCSX-Reloaded, a video game console emulator REAPER, a digital audio workstation (DAW) Remmina, a remote desktop client Transmission, a BitTorrent client GTK programs can be run on desktop environments based on X11 and Wayland, or others including ones not made with GTK, provided the needed libraries are installed; this includes macOS if X11.app is installed. GTK can be also run on Microsoft Windows.
It is used by some popular cross-platform applications like Pidgin and GIMP. wxWidgets, a cross-platform GUI toolkit, uses GTK on Linux by default. Other ports include DirectFB (for example used by the Debian installer).
Desktop environments
Several desktop environments utilize GTK as the widget toolkit.
Current
GNOME, based on GTK, meaning that programs native to GNOME use GTK Budgie, built from scratch for the SolusOS successor, Solus Operating System Cinnamon, a fork of GNOME 3 which uses GTK version 3 MATE, a fork of GNOME 2 which uses GTK 3 since version 1.18 Xfce, based on GTK 3 since version 4.14 Pantheon uses GTK 3 & 4, being developed by elementary OS Sugar, a desktop environment for youth primary education, which uses GTK, especially PyGTK Phosh, a mobile UI designed for PureOS LXDE (Lightweight X11 Desktop Environment) is based on GTK 2 Unity, the former default desktop environment of Ubuntu
Inactive
Access Linux Platform (successor of the Palm OS PDA platform) Consort, the GNOME 3.4 Fallback Mode – fork from Solus GPE, the GPE Palmtop Environment ROX Desktop, a lightweight desktop, with features from the GUI of RISC OS
Window managers
The following window managers use GTK: Aewm AfterStep Amaterus Consortium IceWM Marco Metacity Muffin Mutter Sawfish Wmg Xfwm
GtkSourceView
For syntax highlighting there is GtkSourceView, "source code editing widget". GtkSourceView is maintained by GNOME separately from GTK as a library: gtksourceview. There are plans to rename to gsv.
GtkSpell
GtkSpell is a library separate from GTK. GtkSpell depends on GTK and Enchant. Enchant is a wrapper for ispell, hunspell, etc., the actual spell checker engine/software. GtkSpell uses GTK's GtkTextView widget, to highlight misspelled words and offer replacement.
History
GTK was originally designed and used in the GNU Image Manipulation Program (GIMP) as a replacement of the Motif toolkit; at some point Peter Mattis became disenchanted with Motif and began to write his own GUI toolkit named the GIMP toolkit and had successfully replaced Motif by the 0.60 release of GIMP. Finally GTK was re-written to be object-oriented and was renamed GTK+.
This was first used in the 0.99 release of GIMP. GTK was subsequently adopted for maintenance by the GNOME Foundation, which uses it in the GNOME desktop environment.
GTK 4
Release of the first GTK 4 version was in December 2020. At the 2018 edition of DevConf.cz, Matthias Clasen gave an overview of the then-current state of GTK 4 development, including a high-level explanation of how rendering and input worked in GTK 3, what changes were being made to GTK 4, and the reasons for those changes.
Examples of things that have become possible with GTK 4 were given as well. One of the main changes made during the GTK 4 development cycle (i.e. GTK 3.92, etc.) was the removal of user customization options (like individual keyboard shortcuts that could be set in GTK+ 2), and the delegation of functionality to ancillary objects instead of encoding it into the base classes provided by GTK.
Other changes include: Event handling from signal handlers described by GtkWidget is delegated to event controllers. Rendering is delegated to GtkSnapshot objects. The layout mechanism is delegated from GtkWidget to GtkLayoutManager.
Cairo was de-emphasized and Vulkan or GL were used instead to draw most graphical elements.
See also
Client-side decoration List of widget toolkits gtkmm – C++ bindings for GTK Enlightenment Foundation Libraries (EFL) – widget toolkit written for the Enlightenment window manager FLTK – a light, cross-platform, non-native widget toolkit Fox toolkit – a fast, open source, cross-platform widget toolkit IUP – a multi-platform toolkit for building native graphical user interfaces Ultimate++ Visual Component Library (VCL)
Text derived from https://en.wikipedia.org/w/index.php?oldid=1377437475 under CC BY-SA 4.0; modifications have been made.
References
- ↩Wikipedia “GTK” release date (×2) · confidence 0.95 revision URL