Not to be confused with
glibc, the GNU implementation of the C standard library.
The GNU C Library, commonly known as glibc, is the C standard library released by the GNU Project.
In computing, GLib refers to a cross-platform software utility library. Computing is usually defined like the activity of using and developing Computer technology Computer hardware and software. In Computer science, a library is a collection of Subroutines used to develop Software. It started life as part of the GTK+ project, however, before releasing version 2 of GTK+, the project's developers decided to separate non-GUI-specific code from the GTK+ platform, thus creating GLib as a separate product. GTK+, or The GIMP Toolkit, is a Cross-platform Widget toolkit for creating Graphical user interfaces It is one of the most popular toolkits GLib was released as a separate library so other developers, those that did not make use of the GUI-related portions of GTK+, could make use of the non-GUI portions of the library without the overhead of depending on a full-blown 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.
Features
Some features of GLib include:
- basic types and their limits
- standard macros
- type conversions
- byte order conversion
- memory allocation
- warnings and assertions
- message logging
- timers
- string utilities
- hook functions
- a lexical scanner
- dynamic loading of modules
- threads
- memory pools
- automatic string completion. A macro (from the Greek 'μάκρο' for long or far in Computer science is a rule or Pattern that specifies how a certain input sequence (often a sequence In Computer science, type conversion or typecasting refers to changing an entity of one Data type into another In Computer science, dynamic memory allocation is the allocation of memory storage for use in a Computer program during the Runtime of that program A timer is a specialized type of Clock. A timer can be used to control the sequence of an event or process For the slang term meaning female prostitution see Prostitution. In Computer science, lexical analysis is the process of converting a sequence of characters into a sequence of tokens A thread in Computer science is short for a thread of execution. Memory pools, also called fixed-size-blocks allocation, allow Dynamic memory allocation comparable to Malloc or C++ 's operator new
- a type system, GType
- an object system, GObject
A number of data structures (and their related operations) are also defined, including:
- memory chunks
- doubly- and singly-linked lists
- hash tables (associative arrays)
- strings (which can grow dynamically)
- string chunks (groups of strings)
- arrays (which can grow in size as elements are added)
- balanced binary trees
- N-ary trees
- quarks (a two-way association of a string and a unique integer identifier)
- keyed data lists (lists of data elements accessible by a string or integer id)
- relations and tuples (tables of data which can be indexed on any number of fields)
- caches. The GLib Object System, or GObject, is a free Software library (covered by the LGPL) that provides a portable Object system The GLib Object System, or GObject, is a free Software library (covered by the LGPL) that provides a portable Object system In Computer science, a linked list is one of the fundamental Data structures and can be used to implement other data structures In Computer science, a hash table, or a hash map, is a Data structure that associates keys with values. In Computer science an array is a Data structure consisting of a group of elements that are accessed by indexing. In Computer science, a binary tree is a tree data structure in which each node has at most two children. In Logic, Mathematics, and Computer science, the arity (synonyms include type, adicity, and rank) of a function In Mathematics, a tuple is a Sequence (also known as an "ordered list" of values called the components of the tuple For detailed algorithms specific to the cache between a CPU and RAM see CPU cache.
Similar projects
For many applications, C with GLib is an alternative to C++ with STL (see GObject for a detailed comparison). The Standard Template Library ( STL) is a software library partially included in the C++ Standard Library. The GLib Object System, or GObject, is a free Software library (covered by the LGPL) that provides a portable Object system
GLib, together with GTK+, can be considered similar in scope and purpose to the Windows API. The Windows API, informally WinAPI, is Microsoft's core set of Application programming interfaces (APIs available in the Microsoft Windows Operating However, applications using the Windows API are not portable to other operating systems, unless the calls are replaced with their equivalents in the target system.
Other widget toolkits usually also provide low-level functions and implementations of data structures. A widget toolkit, widget library, or GUI toolkit is a set of widgets for use in designing applications with Graphical user interfaces (GUIs An example is the wxWidgets library, where the non-GUI functions are in the wxBase library.
External links
© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
network: | |