Jump to content

GLib

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Jerryobject (talk | contribs) at 09:54, 4 April 2016 (Template:Infobox software parameter: move, fill.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Template:Distinguish2

GLib
Original author(s)Shawn Amundson
Developer(s)The GNOME Project et al.
Initial release1998; 26 years ago (1998)
Stable release
2.48.0 / March 22, 2016; 8 years ago (2016-03-22)
Repository
Written inC
Operating systemLinux, Unix-like, OS X, Windows
PlatformCross-platform
TypeLibrary
LicenseGNU Lesser General Public License
Websitewiki.gnome.org/Projects/GLib
As the GNU C Library serves as a wrapper for Linux kernel system calls, so do the libraries bundled in GLib (GObject, Glib, GModule, GThread, and GIO) serve as further wrappers for their specific tasks.
Simplified software architecture of GTK+. Pango, GDK, ATK, GIO, Cairo and GLib.

GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib code was separated from GTK+, so it can be used by software other than GNOME and has been developed in parallel ever since.

Features

GLib provides advanced data structures, such as memory chunks, doubly and singly linked lists, hash tables, dynamic strings and string utilities, such as a lexical scanner, string chunks (groups of strings), dynamic arrays, balanced binary trees, N-ary trees, quarks (a two-way association of a string and a unique integer identifier), keyed data lists, relations, and tuples. Caches provide memory management.

GLib implements functions that provide threads, thread programming and related facilities such as primitive variable access, mutexes, asynchronous queues, secure memory pools, message passing and logging, hook functions (callback registering) and timers. Also message passing facilities such as byte order conversion and I/O channels.

Some other features of GLib include:

  • standard macros
  • warnings and assertions
  • dynamic loading of 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, includes the type system GType
  • Glib
  • GModule
  • GThread
  • GIO

History

GLib began as part of the GTK+ project. However, before releasing GTK+ version 2, the project's developers decided to separate code from GTK+ that was not for graphical user interfaces (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.[1]

Releases

For a current overview see Roadmap 2.24–2.36 and 2.38–current, for details see the respective release notes in the mailing list or in the tarballs directory.

Release series Initial
release date
Major enhancements
GLib 1.x
1.1 1998-09-12
1.2 1999-02-27
1.3 2001-09-25
GLib 2.x
2.0 2002-03-08
2.24 2010-03-26 GVariant, GConverted
2.26 2010-09-27 GSettings, GDbus, GObject property bindings (GAtomic for refcounting)
2.30 2011-09-26 Non-unique GApplications, use eventfd() for mainloop wakeup, GHashTable set optimization, GObject data scalability
2.32 2012-03-24 Plans for GLib 2.32
2.38 2013-09-23 applications launched using D-Bus activation[2] GSubprocess, Unicode 6.3 (released September 2013)
2.40 2014-03-24 GNotification, System notification API[3]
2.42 2014-09-22

Similar projects

Other widget toolkits provide low-level functions and implementations of data structures, including:

References

  1. ^ Krause, Andrew (2007). Foundations of GTK+ Development. Expert's Voice in Open Source. Apress. p. 5. ISBN 1-59059-793-1. Retrieved 3 April 2013. [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!
  2. ^ "Setting up an application for D-Bus Launching".
  3. ^ "GNotification".
  4. ^ http://stackoverflow.com/questions/213460/boost-like-libraries-in-c