GTK Programming Introduction

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

See the full GTK3 tutorial index

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.

GTK Programming with Glade User Interface Designer
GTK Programming with Glade User Interface Designer

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.

GTK Glade Application Window
GTK Glade Application Window

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 License

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.

GTK Versions

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.

3 thoughts on “GTK Programming Introduction”

  1. Thank you CodeNerd for an excellent tutorial series. Simple and straightforward which is perfect for getting up to speed quickly. I’m an experienced c/c++ developer who has become a little frustrated with QT and wanted to try Gtk. That little WebKit tutorial was especially useful as I hacked your sample to produce a nice lightweight doc reference viewer. Look forward to any future articles, well done.

Leave a Reply

Your email address will not be published. Required fields are marked *