Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
GLib
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Software library}} {{hatnote group| {{other uses|Glib (disambiguation)}} {{distinguish|text=[[glibc]], the GNU implementation of the C standard library or [[gnulib]], a portability library}} }} {{More citations needed|date=July 2019}} {{Infobox software | name = GLib | logo = | screenshot = | caption = | collapsible = | author = Shawn Amundson | developer = [[The GNOME Project]] et al. | released = {{Start date and age|1998}} | latest release version = {{wikidata|property|reference|edit|P348|P548=Q2804309}} | latest release date = {{Start date and age|{{wikidata|qualifier|single|P348|P577|P548=Q2804309}}}} | programming language = [[C (programming language)|C]] | operating system = [[Linux]], [[Unix-like]], [[macOS]], [[Microsoft Windows|Windows]] | platform = [[Cross-platform]] | size = | language = | genre = [[Library (computing)|Library]] | license = [[GNU Lesser General Public License|LGPLv2.1]] | website = {{URL|https://www.gtk.org/}} }} [[File:GTK+ software architecture.svg|thumb|Simplified software architecture of [[GTK]], [[Pango]], [[GDK]], [[Accessibility Toolkit|ATK]], [[GIO (software)|GIO]], [[Cairo (graphics)|Cairo]] and GLib.]] '''GLib''' is a bundle of three (formerly five) low-level system [[Library (computing)|libraries]] written in [[C (programming language)|C]] and developed mainly by [[The GNOME Project|GNOME]]. GLib's code was separated from [[GTK]], so it can be used by software other than GNOME and has been developed in parallel ever since. The name "GLib" originates from the project's start as a GTK C utility library. ==Features== GLib provides advanced data structures, such as memory chunks, doubly and singly [[linked list]]s, [[hash table]]s, dynamic [[String (computer science)|strings]] and string utilities, such as a [[Lexical analysis|lexical]] scanner, string chunks (groups of strings), dynamic [[Array data structure|arrays]], balanced [[binary tree]]s, [[K-ary tree|N-ary trees]], quarks (a two-way association of a string and a unique integer identifier), keyed data lists, relations, and [[tuple]]s. [[cache algorithms|Caches]] provide memory management. GLib implements functions that provide [[Thread (computer science)|threads]], thread programming and related facilities such as primitive variable access, [[Mutual exclusion|mutexes]], asynchronous [[Queue (data structure)|queue]]s, secure [[memory pool]]s, [[message passing]] and logging, [[hook function]]s (callback registering) and [[timer]]s. GLib also includes message passing facilities such as [[Endianness|byte order conversion]] and I/O channels. Some other features of GLib include: * standard [[Macro (computer science)|macros]] * warnings and assertions * dynamic loading of [[Plug-in (computing)|modules]] ===Components=== The GLib package consisted of five libraries, but they were all merged into one library, since then named simply ''GLib'', and are no longer sustained as standalone libraries. The original libraries were: * [[GObject]], an object system including the type system GType * GLib * GModule * GThread * [[GIO (software)|GIO]] Of these, three continue to reside in distinct subdirectories of the source tree, and so can be thought of as discrete components: GLib, GObject, and GIO. These can be thought of as a software stack: GObject relies on GLib, and GIO provides higher-level functionality that uses both. ==History== GLib began as part of the [[GTK+]] project, now named GTK. However, before releasing GTK+ version 2, the project's developers decided to separate code from GTK+ that was not for [[graphical user interface]]s (GUIs), thus creating GLib as a separate software bundle. GLib was released as a separate library so other developers, those not using the GUI-related parts of GTK+, could use the non-GUI parts of the library without the overhead of depending on the full GUI library. Since GLib is a [[cross-platform]] library, applications using it to interface with the [[operating system]] are usually portable across different operating systems without major changes.<ref>{{cite book |last=Krause |first=Andrew |title=Foundations of GTK+ Development |publisher=[[Apress]] |url=https://archive.org/details/foundationsofgtk00krau/page/5 |access-date=3 April 2013 |series=Expert's Voice in Open Source |year=2007 |isbn=978-1-59059-793-4 |quote=[GLib] provides a cross-platform interface that allows your code to be run on any of its supported operating systems ''with little to no rewriting of code''! |page=[https://archive.org/details/foundationsofgtk00krau/page/5 5] |url-access=registration }}</ref> ===Releases=== Glib is undergoing active development. For a current overview see [https://gitlab.gnome.org/GNOME/glib/-/tags https://gitlab.gnome.org/GNOME/glib/-/blob/main/NEWS]. The table below documents major patch notes from 1998 to 2022. {| class="wikitable" |- ! Release series ! Initial<br />release date ! Major enhancements |- ! colspan="3" style="background:light-gray"|GLib 1.x |- ! [https://download.gnome.org/sources/glib/1.1/ 1.1] | style="white-space: nowrap;" | 1998-09-12 | |- ! [https://download.gnome.org/sources/glib/1.2/ 1.2] | style="white-space: nowrap;" | 1999-02-27 | |- ! [https://download.gnome.org/sources/glib/1.3/ 1.3] | style="white-space: nowrap;" | 2001-09-25 | |- ! colspan="3" style="background:light-gray"|GLib 2.x |- ! [https://download.gnome.org/sources/glib/2.0/ 2.0] | style="white-space: nowrap;" | 2002-03-08 | |- ! [https://download.gnome.org/sources/glib/2.24/ 2.24] | style="white-space: nowrap;" | 2010-03-26 | GVariant, GConverted |- ! [https://download.gnome.org/sources/glib/2.26/ 2.26] | style="white-space: nowrap;" | 2010-09-27 | [[GSettings]], GDbus, [[GObject]] property bindings (GAtomic for refcounting) |- ! [https://download.gnome.org/sources/glib/2.30/ 2.30] | style="white-space: nowrap;" | 2011-09-26 | Non-unique GApplications, use <code>[[File descriptor|eventfd()]]</code> for mainloop wakeup, GHashTable set optimization, GObject data scalability |- ! [https://download.gnome.org/sources/glib/2.32/ 2.32] | style="white-space: nowrap;" | 2012-03-24 | [https://mail.gnome.org/archives/gtk-devel-list/2011-August/msg00059.html Plans for GLib 2.32] |- ! [https://download.gnome.org/sources/glib/2.34/ 2.34] | style="white-space: nowrap;" | 2012-09-23 | [https://help.gnome.org/misc/release-notes/3.6/developers-glib.html.en What's New for Developers in GLib 2.34] |- ! [https://download.gnome.org/sources/glib/2.36/ 2.36] | style="white-space: nowrap;" | 2013-03-25 | |- ! [https://download.gnome.org/sources/glib/2.38/ 2.38] | style="white-space: nowrap;" | 2013-09-23 | applications launched using [[D-Bus]] activation<ref>{{cite web |url=https://wiki.gnome.org/HowDoI/DBusApplicationLaunching |title=Setting up an application for D-Bus Launching}}</ref> GSubprocess, [[Unicode#Versions|Unicode 6.3]] (released September 2013) |- ! [https://download.gnome.org/sources/glib/2.40/ 2.40] | style="white-space: nowrap;" | 2014-03-24 | GNotification, System notification API<ref>{{cite web |url=https://wiki.gnome.org/HowDoI/GNotification |title=GNotification}}</ref> |- ! [https://download.gnome.org/sources/glib/2.42/ 2.42] | style="white-space: nowrap;"| 2014-09-22 | |- ! [https://download.gnome.org/sources/glib/2.43/ 2.43] | style="white-space: nowrap;" | 2014-10-27 | |- ! [https://download.gnome.org/sources/glib/2.44/ 2.44] | style="white-space: nowrap;" | 2015-03-23 | |- ! [https://download.gnome.org/sources/glib/2.45/ 2.45] | style="white-space: nowrap;" | 2015-04-30 | |- ! [https://download.gnome.org/sources/glib/2.46/ 2.46] | style="white-space: nowrap;" | 2015-09-21 | |- ! [https://download.gnome.org/sources/glib/2.47/ 2.47] | style="white-space: nowrap;" | 2015-10-26 | |- ! [https://download.gnome.org/sources/glib/2.48/ 2.48] | style="white-space: nowrap;" | 2016-03-22 | |- ! [https://download.gnome.org/sources/glib/2.50/ 2.50] | style="white-space: nowrap;" | 2016-09-19 | |- ! [https://download.gnome.org/sources/glib/2.52/ 2.52] | style="white-space: nowrap;" | 2017-03-19 | |- ! [https://download.gnome.org/sources/glib/2.53/ 2.53] | style="white-space: nowrap;" | 2017-04-25 | |- ! [https://download.gnome.org/sources/glib/2.54/ 2.54] | style="white-space: nowrap;" | 2018-01-08 | |- ![https://download.gnome.org/sources/glib/2.55/ 2.55] |2018-02-06 | |- ![https://download.gnome.org/sources/glib/2.57/ 2.56] |2018-03-12 | |- ![https://download.gnome.org/sources/glib/2.57/ 2.57] |2018-05-05 | |- ![https://download.gnome.org/sources/glib/2.58/ 2.58] |2018-08-30 | |- ![https://download.gnome.org/sources/glib/2.59/ 2.59] |2018-12-23 | |- ![https://download.gnome.org/sources/glib/2.60/ 2.60] |2019-03-04 | |- ![https://download.gnome.org/sources/glib/2.61/ 2.61] |2019-04-15 | |- ![https://download.gnome.org/sources/glib/2.62/ 2.62] |2019-09-05 | |- ![https://download.gnome.org/sources/glib/2.63/ 2.63] |2019-10-04 | |- ![https://download.gnome.org/sources/glib/2.64/ 2.64] |2020-02-27 | |- ![https://download.gnome.org/sources/glib/2.65/ 2.65] |2020-06-18 | |- ![https://download.gnome.org/sources/glib/2.66/ 2.66] |2020-09-10 | |- ![https://download.gnome.org/sources/glib/2.67/ 2.67] |2020-10-23 | |- ![https://download.gnome.org/sources/glib/2.68/ 2.68] |2021-03-18 | |- ![https://download.gnome.org/sources/glib/2.69/ 2.69] |2021-07-06 | |- ![https://download.gnome.org/sources/glib/2.70/ 2.70] |2021-09-17 | |- ![https://download.gnome.org/sources/glib/2.71/ 2.71] |2021-12-16 | |- ![https://download.gnome.org/sources/glib/2.72/ 2.72] |2022-03-17 | |} ==Similar projects== Other libraries provide low-level functions and implementations of data structures, including: * [[Microsoft Foundation Class Library]] (MFC) β An object-oriented [[C++]] [[wrapper library]] to the C-based [[Windows API]] which also includes some data structures and other convenience functionality * [[Standard Template Library]] (STL) β C++ library for data structures and algorithms * [[Boost (C++ libraries)|Boost]] β provides some functions for C++, such as threading primitives, similar to what GLib does for C * QtCore β core API of the [[Qt Framework]] * wxBase β non-GUI functions of the [[wxWidgets]] library * The [[Apache Portable Runtime]] and Apple [[Core Foundation]] have a large functional overlap with GLib, and provide many similar OS-portable threading, network and data structure implementations in C. * [[Gnulib]] - The GNU portability library ==References== {{Reflist}} ==External links== {{Portal|Free and open-source software}} * [https://library.gnome.org/devel/glib/stable/ GLib API documentation] * [https://gitlab.gnome.org/GNOME/glib GLib Git Source Tree] {{GTK}} {{DEFAULTSORT:Glib}} [[Category:GLib| ]] [[Category:C (programming language) libraries]] [[Category:Free computer libraries]] [[Category:Free software programmed in C]] [[Category:GNOME libraries]] [[Category:GTK]] [[Category:Software using the GNU Lesser General Public License]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:GTK
(
edit
)
Template:Hatnote group
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:More citations needed
(
edit
)
Template:Portal
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Template other
(
edit
)