GTK Basics GTK was initially written to allow writing the GIMP program. Later on it was established as an independent project. GTK is split into a set of libraries - glib, GDK and GTK. Glib supports basic portable data types (gint, gpointer..), macros, debug functions, data structures (lists, queues, hash tables...) and some basic portable threading support. GDK is the only layer that is aware of the underlying graphics system that GTK uses. Thus, porting GTK to another platform requires no change to GTK itself - just to Glib and GDK. GTK is the layer that the programmer actually sees, which defines various widgets and their attributes, and defines various utility functions often needed by GUI programmers.