Glib is used as a basic platform abstraction library, it's not related to
GUI things.
To quote the Glib documentation: “GLib is a general-purpose utility
library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on. It works on many UNIX-like platforms,
Windows, OS/2 and BeOS. GLib is released under the GNU Library General
Public License (GNU LGPL).”
GLib contains lot's of useful things for platform independent development.
See https://developer.gnome.org/doc/API/2.0/glib/index.html
for details about GLib.