The GTK team releases new versions on a regular basis.[6] GTK 4 and GTK 3 are maintained, while GTK 2 isend-of-life.[7] GTK1 is independently maintained by theCinePaint project.[8]
The GTK toolkitSimplified software architecture ofGTK.Pango,GDK,ATK,GIO,Cairo andGLibGDK contains back-ends toX11,Wayland, Broadway (HTTP),Quartz, andGDI and relies onCairo for the rendering. Its new SceneGraph is work-in-progress.
This section needs to beupdated. Please help update this article to reflect recent events or newly available information.(May 2024)
The GTKlibrary contains a set of graphical control elements (widgets); version 3.22.16 contains 186 active and 36 deprecated widgets.[9] GTK is anobject-orientedwidget toolkit written in the programming languageC; it usesGObject (that is, theGLib object system) for object orientation. While GTK is mainly used with windowing systems based onX11 andWayland, it works on other platforms, includingMicrosoft Windows (interfaced with theWindows API), andmacOS (interfaced withQuartz). There is also anHTML5 back-end namedBroadway.[10][11]
GTK can be configured to change the look of the widgets drawn; this is done using different display engines. Several display engines exist which try to emulate the look of the native widgets on the platform in use.
Starting with version 2.8, released in 2005, GTK began the transition to usingCairo torender most of its graphical control elementswidgets.[12] Since GTK version 3.0, all rendering is done using Cairo.[13]
On January 26, 2018 atDevConf.cz, Matthias Clasen gave an overview of the current state of GTK 4 development, including a high-level explanation of how rendering and input worked in GTK 3, what changes are being made in GTK 4 (>3.90), and why.[14] On February 6, 2019 it was announced that GTK 4 will drop the “+” from the project's name.[3]
GSK is therendering andscene 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 2017.
GtkBuilder allows user interfaces to be designed without writing code. The interface is described in anExtensible Markup Language (XML) file which is written by hand or generated by a GUI designer, which is then loaded at runtime and the objects created automatically. The description of the user interface is independent from the programming language being used.
GTK supports various backends, which provides different ways to display GTK applications depending on the system and environment. Examples of GTK backends are:
Wayland – Used with the Wayland display server on Linux systems, it is a modern replacement for X11.
X11 – The default on Linux systems using the X.Org display server.
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 theControl + Shift + I orControl + Shift + D shortcuts, or by setting theGTK_DEBUG=interactive environment variable.[20] It was introduced with GTK version 3.14.[21][22]
GNOME developers and users gather at an annualGNOME Users And Developers European ConferenceGUADEC meeting to discuss GNOME's current state and future direction.[25] GNOME incorporates standards and programs fromfreedesktop.org to betterinteroperate with other desktops.[citation needed]
On September 1, 2016, a post on the GTK development blog denoted, among other things, the future numbering scheme of GTK.[26] GTK version 3.22, released in Autumn 2016, was planned to be the last 3.x release, although version 3.24 followed in Fall 2018 with the delay of GTK 4.[27] The development of GTK 4 used version names 3.90, 3.92, etc. until the first GTK 4.0 stable release was launched in December 2020.[28] Despite the first stable GTK 4 release, someapplications using GTK still rely on GTK 2. For example, as of January 2022,GIMP is still being ported to GTK 3.[29]
The master branch of GTK utilizesMeson for its build automation. GTK (and GNOME, GLib, etc.) formerly utilized theGNU Build System (named Autotools) as thebuild automation system of choice. Since August 14, 2017, the Autotools build system files have been dropped.[30]
The most common criticism of GTK is the lack of backward-compatibility in major updates, most notably in theapplication programming interface (API)[31] and theming.[32] The result is that application developers or theme developers have to rewrite parts of their code to make it work with a newer version of GTK.
The compatibility breaks between minor releases during the GTK 3.x development cycle was explained by Benjamin Otte as due to strong pressures to innovate, such as providing the features modern users expect and supporting the increasingly influentialWayland display server protocol. With the release of GTK 4, the pressure from the need to innovate will have been released and the balance between stability and innovation will tip toward stability.[33] 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.
Aurélien Gâteau startedGwenview as GTK application but switched to qt early in development.[34]
Dirk Hohndel, codeveloper ofSubsurface and member ofIntel's Open-Source Technology Center, criticized the GTK developers for being abrasive and ignoring most community requests.[35]
Hong Jen Yee, developer ofLXDE (the GTK version of which was dropped and all efforts focused on theQt port), expressed disdain for version 3 of the GTK toolkit's radical API changes and increased memory usage, and portedPCMan File Manager (PCManFM) toQt. PCManFM is being developed with a GTK and with a Qt backend at the same time.[36]
TheAudacious music player moved to Qt in version 3.6.[37] 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."[38]
Wireshark has switched to Qt due to not having a good experience with GTK's cross-platform support.[39]
GTK's support forWayland requires applications to be adapted to Wayland as well.Screenshot ofGIMP 2.8 - GTK is responsible for managing the interface components of the program, including the menus, buttons, and input fields.
GTK programs can be run on desktop environments based onX11 andWayland, or others including ones not made with GTK, provided the needed libraries are installed; this includesmacOS ifX11.app is installed. GTK can be also run onMicrosoft Windows. It is used by some popular cross-platform applications likePidgin andGIMP.wxWidgets, a cross-platform GUI toolkit, uses GTK on Linux by default.[40] Other ports includeDirectFB (for example used by theDebian installer).
Forsyntax highlighting there isGtkSourceView, "source code editing widget". GtkSourceView is maintained by GNOME separately from GTK as a library: gtksourceview. There are plans to rename to gsv.[citation needed]
GtkSpell is a library separate from GTK. GtkSpell depends on GTK andEnchant. Enchant is a wrapper for ispell,hunspell, etc., the actualspell checker engine/software. GtkSpell uses GTK's GtkTextView widget, to highlight misspelled words and offer replacement.
GTK was originally designed and used in theGNU Image Manipulation Program (GIMP) as a replacement of theMotif toolkit; at some pointPeter 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.[41] Finally GTK was re-written to beobject-oriented and was renamed GTK+.[42] This was first used in the 0.99 release of GIMP. GTK was subsequently adopted for maintenance by theGNOME Foundation, which uses it in the GNOME desktop environment.
The GTK 2.0.0 release (2002[43]) series introduced new features which include improved text rendering usingPango, a newtheme engine, improved accessibility using theAccessibility Toolkit, transition toUnicode usingUTF-8 strings, and a more flexible API. Starting with version 2.8, GTK 2 depends on theCairo graphics library for rendering vector graphics.
GTK version 3.0.0 (2011[44]) included revised input device handling, support for themes written withCSS-like syntax, and the ability to receive information about other opened GTK applications.
The '+' was dropped returning to simply 'GTK' in February 2019 during aHackathon.[45]
HP stated that their goal was to merge the neededOpenVMS changes into the GTK Version 1.3 development stream, however this never materialised.[46] The latest version of GTK for OpenVMS is version 1.2.10.[47]
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.
At the 2018 edition ofDevConf.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.[48]
To remove much of the necessary IPC between the X11 application and the X11 server,GDK is rewritten (mainly by Alexander Larsson) to use "client-side windows", i.e., the GdkWindow, which every widget must have, belongs now to the client
Thegtk4-builder-toolsimplify command has gained a--3to4 option to convert GTK3 ui files to GTK4; though with AMTK menus, toolbars or other objects like GtkShortcutsWindow are created programmatically (not with a *.ui file), but with convenient APIs.[103]
GtkWidget can now use a GtkLayoutManager for size allocation
layout managers can optionally use layout children holding layout properties
GtkBinLayout, GtkBoxLayout, GtkGridLayout, GtkFixedLayout and GtkCustomLayout are currently available
more layout manager implementations will appear in the future
Focus handling has been rewritten, and focus-change event generation has been unified with crossing events
Events have been simplified and are just used for input:
expose events have been replaced by a GdkSurface::render signal
configure events have been replaced by a GdkSurface::size-changed signal
map events have been replaced by a GdkSurface::mapped property
gdk_event_handler_set has been replaced by a GdkSurface::event signal
Introduced successor toAccessibility Toolkit (ATK).[106] The new approach will implement WAI-ARIA (World Wide Web Consortium (W3C) Accessibility Initiative – Accessible Rich Internet Applications).
Updated headers to use standardC types instead ofGLib types
^abBassi, Emmanuele (February 6, 2019)."Project rename to "GTK"".mail.gnome.org.GNOME mailinglist.Archived from the original on November 7, 2020. RetrievedFebruary 7, 2019.
^Aurélien Gâteau (October 3, 2021)."The story behind Gwenview name".agateau.com. Archived fromthe original on April 22, 2024. RetrievedDecember 15, 2024.Yes, you read this right! Gwenview started its life as a GTK+ application!
^Clasen, Matthias."GTK+ 4 Status Update"(PDF).Fedora People.Archived(PDF) from the original on April 22, 2024. RetrievedApril 22, 2024.
^Amundson, Shawn T. (April 13, 1998)."ANNOUNCE: GTK+ 1.0.0 Released!".GNOME Mail Services (Mailing list).Archived from the original on March 12, 2019. RetrievedMay 20, 2019.
^Taylor, Owen (March 11, 2002)."GTK+-2.0.0 released".GNOME Mail Services (Mailing list).Archived from the original on August 10, 2020. RetrievedMay 20, 2019.
^Taylor, Owen (December 22, 2002)."GTK+-2.2.0 released".GNOME Mail Services (Mailing list).Archived from the original on August 10, 2020. RetrievedMay 20, 2019.
^Taylor, Owen (March 16, 2004)."GTK+-2.4.0 released".GNOME Mail Services (Mailing list).Archived from the original on August 10, 2020. RetrievedMay 20, 2019.
^Clasen, Matthias (December 16, 2004)."GTK+-2.6.0 released".GNOME Mail Services (Mailing list).Archived from the original on August 10, 2020. RetrievedMay 20, 2019.
^Clasen, Matthias (August 13, 2005)."GTK+ 2.8.0 released".GNOME Mail Services (Mailing list).Archived from the original on August 10, 2020. RetrievedMay 20, 2019.
^Clasen, Matthias (July 3, 2006)."GTK+ 2.10 released".GNOME Mail Services (Mailing list).Archived from the original on January 22, 2021. RetrievedMay 20, 2019.
^Clasen, Matthias (September 14, 2007)."GTK+ 2.12 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (September 4, 2008)."GTK+ 2.14.0 released".GNOME Mail Services (Mailing list).Archived from the original on August 10, 2020. RetrievedMay 20, 2019.
^Clasen, Matthias (March 13, 2009)."GTK+ 2.16.0 released".GNOME Mail Services (Mailing list).Archived from the original on June 3, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (September 23, 2009)."GTK+ 2.18.0 released".GNOME Mail Services (Mailing list).Archived from the original on June 3, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (March 23, 2010)."GTK+ 2.20.0 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (September 23, 2010)."GTK+ 2.22.0 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (January 20, 2011)."GTK+ 2.24.0".GNOME Mail Services (Mailing list).Archived from the original on May 8, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (February 10, 2011)."GTK+ 3.0.0 released".GNOME Mail Services (Mailing list).Archived from the original on March 12, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (September 25, 2011)."GTK+ 3.2.0".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (March 26, 2012)."GTK+ 3.4.0 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (September 24, 2012)."GTK+ 3.6.0 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (March 25, 2013)."GTK+ 3.8.0 released".GNOME Mail Services (Mailing list).Archived from the original on March 3, 2016. RetrievedMay 20, 2019.
^Clasen, Matthias (September 23, 2013)."GTK+ 3.10.0 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (March 25, 2014)."GTK+ 3.12 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (September 22, 2014)."GTK+ 3.14.0 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^"RFC: gestures". March 4, 2014.Archived from the original on May 24, 2014. RetrievedMay 23, 2014.
^"gtk+ 3.13.2". May 27, 2014.Archived from the original on May 29, 2014. RetrievedMay 28, 2014.
^"gtk+ 3.13.3". June 24, 2014.Archived from the original on December 15, 2014. RetrievedJune 25, 2014.
^Clasen, Matthias (March 22, 2015)."GTK+ 3.16.0 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (September 21, 2016)."GTK+ 3.22 released".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (September 3, 2018)."gtk+ 3.24.0".GNOME Mail Services (Mailing list).Archived from the original on May 25, 2019. RetrievedMay 20, 2019.
^Clasen, Matthias (March 31, 2017)."gtk+ 3.90.0".GNOME Mail Services (Mailing list).Archived from the original on December 29, 2017. RetrievedMay 20, 2019.
^Clasen, Matthias (October 18, 2017)."gtk+ 3.92.1".GNOME Mail Services (Mailing list).Archived from the original on December 29, 2017. RetrievedMay 20, 2019.
^Clasen, Matthias (October 23, 2017)."GTK+ 3.92".GTK Development Blog.Archived from the original on May 25, 2019. RetrievedMay 25, 2019.
^Clasen, Matthias (December 16, 2020)."gtk 4.0.0".GNOME Mail Services (Mailing list).Archived from the original on October 28, 2021. RetrievedDecember 16, 2020.
^Clasen, Matthias (March 30, 2021)."gtk 4.2.0".GNOME Mail Services (Mailing list).Archived from the original on October 27, 2021. RetrievedMarch 30, 2021.
^Clasen, Matthias (August 23, 2021)."gtk 4.4.0".GNOME Mail Services (Mailing list).Archived from the original on August 24, 2021. RetrievedJanuary 23, 2022.
^Clasen, Matthias (December 30, 2021)."gtk 4.6.0".FTP Releases (Mailing list).Archived from the original on January 23, 2022. RetrievedJanuary 23, 2022.
^Clasen, Matthias (September 6, 2022)."gtk 4.8.0".Archived from the original on January 11, 2023. RetrievedJanuary 11, 2023.