GLib is a low-level library that extends the capabilities provided by the standard C libc library.
| GLib | |
|---|---|
| Type of | and |
| Developer | GNOME Project |
| Written on | |
| operating system | cross-platform |
| Latest version | 2.60.1 |
| Test version | 2.62 |
| Readable File Formats | |
| File Formats Created | |
| License | |
| Site | |
Developed within the framework and underlying the GTK + and GNOME projects, GLib is widely used in applications, including non-graphical ones. The release of the next version of the library in time usually coincides with the release of the new version of GTK +.
GLib provides the main object system used in GNOME, the implementation of the main loop, as well as an extensive set of auxiliary functions for strings and typical data structures [2] .
GLib is currently capable of running on many UNIX-like operating systems, as well as MS Windows, OS / 2 and BeOS.
Content
Features
GLib provides the following features:
- A large set of base and derived data types
- macros and a developed mechanism for debugging messages;
- string functions;
- functions for encoding conversion and unicode support;
- built-in gettext macros for internationalization;
- tools for working with dynamic memory ;
- means for dynamically loading modules;
- atomic operations;
- software streams and means of their synchronization;
- the creation of new processes;
- timers, functions for working with date and time;
- pseudo random number generator;
- universal lexical scanner;
- command line parameter parser;
- XML type subset parser
- parser of .ini-like configuration files;
- input-output means;
- interception functions ;
- Shell-related Utilities;
- Bookmark parser
- Glob regex tools.
Data Types
The GLib core data types are designed for programmer convenience and application portability. They are divided into the following groups:
- Fixed-size integer types are gint8, guint8, gint16, guint16, gint32, guint32, gint64, guint64. The variable size of any of these types is the same for each hardware platform used. For gint8, for example, it is always 8 bits.
- The aliases of the standard C language types are gpointer (analogue of void *), gconstpointer, guchar (analogue of unsigned char), guint, gushort, gulong, gchar (analogue of char), gint, gshort, glong, gfloat and gdouble.
- Type gboolean with values TRUE and FALSE, types gsize and gssize to represent the sizes of data structures.
- A type of GString that is similar to standard C lines, except that they automatically expand when text is added or inserted. It also stores the length of the string so that it can be used for binary data with zero bytes.
Notes
Links
- Glib Reference Manual . - GLib user guide. Date of treatment September 29, 2011. Archived February 4, 2012.
- Reference description GLib (already unavailable) . - Russian translation of GLib API version 2.13.0. Date of treatment March 24, 2014. Archived August 24, 2011.
- Reference description GLib . - Russian translation of GLib API version 2.13.0. Date of treatment March 24, 2014.
- Reference description of GObject . - Russian translation of the GObject API (version GLib 2.13.7). Date of treatment October 13, 2008.