Namespace
GLib – 2.0
GLib is a general-purpose, portable utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a mainloop abstraction, and so on.
Related libraries
GModule | Portable API for dynamically loading modules |
Browse documentation | |
GObject | The base type system library |
Browse documentation | |
GIO | GObject Interfaces and Objects, Networking, IPC, and I/O |
Browse documentation |
Additional documentation
- Building GLib
- Compiling GLib Applications
- Cross-compiling the GLib package
- Running GLib Applications
- Writing GLib Applications
- Support and Bug Reports
- GVariant Format Strings
- GVariant Text Format
- Character Set Conversions
- Internationalization
- String Utilities
- Basic Types
- Macros
- Conversion Macros
- Automatic Cleanup
- Memory Allocation
- Memory Slices
- Error Reporting
- Message Logging
- Warnings and Assertions
- File Utilities
- Hostname Utilities
- Miscellaneous Utilities
- The Main Event Loop
- Reference Counting
- Testing Framework
- Atomic Operations
- Bounds-checking Integer Arithmetic
- Threads
- Spawning Processes
- Random Numbers
- Numerical Definitions
- Simple XML Subset Parser
- Base64 Encoding
- Commandline Option Parser
- Data Structures
- Keyed Data Lists and Datasets
- Shell Utilities
- GUuid
- Unicode
- Version Information
- Deprecated Thread API
- Classes Hierarchy
Structs
Allocator |
deprecated: 2.10 |
Array |
Contains the public fields of a GArray. |
AsyncQueue |
An opaque data structure which represents an asynchronous queue. |
BookmarkFile |
since: 2.12 |
ByteArray |
Contains the public fields of a GByteArray. |
Bytes |
A simple reference counted data type representing an immutable sequence of zero or more bytes from an unspecified origin. since: 2.32 |
Cache |
A deprecated: 2.32 |
Checksum |
GLib provides a generic API for computing checksums (or ‘digests’) for a sequence of arbitrary bytes, using various hashing algorithms like MD5, SHA-1 and SHA-256. Checksums are commonly used in various environments and specifications. since: 2.16 |
Completion |
deprecated: 2.26 |
Cond |
The |
Data |
An opaque data structure that represents a keyed data list. |
Date |
|
DateTime |
since: 2.26 |
DebugKey |
Associates a string with a bit flag. Used in g_parse_debug_string(). |
Dir |
An opaque structure representing an opened directory. |
Error |
The |
HashTable |
The |
HashTableIter |
A GHashTableIter structure represents an iterator that can be used
to iterate over the elements of a |
Hmac |
HMACs should be used when producing a cookie or hash based on data and a key. Simple mechanisms for using SHA1 and other algorithms to digest a key and data together are vulnerable to various security issues. HMAC uses algorithms like SHA1 in a secure way to produce a digest of a key and data. since: 2.30 |
Hook |
The |
HookList |
The |
IConv |
The GIConv struct wraps an |
IOChannel |
The |
IOFuncs |
A table of functions used to handle different types of |
KeyFile |
|
List |
The |
LogField |
Structure representing a single field in a structured log entry. See
since: 2.50 |
MainContext |
The |
MainLoop |
The |
MappedFile |
The |
MarkupParseContext |
A parse context is used to parse a stream of bytes that you expect to contain marked-up text. |
MarkupParser |
Any of the fields in |
MatchInfo |
A GMatchInfo is an opaque struct used to return information about matches. |
MemChunk |
deprecated: 2.10 |
MemVTable |
A set of functions used to perform memory allocation. The same |
Node |
The |
Once |
A since: 2.4 |
OptionContext |
A |
OptionEntry |
|
OptionGroup |
A |
PathBuf |
since: 2.76 |
PatternSpec |
A |
PollFD |
Represents a file descriptor, which events to poll for, and which events occurred. |
Private |
The |
PtrArray |
Contains the public fields of a pointer array. |
Queue |
Contains the public fields of a Queue. |
Rand |
The GRand struct is an opaque data structure. It should only be accessed through the g_rand_* functions. |
RecMutex |
The GRecMutex struct is an opaque data structure to represent a
recursive mutex. It is similar to a since: 2.32 |
Regex |
A since: 2.14 |
Relation |
A deprecated: 2.26 |
RWLock |
The GRWLock struct is an opaque data structure to represent a
reader-writer lock. It is similar to a since: 2.32 |
Scanner |
|
ScannerConfig |
Specifies the |
Sequence |
The |
SequenceIter |
The |
SList |
The |
Source |
The |
SourceCallbackFuncs |
The |
SourceFuncs |
The |
StatBuf |
A type corresponding to the appropriate struct type for the |
StaticMutex |
A |
StaticPrivate |
A |
StaticRecMutex |
A |
StaticRWLock |
The deprecated: 2.32 |
String |
A |
StringChunk |
|
StrvBuilder |
since: 2.68 |
TestCase |
An opaque structure representing a test case. |
TestConfig | |
TestLogBuffer | |
TestLogMsg | |
TestSuite |
An opaque structure representing a test suite. |
Thread |
The |
ThreadFunctions |
This function table is no longer used by |
ThreadPool |
The |
Timer |
|
TimeVal |
Represents a precise time, with seconds and microseconds. deprecated: 2.62 |
TimeZone |
A since: 2.26 |
TrashStack |
A deprecated: 2.48 |
Tree |
The GTree struct is an opaque data structure representing a balanced binary tree. It should be accessed only by using the following functions. |
TreeNode |
An opaque type which identifies a specific node in a since: 2.68 |
Tuples |
The deprecated: 2.26 |
Uri |
The since: 2.66 |
UriParamsIter |
Many URI schemes include one or more attribute/value pairs as part of the URI
value. For example since: 2.66 |
Variant |
since: 2.24 |
VariantBuilder |
A utility type for constructing container-type |
VariantDict |
since: 2.40 |
VariantIter |
|
VariantType |
A type in the since: 2.24 |
Unions
DoubleIEEE754 |
The |
FloatIEEE754 |
The |
Mutex |
The |
TokenValue |
A union holding the value of the token. |
Aliases
DateDay |
Integer representing a day of the month; between 1 and 31. |
DateYear |
Integer type representing a year. |
MainContextPusher |
Opaque type. See |
MutexLocker |
Opaque type. See |
Pid |
A type which is used to hold a process identification. |
Quark |
A GQuark is a non-zero integer which uniquely identifies a particular string. |
RecMutexLocker |
Opaque type. See |
RefString |
A typedef for a reference-counted string. A pointer to a |
RWLockReaderLocker |
Opaque type. See |
RWLockWriterLocker |
Opaque type. See |
Strv |
A typedef alias for gchar**. This is mostly useful when used together with
|
Time |
Simply a replacement for deprecated: 2.62 |
TimeSpan |
A value representing an interval of time, in microseconds. |
Enumerations
ChecksumType |
The hashing algorithm to be used by since: 2.16 |
DateDMY |
This enumeration isn’t used in the API, but may be useful if you need to mark a number as a day, month, or year. |
DateMonth |
Enumeration representing a month; values are |
DateWeekday |
Enumeration representing a day of the week; |
ErrorType |
The possible errors, used in the |
IOError |
|
IOStatus |
Statuses returned by most of the |
LogWriterOutput |
Return values from since: 2.50 |
NormalizeMode |
Defines how a Unicode string is transformed in a canonical form, standardizing such issues as whether a character with an accent is represented as a base character and combining accent or as a single precomposed character. Unicode strings should generally be normalized before comparing them. |
OnceStatus |
The possible statuses of a one-time initialization function
controlled by a since: 2.4 |
OptionArg |
The |
SeekType |
An enumeration specifying the base position for a
|
SliceConfig | |
TestFileType |
The type of file to return the filename for, when used with
since: 2.38 |
TestLogType | |
TestResult | |
ThreadPriority |
Thread priorities. deprecated: 2.32 |
TimeType |
Disambiguates a given time in two ways. |
TokenType |
The possible types of token returned from each
|
TraverseType |
Specifies the type of traversal performed by g_tree_traverse(),
|
UnicodeBreakType |
These are the possible line break classifications. |
UnicodeScript |
The |
UnicodeType |
These are the possible character classifications from the Unicode specification. See Unicode Character Database. |
UserDirectory |
These are logical ids for special directories which are defined
depending on the platform used. You should use since: 2.14 |
VariantClass |
The range of possible top-level types of since: 2.24 |
Bitfields
AsciiType | |
FileSetContentsFlags |
Flags to pass to since: 2.66 |
FileTest |
A test to perform on a file using g_file_test(). |
FormatSizeFlags |
Flags to modify the format of the string returned by g_format_size_full(). |
HookFlagMask |
Flags used internally in the |
IOCondition |
A bitwise combination representing a condition to watch for on an event source. |
IOFlags |
Specifies properties of a |
KeyFileFlags |
Flags which influence the parsing. |
LogLevelFlags |
Flags specifying the level of log messages. |
MainContextFlags |
Flags to pass to since: 2.72 |
MarkupCollectType |
A mixed enumerated type and flags field. You must specify one type
(string, strdup, boolean, tristate). Additionally, you may optionally
bitwise OR the type with the flag |
MarkupParseFlags |
Flags that affect the behaviour of the parser. |
OptionFlags |
Flags which modify individual options. |
RegexCompileFlags |
Flags specifying compile-time options. since: 2.14 |
RegexMatchFlags |
Flags specifying match-time options. since: 2.14 |
SpawnFlags |
Flags passed to g_spawn_sync(), |
TestSubprocessFlags |
Flags to pass to |
TestTrapFlags |
Flags to pass to deprecated: 2.38 |
TraverseFlags |
Specifies which nodes are visited during several of the tree
functions, including |
UriFlags |
Flags that describe a URI. since: 2.66 |
UriHideFlags |
Flags describing what parts of the URI to hide in
g_uri_to_string_partial(). Note that since: 2.66 |
UriParamsFlags |
Flags modifying the way parameters are handled by since: 2.66 |
Error Domains
BookmarkFileError |
Error codes returned by bookmark file parsing. |