A brief overview of GTK in preparation for learning GTK programming. Learn to write GUI applications for Linux using GTK 3 with Glade user interface designer and the C programming language.
Part 1 of GTK 3 Programming with C and Glade Tutorial
What is GTK?
GTK stands for GIMP Toolkit, as it was originally designed for implementing the GIMP (GNU Image Manipulation Program) application.
It is a toolkit for creating GUI (Graphical User Interface) applications on multiple platforms. GTK is implemented as a library with a set of widgets used to build GUI applications.
GTK Programming with Glade and C
GTK applications are written in C, while the user interfaces are designed with an application called Glade in this tutorial series.
The Glade user interface designer can be seen in the image below. Glade is used to lay out all of the graphical elements and widgets.
After the user interface has been created in Glade, it is used by a GTK program written in C. The following image shows the window designed in Glade after it is running as a GTK C program.
More About GTK
GTK+ or GTK?
For historical reasons, GTK was renamed GTK+ at some stage. The GTK project is now reverting the name back to GTK, dropping the “plus” at the end. This appears to apply to GTK 4 which at the time of writing is still under development. For more details, read the Project rename to GTK post.
GTK Programming Languages
The GTK library itself is written in the C programming language. Applications that use GTK can therefore be written in C, however there are other options. Language bindings or wrappers allow GTK applications to be written in other languages. See the GTK Project Language Bindings page for other supported languages.
GTK is free and open source. It is licensed under the terms of the GNU LGPL (Lesser General Public License).
From the GTK project home page:
… licensing terms for GTK, the GNU LGPL, allow it to be used by all developers, including those developing proprietary software, without any license fees or royalties.
At the time of writing, GTK 3 is the current stable version of GTK. GTK 4, which is to be the next major release of GTK is currently under development. Incidentally, GIMP 3.0 is currently being ported to GTK 3.