Generated by GPT-5-mini| GTK | |
|---|---|
| Name | GTK |
| Developer | The GNOME Project |
| Initial release | 1998 |
| Latest release | 4.8 |
| Programming language | C (programming language) |
| Operating system | Unix-like; Microsoft Windows; macOS |
| License | GNU Lesser General Public License |
GTK is a cross-platform widget toolkit for creating graphical user interfaces. It is used to build desktop environments, application suites, and graphical utilities across multiple operating systems. GTK provides a set of standard widgets, theming capabilities, and integration points for accessibility and internationalization.
GTK originated as a toolkit for the GNOME Project but is independent software used by projects such as GNOME, MATE, XFCE, LXDE, and Elementary OS. GTK implements a widget set that includes buttons, menus, dialogs, text entries, and canvas widgets used by applications like GIMP, Inkscape, Pidgin, Glade (software), and Gedit. The toolkit integrates with windowing systems and display servers like X Window System, Wayland, Microsoft Windows, and macOS while supporting internationalization with libraries such as ICU and input methods like IBus.
GTK was created to support the development of GIMP after disputes involving X11 toolkit choices and the MIT License. Early GTK versions were released in the late 1990s alongside projects like GNOME 1 and influenced other toolkits such as Qt (software) and Tk (software). Major milestones include the GTK 2 transition with improved theming coinciding with GNOME 2, the GTK 3 refactor aligning with Wayland support and CSS-like theming used in GNOME 3, and the GTK 4 rewrite emphasizing rendering through GDK and Cairo (graphics) while optimizing for modern compositors and HiDPI displays. GTK development has involved contributors from organizations like Red Hat, Canonical (company), SUSE, Collabora, and independent developers collaborating via platforms such as GNOME GitLab.
GTK is built on the GObject object system and uses core libraries including GLib, GObject Introspection, GDK, and Pango (software). Rendering is performed with backends such as Cairo (graphics), OpenGL, Vulkan, and native windowing APIs on Microsoft Windows and Quartz on macOS. Input and events are mediated by adapters to X Input Method, Wayland protocol, and Windows Input. Accessibility support is provided via implementations of AT-SPI and integration with assistive technologies like Orca (assistive technology). The GTK widget hierarchy categorizes containers, controls, and layout managers; tools like GtkBuilder and Glade (software) enable UI description and rapid prototyping.
Applications typically use languages compiled against GTK's C ABI or via bindings to languages such as Python (programming language), C++, Rust (programming language), JavaScript, Vala (programming language), Go (programming language), Perl, Ruby, Haskell, Java (programming language), and C#. Developers employ IDEs and editors like GNOME Builder, Anjuta, Eclipse, Visual Studio Code, and Geany (editor) to write GTK applications. Build systems and package managers involved include Meson (build system), Autotools, CMake, Flatpak, Snap, and distribution-specific systems such as Debian and Fedora. Debugging and profiling often use tools like GDB, Valgrind, perf (Linux tool), and sysprof.
GTK theming leverages CSS-like styling introduced in later releases, enabling authors to target widgets with selectors similar to Cascading Style Sheets used on the World Wide Web Consortium. Theme engines, icon sets, and font rendering interact with subsystems like Fontconfig, FreeType, HarfBuzz, and compositor features from Wayland and X.Org Server. Accessibility compliance is promoted through protocols like AT-SPI and tools such as Orca (assistive technology), while internationalization workflows incorporate gettext and encoding layers from ICU. Theme and widget styling tie into desktop environment standards like freedesktop.org specifications and icon theme guidelines from GNOME Human Interface Guidelines.
GObject Introspection provides metadata used by language bindings including PyGObject, gtkmm, rust-gtk, GJS, GtkSharp, and third-party wrappers for languages such as Lua (programming language), Erlang, OCaml, Ada (programming language), Nim (programming language), D (programming language), and Zig (programming language). Ports to other platforms enable integration with Microsoft Windows APIs, Apple Developer toolchains on macOS, and embedded systems supported by vendors like ARM. Interoperability with Wayland protocol compositors and compatibility layers like XWayland facilitate cross-environment deployment.
GTK is used by a wide range of applications and suites: GIMP, Inkscape, GNOME Photos, Evince, Totem, Rhythmbox, Transmission, Evolution, Gedit, Geary, Nautilus, Pidgin, Remmina, SimpleScan, Synaptic, and BleachBit. Desktop environments built on GTK include GNOME, MATE, XFCE, and projects like Elementary OS that emphasize custom UX. GTK’s adoption spans distributions such as Debian, Ubuntu, Fedora, openSUSE, Arch Linux, and commercial products from companies including Red Hat and Canonical (company).
Category:Widget toolkits