Package-level declarations
Types
Error codes returned by bookmark file parsing.
The hashing algorithm to be used by #GChecksum when performing the digest of some data.
Prototype of a #GChildWatchSource callback, called when a child process has exited.
Specifies the type of function passed to g_clear_handle_id(). The implementation is expected to free the resource identified by @handle_id; for instance, if @handle_id is a #GSource ID, g_source_remove() can be used.
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.
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.
The #GCond struct is an opaque data structure that represents a condition. Threads can block on a #GCond if they find a certain condition to be false. If other threads change the state of this condition they signal the #GCond, and that causes the waiting threads to be woken up.
Error codes returned by character set conversion routines.
Specifies the type of function passed to g_dataset_foreach(). It is called with each #GQuark id and associated data element, together with the @user_data parameter supplied to g_dataset_foreach().
Enumeration representing a day of the week; %G_DATE_MONDAY, %G_DATE_TUESDAY, etc. %G_DATE_BAD_WEEKDAY is an invalid weekday.
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.
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.
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 @src_error to @dest_error.
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 *_get_private()
function.
Values corresponding to @errno codes returned from file operations on UNIX. Unlike @errno codes, GFileError values are available on all systems, even Windows. The exact meaning of each code depends on what sort of file operation you were performing; the UNIX documentation gives more details. The following error code descriptions come from the GNU C Library manual, and are under the copyright of that manual.
Flags to pass to g_file_set_contents_full() to affect its safety and performance.
Flags to modify the format of the string returned by g_format_size_full().
A GHashTableIter structure represents an iterator that can be used to iterate over the elements of a #GHashTable. GHashTableIter structures are typically allocated on the stack and then initialized with g_hash_table_iter_init().
Defines the type of a hook function that can be invoked by g_hook_list_invoke_check().
Defines the type of function used by g_hook_list_marshal_check().
Defines the type of function used to compare #GHook elements in g_hook_insert_sorted().
Defines the type of function to be called when a hook in a list of hooks gets finalized.
Defines the type of the function passed to g_hook_find().
Flags used internally in the #GHook implementation.
Defines the type of function used by g_hook_list_marshal().
Specifies the type of the function passed to g_hash_table_foreach_remove(). It is called with each key/value pair, together with the @user_data parameter passed to g_hash_table_foreach_remove(). It should return true if the key/value pair should be removed from the #GHashTable.
Error codes returned by #GIOChannel operations.
A bitwise combination representing a condition to watch for on an event source.
Specifies the type of function passed to g_io_add_watch() or g_io_add_watch_full(), which is called when the requested condition on a #GIOChannel is satisfied.
Error codes returned by key file parsing.
Flags which influence the parsing.
Flags specifying the level of log messages.
Writer function for log entries. A log entry is a collection of one or more #GLogFields, using the standard [field names from journal
Return values from #GLogWriterFuncs to indicate whether the given log entry was successfully handled by the writer, or whether there was an error in handling it (and hence a fallback writer should be used).
The GMainContext
struct is an opaque data type representing a set of sources to be handled in a main loop.
Flags to pass to g_main_context_new_with_flags() which affect the behaviour of a #GMainContext.
The #GMappedFile represents a file mapping created with g_mapped_file_new(). It has only private members and should not be accessed directly.
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 %G_MARKUP_COLLECT_OPTIONAL.
Error codes returned by markup parsing.
A parse context is used to parse a stream of bytes that you expect to contain marked-up text.
Flags that affect the behaviour of the parser.
Any of the fields in #GMarkupParser can be null, in which case they will be ignored. Except for the @error function, any of these callbacks can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT, %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT errors are intended to be set from these callbacks. If you set an error from a callback, g_markup_parse_context_parse() will report that error back to its caller.
A set of functions used to perform memory allocation. The same #GMemVTable must be used for all allocations in the same program; a call to g_mem_set_vtable(), if it exists, should be prior to any use of GLib.
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().
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 true, then the traversal is stopped.
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.
Error codes returned by functions converting a string to a number.
The possible statuses of a one-time initialization function controlled by a #GOnce struct.
The #GOptionArg enum values determine which type of extra argument the options expect to find. If an option expects an extra argument, it can be specified in several ways; with a short option: -x arg
, with a long option: --name arg
or combined in a single argument: --name=arg
.
A GOptionEntry struct defines a single option. To have an effect, they must be added to a #GOptionGroup with g_option_context_add_main_entries() or g_option_group_add_entries().
Error codes returned by option parsing.
Flags which modify individual options.
A GOptionGroup
struct defines the options in a single group. The struct has only private fields and should not be directly accessed.
A GPatternSpec struct is the 'compiled' form of a pattern. This structure is opaque and its fields cannot be accessed directly.
The #GPrivate struct is an opaque data structure to represent a thread-local data key. It is approximately equivalent to the pthread_setspecific()/pthread_getspecific() APIs on POSIX and to TlsSetValue()/TlsGetValue() on Windows.
The GRecMutex struct is an opaque data structure to represent a recursive mutex. It is similar to a #GMutex with the difference that it is possible to lock a GRecMutex multiple times in the same thread without deadlock. When doing so, care has to be taken to unlock the recursive mutex as often as it has been locked.
Flags specifying compile-time options.
Error codes returned by regular expressions functions.
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
Flags specifying match-time options.
Specifies the #GScanner parser configuration. Most settings can be changed during the parsing phase and will affect the lexical parsing of the next unpeeked token.
Specifies the type of the message handler function.
A #GSequenceIterCompareFunc is a function used to compare iterators. It must return zero if the iterators compare equal, a negative value if @a comes before @b, and a positive value if @b comes before @a.
Error codes returned by shell functions.
The GSourceCallbackFuncs
struct contains functions for managing callback objects.
Dispose function for @source. See g_source_set_dispose_function() for details.
This is just a placeholder for #GClosureMarshal, which cannot be used here for dependency reasons.
Specifies the type of function passed to g_timeout_add(), g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
The GSourceFuncs
struct contains a table of functions used to handle event sources in a generic manner.
Specifies the type of the setup function passed to g_spawn_async(), g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very limited ways, be used to affect the child's execution.
Error codes returned by spawning processes.
Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
The type used for test case functions that take an extra pointer argument.
The type of file to return the filename for, when used with g_test_build_filename().
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.
Specifies the prototype of fatal log handler functions.
Flags to pass to g_test_trap_subprocess() to control input and output.
Test traps are guards around forked tests. These flags determine what traps to set.
Possible errors of thread related functions.
The #GThreadPool struct represents a thread pool. It has three public read-only members, but the underlying struct is bigger, so you must not copy this struct.
Each piece of memory that is pushed onto the stack is cast to a GTrashStack*.
Specifies which nodes are visited during several of the tree functions, including g_node_traverse() and g_node_find().
Specifies the type of function passed to g_tree_traverse(). It is passed the key and value of each node, together with the @user_data parameter passed to g_tree_traverse(). If the function returns true, the traversal is stopped.
Specifies the type of function passed to g_tree_foreach_node(). It is passed each node, together with the @user_data parameter passed to g_tree_foreach_node(). If the function returns true, the traversal is stopped.
Specifies the type of traversal performed by g_tree_traverse(), g_node_traverse() and g_node_find(). The different orders are illustrated here:
These are the possible line break classifications.
The #GUnicodeScript enumeration identifies different writing systems. The values correspond to the names as defined in the Unicode standard. The enumeration has been added in GLib 2.14, and is interchangeable with #PangoScript.
These are the possible character classifications from the Unicode specification. See Unicode Character Database.
The type of functions to be called when a UNIX fd watch source triggers.
Flags describing what parts of the URI to hide in g_uri_to_string_partial(). Note that %G_URI_HIDE_PASSWORD and %G_URI_HIDE_AUTH_PARAMS will only work if the #GUri was parsed with the corresponding flags.
Flags modifying the way parameters are handled by g_uri_parse_params() and #GUriParamsIter.
Many URI schemes include one or more attribute/value pairs as part of the URI value. For example scheme://server/path?query=string&is=there
has two attributes – query=string
and is=there
– in its query part.
These are logical ids for special directories which are defined depending on the platform used. You should use g_get_user_special_dir() to retrieve the full path associated to the logical id.
A utility type for constructing container-type #GVariant instances.
The range of possible top-level types of #GVariant instances.
#GVariantDict is a mutable interface to #GVariant dictionaries.
Error codes returned by parsing text-format GVariants.
This section introduces the GVariant type system. It is based, in large part, on the D-Bus type system, with two major changes and some minor lifting of restrictions. The D-Bus specification, therefore, provides a significant amount of information that is useful when working with GVariant.