Package-level declarations
Types
Contains the public fields of a GArray.
An opaque data structure which represents an asynchronous queue.
GBookmarkFile
lets you parse, edit or create files containing bookmarks.
Error codes returned by bookmark file parsing.
Contains the public fields of a GByteArray.
A simple refcounted data type representing an immutable sequence of zero or more bytes from an unspecified origin.
A GCache
allows sharing of complex data structures, in order to save system resources.
Specifies the type of the @value_destroy_func and @key_destroy_func functions passed to g_cache_new(). The functions are passed a pointer to the #GCache key or #GCache value and should free any memory and other resources associated with it.
Specifies the type of the @key_dup_func function passed to g_cache_new(). The function is passed a key (not a value as the prototype implies) and should return a duplicate of the key.
Specifies the type of the @value_new_func function passed to g_cache_new(). It is passed a #GCache key and should create the value corresponding to the key.
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.
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 func@GLib.clear_handle_id The implementation is expected to free the resource identified by @handle_id; for instance, if @handle_id is a struct@GLib.Source ID, func@GLib.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.
GCompletion
provides support for automatic completion of a string using any group of target strings. It is typically used for file name completion as is common in many UNIX shells.
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 #GCompletion items.
Specifies the type of the function passed to g_completion_set_compare(). This is used when you use strings as #GCompletion items.
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.
An opaque data structure that represents a keyed data list.
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().
GDate
is a struct for calendrical calculations.
GDateTime
is a structure that combines a Gregorian date and time into a single structure.
Enumeration representing a day of the week; %G_DATE_MONDAY, %G_DATE_TUESDAY, etc. %G_DATE_BAD_WEEKDAY is an invalid weekday.
Associates a string with a bit flag. Used in g_parse_debug_string().
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.
An opaque structure representing an opened directory.
The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign, mantissa and exponent of IEEE floats and doubles. These unions are defined as appropriate for a given platform. IEEE floats and doubles are supported (used for storage) by at least Intel, PPC and Sparc.
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 @data is a ref-counted object.
Specifies the type of a function used to test two values for equality. The function should return true if both values are equal and false otherwise.
The GError
structure contains information about an error that has occurred.
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.
The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign, mantissa and exponent of IEEE floats and doubles. These unions are defined as appropriate for a given platform. IEEE floats and doubles are supported (used for storage) by at least Intel, PPC and Sparc.
Flags to modify the format of the string returned by g_format_size_full().
The #GHashTable struct is an opaque data structure to represent a glib-Hash-Tables. It should only be accessed via the following functions.
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().
The #GHook struct represents a single hook function in a #GHookList.
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.
The #GHookList struct represents a list of hook functions.
Defines the type of function used by g_hook_list_marshal().
The GIConv struct wraps an iconv() conversion descriptor. It contains private data and should only be accessed using the following functions.
The GIOChannel
data type aims to provide a portable method for using file descriptors, pipes, and sockets, and integrating them into the main event loop (see struct@GLib.MainContext). Currently, full support is available on UNIX platforms; support for Windows is only partially complete.
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.
A table of functions used to handle different types of #GIOChannel in a generic way.
GKeyFile
parses .ini-like config files.
Error codes returned by key file parsing.
Flags which influence the parsing.
The #GList struct is used for each element in a doubly-linked list.
Structure representing a single field in a structured log entry. See g_log_structured() for details.
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 ctor@GLib.MainContext.new_with_flags which affect the behaviour of a struct@GLib.MainContext.
Opaque type. See g_main_context_pusher_new() for details.
The GMainLoop
struct is an opaque data type representing the main event loop of a GLib or GTK application.
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 GMatchInfo is an opaque struct used to return information about matches.
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.
The #GMutex struct is an opaque data structure to represent a mutex (mutual exclusion). It can be used to protect data against shared access.
Opaque type. See g_mutex_locker_new() for details.
The #GNode struct represents one node in a glib-N-ary-Trees.
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.
A #GOnce struct controls a one-time initialization function. Any one-time initialization function must have its own unique #GOnce struct.
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 GOptionContext
struct defines which options are accepted by the commandline option parser. The struct has only private fields and should not be directly accessed.
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.
GPathBuf
is a helper type that allows you to easily build paths from individual elements, using the platform specific conventions for path separators.
A GPatternSpec
struct is the ‘compiled’ form of a glob-style pattern.
Represents a file descriptor, which events to poll for, and which events occurred.
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.
Contains the public fields of a pointer array.
Contains the public fields of a glib-Double-ended-Queues.
The GRand struct is an opaque data structure. It should only be accessed through the g_rand_* functions.
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.
Opaque type. See g_rec_mutex_locker_new() for details.
A typedef for a reference-counted string. A pointer to a #GRefString can be treated like a standard char*
array by all code, but can additionally have g_ref_string_*()
methods called on it. g_ref_string_*()
methods cannot be called on char*
arrays not allocated using g_ref_string_new().
A GRegex
is the "compiled" form of a regular expression pattern.
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.
A GRelation
is a table of data which can be indexed on any number of fields, rather like simple database tables. A GRelation
contains a number of records, called tuples. Each record contains a number of fields. Records are not ordered, so it is not possible to find the record at a particular index.
The GRWLock struct is an opaque data structure to represent a reader-writer lock. It is similar to a #GMutex in that it allows multiple threads to coordinate access to a shared resource.
Opaque type. See g_rw_lock_reader_locker_new() for details.
Opaque type. See g_rw_lock_writer_locker_new() for details.
GScanner
provides a general-purpose lexical scanner.
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.
The #GSequence struct is an opaque data type representing a glib-Sequences data type.
The #GSequenceIter struct is an opaque data type representing an iterator pointing into a #GSequence.
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 #GSList struct is used for each element in the singly-linked list.
The GSource
struct is an opaque data type representing an event source.
The GSourceCallbackFuncs
struct contains functions for managing callback objects.
Dispose function for @source. See method@GLib.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 func@GLib.timeout_add, func@GLib.timeout_add_full, func@GLib.idle_add, and func@GLib.idle_add_full.
The GSourceFuncs
struct contains a table of functions used to handle event sources in a generic manner.
Checks if the source is ready to be dispatched.
Dispatches the source callback.
Finalizes the source.
Checks the source for readiness.
A source function that is only called once before being removed from the main context automatically.
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().
A type corresponding to the appropriate struct type for the stat() system call, depending on the platform and/or compiler being used.
A #GStaticMutex works like a #GMutex.
A #GStaticRecMutex works like a #GStaticMutex, but it can be locked multiple times by one thread. If you enter it n times, you have to unlock it n times again to let other threads lock it. An exception is the function g_static_rec_mutex_unlock_full(): that allows you to unlock a #GStaticRecMutex completely returning the depth, (i.e. the number of times this mutex was locked). The depth can later be used to restore the state of the #GStaticRecMutex by calling g_static_rec_mutex_lock_full(). In GLib 2.32, #GStaticRecMutex has been deprecated in favor of #GRecMutex.
The #GStaticRWLock struct represents a read-write lock. A read-write lock can be used for protecting data that some portions of code only read from, while others also write. In such situations it is desirable that several readers can read at once, whereas of course only one writer may write at a time.
A GString
is an object that handles the memory management of a C string.
GStringChunk
provides efficient storage of groups of strings
GStrvBuilder
is a helper object to build a null-terminated string arrays.
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.
The #GThread struct represents a running thread. This struct is returned by g_thread_new() or g_thread_try_new(). You can obtain the #GThread struct representing the current thread by calling g_thread_self().
Possible errors of thread related functions.
Specifies the type of the @func functions passed to g_thread_new() or g_thread_try_new().
This function table is no longer used by g_thread_init() to initialize the thread system.
The GThreadPool
struct represents a thread pool.
Thread priorities.
GTimer
records a start time, and counts microseconds elapsed since that time.
Represents a precise time, with seconds and microseconds.
A GTimeZone
represents a time zone, at no particular point in time.
A union holding the value of the token.
The type of functions which are used to translate user-visible strings, for output.
A GTrashStack
is an efficient way to keep a stack of unused allocated memory chunks. Each memory chunk is required to be large enough to hold a gpointer
. This allows the stack to be maintained without any space overhead, since the stack pointers can be stored inside the memory chunks.
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 GTree struct is an opaque data structure representing a glib-Balanced-Binary-Trees. It should be accessed only by using the following functions.
An opaque type which identifies a specific node in a #GTree.
The #GTuples struct is used to return records (or tuples) from the #GRelation by g_relation_select(). It only contains one public member - the number of records that matched. To access the matched records, you must use g_tuples_index().
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.
A Unix pipe. The advantage of this type over int[2]
is that it can be closed automatically when it goes out of scope, using g_auto(GUnixPipe)
, on compilers that support that feature.
Mnemonic constants for the ends of a Unix pipe.
The GUri
type and related functions can be used to parse URIs into their components, and build valid URIs from individual components.
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.
GVariant
is a variant datatype; it can contain one or more values along with information about the type of the values.
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.
#GVariantIter is an opaque data structure and can only be accessed using the following functions.
Error codes returned by parsing text-format GVariants.
A type in the type@GLib.Variant type system.