Lably
Skip to content

GTK

Free and open-source cross-platform widget toolkit for creating graphical user interfaces

  • 9 min read
  • 6 chapters

Related on Lably

Through Free and open-source software, Graphical user interface and Product lifecycle

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

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 2017.

GtkBuilder

GtkBuilder allows user interfaces to be designed without writing code. The interface is described in an Extensible 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.

Language bindings

Language bindings are available for using GTK from languages other than C, including C++, Genie, JavaScript, Perl, Python, Vala, and others.

Backends

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 some Unix-like systems, it is a modern replacement for X11.
  • X11 – The default on Unix-like systems using the X.Org display server.
  • Win32 – For running GTK applications on Windows.
  • Quartz – For macOS support.
  • Broadway – Allows GTK applications to run in web browsers using HTML5 and WebSocket.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Computing and communication

Source and licence. Adapted from the Wikipedia article “GTK” (this version, 2026-09-29) by its contributors, shared under CC BY-SA 4.0. Lablypedia has left out its tables, references and most pictures, and linked it to other Lablypedia articles.