glib
general-purpose C utility library for GTK and GNOME
TLDR
DESCRIPTION
GLib is a general-purpose utility library used by GTK and GNOME. It provides data structures, portability wrappers, event loops, threads, and many utilities for C programming.GLib is not a command but a library. Related tools include glib-compile-resources, glib-mkenums, and glib-genmarshal.
PARAMETERS
glib-mkenums --template file
Text template controlling the generated enum descriptions.glib-genmarshal --header / --body
Generate the marshaller header or C source respectively.glib-compile-resources --target file
Output file for the compiled resource bundle (C source or binary `.gresource`).glib-compile-resources --generate-source / --generate-header
Generate only the C source or only the header, instead of both.glib-compile-resources --sourcedir dir
Directory to search for referenced resource files.
KEY FEATURES
- GList/GSList: Linked lists- GHashTable: Hash tables- GString: Dynamic strings- GMainLoop: Event loop- GThread: Threading- GObject: Object system- GSettings: Configuration storage
RELATED TOOLS
glib-compile-schemas Compile GSettings schemas
glib-mkenums Generate enum types
glib-genmarshal Generate marshallers
gdbus D-Bus tool
gsettings GSettings CLI
INSTALL
CAVEATS
C library, not a command. Requires understanding of C and GLib conventions. Memory management follows GLib patterns. Documentation at docs.gtk.org.
HISTORY
GLib was originally part of GTK+, extracted as a separate library in 1998 to enable non-GUI programs to use its utilities. It's maintained by the GNOME project and used throughout the Linux desktop ecosystem.
SEE ALSO
pkg-config(1), gdbus(1), gsettings(1)
