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 | |
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 | |
MemVTable |
A set of functions used to perform memory allocation. The same |
Node |
The |
Once |
A since: 2.4 |
OptionContext |
A |
OptionEntry |
A GOptionEntry struct defines a single option. To have an effect, they
must be added to a |
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][glib-Double-ended-Queues]. |
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][glib-Balanced-Binary-Trees]. 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 |
UnixPipe |
A Unix pipe. The advantage of this type over since: 2.80 |
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 g_test_build_filename(). 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. |
UnixPipeEnd |
Mnemonic constants for the ends of a Unix pipe. since: 2.80 |
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 |
Test traps are guards around forked tests. These flags determine what traps to set. 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. |
ConvertError |
Error codes returned by character set conversion routines. |
FileError |
Values corresponding to |
IOChannelError |
Error codes returned by |
KeyFileError |
Error codes returned by key file parsing. |
MarkupError |
Error codes returned by markup parsing. |
NumberParserError |
Error codes returned by functions converting a string to a number. since: 2.54 |
OptionError |
Error codes returned by option parsing. |
RegexError |
Error codes returned by regular expressions functions. since: 2.14 |
ShellError |
Error codes returned by shell functions. |
SpawnError |
Error codes returned by spawning processes. |
ThreadError |
Possible errors of thread related functions. |
UriError |
Error codes returned by since: 2.66 |
VariantParseError |
Error codes returned by parsing text-format GVariants. |
Callbacks
CacheDestroyFunc |
Specifies the type of the deprecated: 2.32 |
CacheDupFunc |
Specifies the type of the deprecated: 2.32 |
CacheNewFunc |
Specifies the type of the deprecated: 2.32 |
ChildWatchFunc |
Prototype of a |
ClearHandleFunc |
Specifies the type of function passed to since: 2.56 |
CompareDataFunc |
Specifies the type of a comparison function used to compare two values. The function should return a negative integer if the first value comes before the second, 0 if they are equal, or a positive integer if the first value comes after the second. |
CompareFunc |
Specifies the type of a comparison function used to compare two values. The function should return a negative integer if the first value comes before the second, 0 if they are equal, or a positive integer if the first value comes after the second. |
CompletionFunc |
Specifies the type of the function passed to g_completion_new(). It
should return the string corresponding to the given target item.
This is used when you use data structures as deprecated: 2.26 |
CompletionStrncmpFunc |
Specifies the type of the function passed to
g_completion_set_compare(). This is used when you use strings as
deprecated: 2.26 |
CopyFunc |
A function of this signature is used to copy the node data when doing a deep-copy of a tree. since: 2.4 |
DataForeachFunc |
Specifies the type of function passed to g_dataset_foreach(). It is
called with each |
DestroyNotify |
Specifies the type of function which is called when a data element is destroyed. It is passed the pointer to the data element and should free any memory and resources allocated for it. |
DuplicateFunc |
The type of functions that are used to ‘duplicate’ an object.
What this means depends on the context, it could just be
incrementing the reference count, if |
EqualFunc |
Specifies the type of a function used to test two values for
equality. The function should return |
EqualFuncFull |
Specifies the type of a function used to test two values for
equality. The function should return since: 2.74 |
ErrorClearFunc |
Specifies the type of function which is called when an extended error instance is freed. It is passed the error pointer about to be freed, and should free the error’s private data fields. since: 2.68 |
ErrorCopyFunc |
Specifies the type of function which is called when an extended
error instance is copied. It is passed the pointer to the
destination error and source error, and should copy only the fields
of the private data from since: 2.68 |
ErrorInitFunc |
Specifies the type of function which is called just after an
extended error instance is created and its fields filled. It should
only initialize the fields in the private data, which can be
received with the generated since: 2.68 |
FreeFunc |
Declares a type of function which takes an arbitrary data pointer argument and has no return value. It is not currently used in GLib or GTK. |
Func |
Specifies the type of functions passed to |
HashFunc |
Specifies the type of the hash function which is passed to
|
HFunc |
Specifies the type of the function passed to g_hash_table_foreach().
It is called with each key/value pair, together with the |
HookCheckFunc |
Defines the type of a hook function that can be invoked by g_hook_list_invoke_check(). |
HookCheckMarshaller |
Defines the type of function used by g_hook_list_marshal_check(). |
HookCompareFunc |
Defines the type of function used to compare |
HookFinalizeFunc |
Defines the type of function to be called when a hook in a list of hooks gets finalized. |
HookFindFunc |
Defines the type of the function passed to g_hook_find(). |
HookFunc |
Defines the type of a hook function that can be invoked by g_hook_list_invoke(). |
HookMarshaller |
Defines the type of function used by g_hook_list_marshal(). |
HRFunc |
Specifies the type of the function passed to
|
IOFunc |
Specifies the type of function passed to |
LogFunc |
Specifies the prototype of log handler functions. |
LogWriterFunc |
Writer function for log entries. A log entry is a collection of one or more
since: 2.50 |
NodeForeachFunc |
Specifies the type of function passed to g_node_children_foreach(). The function is called with each child node, together with the user data passed to g_node_children_foreach(). |
NodeTraverseFunc |
Specifies the type of function passed to g_node_traverse(). The
function is called with each of the nodes visited, together with the
user data passed to g_node_traverse(). If the function returns
|
OptionArgFunc |
The type of function to be passed as callback for |
OptionErrorFunc |
The type of function to be used as callback when a parse error occurs. |
OptionParseFunc |
The type of function that can be called before and after parsing. |
PollFunc |
Specifies the type of function passed to g_main_context_set_poll_func().
The semantics of the function should match those of the |
PrintFunc |
Specifies the type of the print handler functions. These are called with the complete formatted string to output. |
RegexEvalCallback |
Specifies the type of the function passed to g_regex_replace_eval().
It is called for each occurrence of the pattern in the string passed
to g_regex_replace_eval(), and it should append the replacement to
since: 2.14 |
ScannerMsgFunc |
Specifies the type of the message handler function. |
SequenceIterCompareFunc |
A |
SourceDisposeFunc |
Dispose function for since: 2.64 |
SourceDummyMarshal |
This is just a placeholder for |
SourceFunc |
Specifies the type of function passed to |
SourceFuncsCheckFunc |
Checks if the source is ready to be dispatched. since: 2.82 |
SourceFuncsDispatchFunc |
Dispatches the source callback. since: 2.82 |
SourceFuncsFinalizeFunc |
Finalizes the source. since: 2.82 |
SourceFuncsPrepareFunc |
Checks the source for readiness. since: 2.82 |
SourceOnceFunc |
A source function that is only called once before being removed from the main context automatically. since: 2.74 |
SpawnChildSetupFunc |
Specifies the type of the setup function passed to g_spawn_async(),
|
TestDataFunc |
The type used for test case functions that take an extra pointer argument. since: 2.28 |
TestFixtureFunc |
The type used for functions that operate on test fixtures. This is used for the fixture setup and teardown functions as well as for the testcases themselves. since: 2.28 |
TestFunc |
The type used for test case functions. since: 2.28 |
TestLogFatalFunc |
Specifies the prototype of fatal log handler functions. since: 2.22 |
ThreadFunc |
Specifies the type of the |
TranslateFunc |
The type of functions which are used to translate user-visible strings, for output. |
TraverseFunc |
Specifies the type of function passed to g_tree_traverse(). It is
passed the key and value of each node, together with the |
TraverseNodeFunc |
Specifies the type of function passed to g_tree_foreach_node(). It is
passed each node, together with the since: 2.68 |
UnixFDSourceFunc |
The type of functions to be called when a UNIX fd watch source triggers. |
VoidFunc |
Declares a type of function which takes no arguments and has no return value. It is used to specify the type function passed to g_atexit(). |
Functions
access |
A wrapper for the POSIX since: 2.8 |
aligned_alloc |
This function is similar to g_malloc(), allocating ( since: 2.72 |
aligned_alloc0 |
This function is similar to g_aligned_alloc(), but it will also clear the allocated memory before returning it. since: 2.72 |
aligned_free |
Frees the memory allocated by g_aligned_alloc(). since: 2.72 |
aligned_free_sized |
Frees the memory pointed to by since: 2.76 |
ascii_digit_value |
Determines the numeric value of a character as a decimal digit. If the
character is not a decimal digit according to |
ascii_dtostr |
Converts a |
ascii_formatd |
Converts a |
ascii_strcasecmp |
Compare two strings, ignoring the case of ASCII characters. |
ascii_strdown |
Converts all upper case ASCII letters to lower case ASCII letters, with
semantics that exactly match |
ascii_string_to_signed |
A convenience function for converting a string to a signed number. since: 2.54 |
ascii_string_to_unsigned |
A convenience function for converting a string to an unsigned number. since: 2.54 |
ascii_strncasecmp |
Compare |
ascii_strtod |
Converts a string to a floating point value. |
ascii_strtoll |
Converts a string to a since: 2.12 |
ascii_strtoull |
Converts a string to a since: 2.2 |
ascii_strup |
Converts all lower case ASCII letters to upper case ASCII letters, with
semantics that exactly match |
ascii_tolower |
Convert a character to ASCII lower case. If the character is not an ASCII upper case letter, it is returned unchanged. |
ascii_toupper |
Convert a character to ASCII upper case. If the character is not an ASCII lower case letter, it is returned unchanged. |
ascii_xdigit_value |
Determines the numeric value of a character as a hexadecimal digit. If the
character is not a hex digit according to |
assert_warning | |
assertion_message | |
assertion_message_cmpint | |
assertion_message_cmpnum | |
assertion_message_cmpstr | |
assertion_message_cmpstrv | |
assertion_message_error | |
assertion_message_expr |
Internal function used to print messages from the public |
atexit |
Specifies a function to be called at normal program termination. deprecated: 2.32 |
atomic_int_add |
Atomically adds since: 2.4 |
atomic_int_and |
Performs an atomic bitwise ‘and’ of the value of since: 2.30 |
atomic_int_compare_and_exchange |
Compares since: 2.4 |
atomic_int_compare_and_exchange_full |
Compares since: 2.74 |
atomic_int_dec_and_test |
Decrements the value of since: 2.4 |
atomic_int_exchange |
Sets the since: 2.74 |
atomic_int_exchange_and_add |
This function existed before deprecated: 2.30 since: 2.4 |
atomic_int_get |
Gets the current value of since: 2.4 |
atomic_int_inc |
Increments the value of since: 2.4 |
atomic_int_or |
Performs an atomic bitwise ‘or’ of the value of since: 2.30 |
atomic_int_set |
Sets the value of since: 2.4 |
atomic_int_xor |
Performs an atomic bitwise ‘xor’ of the value of since: 2.30 |
atomic_pointer_add |
Atomically adds since: 2.30 |
atomic_pointer_and |
Performs an atomic bitwise ‘and’ of the value of since: 2.30 |
atomic_pointer_compare_and_exchange |
Compares since: 2.4 |
atomic_pointer_compare_and_exchange_full |
Compares since: 2.74 |
atomic_pointer_exchange |
Sets the since: 2.74 |
atomic_pointer_get |
Gets the current value of since: 2.4 |
atomic_pointer_or |
Performs an atomic bitwise ‘or’ of the value of since: 2.30 |
atomic_pointer_set |
Sets the value of since: 2.4 |
atomic_pointer_xor |
Performs an atomic bitwise ‘xor’ of the value of since: 2.30 |
atomic_rc_box_acquire |
Atomically acquires a reference on the data pointed by since: 2.58 |
atomic_rc_box_alloc |
Allocates since: 2.58 |
atomic_rc_box_alloc0 |
Allocates since: 2.58 |
atomic_rc_box_dup |
Allocates a new block of data with atomic reference counting
semantics, and copies since: 2.58 |
atomic_rc_box_get_size |
Retrieves the size of the reference counted data pointed by since: 2.58 |
atomic_rc_box_release |
Atomically releases a reference on the data pointed by since: 2.58 |
atomic_rc_box_release_full |
Atomically releases a reference on the data pointed by since: 2.58 |
atomic_ref_count_compare |
Atomically compares the current value of since: 2.58 |
atomic_ref_count_dec |
Atomically decreases the reference count. since: 2.58 |
atomic_ref_count_inc |
Atomically increases the reference count. since: 2.58 |
atomic_ref_count_init |
Initializes a reference count variable to 1. since: 2.58 |
base64_decode |
Decode a sequence of Base-64 encoded text into binary data. Note that the returned binary data is not necessarily zero-terminated, so it should not be used as a character string. since: 2.12 |
base64_decode_inplace |
Decode a sequence of Base-64 encoded text into binary data by overwriting the input data. since: 2.20 |
base64_decode_step |
Incrementally decode a sequence of binary data from its Base-64 stringified representation. By calling this function multiple times you can convert data in chunks to avoid having to have the full encoded data in memory. since: 2.12 |
base64_encode |
Encode a sequence of binary data into its Base-64 stringified representation. since: 2.12 |
base64_encode_close |
Flush the status from a sequence of calls to g_base64_encode_step(). since: 2.12 |
base64_encode_step |
Incrementally encode a sequence of binary data into its Base-64 stringified representation. By calling this function multiple times you can convert data in chunks to avoid having to have the full encoded data in memory. since: 2.12 |
basename |
Gets the name of the file without any leading directory components. It returns a pointer into the given file name string. deprecated: 2.2 |
bit_lock |
Sets the indicated since: 2.24 |
bit_nth_lsf |
Find the position of the first bit set in |
bit_nth_msf |
Find the position of the first bit set in |
bit_storage |
Gets the number of bits used to hold |
bit_trylock |
Sets the indicated since: 2.24 |
bit_unlock |
Clears the indicated since: 2.24 |
blow_chunks | |
build_filename |
Creates a filename from a series of elements using the correct separator for the current platform. |
build_filename_valist |
Creates a filename from a list of elements using the correct separator for the current platform. since: 2.56 |
build_filenamev |
Creates a filename from a vector of elements using the correct separator for the current platform. since: 2.8 |
build_path |
Creates a path from a series of elements using |
build_pathv |
Behaves exactly like g_build_path(), but takes the path elements as a string array, instead of variadic arguments. since: 2.8 |
canonicalize_filename |
Gets the canonical file name from since: 2.58 |
chdir |
A wrapper for the POSIX since: 2.8 |
check_version |
Checks that the GLib library in use is compatible with the given version. since: 2.6 |
child_watch_add |
Sets a function to be called when the child indicated by since: 2.4 |
child_watch_add_full |
Sets a function to be called when the child indicated by since: 2.4 |
child_watch_source_new |
Creates a new child_watch source. since: 2.4 |
chmod |
A wrapper for the POSIX since: 2.8 |
clear_error |
If |
clear_fd |
If since: 2.76 |
clear_handle_id |
Clears a numeric handler, such as a since: 2.56 |
clear_list |
Clears a pointer to a since: 2.64 |
clear_pointer |
Clears a reference to a variable. since: 2.34 |
clear_slist |
Clears a pointer to a since: 2.64 |
close |
This wraps the since: 2.36 |
closefrom |
Close every file descriptor equal to or greater than since: 2.80 |
compute_checksum_for_bytes |
Computes the checksum for a binary since: 2.34 |
compute_checksum_for_data |
Computes the checksum for a binary since: 2.16 |
compute_checksum_for_string |
Computes the checksum of a string. since: 2.16 |
compute_hmac_for_bytes |
Computes the HMAC for a binary since: 2.50 |
compute_hmac_for_data |
Computes the HMAC for a binary since: 2.30 |
compute_hmac_for_string |
Computes the HMAC for a string. since: 2.30 |
convert |
Converts a string from one character set to another. |
convert_error_quark | |
convert_with_fallback |
Converts a string from one character set to another, possibly
including fallback sequences for characters not representable
in the output. Note that it is not guaranteed that the specification
for the fallback sequences in |
convert_with_iconv |
Converts a string from one character set to another. |
creat |
A wrapper for the POSIX since: 2.8 |
datalist_clear |
Frees all the data elements of the datalist. The data elements’ destroy functions are called if they have been set. |
datalist_foreach |
Calls the given function for each data element of the datalist. The
function is called with each data element’s |
datalist_get_data |
Gets a data element, using its string identifier. This is slower than
|
datalist_get_flags |
Gets flags values packed in together with the datalist. See g_datalist_set_flags(). since: 2.8 |
datalist_id_dup_data |
This is a variant of since: 2.34 |
datalist_id_get_data |
Retrieves the data element corresponding to |
datalist_id_remove_multiple |
Removes multiple keys from a datalist. since: 2.74 |
datalist_id_remove_no_notify |
Removes an element, without calling its destroy notification function. |
datalist_id_replace_data |
Compares the member that is associated with since: 2.34 |
datalist_id_set_data_full |
Sets the data corresponding to the given |
datalist_init |
Resets the datalist to |
datalist_set_flags |
Turns on flag values for a data list. This function is used
to keep a small number of boolean flags in an object with
a data list without using any additional space. It is
not generally useful except in circumstances where space
is very tight. (It is used in the base since: 2.8 |
datalist_unset_flags |
Turns off flag values for a data list. See g_datalist_unset_flags(). since: 2.8 |
dataset_destroy |
Destroys the dataset, freeing all memory allocated, and calling any destroy functions set for data elements. |
dataset_foreach |
Calls the given function for each data element which is associated
with the given location. Note that this function is NOT thread-safe.
So unless |
dataset_id_get_data |
Gets the data element corresponding to a |
dataset_id_remove_no_notify |
Removes an element, without calling its destroy notification function. |
dataset_id_set_data_full |
Sets the data element associated with the given |
dcgettext |
This is a variant of since: 2.26 |
dgettext |
This function is a wrapper of since: 2.18 |
direct_equal |
Compares two #gpointer arguments and returns |
direct_hash |
Converts a gpointer to a hash value.
It can be passed to |
dngettext |
This function is a wrapper of since: 2.18 |
double_equal |
Compares the two #gdouble values being pointed to and returns
since: 2.22 |
double_hash |
Converts a pointer to a #gdouble to a hash value.
It can be passed to since: 2.22 |
dpgettext |
This function is a variant of since: 2.16 |
dpgettext2 |
This function is a variant of since: 2.18 |
environ_getenv |
Returns the value of the environment variable since: 2.32 |
environ_setenv |
Sets the environment variable since: 2.32 |
environ_unsetenv |
Removes the environment variable since: 2.32 |
fdwalk_set_cloexec |
Mark every file descriptor equal to or greater than since: 2.80 |
file_error_from_errno |
Gets a |
file_error_quark | |
file_get_contents |
Reads an entire file into allocated memory, with good error checking. |
file_open_tmp |
Opens a file for writing in the preferred directory for temporary files (as returned by g_get_tmp_dir()). |
file_read_link |
Reads the contents of the symbolic link since: 2.4 |
file_set_contents |
Writes all of since: 2.8 |
file_set_contents_full |
Writes all of since: 2.66 |
file_test |
Returns |
filename_display_basename |
Returns the display basename for the particular filename, guaranteed to be valid UTF-8. The display name might not be identical to the filename, for instance there might be problems converting it to UTF-8, and some files can be translated in the display. since: 2.6 |
filename_display_name |
Converts a filename into a valid UTF-8 string. The conversion is
not necessarily reversible, so you should keep the original around
and use the return value of this function only for display purposes.
Unlike g_filename_to_utf8(), the result is guaranteed to be non- since: 2.6 |
filename_from_uri |
Converts an escaped ASCII-encoded URI to a local filename in the encoding used for filenames. |
filename_from_utf8 |
Converts a string from UTF-8 to the encoding GLib uses for filenames. Note that on Windows GLib uses UTF-8 for filenames; on other platforms, this function indirectly depends on the [current locale][setlocale]. |
filename_to_uri |
Converts an absolute filename to an escaped ASCII-encoded URI, with the path component following Section 3.3. of RFC 2396. |
filename_to_utf8 |
Converts a string which is in the encoding used by GLib for filenames into a UTF-8 string. Note that on Windows GLib uses UTF-8 for filenames; on other platforms, this function indirectly depends on the [current locale][setlocale]. |
find_program_in_path |
Locates the first executable named On Windows, if |
fopen |
A wrapper for the stdio since: 2.6 |
format_size |
Formats a size (for example the size of a file) into a human readable string. Sizes are rounded to the nearest size prefix (kB, MB, GB) and are displayed rounded to the nearest tenth. E.g. the file size 3292528 bytes will be converted into the string “3.2 MB”. The returned string is UTF-8, and may use a non-breaking space to separate the number and units, to ensure they aren’t separated when line wrapped. since: 2.30 |
format_size_for_display |
Formats a size (for example the size of a file) into a human readable string. Sizes are rounded to the nearest size prefix (KB, MB, GB) and are displayed rounded to the nearest tenth. E.g. the file size 3292528 bytes will be converted into the string “3.1 MB”. deprecated: 2.30 since: 2.16 |
format_size_full |
Formats a size. since: 2.30 |
fprintf |
An implementation of the standard since: 2.2 |
free |
Frees the memory pointed to by |
free_sized |
Frees the memory pointed to by since: 2.76 |
freopen |
A wrapper for the POSIX since: 2.6 |
fsync |
A wrapper for the POSIX since: 2.64 |
get_application_name |
Gets a human-readable name for the application, as set by
g_set_application_name(). This name should be localized if
possible, and is intended for display to the user. Contrast with
g_get_prgname(), which gets a non-localized name. If
since: 2.2 |
get_charset |
Obtains the character set for the [current locale][setlocale]; you
might use this character set as an argument to g_convert(), to convert
from the current locale’s encoding to some other encoding. (Frequently
|
get_codeset |
Gets the character set for the current locale. |
get_console_charset |
Obtains the character set used by the console attached to the process, which is suitable for printing output to the terminal. since: 2.62 |
get_current_dir |
Gets the current directory. |
get_current_time |
Equivalent to the UNIX deprecated: 2.62 |
get_environ |
Gets the list of environment variables for the current process. since: 2.28 |
get_filename_charsets |
Determines the preferred character sets used for filenames.
The first character set from the since: 2.6 |
get_home_dir |
Gets the current user’s home directory. |
get_host_name |
Return a name for the machine. since: 2.8 |
get_language_names |
Computes a list of applicable locale names, which can be used to e.g. construct locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable and always contains the default locale “C”. since: 2.6 |
get_language_names_with_category |
Computes a list of applicable locale names with a locale category name, which can be used to construct the fallback locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable and always contains the default locale “C”. since: 2.58 |
get_locale_variants |
Returns a list of derived variants of since: 2.28 |
get_monotonic_time |
Queries the system monotonic time. since: 2.28 |
get_num_processors |
Determine the approximate number of threads that the system will
schedule simultaneously for this process. This is intended to be
used as a parameter to since: 2.36 |
get_os_info |
Get information about the operating system. since: 2.64 |
get_prgname |
Gets the name of the program. This name should not be localized, in contrast to g_get_application_name(). |
get_real_name |
Gets the real name of the user. This usually comes from the user’s
entry in the |
get_real_time |
Queries the system wall-clock time. since: 2.28 |
get_system_config_dirs |
Returns an ordered list of base directories in which to access system-wide configuration information. since: 2.6 |
get_system_data_dirs |
Returns an ordered list of base directories in which to access system-wide application data. since: 2.6 |
get_tmp_dir |
Gets the directory to use for temporary files. |
get_user_cache_dir |
Returns a base directory in which to store non-essential, cached data specific to particular user. since: 2.6 |
get_user_config_dir |
Returns a base directory in which to store user-specific application configuration information such as user preferences and settings. since: 2.6 |
get_user_data_dir |
Returns a base directory in which to access application data such as icons that is customized for a particular user. since: 2.6 |
get_user_name |
Gets the user name of the current user. The encoding of the returned string is system-defined. On UNIX, it might be the preferred file name encoding, or something else, and there is no guarantee that it is even consistent on a machine. On Windows, it is always UTF-8. |
get_user_runtime_dir |
Returns a directory that is unique to the current user on the local system. since: 2.28 |
get_user_special_dir |
Returns the full path of a special directory using its logical id. since: 2.14 |
get_user_state_dir |
Returns a base directory in which to store state files specific to particular user. since: 2.72 |
getenv |
Returns the value of an environment variable. |
hostname_is_ascii_encoded |
Tests if since: 2.22 |
hostname_is_ip_address |
Tests if since: 2.22 |
hostname_is_non_ascii |
Tests if since: 2.22 |
hostname_to_ascii |
Converts since: 2.22 |
hostname_to_unicode |
Converts since: 2.22 |
iconv |
Same as the standard UNIX routine iconv(), but may be implemented via libiconv on UNIX flavors that lack a native implementation. |
idle_add |
Adds a function to be called whenever there are no higher priority
events pending to the default main loop. The function is given the
default idle priority, |
idle_add_full |
Adds a function to be called whenever there are no higher priority events pending. |
idle_add_once |
Adds a function to be called whenever there are no higher priority
events pending to the default main loop. The function is given the
default idle priority, since: 2.74 |
idle_remove_by_data |
Removes the idle function with the given data. |
idle_source_new |
Creates a new idle source. |
int64_equal |
Compares the two #gint64 values being pointed to and returns
since: 2.22 |
int64_hash |
Converts a pointer to a #gint64 to a hash value. since: 2.22 |
int_equal |
Compares the two #gint values being pointed to and returns
|
int_hash |
Converts a pointer to a #gint to a hash value.
It can be passed to |
intern_static_string |
Returns a canonical representation for since: 2.10 |
intern_string |
Returns a canonical representation for since: 2.10 |
io_add_watch |
Adds the |
io_add_watch_full |
Adds the |
io_create_watch |
Creates a |
listenv |
Gets the names of all variables set in the environment. since: 2.8 |
locale_from_utf8 |
Converts a string from UTF-8 to the encoding used for strings by the C runtime (usually the same as that used by the operating system) in the [current locale][setlocale]. On Windows this means the system codepage. |
locale_to_utf8 |
Converts a string which is in the encoding used for strings by the C runtime (usually the same as that used by the operating system) in the [current locale][setlocale] into a UTF-8 string. |
log |
Logs an error or debugging message. |
log_default_handler |
The default log handler set up by GLib; |
log_get_debug_enabled |
Return whether debug output from the GLib logging system is enabled. since: 2.72 |
log_remove_handler |
Removes the log handler. |
log_set_always_fatal |
Sets the message levels which are always fatal, in any log domain. |
log_set_debug_enabled |
Enable or disable debug output from the GLib logging system for all domains. since: 2.72 |
log_set_default_handler |
Installs a default log handler which is used if no log handler has been set for the particular log domain and log level combination. since: 2.6 |
log_set_fatal_mask |
Sets the log levels which are fatal in the given domain. |
log_set_handler |
Sets the log handler for a domain and a set of log levels. |
log_set_handler_full |
Like since: 2.46 |
log_set_writer_func |
Set a writer function which will be called to format and write out each log message. since: 2.50 |
log_structured |
Log a message with structured data. since: 2.50 |
log_structured_array |
Log a message with structured data. since: 2.50 |
log_structured_standard | |
log_variant |
Log a message with structured data, accepting the data within a since: 2.50 |
log_writer_default |
Format a structured log message and output it to the default log destination for the platform. since: 2.50 |
log_writer_default_set_debug_domains |
Reset the list of domains to be logged, that might be initially set by the
since: 2.80 |
log_writer_default_set_use_stderr |
Configure whether the built-in log functions will output all log messages to
since: 2.68 |
log_writer_default_would_drop |
Check whether since: 2.68 |
log_writer_format_fields |
Format a structured log message as a string suitable for outputting to the terminal (or elsewhere). since: 2.50 |
log_writer_is_journald |
Check whether the given since: 2.50 |
log_writer_journald |
Format a structured log message and send it to the systemd journal as a set of key–value pairs. since: 2.50 |
log_writer_standard_streams |
Format a structured log message and print it to either since: 2.50 |
log_writer_supports_color |
Check whether the given since: 2.50 |
log_writer_syslog |
Format a structured log message and send it to the syslog daemon. Only fields which are understood by this function are included in the formatted string which is printed. since: 2.80 |
logv |
Logs an error or debugging message. |
lstat |
A wrapper for the POSIX since: 2.6 |
main_current_source |
Returns the currently firing source for this thread. since: 2.12 |
main_depth |
Returns the depth of the stack of calls to
|
malloc |
Allocates |
malloc0 |
Allocates |
malloc0_n |
This function is similar to g_malloc0(), allocating ( since: 2.24 |
malloc_n |
This function is similar to g_malloc(), allocating ( since: 2.24 |
markup_collect_attributes |
Collects the attributes of the element from the data passed to the
since: 2.16 |
markup_error_quark | |
markup_escape_text |
Escapes text so that the markup parser will parse it verbatim. Less than, greater than, ampersand, etc. are replaced with the corresponding entities. This function would typically be used when writing out a file to be parsed with the markup parser. |
markup_printf_escaped |
Formats arguments according to since: 2.4 |
markup_vprintf_escaped |
Formats the data in since: 2.4 |
mem_is_system_malloc |
Checks whether the allocator used by deprecated: 2.46 |
mem_profile |
GLib used to support some tools for memory profiling, but this no longer works. There are many other useful tools for memory profiling these days which can be used instead. deprecated: 2.46 |
mem_set_vtable |
This function used to let you override the memory allocation function. However, its use was incompatible with the use of global constructors in GLib and GIO, because those use the GLib allocators before main is reached. Therefore this function is now deprecated and is just a stub. deprecated: 2.46 |
memdup |
Allocates deprecated: 2.68 |
memdup2 |
Allocates since: 2.68 |
mkdir |
A wrapper for the POSIX since: 2.6 |
mkdir_with_parents |
Create a directory if it doesn’t already exist. Create intermediate parent directories as needed, too. since: 2.8 |
mkdtemp |
Creates a temporary directory. See the since: 2.30 |
mkdtemp_full |
Creates a temporary directory. See the since: 2.30 |
mkstemp |
Opens a temporary file. See the |
mkstemp_full |
Opens a temporary file. See the since: 2.22 |
nullify_pointer |
Set the pointer at the specified location to |
number_parser_error_quark | |
on_error_query |
Prompts the user with
|
on_error_stack_trace |
Invokes gdb, which attaches to the current process and shows a
stack trace. Called by |
open |
A wrapper for the POSIX since: 2.6 |
option_error_quark | |
parse_debug_string |
Parses a string containing debugging options into a %guint containing bit flags. This is used within GDK and GTK to parse the debug options passed on the command line or through environment variables. |
path_get_basename |
Gets the last component of the filename. |
path_get_dirname |
Gets the directory components of a file name. For example, the directory
component of |
path_is_absolute |
Returns |
path_skip_root |
Returns a pointer into |
pattern_match |
Matches a string against a compiled pattern. deprecated: 2.70 |
pattern_match_simple |
Matches a string against a pattern given as a string. |
pattern_match_string |
Matches a string against a compiled pattern. deprecated: 2.70 |
pointer_bit_lock |
This is equivalent to g_bit_lock, but working on pointers (or other pointer-sized values). since: 2.30 |
pointer_bit_lock_and_get |
This is equivalent to g_bit_lock, but working on pointers (or other pointer-sized values). since: 2.80 |
pointer_bit_lock_mask_ptr |
This mangles since: 2.80 |
pointer_bit_trylock |
This is equivalent to g_bit_trylock(), but working on pointers (or other pointer-sized values). since: 2.30 |
pointer_bit_unlock |
This is equivalent to g_bit_unlock, but working on pointers (or other pointer-sized values). since: 2.30 |
pointer_bit_unlock_and_set |
This is equivalent to since: 2.80 |
poll |
Polls since: 2.20 |
prefix_error |
Formats a string according to since: 2.16 |
prefix_error_literal |
Prefixes since: 2.70 |
Outputs a formatted message via the print handler. |
|
printerr |
Outputs a formatted message via the error message handler. |
printf |
An implementation of the standard since: 2.2 |
printf_string_upper_bound |
Calculates the maximum space needed to store the output
of the |
propagate_error |
If |
propagate_prefixed_error |
If since: 2.16 |
qsort_with_data |
This is just like the standard C deprecated: 2.82 |
quark_from_static_string |
Gets the |
quark_from_string |
Gets the |
quark_to_string |
Gets the string associated with the given |
quark_try_string |
Gets the |
random_double |
Returns a random #gdouble equally distributed over the range [0..1). |
random_double_range |
Returns a random #gdouble equally distributed over the range
[ |
random_int |
Return a random #guint32 equally distributed over the range [0..2^32-1]. |
random_int_range |
Returns a random #gint32 equally distributed over the range
[ |
random_set_seed |
Sets the seed for the global random number generator, which is used
by the g_random_* functions, to |
rc_box_acquire |
Acquires a reference on the data pointed by since: 2.58 |
rc_box_alloc |
Allocates since: 2.58 |
rc_box_alloc0 |
Allocates since: 2.58 |
rc_box_dup |
Allocates a new block of data with reference counting
semantics, and copies since: 2.58 |
rc_box_get_size |
Retrieves the size of the reference counted data pointed by since: 2.58 |
rc_box_release |
Releases a reference on the data pointed by since: 2.58 |
rc_box_release_full |
Releases a reference on the data pointed by since: 2.58 |
realloc |
Reallocates the memory pointed to by |
realloc_n |
This function is similar to g_realloc(), allocating ( since: 2.24 |
ref_count_compare |
Compares the current value of since: 2.58 |
ref_count_dec |
Decreases the reference count. since: 2.58 |
ref_count_inc |
Increases the reference count. since: 2.58 |
ref_count_init |
Initializes a reference count variable to 1. since: 2.58 |
ref_string_acquire |
Acquires a reference on a string. since: 2.58 |
ref_string_equal |
Compares two ref-counted strings for byte-by-byte equality. unstable since: 2.84 |
ref_string_length |
Retrieves the length of since: 2.58 |
ref_string_new |
Creates a new reference counted string and copies the contents of since: 2.58 |
ref_string_new_intern |
Creates a new reference counted string and copies the content of since: 2.58 |
ref_string_new_len |
Creates a new reference counted string and copies the contents of since: 2.58 |
ref_string_release |
Releases a reference on a string; if it was the last reference, the resources allocated by the string are freed as well. since: 2.58 |
reload_user_special_dirs_cache |
Resets the cache used for g_get_user_special_dir(), so that the latest on-disk version is used. Call this only if you just changed the data on disk yourself. since: 2.22 |
remove |
A wrapper for the POSIX since: 2.6 |
rename |
A wrapper for the POSIX since: 2.6 |
return_if_fail_warning |
Internal function used to print messages from the public |
rmdir |
A wrapper for the POSIX since: 2.6 |
set_application_name |
Sets a human-readable name for the application. This name should be
localized if possible, and is intended for display to the user.
Contrast with g_set_prgname(), which sets a non-localized name.
since: 2.2 |
set_error |
Does nothing if |
set_error_literal |
Does nothing if since: 2.18 |
set_prgname |
Sets the name of the program. This name should not be localized, in contrast to g_set_application_name(). |
set_print_handler |
Sets the print handler to |
set_printerr_handler |
Sets the handler for printing error messages to |
set_str |
Updates a pointer to a string to a copy of since: 2.76 |
setenv |
Sets an environment variable. On UNIX, both the variable’s name and value can be arbitrary byte strings, except that the variable’s name cannot contain ‘=’. On Windows, they should be in UTF-8. since: 2.4 |
shell_error_quark | |
shell_parse_argv |
Parses a command line into an argument vector, in much the same way the shell would, but without many of the expansions the shell would perform (variable expansion, globs, operators, filename expansion, etc. are not supported). |
shell_quote |
Quotes a string so that the shell (/bin/sh) will interpret the
quoted string to mean |
shell_unquote |
Unquotes a string as the shell (/bin/sh) would. |
slice_alloc |
Allocates a block of memory from the libc allocator. since: 2.10 |
slice_alloc0 |
Allocates a block of memory via since: 2.10 |
slice_copy |
Allocates a block of memory from the slice allocator
and copies since: 2.14 |
slice_free1 |
Frees a block of memory. since: 2.10 |
slice_free_chain_with_offset |
Frees a linked list of memory blocks of structure type since: 2.10 |
slice_get_config | |
slice_get_config_state | |
slice_set_config | |
snprintf |
A safer form of the standard |
sort_array |
This is just like the standard C since: 2.82 |
spaced_primes_closest |
Gets the smallest prime number from a built-in array of primes which
is larger than |
spawn_async |
Executes a child program asynchronously. |
spawn_async_with_fds |
Executes a child program asynchronously. since: 2.58 |
spawn_async_with_pipes |
Identical to |
spawn_async_with_pipes_and_fds |
Executes a child program asynchronously (your program will not block waiting for the child to exit). since: 2.68 |
spawn_check_exit_status |
An old name for g_spawn_check_wait_status(), deprecated because its name is misleading. deprecated: 2.70 since: 2.34 |
spawn_check_wait_status |
Set since: 2.70 |
spawn_close_pid |
On some platforms, notably Windows, the |
spawn_command_line_async |
A simple version of |
spawn_command_line_sync |
A simple version of |
spawn_error_quark | |
spawn_exit_error_quark | |
spawn_sync |
Executes a child synchronously (waits for the child to exit before returning). |
sprintf |
An implementation of the standard since: 2.2 |
stat |
A wrapper for the POSIX since: 2.6 |
steal_fd |
Sets since: 2.70 |
steal_handle_id |
Sets unstable since: 2.84 |
steal_pointer |
Sets since: 2.44 |
stpcpy |
Copies a nul-terminated string into the destination buffer, including
the trailing nul byte, and returns a pointer to the trailing nul byte
in |
str_equal |
Compares two strings for byte-by-byte equality and returns |
str_has_prefix |
Looks whether the string since: 2.2 |
str_has_suffix |
Looks whether a string ends with since: 2.2 |
str_hash |
Converts a string to a hash value. |
str_is_ascii |
Determines if a string is pure ASCII. A string is pure ASCII if it contains no bytes with the high bit set. since: 2.40 |
str_match_string |
Checks if a search conducted for since: 2.40 |
str_to_ascii |
Transliterate since: 2.40 |
str_tokenize_and_fold |
Tokenizes since: 2.40 |
strcanon |
For each character in |
strcasecmp |
A case-insensitive string comparison, corresponding to the standard
deprecated: 2.2 |
strchomp |
Removes trailing whitespace from a string. |
strchug |
Removes leading whitespace from a string, by moving the rest of the characters forward. |
strcmp0 |
Compares since: 2.16 |
strcompress |
Makes a copy of a string replacing C string-style escape sequences with their one byte equivalent:. |
strconcat |
Concatenates all of the given strings into one long string. |
strdelimit |
Converts any delimiter characters in |
strdown |
Converts a string to lower case. deprecated: 2.2 |
strdup |
Duplicates a string. If |
strdup_printf |
Similar to the standard C |
strdup_vprintf |
Similar to the standard C |
strdupv |
Copies an array of strings. The copy is a deep copy; each string is also copied. |
strerror |
Returns a string corresponding to the given error code, e.g. “no such process”. |
strescape |
It replaces the following special characters in the string |
strfreev |
Frees an array of strings, as well as each string it contains. |
strip_context |
An auxiliary function for since: 2.4 |
strjoin |
Joins a number of strings together to form one long string, with the
optional |
strjoinv |
Joins an array of strings together to form one long string, with the
optional |
strlcat |
Portability wrapper that calls |
strlcpy |
Portability wrapper that calls |
strncasecmp |
A case-insensitive string comparison, corresponding to the standard
deprecated: 2.2 |
strndup |
Duplicates the first |
strnfill |
Creates a new string |
strreverse |
Reverses all of the bytes in a string. For example,
|
strrstr |
Searches the string |
strrstr_len |
Searches the string |
strsignal |
Returns a string describing the given signal, e.g. “Segmentation fault”. If the signal is unknown, it returns “unknown signal (<signum>)”. |
strsplit |
Splits a string into a maximum of |
strsplit_set |
Splits since: 2.4 |
strstr_len |
Searches the string |
strtod |
Converts a string to a floating point value. |
strup |
Converts a string to upper case. deprecated: 2.2 |
strv_contains |
Checks if an array of strings contains the string since: 2.44 |
strv_equal |
Checks if two arrays of strings contain exactly the same elements in exactly the same order. since: 2.60 |
strv_get_type | |
strv_length |
Returns the length of an array of strings. since: 2.6 |
test_add_data_func |
Create a new test case, similar to g_test_create_case(). However
the test is assumed to use no fixture, and test suites are automatically
created on the fly and added to the root fixture, based on the
slash-separated portions of since: 2.16 |
test_add_data_func_full |
Create a new test case, as with g_test_add_data_func(), but freeing
since: 2.34 |
test_add_func |
Create a new test case, similar to g_test_create_case(). However
the test is assumed to use no fixture, and test suites are automatically
created on the fly and added to the root fixture, based on the
slash-separated portions of since: 2.16 |
test_add_vtable | |
test_bug |
This function adds a message to test reports that associates a bug URI with a test case. since: 2.16 |
test_bug_base |
Specify the base URI for bug reports. since: 2.16 |
test_build_filename |
Creates the pathname to a data file that is required for a test. since: 2.38 |
test_create_case |
Create a new since: 2.16 |
test_create_suite |
Create a new test suite with the name since: 2.16 |
test_disable_crash_reporting |
Attempt to disable system crash reporting infrastructure. since: 2.78 |
test_expect_message |
Indicates that a message with the given since: 2.34 |
test_fail |
Indicates that a test failed. This function can be called multiple times from the same test. You can use this function if your test failed in a recoverable way. since: 2.30 |
test_fail_printf |
Equivalent to g_test_fail(), but also record a message like g_test_skip_printf(). since: 2.70 |
test_failed |
Returns whether a test has already failed. This will
be the case when g_test_fail(), since: 2.38 |
test_get_dir |
Gets the pathname of the directory containing test files of the type
specified by since: 2.38 |
test_get_filename |
Gets the pathname to a data file that is required for a test. since: 2.38 |
test_get_path |
Gets the test path for the test currently being run. since: 2.68 |
test_get_root |
Get the toplevel test suite for the test path API. since: 2.16 |
test_incomplete |
Indicates that a test failed because of some incomplete functionality. This function can be called multiple times from the same test. since: 2.38 |
test_incomplete_printf |
Equivalent to g_test_incomplete(), but the explanation is formatted as if by g_strdup_printf(). since: 2.70 |
test_init |
Initialize the GLib testing framework, e.g. by seeding the
test random number generator, the name for since: 2.16 |
test_log_set_fatal_handler |
Installs a non-error fatal log handler which can be used to decide whether log messages which are counted as fatal abort the program. since: 2.22 |
test_log_type_name | |
test_maximized_result |
Report the result of a performance or measurement test.
The test should generally strive to maximize the reported
quantities (larger values are better than smaller ones),
this and since: 2.16 |
test_message |
Add a message to the test report. since: 2.16 |
test_minimized_result |
Report the result of a performance or measurement test.
The test should generally strive to minimize the reported
quantities (smaller values are better than larger ones),
this and since: 2.16 |
test_queue_destroy |
Enqueues a callback since: 2.16 |
test_queue_free |
Enqueue a pointer to be released with since: 2.16 |
test_rand_double |
Get a reproducible random floating point number,
see since: 2.16 |
test_rand_double_range |
Get a reproducible random floating pointer number out of a specified range,
see since: 2.16 |
test_rand_int |
Get a reproducible random integer number. since: 2.16 |
test_rand_int_range |
Get a reproducible random integer number out of a specified range,
see since: 2.16 |
test_run |
Runs all tests under the toplevel suite which can be retrieved
with g_test_get_root(). Similar to g_test_run_suite(), the test
cases to be run are filtered according to test path arguments
( since: 2.16 |
test_run_suite |
Execute the tests within since: 2.16 |
test_set_nonfatal_assertions |
Changes the behaviour of the various since: 2.38 |
test_skip |
Indicates that a test was skipped. since: 2.38 |
test_skip_printf |
Equivalent to g_test_skip(), but the explanation is formatted as if by g_strdup_printf(). since: 2.70 |
test_subprocess |
Returns since: 2.38 |
test_summary |
Set the summary for a test, which describes what the test checks, and how it goes about checking it. This may be included in test report output, and is useful documentation for anyone reading the source code or modifying a test in future. It must be a single line. since: 2.62 |
test_timer_elapsed |
Get the number of seconds since the last start of the timer with g_test_timer_start(). since: 2.16 |
test_timer_last |
Report the last result of g_test_timer_elapsed(). since: 2.16 |
test_timer_start |
Start a timing test. Call since: 2.16 |
test_trap_assertions | |
test_trap_fork |
Fork the current test program to execute a test case that might not return or that might abort. deprecated: Unknown since: 2.16 |
test_trap_has_passed |
Check the result of the last since: 2.16 |
test_trap_reached_timeout |
Check the result of the last since: 2.16 |
test_trap_subprocess |
Respawns the test program to run only since: 2.38 |
test_trap_subprocess_with_envp |
Respawns the test program to run only since: 2.80 |
timeout_add |
Sets a function to be called at regular intervals, with the default
priority, |
timeout_add_full |
Sets a function to be called at regular intervals, with the given
priority. The function is called repeatedly until it returns
|
timeout_add_once |
Sets a function to be called after since: 2.74 |
timeout_add_seconds |
Sets a function to be called at regular intervals with the default
priority, since: 2.14 |
timeout_add_seconds_full |
Sets a function to be called at regular intervals, with since: 2.14 |
timeout_add_seconds_once |
This function behaves like since: 2.78 |
timeout_source_new |
Creates a new timeout source. |
timeout_source_new_seconds |
Creates a new timeout source. since: 2.14 |
try_malloc |
Attempts to allocate |
try_malloc0 |
Attempts to allocate since: 2.8 |
try_malloc0_n |
This function is similar to g_try_malloc0(), allocating ( since: 2.24 |
try_malloc_n |
This function is similar to g_try_malloc(), allocating ( since: 2.24 |
try_realloc |
Attempts to realloc |
try_realloc_n |
This function is similar to g_try_realloc(), allocating ( since: 2.24 |
ucs4_to_utf16 |
Convert a string from UCS-4 to UTF-16. |
ucs4_to_utf8 |
Convert a string from a 32-bit fixed width representation as UCS-4. to UTF-8. |
unichar_break_type |
Determines the break type of |
unichar_combining_class |
Determines the canonical combining class of a Unicode character. since: 2.14 |
unichar_compose |
Performs a single composition step of the Unicode canonical composition algorithm. since: 2.30 |
unichar_decompose |
Performs a single decomposition step of the Unicode canonical decomposition algorithm. since: 2.30 |
unichar_digit_value |
Determines the numeric value of a character as a decimal digit. |
unichar_fully_decompose |
Computes the canonical or compatibility decomposition of a
Unicode character. For compatibility decomposition,
pass since: 2.30 |
unichar_get_mirror_char |
In Unicode, some characters are “mirrored”. This means that their images are mirrored horizontally in text that is laid out from right to left. For instance, “(” would become its mirror image, “)”, in right-to-left text. since: 2.4 |
unichar_get_script |
Looks up the since: 2.14 |
unichar_isalnum |
Determines whether a character is alphanumeric. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). |
unichar_isalpha |
Determines whether a character is alphabetic (i.e. a letter). Given some UTF-8 text, obtain a character value with g_utf8_get_char(). |
unichar_iscntrl |
Determines whether a character is a control character. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). |
unichar_isdefined |
Determines if a given character is assigned in the Unicode standard. |
unichar_isdigit |
Determines whether a character is numeric (i.e. a digit). This covers ASCII 0-9 and also digits in other languages/scripts. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). |
unichar_isgraph |
Determines whether a character is printable and not a space
(returns |
unichar_islower |
Determines whether a character is a lowercase letter. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). |
unichar_ismark |
Determines whether a character is a mark (non-spacing mark, combining mark, or enclosing mark in Unicode speak). Given some UTF-8 text, obtain a character value with g_utf8_get_char(). since: 2.14 |
unichar_isprint |
Determines whether a character is printable.
Unlike g_unichar_isgraph(), returns |
unichar_ispunct |
Determines whether a character is punctuation or a symbol. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). |
unichar_isspace |
Determines whether a character is a space, tab, or line separator (newline, carriage return, etc.). Given some UTF-8 text, obtain a character value with g_utf8_get_char(). |
unichar_istitle |
Determines if a character is titlecase. Some characters in Unicode which are composites, such as the DZ digraph have three case variants instead of just two. The titlecase form is used at the beginning of a word where only the first letter is capitalized. The titlecase form of the DZ digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z. |
unichar_isupper |
Determines if a character is uppercase. |
unichar_iswide |
Determines if a character is typically rendered in a double-width cell. |
unichar_iswide_cjk |
Determines if a character is typically rendered in a double-width cell under legacy East Asian locales. If a character is wide according to g_unichar_iswide(), then it is also reported wide with this function, but the converse is not necessarily true. See the Unicode Standard Annex #11 for details. since: 2.12 |
unichar_isxdigit |
Determines if a character is a hexadecimal digit. |
unichar_iszerowidth |
Determines if a given character typically takes zero width when rendered.
The return value is since: 2.14 |
unichar_to_utf8 |
Converts a single character to UTF-8. |
unichar_tolower |
Converts a character to lower case. |
unichar_totitle |
Converts a character to the titlecase. |
unichar_toupper |
Converts a character to uppercase. |
unichar_type |
Classifies a Unicode character by type. |
unichar_validate |
Checks whether |
unichar_xdigit_value |
Determines the numeric value of a character as a hexadecimal digit. |
unicode_canonical_decomposition |
Computes the canonical decomposition of a Unicode character. deprecated: 2.30 |
unicode_canonical_ordering |
Computes the canonical ordering of a string in-place. This rearranges decomposed characters in the string according to their combining classes. See the Unicode manual for more information. |
unix_error_quark | |
unix_fd_add |
Sets a function to be called when the IO condition, as specified by
since: 2.36 |
unix_fd_add_full |
Sets a function to be called when the IO condition, as specified by
since: 2.36 |
unix_fd_source_new |
Creates a since: 2.36 |
unix_get_passwd_entry |
Get the since: 2.64 |
unix_open_pipe |
Similar to the UNIX since: 2.30 |
unix_set_fd_nonblocking |
Control the non-blocking state of the given file descriptor,
according to since: 2.30 |
unix_signal_add |
A convenience function for g_unix_signal_source_new(), which
attaches to the default since: 2.30 |
unix_signal_add_full |
A convenience function for g_unix_signal_source_new(), which
attaches to the default since: 2.30 |
unix_signal_source_new |
Create a since: 2.30 |
unlink |
A wrapper for the POSIX since: 2.6 |
unsetenv |
Removes an environment variable from the environment. since: 2.4 |
usleep |
Pauses the current thread for the given number of microseconds. |
utf16_to_ucs4 |
Convert a string from UTF-16 to UCS-4. |
utf16_to_utf8 |
Convert a string from UTF-16 to UTF-8. |
utf8_casefold |
Converts a string into a form that is independent of case. The
result will not correspond to any particular case, but can be
compared for equality or ordered with the results of calling
|
utf8_collate |
Compares two strings for ordering using the linguistically
correct rules for the [current locale][setlocale].
When sorting a large number of strings, it will be significantly
faster to obtain collation keys with |
utf8_collate_key |
Converts a string into a collation key that can be compared with other collation keys produced by the same function using strcmp(). |
utf8_collate_key_for_filename |
Converts a string into a collation key that can be compared with other collation keys produced by the same function using strcmp(). since: 2.8 |
utf8_find_next_char |
Finds the start of the next UTF-8 character in the string after |
utf8_find_prev_char |
Given a position |
utf8_get_char |
Converts a sequence of bytes encoded as UTF-8 to a Unicode character. |
utf8_get_char_validated |
Convert a sequence of bytes encoded as UTF-8 to a Unicode character. |
utf8_make_valid |
If the provided string is valid UTF-8, return a copy of it. If not, return a copy in which bytes that could not be interpreted as valid Unicode are replaced with the Unicode replacement character (U+FFFD). since: 2.52 |
utf8_normalize |
Converts a string into 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. The
string has to be valid UTF-8, otherwise |
utf8_offset_to_pointer |
Converts from an integer character offset to a pointer to a position within the string. |
utf8_pointer_to_offset |
Converts from a pointer to position within a string to an integer character offset. |
utf8_prev_char |
Finds the previous UTF-8 character in the string before |
utf8_strchr |
Finds the leftmost occurrence of the given Unicode character
in a UTF-8 encoded string, while limiting the search to |
utf8_strdown |
Converts all Unicode characters in the string that have a case to lowercase. The exact manner that this is done depends on the current locale, and may result in the number of characters in the string changing. |
utf8_strlen |
Computes the length of the string in characters, not including
the terminating nul character. If the |
utf8_strncpy |
Like the standard C |
utf8_strrchr |
Find the rightmost occurrence of the given Unicode character
in a UTF-8 encoded string, while limiting the search to |
utf8_strreverse |
Reverses a UTF-8 string. since: 2.2 |
utf8_strup |
Converts all Unicode characters in the string that have a case to uppercase. The exact manner that this is done depends on the current locale, and may result in the number of characters in the string increasing. (For instance, the German ess-zet will be changed to SS.). |
utf8_substring |
Copies a substring out of a UTF-8 encoded string.
The substring will contain since: 2.30 |
utf8_to_ucs4 |
Convert a string from UTF-8 to a 32-bit fixed width representation as UCS-4. |
utf8_to_ucs4_fast |
Convert a string from UTF-8 to a 32-bit fixed width representation as UCS-4, assuming valid UTF-8 input. |
utf8_to_utf16 |
Convert a string from UTF-8 to UTF-16. |
utf8_truncate_middle |
Cuts off the middle of the string, preserving half of since: 2.78 |
utf8_validate |
Validates UTF-8 encoded text. |
utf8_validate_len |
Validates UTF-8 encoded text. since: 2.60 |
utime |
A wrapper for the POSIX since: 2.18 |
uuid_string_is_valid |
Parses the string since: 2.52 |
uuid_string_random |
Generates a random UUID (RFC 4122 version 4) as a string. It has the same
randomness guarantees as since: 2.52 |
variant_get_gtype | |
vasprintf |
An implementation of the GNU since: 2.4 |
vfprintf |
An implementation of the standard since: 2.2 |
vprintf |
An implementation of the standard since: 2.2 |
vsnprintf |
A safer form of the standard |
vsprintf |
An implementation of the standard since: 2.2 |
warn_message |
Internal function used to print messages from the public |
Function Macros
abort |
A wrapper for the POSIX since: 2.50 |
ALIGNOF |
Return the minimal alignment required by the platform ABI for values of the given
type. The address of a variable or struct member of the given type must always be
a multiple of this alignment. For example, most platforms require int variables
to be aligned at a 4-byte boundary, so since: 2.60 |
alloca |
Allocates |
alloca0 |
Wraps since: 2.72 |
APPROX_VALUE |
Evaluates to a truth value if the absolute difference between since: 2.58 |
array_append_val |
Adds the value on to the end of the array. The array will grow in size automatically if necessary. |
array_index |
Returns the element of a |
array_insert_val |
Inserts an element into an array at the given index. |
array_prepend_val |
Adds the value on to the start of the array. The array will grow in size automatically if necessary. |
ascii_isalnum |
Determines whether a character is alphanumeric. |
ascii_isalpha |
Determines whether a character is alphabetic (i.e. a letter). |
ascii_iscntrl |
Determines whether a character is a control character. |
ascii_isdigit |
Determines whether a character is digit (0-9). |
ascii_isgraph |
Determines whether a character is a printing character and not a space. |
ascii_islower |
Determines whether a character is an ASCII lower case letter. |
ascii_isprint |
Determines whether a character is a printing character. |
ascii_ispunct |
Determines whether a character is a punctuation character. |
ascii_isspace |
Determines whether a character is a white-space character. |
ascii_isupper |
Determines whether a character is an ASCII upper case letter. |
ascii_isxdigit |
Determines whether a character is a hexadecimal-digit character. |
assert |
Debugging macro to terminate the application if the assertion fails. If the assertion fails (i.e. the expression is not true), an error message is logged and the application is terminated. |
assert_cmpfloat |
Debugging macro to compare two floating point numbers. since: 2.16 |
assert_cmpfloat_with_epsilon |
Debugging macro to compare two floating point numbers within an epsilon. since: 2.58 |
assert_cmphex |
Debugging macro to compare to unsigned integers. since: 2.16 |
assert_cmpint |
Debugging macro to compare two integers. since: 2.16 |
assert_cmpmem |
Debugging macro to compare memory regions. If the comparison fails, an error message is logged and the application is either terminated or the testcase marked as failed. since: 2.46 |
assert_cmpstr |
Debugging macro to compare two strings. If the comparison fails, an error message is logged and the application is either terminated or the testcase marked as failed. The strings are compared using g_strcmp0(). since: 2.16 |
assert_cmpstrv |
Debugging macro to check if two since: 2.68 |
assert_cmpuint |
Debugging macro to compare two unsigned integers. since: 2.16 |
assert_cmpvariant |
Debugging macro to compare two since: 2.60 |
assert_error |
Debugging macro to check that a method has returned
the correct since: 2.20 |
assert_false |
Debugging macro to check an expression is false. since: 2.38 |
assert_no_errno |
Debugging macro to check that an expression has a non-negative return value,
as used by traditional POSIX functions (such as since: 2.66 |
assert_no_error |
Debugging macro to check that a since: 2.20 |
assert_nonnull |
Debugging macro to check an expression is not since: 2.40 |
assert_not_reached |
Debugging macro to terminate the application if it is ever reached. If it is reached, an error message is logged and the application is terminated. |
assert_null |
Debugging macro to check an expression is since: 2.38 |
assert_true |
Debugging macro to check that an expression is true. since: 2.38 |
ATEXIT | |
atomic_rc_box_new |
A convenience macro to allocate atomically reference counted
data with the size of the given since: 2.58 |
atomic_rc_box_new0 |
A convenience macro to allocate atomically reference counted
data with the size of the given since: 2.58 |
AUTO_LOCK |
Works like since: 2.80 |
BREAKPOINT |
Inserts a breakpoint instruction into the code. |
C_STD_CHECK_VERSION |
Macro to check if the current compiler supports a specified since: 2.76 |
CHECK_VERSION |
Checks whether the version of the GLib library that is being compiled against is greater than or equal to the given one. |
chunk_free | |
chunk_new | |
chunk_new0 | |
critical |
Logs a ‘critical warning’ ( |
CXX_STD_CHECK_VERSION |
Macro to check if the current compiler supports a specified since: 2.76 |
datalist_id_remove_data |
Removes an element, using its |
datalist_id_set_data |
Sets the data corresponding to the given |
datalist_remove_data |
Removes an element using its string identifier. The data element’s destroy function is called if it has been set. |
datalist_remove_no_notify |
Removes an element, without calling its destroy notifier. |
datalist_set_data |
Sets the data element corresponding to the given string identifier. |
datalist_set_data_full |
Sets the data element corresponding to the given string identifier, and the function to be called when the data element is removed. |
dataset_get_data |
Gets the data element corresponding to a string. |
dataset_id_remove_data |
Removes a data element from a dataset. The data element’s destroy function is called if it has been set. |
dataset_id_set_data |
Sets the data element associated with the given |
dataset_remove_data |
Removes a data element corresponding to a string. Its destroy function is called if it has been set. |
dataset_remove_no_notify |
Removes an element, without calling its destroy notifier. |
dataset_set_data |
Sets the data corresponding to the given string identifier. |
dataset_set_data_full |
Sets the data corresponding to the given string identifier, and the function to call when the data element is destroyed. |
debug |
A convenience function/macro to log a debug message. since: 2.6 |
DEBUG_HERE |
A convenience form of g_log_structured(), recommended to be added to
functions when debugging. It prints the current monotonic time and the code
location using since: 2.50 |
DEFINE_AUTO_CLEANUP_CLEAR_FUNC |
Defines the appropriate cleanup function for a type. since: 2.44 |
DEFINE_AUTO_CLEANUP_FREE_FUNC |
Defines the appropriate cleanup function for a type. since: 2.44 |
DEFINE_AUTOPTR_CLEANUP_FUNC |
Defines the appropriate cleanup function for a pointer type. since: 2.44 |
DEFINE_EXTENDED_ERROR |
A convenience macro which defines two functions. First, returning
the since: 2.68 |
DEFINE_QUARK |
A convenience macro which defines a function returning the
since: 2.34 |
DEPRECATED_ENUMERATOR_FOR | |
DEPRECATED_FOR | |
DEPRECATED_MACRO_FOR | |
DEPRECATED_TYPE_FOR | |
ENCODE_VERSION | |
error |
A convenience function/macro to log an error message. |
GINT64_CONSTANT | |
GNUC_ALLOC_SIZE |
Expands to the GNU C since: 2.18 |
GNUC_ALLOC_SIZE2 |
Expands to the GNU C since: 2.18 |
GNUC_CHECK_VERSION |
Expands to a check for a compiler with GNUC defined and a version greater than or equal to the major and minor numbers provided. For example, the following would only match on compilers such as GCC 4.8 or newer. since: 2.42 |
GNUC_DEPRECATED_FOR |
Like since: 2.26 |
GNUC_FORMAT |
Expands to the GNU C |
GNUC_PRINTF |
Expands to the GNU C |
GNUC_SCANF |
Expands to the GNU C |
GNUC_STRFTIME |
Expands to the GNU C since: 2.60 |
GOFFSET_CONSTANT | |
GUINT64_CONSTANT | |
hash_table_freeze |
This function is deprecated and will be removed in the next major release of GLib. It does nothing. |
hash_table_thaw |
This function is deprecated and will be removed in the next major release of GLib. It does nothing. |
HOOK_ACTIVE |
Returns |
hook_append |
Appends a |
HOOK_FLAGS |
Gets the flags of a hook. |
HOOK_IN_CALL |
Returns |
htonl |
Converts a 32-bit integer value from host to network byte order. |
htons |
Converts a 16-bit integer value from host to network byte order. |
info |
A convenience function/macro to log an informational message. since: 2.40 |
LIKELY |
Hints the compiler that the expression is likely to evaluate to a true value. The compiler may use this information for optimizations. since: 2.2 |
list_next |
A convenience macro to get the next element in a |
list_previous |
A convenience macro to get the previous element in a |
LOCK |
Works like g_mutex_lock(), but for a lock defined with
|
LOCK_DEFINE |
The |
LOCK_DEFINE_STATIC |
This works like |
LOCK_EXTERN |
This declares a lock, that is defined with |
LOCK_NAME | |
main_destroy |
Frees the memory allocated for the deprecated: 2.2 |
main_is_running |
Checks if the main loop is running. deprecated: 2.2 |
main_iteration |
Runs a single iteration for the default deprecated: 2.2 |
main_new |
Creates a new deprecated: 2.2 |
main_pending |
Checks if any events are pending for the default deprecated: 2.2 |
main_quit |
Stops the deprecated: 2.2 |
main_run |
Runs a main loop until it stops running. deprecated: 2.2 |
main_set_poll_func |
Sets the function to use for the handle polling of file descriptors for the default main context. deprecated: 2.2 |
mem_chunk_create | |
memmove |
Copies a block of memory deprecated: 2.40 |
message |
A convenience function/macro to log a normal message. |
MUTEX_AUTO_LOCK |
Declare a since: 2.80.0 |
N_ELEMENTS |
Determines the number of elements in an array. The array must be declared so the compiler knows its size at compile-time; this macro will not work on an array allocated on the heap, only static arrays or arrays on the stack. |
new |
Allocates |
new0 |
Allocates |
newa |
Wraps |
newa0 |
Wraps since: 2.72 |
node_append |
Inserts a |
node_append_data |
Inserts a new |
node_first_child |
Gets the first child of a |
node_insert_data |
Inserts a new |
node_insert_data_after |
Inserts a new |
node_insert_data_before |
Inserts a new |
node_next_sibling |
Gets the next sibling of a |
node_prepend_data |
Inserts a new |
node_prev_sibling |
Gets the previous sibling of a |
ntohl |
Converts a 32-bit integer value from network to host byte order. |
ntohs |
Converts a 16-bit integer value from network to host byte order. |
once |
The first call to this routine by a process with a given since: 2.4 |
PASTE |
Yields a new preprocessor pasted identifier
#define GET(traveller,method) G_PASTE(traveller_get_, method) (traveller)
const gchar *name = GET (traveller, name);
const gchar *quest = GET (traveller, quest);
GdkColor *favourite = GET (traveller, favourite_colour);
since: 2.20 |
PASTE_ARGS | |
PRIVATE_INIT |
A macro to assist with the static initialisation of a since: 2.32 |
ptr_array_index |
Returns the pointer at the given index of the pointer array. |
rand_boolean |
Returns a random #gboolean from |
random_boolean |
Returns a random #gboolean. This corresponds to an unbiased coin toss. |
rc_box_new |
A convenience macro to allocate reference counted data with
the size of the given since: 2.58 |
rc_box_new0 |
A convenience macro to allocate reference counted data with
the size of the given since: 2.58 |
REC_MUTEX_AUTO_LOCK |
Declare a since: 2.80.0 |
renew |
Reallocates the memory pointed to by |
return_if_fail | |
return_if_reached | |
return_val_if_fail | |
return_val_if_reached | |
RW_LOCK_READER_AUTO_LOCK |
Declare a since: 2.80.0 |
RW_LOCK_WRITER_AUTO_LOCK |
Declare a since: 2.80.0 |
scanner_add_symbol |
Adds a symbol to the default scope. deprecated: 2.2 |
scanner_foreach_symbol |
Calls a function for each symbol in the default scope. deprecated: 2.2 |
scanner_freeze_symbol_table |
There is no reason to use this macro, since it does nothing. deprecated: 2.2 |
scanner_remove_symbol |
Removes a symbol from the default scope. deprecated: 2.2 |
scanner_thaw_symbol_table |
There is no reason to use this macro, since it does nothing. deprecated: 2.2 |
size_checked_add |
Performs a checked addition of since: 2.48 |
size_checked_mul |
Performs a checked multiplication of since: 2.48 |
SIZEOF_MEMBER |
Returns the size of since: 2.64 |
slice_dup |
A convenience macro to duplicate a block of memory using the slice allocator. since: 2.14 |
slice_free |
A convenience macro to free a block of memory that has been allocated from the slice allocator. since: 2.10 |
slice_free_chain |
Frees a linked list of memory blocks of structure type since: 2.10 |
slice_new |
A convenience macro to allocate a block of memory from the slice allocator. since: 2.10 |
slice_new0 |
A convenience macro to allocate a block of memory from the slice allocator and set the memory to 0. since: 2.10 |
slist_next |
A convenience macro to get the next element in a |
SOURCE_FUNC |
Cast a function pointer to a since: 2.58 |
STATIC_ASSERT |
The G_STATIC_ASSERT() macro lets the programmer check a condition at compile time, the condition needs to be compile time computable. The macro can be used in any place where a typedef is valid. since: 2.20 |
STATIC_ASSERT_EXPR |
The G_STATIC_ASSERT_EXPR() macro lets the programmer check a condition at compile time. The condition needs to be compile time computable. since: 2.30 |
static_mutex_lock |
Works like g_mutex_lock(), but for a deprecated: 2.32 |
static_mutex_trylock |
Works like g_mutex_trylock(), but for a deprecated: 2.32 |
static_mutex_unlock |
Works like g_mutex_unlock(), but for a deprecated: 2.32 |
STRINGIFY |
Accepts a macro or a string and converts it into a string after preprocessor argument expansion. For example, the following code:. |
STRINGIFY_ARG | |
strstrip |
Removes leading and trailing whitespace from a string. |
STRUCT_MEMBER |
Returns a member of a structure at a given offset, using the given type. |
STRUCT_MEMBER_P |
Returns an untyped pointer to a given offset of a struct. |
STRUCT_OFFSET |
Returns the offset, in bytes, of a member of a struct. |
test_add |
Hook up a new test case at since: 2.16 |
test_assert_expected_messages |
Asserts that all messages previously indicated via
since: 2.34 |
test_initialized |
Returns since: 2.36 |
test_perf |
Returns |
test_queue_unref |
Enqueue an object to be released with since: 2.16 |
test_quick |
Returns |
test_quiet |
Returns |
test_rand_bit |
Get a reproducible random bit (0 or 1), see since: 2.16 |
test_slow |
Returns |
test_thorough |
Returns |
test_trap_assert_failed |
Assert that the last test subprocess failed. See g_test_trap_subprocess(). since: 2.16 |
test_trap_assert_passed |
Assert that the last test subprocess passed. See g_test_trap_subprocess(). since: 2.16 |
test_trap_assert_stderr |
Assert that the stderr output of the last test subprocess
matches since: 2.16 |
test_trap_assert_stderr_unmatched |
Assert that the stderr output of the last test subprocess
does not match since: 2.16 |
test_trap_assert_stdout |
Assert that the stdout output of the last test subprocess matches
since: 2.16 |
test_trap_assert_stdout_unmatched |
Assert that the stdout output of the last test subprocess
does not match since: 2.16 |
test_undefined |
Returns |
test_verbose |
Returns |
thread_supported |
This macro returns |
try_new |
Attempts to allocate since: 2.8 |
try_new0 |
Attempts to allocate since: 2.8 |
try_renew |
Attempts to reallocate the memory pointed to by since: 2.8 |
TRYLOCK |
Works like g_mutex_trylock(), but for a lock defined with
|
typeof | |
uint64_checked_add |
Performs a checked addition of since: 2.48 |
uint64_checked_mul |
Performs a checked multiplication of since: 2.48 |
uint_checked_add |
Performs a checked addition of since: 2.48 |
uint_checked_mul |
Performs a checked multiplication of since: 2.48 |
UNAVAILABLE | |
UNAVAILABLE_ENUMERATOR | |
UNAVAILABLE_MACRO | |
UNAVAILABLE_STATIC_INLINE | |
UNAVAILABLE_TYPE | |
UNLIKELY |
Hints the compiler that the expression is unlikely to evaluate to a true value. The compiler may use this information for optimizations. since: 2.2 |
UNLOCK |
Works like g_mutex_unlock(), but for a lock defined with
|
utf8_next_char |
Skips to the next character in a UTF-8 string. |
VARIANT_BUILDER_INIT |
A stack-allocated since: 2.50 |
VARIANT_BUILDER_INIT_UNSET |
A stack-allocated unstable since: 2.84 |
VARIANT_DICT_INIT |
A stack-allocated since: 2.50 |
warn_if_fail |
Logs a warning if the expression is not true. since: 2.16 |
warn_if_reached |
Logs a warning. since: 2.16 |
warning |
A convenience function/macro to log a warning message. |
warning_once |
Logs a warning only once. since: 2.64 |
WIN32_DLLMAIN_FOR_DLL_NAME |
On Windows, this macro defines a DllMain() function that stores the actual DLL name that the code being compiled will be included in. |
Constants
ALLOC_AND_FREE | |
ALLOC_ONLY | |
ALLOCATOR_LIST | |
ALLOCATOR_NODE | |
ALLOCATOR_SLIST | |
ANALYZER_ANALYZING | |
ASCII_DTOSTR_BUF_SIZE |
A good size for a buffer to be passed into |
ATOMIC_REF_COUNT_INIT |
Evaluates to the initial reference count for |
BIG_ENDIAN |
Specifies one of the possible types of byte order.
See |
C_STD_VERSION |
The C standard version the code is compiling against, it’s normally
defined with the same value of |
CSET_A_2_Z |
The set of uppercase ASCII alphabet characters.
Used for specifying valid identifier characters
in |
CSET_a_2_z |
The set of lowercase ASCII alphabet characters.
Used for specifying valid identifier characters
in |
CSET_DIGITS |
The set of ASCII digits.
Used for specifying valid identifier characters
in |
DATALIST_FLAGS_MASK |
A bitmask that restricts the possible flags passed to g_datalist_set_flags(). Passing a flags value where flags & ~G_DATALIST_FLAGS_MASK != 0 is an error. |
DATE_BAD_DAY |
Represents an invalid |
DATE_BAD_JULIAN |
Represents an invalid Julian day number. |
DATE_BAD_YEAR |
Represents an invalid year. |
DIR_SEPARATOR |
The directory separator character. This is ‘/’ on UNIX machines and ‘' under Windows. |
DIR_SEPARATOR_S |
The directory separator as a string. This is “/” on UNIX machines and “" under Windows. |
E |
The base of natural logarithms. |
GINT16_FORMAT | |
GINT16_MODIFIER | |
GINT32_FORMAT | |
GINT32_MODIFIER | |
GINT64_FORMAT | |
GINT64_MODIFIER | |
GINTPTR_FORMAT | |
GINTPTR_MODIFIER | |
GNUC_FUNCTION |
Expands to “” on all modern compilers, and to FUNCTION on gcc version 2.x. Don’t use it. deprecated: 2.16 |
GNUC_PRETTY_FUNCTION |
Expands to “” on all modern compilers, and to PRETTY_FUNCTION on gcc version 2.x. Don’t use it. deprecated: 2.16 |
GSIZE_FORMAT | |
GSIZE_MODIFIER | |
GSSIZE_FORMAT | |
GSSIZE_MODIFIER | |
GUINT16_FORMAT | |
GUINT32_FORMAT | |
GUINT64_FORMAT | |
GUINTPTR_FORMAT | |
HAVE_GINT64 | |
HAVE_GNUC_VARARGS | |
HAVE_GNUC_VISIBILITY |
Defined to 1 if gcc-style visibility handling is supported. |
HAVE_GROWING_STACK | |
HAVE_ISO_VARARGS | |
HOOK_FLAG_USER_SHIFT |
The position of the first bit which is not reserved for internal
use be the |
IEEE754_DOUBLE_BIAS |
The bias by which exponents in double-precision floats are offset. |
IEEE754_FLOAT_BIAS |
The bias by which exponents in single-precision floats are offset. |
KEY_FILE_DESKTOP_GROUP |
The name of the main group of a desktop entry file, as defined in the Desktop Entry Specification. Consult the specification for more details about the meanings of the keys below. |
KEY_FILE_DESKTOP_KEY_ACTIONS |
A key under |
KEY_FILE_DESKTOP_KEY_CATEGORIES |
A key under |
KEY_FILE_DESKTOP_KEY_COMMENT |
A key under |
KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE |
A key under |
KEY_FILE_DESKTOP_KEY_EXEC |
A key under |
KEY_FILE_DESKTOP_KEY_GENERIC_NAME |
A key under |
KEY_FILE_DESKTOP_KEY_HIDDEN |
A key under |
KEY_FILE_DESKTOP_KEY_ICON |
A key under |
KEY_FILE_DESKTOP_KEY_MIME_TYPE |
A key under |
KEY_FILE_DESKTOP_KEY_NAME |
A key under |
KEY_FILE_DESKTOP_KEY_NO_DISPLAY |
A key under |
KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN |
A key under |
KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN |
A key under |
KEY_FILE_DESKTOP_KEY_PATH |
A key under |
KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY |
A key under |
KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS |
A key under |
KEY_FILE_DESKTOP_KEY_TERMINAL |
A key under |
KEY_FILE_DESKTOP_KEY_TRY_EXEC |
A key under |
KEY_FILE_DESKTOP_KEY_TYPE |
A key under |
KEY_FILE_DESKTOP_KEY_URL |
A key under |
KEY_FILE_DESKTOP_KEY_VERSION |
A key under |
KEY_FILE_DESKTOP_TYPE_APPLICATION |
The value of the |
KEY_FILE_DESKTOP_TYPE_DIRECTORY |
The value of the |
KEY_FILE_DESKTOP_TYPE_LINK |
The value of the |
LITTLE_ENDIAN |
Specifies one of the possible types of byte order.
See |
LN10 |
The natural logarithm of 10. |
LN2 |
The natural logarithm of 2. |
LOG_2_BASE_10 |
Multiplying the base 2 exponent by this number yields the base 10 exponent. |
LOG_DOMAIN |
Defines the log domain. See Log Domains. |
LOG_FATAL_MASK |
GLib log levels that are considered fatal by default. |
LOG_LEVEL_USER_SHIFT |
Log levels below |
MAJOR_VERSION |
The major version number of the GLib library. |
MAXINT16 | |
MAXINT32 | |
MAXINT64 | |
MAXINT8 | |
MAXUINT16 | |
MAXUINT32 | |
MAXUINT64 | |
MAXUINT8 | |
MICRO_VERSION |
The micro version number of the GLib library. |
MININT16 |
The minimum value which can be held in a #gint16. |
MININT32 |
The minimum value which can be held in a #gint32. |
MININT64 |
The minimum value which can be held in a #gint64. |
MININT8 |
The minimum value which can be held in a #gint8. |
MINOR_VERSION |
The minor version number of the GLib library. |
MODULE_SUFFIX | |
OPTION_REMAINING |
If a long option in the main group has this name, it is not treated as a
regular option. Instead it collects all non-option arguments which would
otherwise be left in |
PDP_ENDIAN |
Specifies one of the possible types of byte order
(currently unused). See |
PI |
The value of pi (ratio of circle’s circumference to its diameter). |
PI_2 |
Pi divided by 2. |
PI_4 |
Pi divided by 4. |
PID_FORMAT |
A format specifier that can be used in printf()-style format strings
when printing a |
POLLFD_FORMAT |
A format specifier that can be used in printf()-style format strings
when printing the |
PRIORITY_DEFAULT |
Use this for default priority event sources. |
PRIORITY_DEFAULT_IDLE |
Use this for default priority idle functions. |
PRIORITY_HIGH |
Use this for high priority event sources. |
PRIORITY_HIGH_IDLE |
Use this for high priority idle functions. |
PRIORITY_LOW |
Use this for very low priority background tasks. |
REF_COUNT_INIT |
Evaluates to the initial reference count for |
SEARCHPATH_SEPARATOR |
The search path separator character. This is ‘:’ on UNIX machines and ‘;’ under Windows. |
SEARCHPATH_SEPARATOR_S |
The search path separator as a string. This is “:” on UNIX machines and “;” under Windows. |
SIZEOF_LONG | |
SIZEOF_SIZE_T | |
SIZEOF_SSIZE_T | |
SIZEOF_VOID_P | |
SOURCE_CONTINUE |
Use this macro as the return value of a |
SOURCE_REMOVE |
Use this macro as the return value of a |
SQRT2 |
The square root of two. |
STR_DELIMITERS |
The standard delimiters, used in |
SYSDEF_AF_INET | |
SYSDEF_AF_INET6 | |
SYSDEF_AF_UNIX | |
SYSDEF_MSG_DONTROUTE | |
SYSDEF_MSG_OOB | |
SYSDEF_MSG_PEEK | |
TEST_OPTION_ISOLATE_DIRS |
A value that can be passed as an option to |
TEST_OPTION_NO_PRGNAME |
A value that can be passed as an option to |
TEST_OPTION_NONFATAL_ASSERTIONS |
A value that can be passed as an option to |
TIME_SPAN_DAY |
Evaluates to a time span of one day. |
TIME_SPAN_HOUR |
Evaluates to a time span of one hour. |
TIME_SPAN_MILLISECOND |
Evaluates to a time span of one millisecond. |
TIME_SPAN_MINUTE |
Evaluates to a time span of one minute. |
TIME_SPAN_SECOND |
Evaluates to a time span of one second. |
UNICHAR_MAX_DECOMPOSITION_LENGTH |
The maximum length (in codepoints) of a compatibility or canonical decomposition of a single Unicode character. |
URI_RESERVED_CHARS_GENERIC_DELIMITERS |
Generic delimiters characters as defined in
RFC 3986. Includes |
URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS |
Subcomponent delimiter characters as defined in
RFC 3986. Includes |
USEC_PER_SEC |
Number of microseconds in one second (1 million). This macro is provided for code readability. |
VA_COPY_AS_ARRAY | |
VERSION_MIN_REQUIRED |
A macro that should be defined by the user prior to including
the glib.h header.
The definition should be one of the predefined GLib version
macros: |
WIN32_MSG_HANDLE |