GTK Widgets All elements controlled by GTK (including top-level windows) are called 'Widgets'. They are stored in variables of type 'GtkWidget*'. Widgets are in fact classes of objects. Each Widget class is a sub-class of the GtkWidget class, or one of its sub-classes. Note that in order to perform various operations on them, we need to cast them to the proper widget sub-class, that support the given operation. We may cast a widget to its real class, or any of its super-classes. GTK performs run-time type checking, so if we cast a window to the wrong sub-class, we will get a runtime error (and possibly an application crash).