Log in Sign up
Back to Discover
💻

GTK

technology Maturity 7-9 war conflict
This article covers sensitive topics: war_conflict. Parents can manage visibility in Parental Controls.

GTK helps make computer programs.

The GTK toolkit.png
The GTK toolkit.png
It makes buttons and menus. These parts help you use a computer. Many apps use it to look good. It is very helpful. Do you use a computer?

36 words

GTK helps make computer programs.

The GTK toolkit.png
The GTK toolkit.png
It makes parts like buttons and menus. These parts help you use a computer.
GIMP 2.8 in Single Window Mode running on Ubuntu.png
GIMP 2.8 in Single Window Mode running on Ubuntu.png

Many apps use it. For example, the web browser Firefox uses it. The drawing tool GIMP also uses it. It works on many systems. It works on Windows and macOS too.

People can change how it looks. They use different tools to pick colors. This makes the apps look nice. It is a very helpful tool for making software.

90 words

GTK is a toolkit for making computer programs.

The GTK toolkit.png
The GTK toolkit.png
It provides widgets, which are the parts you see on a screen. These parts include buttons, menus, and text boxes.
GIMP 2.8 in Single Window Mode running on Ubuntu.png
GIMP 2.8 in Single Window Mode running on Ubuntu.png
These parts help people talk to their computers.

GTK is free and open-source. This means anyone can use it or help make it better. It was first made for a drawing tool called GIMP. Now, many famous programs use it. For example, the Firefox web browser uses GTK. The LibreOffice office suite also uses it.

GTK+ software architecture.svg
GTK+ software architecture.svg

GTK works on many different systems. It works on Linux and the GNOME desktop. It can also work on Windows and macOS. It uses different ways, called backends, to show things on these systems. Some backends use Wayland or X11. Others use Win32 for Windows or Quartz for macOS.

Making programs with GTK can be tricky. Sometimes, new versions change how things work. This means makers must rewrite parts of their code. However, the GTK team works hard to improve it. They want to add new features and keep it stable.

189 words

GTK is a special toolkit used to build graphical user interfaces. A graphical user interface is the set of visual parts you see on a screen.

The GTK toolkit.png
The GTK toolkit.png
These parts are called widgets. They include things like buttons, menus, and text boxes. These widgets help people talk to their computers. GTK is free and open-source software. This means anyone can use it or help improve it. It is mostly used for Linux and the GNOME desktop environment.
GIMP 2.8 in Single Window Mode running on Ubuntu.png
GIMP 2.8 in Single Window Mode running on Ubuntu.png

To make a program look right, GTK follows a specific way of working. It uses a library of graphical control elements. Version 3.22.16 of the toolkit has 186 active widgets. It also has 36 widgets that are no longer used.

GTK+ software architecture.svg
GTK+ software architecture.svg
The toolkit is written in a programming language called C. It uses a system called GObject to organize its parts. To draw images on the screen, GTK uses tools like Vulkan or GL. It can even change how widgets look using different display engines. This helps the program match the look of your computer.

GTK has a long history that began with a drawing tool. It was first made for the GIMP program. A person named Peter Mattis started writing it to replace an older toolkit. He called it the GIMP Toolkit. Later, it was rewritten to be object-oriented. This change led to it being called GTK+.

GDK software architecture.svg
GDK software architecture.svg
The GNOME Foundation later took over its maintenance. In February 2019, the team dropped the plus sign from the name. Now, it is simply known as GTK. The team releases new versions on a regular basis.

There are many important facts about how GTK runs on different computers. It uses things called backends to show applications on different systems. For example, it uses Wayland or X11 on Unix-like systems. It uses Win32 to run on Microsoft Windows. It also uses Quartz to work on macOS.

Free and open-source-software display servers and UI toolkits.svg
Free and open-source-software display servers and UI toolkits.svg
Developers can also use a tool called GtkBuilder. This allows them to design interfaces using an XML file. This means they can design the look without writing lots of code. This makes the design separate from the programming language.

Many famous programs you might know use GTK every day. The Mozilla Firefox web browser is a great example. The LibreOffice office suite also uses this toolkit. Other tools like the GIMP graphics editor and the Inkscape editor use it too. Even the Transmission BitTorrent client uses GTK. If you use a desktop like Cinnamon or MATE, you are seeing GTK in action. It helps keep these different programs looking and working well together. It is a very important part of the digital world.

458 words

GTK is a free, open-source widget toolkit used to create graphical user interfaces (GUIs). A GUI is the visual layer that allows people to interact with software through icons, buttons, and menus.

The GTK toolkit.png
The GTK toolkit.png
While it is primarily used for Linux and the GNOME desktop environment, it is highly versatile. GTK is licensed under the GNU LGPL. This specific license allows both free software and proprietary software to utilize the toolkit. The GTK team maintains several versions. Currently, GTK 4 and GTK 3 are actively maintained. Older versions like GTK 2 are no longer supported. GTK 1 is maintained independently by the CinePaint project.

To understand how GTK works, one must look at its layered software architecture.

GTK+ software architecture.svg
GTK+ software architecture.svg
At the top level, the GTK library provides a set of graphical control elements known as widgets. As of version 3.22.16, the toolkit contains 186 active widgets and 36 deprecated widgets. GTK is an object-oriented toolkit written in the C programming language. It utilizes the GObject system, which is part of the GLib library, to handle its object-oriented structure. Below the widgets lies the GTK Scene Graph Kit, or GSK. GSK acts as the rendering and scene graph API. It sits between the high-level widgets and the actual rendering process.
GDK software architecture.svg
GDK software architecture.svg
GSK was merged into GTK version 3.90 in March 2017.

The rendering process relies on several specialized components to display images correctly. The GTK Drawing Kit, or GDK, acts as a wrapper around low-level functions. These functions are provided by the underlying windowing and graphics systems. To draw most graphical elements, GTK uses Vulkan or GL. The toolkit can also be configured to change the appearance of widgets. This is achieved through different display engines. These engines attempt to emulate the look of native widgets on the specific platform being used. This ensures that a GTK application looks natural whether it is running on a computer or a mobile device.

GTK is capable of running on many different operating systems through the use of backends. A backend is a way for the toolkit to communicate with a specific system's display server. For modern Unix-like systems, GTK uses Wayland or its predecessor, X11. For Microsoft Windows, it interfaces with the Windows API via the Win32 backend. On macOS, it uses the Quartz interface. There is also a backend called Broadway. This allows GTK applications to run in web browsers using HTML5 and WebSockets. However, Broadway and X11 were both deprecated in 2025. They are scheduled for removal in the upcoming GTK version 5.

Developers have several tools to make building these interfaces easier. One important tool is GtkBuilder. This allows designers to create user interfaces without writing complex code. Instead, the interface is described in an Extensible Markup Language (XML) file. This file can be written by hand or created with a GUI designer. The file is then loaded at runtime to create the objects automatically. This makes the interface design independent of the programming language. There are many GUI designers available, such as Cambalache, which supports GTK 4. Other designers include Glade, Gazpacho, and Crow Designer.

History shows that GTK grew out of a need for better graphics tools. It was originally designed for the GIMP (GNU Image Manipulation Program). A developer named Peter Mattis began writing the toolkit to replace an older system called Motif. He successfully replaced Motif by the 0.60 release of GIMP. Later, the toolkit was rewritten to be object-oriented and renamed GTK+. The GNOME Foundation eventually took over its maintenance. In February 2019, the team dropped the "+" from the name during a Hackathon. Significant updates have defined its eras. GTK 2.0.0 was released in 2002. GTK 3.0.0 arrived in 2011, introducing CSS-like syntax for themes. GTK 4 was released in December 2020.

Despite its success, GTK has faced criticism regarding its development choices. A common complaint is the lack of backward compatibility during major updates. When the application programming interface (API) or theming changes, developers must often rewrite their code. In 2013, developer Benjamin Otte noted that these changes were driven by the need to innovate. This included supporting the Wayland protocol. However, some major projects have moved away from GTK to avoid these issues. The LXDE project moved to Qt and became LXQt. The Audacious music player and the Wireshark tool also switched to Qt. These developers cited concerns over API changes and cross-platform support.

Even with these challenges, GTK remains a pillar of modern computing. It powers many famous applications, including Mozilla Firefox, LibreOffice, and Inkscape.

GIMP 2.8 in Single Window Mode running on Ubuntu.png
GIMP 2.8 in Single Window Mode running on Ubuntu.png
It is also the foundation for several desktop environments. The GNOME desktop is built entirely on GTK. Other environments like Cinnamon, MATE, and Xfce also utilize the toolkit. Because it is used by so many different programs and systems, GTK is a vital part of the open-source ecosystem.

817 words
🖼️ Images & Media (7)
File:The GTK toolkit.png
The GTK toolkit.png
File:GTK+ software architecture.svg
GTK+ software architecture.svg
File:GDK software architecture.svg
GDK software architecture.svg
File:Camabalache's interface.png
Camabalache's interface.png
File:Gtk-inspector.png
Gtk-inspector.png
File:Free and open-source-software display servers and UI toolkits.svg
Free and open-source-software display...
File:GIMP 2.8 in Single Window Mode running on Ubuntu.png
GIMP 2.8 in Single Window Mode running on...
Up Next
💻
OpenGL
Technology
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.