glib-2.0
Description:
GLib provides the core application building blocks for libraries and applications written in C. It provides the core object system used in GNOME, the main loop implementation, and a large set of utility functions for strings and common data structures.
- Home: https://www.gtk.org/
- C-Documentation: https://docs.gtk.org/glib/
- Devhelp-Package download
- Example listing
Content:
Namespaces:
- GLib
- Array - Contains the public fields of a GArray.
- AsyncQueue - An opaque data structure which represents an asynchronous queue.
- BookmarkFile - `GBookmarkFile` lets you parse, edit or create files containing bookmarks.
- BusName
- ByteArray - Contains the public fields of a GByteArray.
- Bytes - A simple refcounted data type representing an immutable sequence of zero or more bytes from an unspecified origin.
- 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.
- ChildWatchSource
- Completion - `GCompletion` provides support for automatic completion of a string using any group of target strings.
- DateTime - `GDateTime` is a structure that combines a Gregorian date and time into a single structure.
- Dir - An opaque structure representing an opened directory.
- Error - The `GError` structure contains information about an error that has occurred.
- FileStream - Used to control a I/O stream
- GenericArray - Contains the public fields of a pointer array.
- GenericSet - The GenericSet struct is an opaque data structure to represent a Hash Table.
- HashTable -
- Hmac - HMACs should be used when producing a cookie or hash based on data and a key.
- IOChannel - 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.
- IOSource
- IdleSource
- KeyFile - `GKeyFile` parses .
- List - The List struct is used for each element in a doubly-linked list.
- MainContext - The `GMainContext` struct is an opaque data type representing a set of sources to be handled in a main loop.
- MainContextPusher - Opaque type.
- MainLoop - The `GMainLoop` struct is an opaque data type representing the main event loop of a GLib or GTK application.
- MappedFile - The MappedFile represents a file mapping created with MappedFile.
- MarkupParseContext - A parse context is used to parse a stream of bytes that you expect to contain marked-up text.
- MatchInfo - A GMatchInfo is an opaque struct used to return information about matches.
- MemVTable - A set of functions used to perform memory allocation.
- MutexLocker - Opaque type.
- Node - The Node struct represents one node in a n-ary tree.
- ObjectPath
- OptionContext - A `GOptionContext` struct defines which options are accepted by the commandline option parser.
- OptionGroup - A `GOptionGroup` struct defines the options in a single group.
- PathBuf - `GPathBuf` is a helper type that allows you to easily build paths from individual elements, using the platform specific conventions for path separators.
- PatternSpec - A `GPatternSpec` struct is the 'compiled' form of a glob-style pattern.
- Private
- PtrArray -
- Queue - Contains the public fields of a Queue.
- RWLockReaderLocker - Opaque type.
- RWLockWriterLocker - Opaque type.
- Rand - The GRand struct is an opaque data structure.
- RecMutexLocker - Opaque type.
- RefString - A typedef for a reference-counted string.
- Regex - A `GRegex` is the "compiled" form of a regular expression pattern.
- SList - The SList struct is used for each element in the singly-linked list.
- Scanner - `GScanner` provides a general-purpose lexical scanner.
- Sequence - The Sequence struct is an opaque data type representing a sequence data type.
- SequenceIter - The SequenceIter struct is an opaque data type representing an iterator pointing into a Sequence.
- Source
- SourceCallbackFuncs - The `GSourceCallbackFuncs` struct contains functions for managing callback objects.
- StringBuilder - A `GString` is an object that handles the memory management of a C string.
- StringChunk - `GStringChunk` provides efficient storage of groups of strings
- StrvBuilder - `GStrvBuilder` is a helper object to build a null-terminated string arrays.
- TestCase - An opaque structure representing a test case.
- TestSuite - An opaque structure representing a test suite.
- Thread - The Thread struct represents a running thread.
- ThreadPool - The `GThreadPool` struct represents a thread pool.
- TimeZone - A `GTimeZone` represents a time zone, at no particular point in time.
- TimeoutSource -
- Timer - `GTimer` records a start time, and counts microseconds elapsed since that time.
- Tree - The GTree struct is an opaque data structure representing a balanced binary tree.
- TreeNode - An opaque type which identifies a specific node in a Tree.
- Uri - The `GUri` type and related functions can be used to parse URIs into their components, and build valid URIs from individual components.
- Variant - `GVariant` is a variant datatype; it can contain one or more values along with information about the type of the values.
- VariantBuilder - A utility type for constructing container-type Variant instances.
- VariantDict - VariantDict is a mutable interface to Variant dictionaries.
- VariantIter - VariantIter is an opaque data structure and can only be accessed using the following functions.
- VariantType - A type in the [type@GLib.
- Cond - The Cond struct is an opaque data structure that represents a condition.
- Datalist
- Date - `GDate` is a struct for calendrical calculations.
- DateDay - Integer representing a day of the month; between 1 and 31.
- DateYear - Integer type representing a year.
- DebugKey - Associates a string with a bit flag.
- GenericSetIter - A GHashTableIter structure represents an iterator that can be used to iterate over the elements of a GenericSet .
- HashTableIter -
- IConv - The GIConv struct wraps an
iconv
conversion descriptor. - LogField - Structure representing a single field in a structured log entry.
- MarkupParser - Any of the fields in MarkupParser can be null, in which case they will be ignored.
- Mutex - The Mutex struct is an opaque data structure to represent a mutex (mutual exclusion).
- Once - A Once struct controls a one-time initialization function.
- OptionEntry - A GOptionEntry struct defines a single option.
- Pid - A type which is used to hold a process identification.
- PollFD - Represents a file descriptor, which events to poll for, and which events occurred.
- Quark - A GQuark is a non-zero integer which uniquely identifies a particular string.
- RWLock - The GRWLock struct is an opaque data structure to represent a reader-writer lock.
- RecMutex - The GRecMutex struct is an opaque data structure to represent a recursive mutex.
- ScannerConfig - Specifies the Scanner parser configuration.
- SourceFuncs - The `GSourceFuncs` struct contains a table of functions used to handle event sources in a generic manner.
- Stat - A type corresponding to the appropriate struct type for the stat system call, depending on the platform and/or compiler being used.
- StaticMutex - A StaticMutex works like a Mutex.
- StaticPrivate
- StaticRWLock - The StaticRWLock struct represents a read-write lock.
- StaticRecMutex - A StaticRecMutex works like a StaticMutex, but it can be locked multiple times by one thread.
- Time - Structure holding a calendar date and time broken down into its components.
- TimeSpan - A value representing an interval of time, in microseconds.
- TimeVal - Represents a precise time, with seconds and microseconds.
- TokenValue - A union holding the value of the token.
- UTimBuf - Specifies access and modification times for a files
- UriParamsIter - Many URI schemes include one or more attribute/value pairs as part of the URI value.
- pointer
- ByteOrder
- ChecksumType - The hashing algorithm to be used by Checksum when performing the digest of some data.
- CompareOperator - Comparison operators for use with GLib.assert_cmp*() functions
- 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 g_date_january, g_date_february, etc.
- DateWeekday - Enumeration representing a day of the week; g_date_monday, g_date_tuesday, etc.
- ErrorType - The possible errors, used in the
v_error
field of TokenValue, when the token is a g_token_error. - FileSeek
- FileSetContentsFlags - Flags to pass to set_contents_full to affect its safety and performance.
- FileTest - A test to perform on a file using test.
- FormatSizeFlags - Flags to modify the format of the string returned by format_size.
- IOCondition - A bitwise combination representing a condition to watch for on an event source.
- IOFlags - Specifies properties of a IOChannel.
- IOStatus - Statuses returned by most of the IOFuncs functions.
- KeyFileFlags - Flags which influence the parsing.
- LocaleCategory
- LogLevelFlags - Flags specifying the level of log messages.
- LogWriterOutput - Return values from LogWriterFuncs 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).
- MainContextFlags - Flags to pass to MainContext.with_flags which affect the behaviour of a MainContext.
- MarkupParseFlags - Flags that affect the behaviour of the parser.
- 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.
- OnceStatus - The possible statuses of a one-time initialization function controlled by a Once struct.
- OptionArg - The OptionArg enum values determine which type of extra argument the options expect to find.
- OptionFlags - Flags which modify individual options.
- ProcessSignal
- RegexCompileFlags - Flags specifying compile-time options.
- RegexMatchFlags - Flags specifying match-time options.
- SeekType - An enumeration specifying the base position for a seek_position operation.
- SliceConfig
- SpawnFlags - Flags passed to spawn_sync, spawn_async and spawn_async_with_pipes.
- TestSubprocessFlags - Flags to pass to trap_subprocess to control input and output.
- TestTrapFlags - Test traps are guards around forked tests.
- ThreadPriority - Thread priorities.
- TimeType - Disambiguates a given time in two ways.
- TokenType - The possible types of token returned from each get_next_token call.
- TraverseFlags - Specifies which nodes are visited during several of the tree functions, including traverse and find.
- TraverseType - Specifies the type of traversal
performed by
g_tree_traverse
, traverse and find. - UnicodeBreakType - These are the possible line break classifications.
- UnicodeScript - The UnicodeScript enumeration identifies different writing systems.
- UnicodeType - These are the possible character classifications from the Unicode specification.
- UriFlags - Flags that describe a URI.
- UriHideFlags - Flags describing what parts of the URI to hide in to_string_partial.
- UriParamsFlags - Flags modifying the way parameters are handled by parse_params and UriParamsIter.
- UserDirectory - These are logical ids for special directories which are defined depending on the platform used.
- BookmarkFileError - Error codes returned by bookmark file parsing.
- ConvertError - Error codes returned by character set conversion routines.
- FileError - Values corresponding to
errno
codes returned from file operations on UNIX. - IOChannelError - Error codes returned by IOChannel operations.
- 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.
- OptionError - Error codes returned by option parsing.
- RegexError - Error codes returned by regular expressions functions.
- 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 Uri methods.
- VariantParseError - Error codes returned by parsing text-format GVariants.
- public const ByteOrder BYTE_ORDER
- public const string OPTION_REMAINING
If a long option in the main group has this name, it is not treated as a regular option.
- public delegate bool ArraySearchFunc<G,T> (G element, T needle)
Specifies the type of a function used to test two values for equality.
- public delegate void ChildWatchFunc (Pid pid, int wait_status)
Prototype of a
GChildWatchSource
callback, called when a child process has exited. - public delegate int CompareDataFunc<G> (G a, G b)
Specifies the type of a comparison function used to compare two values.
- public delegate int CompareFunc<G> (G a, G b)
- public delegate string CompletionFunc (void* item)
Specifies the type of the function passed to Completion.
- public delegate int CompletionStrncmpFunc (string s1, string s2, size_t n)
Specifies the type of the function passed to
g_completion_set_compare
. - public delegate G CopyFunc<G> (G src)
A function of this signature is used to copy the node data when doing a deep-copy of a tree.
- public delegate void DataForeachFunc<G> (Quark key_id, G data)
Specifies the type of function passed to
g_dataset_foreach
. - public delegate void DestroyNotify (void* data)
Specifies the type of function which is called when a data element is destroyed.
- public delegate G DuplicateFunc<G> (G data)
The type of functions that are used to 'duplicate' an object.
- public delegate bool EqualFunc<G> (G a, G b)
- public delegate bool EqualFuncFull<G> (G a, G b)
Specifies the type of a function used to test two values for equality.
- public delegate void FreeFunc (void* data)
Declares a type of function which takes an arbitrary data pointer argument and has no return value.
- public delegate void Func<G> (G data)
- public delegate void HFunc<K,V> (K key, V value)
Specifies the type of the function passed to for_each.
- public delegate bool HRFunc<K,V> (K key, V value)
Specifies the type of the function passed to foreach_remove.
- public delegate uint HashFunc<K> (K key)
Specifies the type of the hash function which is passed to
g_hash_table_new
when a GenericSet is created. - public delegate bool IOFunc (IOChannel source, IOCondition condition)
Specifies the type of function passed to add_watch or add_watch_full, which is called when the requested condition on a IOChannel is satisfied.
- public delegate void LogFunc (string? log_domain, LogLevelFlags log_levels, string message)
Specifies the prototype of log handler functions.
- public delegate LogWriterOutput LogWriterFunc (LogLevelFlags log_level, LogField[] fields)
Writer function for log entries.
- public delegate void MarkupParserEndElementFunc (MarkupParseContext context, string element_name) throws MarkupError
- public delegate void MarkupParserErrorFunc (MarkupParseContext context, Error error)
- public delegate void MarkupParserPassthroughFunc (MarkupParseContext context, string passthrough_text, size_t text_len) throws MarkupError
- public delegate void MarkupParserStartElementFunc (MarkupParseContext context, string element_name, string[] attribute_names, string[] attribute_values) throws MarkupError
- public delegate void MarkupParserTextFunc (MarkupParseContext context, string text, size_t text_len) throws MarkupError
- public delegate void NodeForeachFunc<G> (Node<G> node)
Specifies the type of function passed to children_foreach.
- public delegate bool NodeTraverseFunc<G> (Node<G> node)
Specifies the type of function passed to traverse.
- public delegate G OnceFunc<G> ()
Specifies the type of the
func
functions passed to Thread or Thread.try. - public delegate bool OptionArgFunc (string option_name, string val, void* data) throws OptionError
The type of function to be passed as callback for g_option_arg_callback options.
- public delegate void OptionErrorFunc (OptionContext context, OptionGroup group, void* data, ref Error error)
The type of function to be used as callback when a parse error occurs.
- public delegate bool OptionParseFunc (OptionContext context, OptionGroup group, void* data) throws OptionError
The type of function that can be called before and after parsing.
- public delegate int PollFunc (PollFD[] ufds, int timeout_)
Specifies the type of function passed to set_poll_func.
- public delegate void PrintFunc (string text)
Specifies the type of the print handler functions.
- public delegate bool RegexEvalCallback (MatchInfo match_info, StringBuilder result)
Specifies the type of the function passed to replace_eval.
- public delegate void ScannerMsgFunc (Scanner scanner, string message, bool error)
Specifies the type of the message handler function.
- public delegate int SearchFunc<G,T> (G a, T b)
Specifies the type of a comparison function used to compare two values.
- public delegate int SequenceIterCompareFunc<G> (SequenceIter<G> a, SequenceIter<G> b)
A SequenceIterCompareFunc is a function used to compare iterators.
- public delegate void SignalHandlerFunc (int signum)
- public delegate void SourceCallbackGetFunc (void* cb_data, Source source, SourceFunc func)
- public delegate void SourceCallbackRefFunc (void* cb_data)
- public delegate void SourceCallbackUnrefFunc (void* cb_data)
- public delegate bool SourceCheckFunc (Source source)
- public delegate bool SourceDispatchFunc (Source source, SourceFunc? _callback)
- public delegate void SourceDisposeFunc (Source source)
Dispose function for
source
. - public delegate void SourceDummyMarshal ()
This is just a placeholder for ClosureMarshal, which cannot be used here for dependency reasons.
- public delegate void SourceFinalizeFunc (Source source)
- public delegate bool SourceFunc ()
- public delegate void SourceOnceFunc ()
A source function that is only called once before being removed from the main context automatically.
- public delegate bool SourcePrepareFunc (Source source, out int timeout_)
- public delegate void SpawnChildSetupFunc ()
Specifies the type of the setup function passed to spawn_async, spawn_sync and spawn_async_with_pipes, which can, in very limited ways, be used to affect the child's execution.
- public delegate void TestDataFunc ()
The type used for test case functions that take an extra pointer argument.
- public delegate void TestFixtureFunc (void* fixture)
The type used for functions that operate on test fixtures.
- public delegate void TestFunc ()
The type used for test case functions.
- public delegate G ThreadFunc<G> ()
- public delegate void ThreadPoolFunc<G> (owned G data)
- public delegate unowned string TranslateFunc (string str)
The type of functions which are used to translate user-visible strings, for <option>--help</option> output.
- public delegate bool TraverseFunc<K,V> (K key, V value)
Specifies the type of function passed to
g_tree_traverse
. - public delegate bool TraverseNodeFunc<K,V> (TreeNode<K,V> node)
Specifies the type of function passed to foreach_node.
- public delegate int TreeSearchFunc<K> (K key)
- public delegate void VoidFunc ()
Declares a type of function which takes no arguments and has no return value.
- public unowned string C_ (string context, string str)
- public unowned string NC_ (string context, string str)
- public unowned string N_ (string str)
- public unowned string Q_ (string str)
- public unowned string _ (string str)
- public void assert (bool expr)
- public void assert_cmpfloat (double n1, CompareOperator cmp, double n2)
- public void assert_cmpfloat_with_epsilon (double n1, double n2, double epsilon)
- public void assert_cmphex (uint n1, CompareOperator cmp, uint n2)
- public void assert_cmpint (int n1, CompareOperator cmp, int n2)
- public void assert_cmpmem (uint8[] m1, uint8[] m2)
- public void assert_cmpstr (string? s1, CompareOperator cmp, string? s2)
- public void assert_cmpstrv (string[] strv1, string[] strv2)
- public void assert_cmpuint (uint n1, CompareOperator cmp, uint n2)
- public void assert_cmpvariant (Variant v1, Variant v2)
- public void assert_error (Error? error, Quark error_domain, int error_code)
- public void assert_false (bool expr)
- public void assert_no_error (Error? error)
- public void assert_nonnull (void* expr)
- public void assert_not_reached ()
- public void assert_null (void* expr)
- public void assert_true (bool expr)
- public void breakpoint ()
- public string convert (string str, ssize_t len, string to_codeset, string from_codeset, out size_t bytes_read = null, out size_t bytes_written = null) throws ConvertError
Converts a string from one character set to another.
- public string convert_with_fallback (string str, ssize_t len, string to_codeset, string from_codeset, string? fallback = null, out size_t bytes_read = null, out size_t bytes_written = null) throws ConvertError
Converts a string from one character set to another, possibly including fallback sequences for characters not representable in the output.
- public string convert_with_iconv (string str, ssize_t len, IConv converter, out size_t bytes_read = null, out size_t bytes_written = null) throws ConvertError
Converts a string from one character set to another.
- public void critical (string format, ...)
- public unowned string dcgettext (string? domain, string msgid, int category)
This is a variant of dgettext that allows specifying a locale category instead of always using `LC_MESSAGES`.
- public void debug (string format, ...)
- public void debug_here ()
- public unowned string dgettext (string? domain, string msgid)
This function is a wrapper of dgettext which does not translate the message if the default domain as set with textdomain has no translations for the current locale.
- public unowned string dngettext (string? domain, string msgid, string msgid_plural, ulong n)
This function is a wrapper of
dngettext
which does not translate the message if the default domain as set with textdomain has no translations for the current locale. - public unowned string dpgettext (string? domain, string msgctxid, size_t msgidoffset)
This function is a variant of dgettext which supports a disambiguating message context.
- public unowned string dpgettext2 (string? domain, string context, string msgid)
This function is a variant of dgettext which supports a disambiguating message context.
- public void error (string format, ...)
- public string format_size (uint64 size, FormatSizeFlags flags = DEFAULT)
Formats a size.
- public string format_size_for_display (int64 size)
Formats a size (for example the size of a file) into a human readable string.
- public void free (void* mem)
- public void free_sized (void* mem, size_t size)
Frees the memory pointed to by
mem
, assuming it is has the givensize
. - public bool get_charset (out unowned string charset)
Obtains the character set for the current locale; you might use this character set as an argument to convert, to convert from the current locale's encoding to some other encoding.
- public bool get_console_charset (out unowned string charset)
Obtains the character set used by the console attached to the process, which is suitable for printing output to the terminal.
- public bool get_filename_charsets (out unowned string[] charsets)
Determines the preferred character sets used for filenames.
- public int64 get_monotonic_time ()
Queries the system monotonic time.
- public uint get_num_processors ()
Determine the approximate number of threads that the system will schedule simultaneously for this process.
- public int64 get_real_time ()
Queries the system wall-clock time.
- public unowned string gettext (string str)
- public void info (string format, ...)
- public bool likely (bool expression)
- public void log (string? log_domain, LogLevelFlags log_level, string format, ...)
Logs an error or debugging message.
- public void log_structured (string? log_domain, LogLevelFlags log_levels, ...)
Log a message with structured data.
- public void log_structured_array (LogLevelFlags log_levels, LogField[] fields)
Log a message with structured data.
- public void log_variant (string? log_domain, LogLevelFlags log_levels, Variant fields)
Log a message with structured data, accepting the data within a [ type@GLib.
- public void logv (string? log_domain, LogLevelFlags log_level, string format, va_list args)
Logs an error or debugging message.
- public void* malloc (size_t n_bytes)
Allocates
n_bytes
bytes of memory. - public void* malloc0 (size_t n_bytes)
Allocates
n_bytes
bytes of memory, initialized to 0's. - public bool mem_is_system_malloc ()
Checks whether the allocator used by malloc is the system's malloc implementation.
- public void mem_profile ()
GLib used to support some tools for memory profiling, but this no longer works.
- public void mem_set_vtable (MemVTable vtable)
This function used to let you override the memory allocation function.
- public void message (string format, ...)
- public unowned string ngettext (string msgid, string msgid_plural, ulong n)
- public void on_error_query (string? prg_name = null)
Prompts the user with `[E]xit, [H]alt, show [S]tack trace or [P]roceed`.
- public void on_error_stack_trace (string? prg_name = null)
Invokes gdb, which attaches to the current process and shows a stack trace.
- public uint parse_debug_string (string? debug_string, DebugKey[] keys)
Parses a string containing debugging options into a guint containing bit flags.
- public int poll (PollFD[] fds, int timeout)
Polls
fds
, as with the poll system call, but portably. - public void print (string format, ...)
Outputs a formatted message via the print handler.
- public void printerr (string format, ...)
Outputs a formatted message via the error message handler.
- public void qsort_with_data<T> (T[] elems, size_t size, CompareDataFunc<T> compare_func)
- public void* realloc (void* mem, size_t n_bytes)
Reallocates the memory pointed to by
mem
, so that it now has space forn_bytes
bytes of memory. - public void return_if_fail (bool expr)
- public void return_if_reached ()
- public void return_val_if_fail (bool expr, ...)
- public void return_val_if_reached (...)
- public void set_print_handler (PrintFunc func)
Sets the print handler to
func
, or resets it to the default GLib handler if `NULL`. - public void set_printerr_handler (PrintFunc func)
Sets the handler for printing error messages to
func
, or resets it to the default GLib handler if `NULL`. - public void static_assert (bool expression)
- public string strdup (string str)
Duplicates a string.
- public string[] strdupv (string[] str_array)
Copies an array of strings.
- public unowned string strerror (int errnum)
Returns a string corresponding to the given error code, e.
- public void strfreev (owned string[] str_array)
Frees an array of strings, as well as each string it contains.
- public unowned string strsignal (int signum)
Returns a string describing the given signal, e.
- public bool strv_contains (string[] str_array, string str)
Checks if an array of strings contains the string
str
according to [func@GLib. - public uint strv_length (string[] str_array)
Returns the length of an array of strings.
- public void* try_malloc (size_t n_bytes)
Attempts to allocate
n_bytes
, and returns null on failure. - public void* try_malloc0 (size_t n_bytes)
Attempts to allocate
n_bytes
, initialized to 0's, and returns null on failure. - public void* try_realloc (void* mem, size_t n_bytes)
Attempts to realloc
mem
to a new size,n_bytes
, and returns null on failure. - public bool unlikely (bool expression)
- public void warn_if_fail (bool expr)
- public void warn_if_reached ()
- public void warning (string format, ...)
- public void warning_once (string format, ...)
- public EqualFunc<void*> direct_equal
Compares two pointer arguments and returns true if they are equal.
- public HashFunc<void*> direct_hash
Converts a gpointer to a hash value.
- public EqualFunc<double?> double_equal
Compares the two double values being pointed to and returns true if they are equal.
- public HashFunc<double?> double_hash
Converts a pointer to a double to a hash value.
- public int errno
A preprocessor macro that expands to a thread-local modifiable lvalue of type int.
- public DestroyNotify g_free
Frees the memory pointed to by
mem
. - public DestroyNotify g_list_free
- public DestroyNotify g_variant_unref
- public EqualFunc<int64?> int64_equal
Compares the two int64 values being pointed to and returns true if they are equal.
- public HashFunc<int64?> int64_hash
Converts a pointer to a int64 to a hash value.
- public EqualFunc<int?> int_equal
Compares the two int values being pointed to and returns true if they are equal.
- public HashFunc<int?> int_hash
Converts a pointer to a int to a hash value.
- public MemVTable mem_profiler_table
- public FileStream stderr
The error stream
- public FileStream stdin
The input stream
- public FileStream stdout
The output stream
- public EqualFunc<string> str_equal
Compares two strings for byte-by-byte equality and returns true if they are equal.
- public HashFunc<string> str_hash
Converts a string to a hash value.
- public CompareFunc<string?> strcmp
- public EqualFunc<string[]> strv_equal
- Aligned
- public void* alloc (size_t n_blocks, size_t n_blocks_bytes, size_t alignment)
This function is similar to malloc, allocating (
n_blocks
*n_block_bytes
) bytes, but care is taken to align the allocated memory to with the given alignment value. - public void* alloc0 (size_t n_blocks, size_t n_blocks_bytes, size_t alignment)
This function is similar to alloc, but it will also clear the allocated memory before returning it.
- public void free (void* mem)
Frees the memory allocated by alloc.
- public void free_sized (void* mem, size_t alignment, size_t size)
Frees the memory pointed to by
mem
, assuming it is has the givensize
andalignment
. - AtomicInt
- public int @get (ref int atomic)
- public void @set (ref int atomic, int newval)
- public int add (ref int atomic, int val)
- public bool compare_and_exchange (ref int atomic, int oldval, int newval)
- public bool compare_and_exchange_full (ref int atomic, int oldval, int newval, out int preval)
- public bool dec_and_test (ref int atomic)
- public int exchange (ref int atomic, int newval)
- public int exchange_and_add (ref int atomic, int val)
- public void inc (ref int atomic)
- AtomicPointer
- public void* @get (void** atomic)
Gets the current value of
atomic
. - public void @set (void** atomic, void* newval)
Sets the value of
atomic
tonewval
. - public bool compare_and_exchange (void** atomic, void* oldval, void* newval)
Compares
atomic
tooldval
and, if equal, sets it tonewval
. - public bool compare_and_exchange_full (void** atomic, void* oldval, void* newval, out void* preval)
Compares
atomic
tooldval
and, if equal, sets it tonewval
. - AtomicUint
- public uint @get (ref uint atomic)
Gets the current value of
atomic
. - public void @set (ref uint atomic, uint newval)
Sets the value of
atomic
tonewval
. - public uint add (ref uint atomic, uint val)
Atomically adds
val
to the value ofatomic
. - public bool compare_and_exchange (ref uint atomic, uint oldval, uint newval)
Compares
atomic
tooldval
and, if equal, sets it tonewval
. - public bool compare_and_exchange_full (ref uint atomic, uint oldval, uint newval, out uint preval)
Compares
atomic
tooldval
and, if equal, sets it tonewval
. - public bool dec_and_test (ref uint atomic)
Decrements the value of
atomic
by 1. - public uint exchange (ref uint atomic, uint newval)
Sets the
atomic
tonewval
and returns the old value fromatomic
. - public uint exchange_and_add (ref uint atomic, uint val)
This function existed before add returned the prior value of the integer (which it now does).
- public void inc (ref uint atomic)
Increments the value of
atomic
by 1. - Base64
- public uchar[] decode (string text)
Decode a sequence of Base-64 encoded text into binary data.
- public size_t decode_step (char[] _in, uchar* _out, ref int state, ref uint save)
Incrementally decode a sequence of binary data from its Base-64 stringified representation.
- public string encode (uchar[] data)
Encode a sequence of binary data into its Base-64 stringified representation.
- public size_t encode_close (bool break_lines, char* _out, ref int state, ref int save)
Flush the status from a sequence of calls to encode_step.
- public size_t encode_step (uchar[] _in, bool break_lines, char* _out, ref int state, ref int save)
Incrementally encode a sequence of binary data into its Base-64 stringified representation.
- Bit
- public int nth_lsf (ulong mask, int nth_bit)
Find the position of the first bit set in
mask
, searching from (but not including)nth_bit
upwards. - public int nth_msf (ulong mask, int nth_bit)
Find the position of the first bit set in
mask
, searching from (but not including)nth_bit
downwards. - public uint storage (ulong number)
Gets the number of bits used to hold
number
, e. - CharacterSet
- public const string A_2_Z
The set of uppercase ASCII alphabet characters.
- public const string DIGITS
The set of ASCII digits.
- public const string LATINC
- public const string LATINS
- public const string a_2_z
The set of lowercase ASCII alphabet characters.
- ChildWatch -
- public uint add (Pid pid, owned ChildWatchFunc function, int priority = DEFAULT_IDLE)
- public uint add_full (int priority, Pid pid, owned ChildWatchFunc function)
Sets a function to be called when the child indicated by
pid
exits, at the prioritypriority
. - DirUtils
- public int create (string pathname, int mode)
A wrapper for the POSIX mkdir function.
- public int create_with_parents (string pathname, int mode)
Create a directory if it doesn't already exist.
- public string make_tmp (string? tmpl = null) throws FileError
Creates a subdirectory in the preferred directory for temporary files (as returned by get_tmp_dir).
- public string? mkdtemp (owned string template)
- public int remove (string filename)
A wrapper for the POSIX rmdir function.
- Environ
- public string[] @get ()
Gets the list of environment variables for the current process.
- public unowned string? get_variable (string[]? envp, string variable)
Returns the value of the environment variable
variable
in the provided listenvp
. - public string[] set_variable (owned string[]? envp, string variable, string value, bool overwrite = true)
Sets the environment variable
variable
in the provided listenvp
tovalue
. - public string[] unset_variable (owned string[]? envp, string variable)
Removes the environment variable
variable
from the provided environmentenvp
. - Environment
- public void atexit (VoidFunc func)
Specifies a function to be called at normal program termination.
- public string? find_program_in_path (string program)
Locates the first executable named
program
in the user's path, in the same way that execvp would locate it. - public unowned string? get_application_name ()
Gets a human-readable name for the application, as set by set_application_name.
- public string get_current_dir ()
Gets the current directory.
- public unowned string get_home_dir ()
Gets the current user's home directory.
- public unowned string get_host_name ()
Return a name for the machine.
- public string? get_os_info (string key_name)
Get information about the operating system.
- public unowned string get_prgname ()
Gets the name of the program.
- public unowned string get_real_name ()
Gets the real name of the user.
- public unowned string[] get_system_config_dirs ()
Returns an ordered list of base directories in which to access system-wide configuration information.
- public unowned string[] get_system_data_dirs ()
Returns an ordered list of base directories in which to access system-wide application data.
- public unowned string get_tmp_dir ()
Gets the directory to use for temporary files.
- public unowned string get_user_cache_dir ()
Returns a base directory in which to store non-essential, cached data specific to particular user.
- public unowned string get_user_config_dir ()
Returns a base directory in which to store user-specific application configuration information such as user preferences and settings.
- public unowned string get_user_data_dir ()
Returns a base directory in which to access application data such as icons that is customized for a particular user.
- public unowned string get_user_name ()
Gets the user name of the current user.
- public unowned string get_user_runtime_dir ()
Returns a directory that is unique to the current user on the local system.
- public unowned string get_user_special_dir (UserDirectory directory)
Returns the full path of a special directory using its logical id.
- public unowned string get_user_state_dir ()
Returns a base directory in which to store state files specific to particular user.
- public unowned string? get_variable (string variable)
Returns the value of an environment variable.
- public string[] list_variables ()
Gets the names of all variables set in the environment.
- public void set_application_name (string application_name)
Sets a human-readable name for the application.
- public int set_current_dir (string path)
A wrapper for the POSIX chdir function.
- public void set_prgname (string application_name)
Sets the name of the program.
- public bool set_variable (string variable, string value, bool overwrite)
Sets an environment variable.
- public void unset_variable (string variable)
Removes an environment variable from the environment.
- FileUtils
- public int chmod (string filename, int mode)
A wrapper for the POSIX chmod function.
- public int close (int fd)
GLib.FileUtils.close closes a file descriptor, so that it no longer refers to any file and may be reused.
- public bool close_checked (int fd) throws FileError
This wraps the close call.
- public int error_from_errno (int err_no)
Gets a FileError constant based on the passed-in
err_no
. - public int fsync (int fd)
A wrapper for the POSIX `fsync()` function.
- public bool get_contents (string filename, out string contents, out size_t length = null) throws FileError
- public bool get_data (string filename, out uint8[] contents) throws FileError
Reads an entire file into allocated memory, with good error checking.
- public int mkstemp (string tmpl)
Opens a temporary file.
- public int open_tmp (string tmpl, out string name_used) throws FileError
Opens a file for writing in the preferred directory for temporary files ( as returned by get_tmp_dir).
- public string read_link (string filename) throws FileError
Reads the contents of the symbolic link
filename
like the POSIX `readlink()` function. - public int remove (string filename)
A wrapper for the POSIX
remove
function. - public int rename (string oldfilename, string newfilename)
A wrapper for the POSIX
rename
function. - public bool set_contents (string filename, string contents, ssize_t length = -1) throws FileError
- public bool set_contents_full (string filename, string contents, ssize_t length = -1, FileSetContentsFlags flags = 0, int mode = 0666) throws FileError
Writes all of
contents
to a file namedfilename
, with good error checking. - public bool set_data (string filename, uint8[] contents) throws FileError
Writes all of
contents
to a file namedfilename
. - public int symlink (string oldpath, string newpath)
Creates a symbolic link
- public bool test (string filename, FileTest test)
Returns true if any of the tests in the bitfield
test
are true. - public int unlink (string filename)
A wrapper for the POSIX unlink function.
- public int utime (string filename, UTimBuf? times = null)
A wrapper for the POSIX
utime
function. - Filename
- public string canonicalize (string filename, string? relative_to = null)
Gets the canonical file name from
filename
. - public string display_basename (string filename)
Returns the display basename for the particular filename, guaranteed to be valid UTF-8.
- public string display_name (string filename)
Converts a filename into a valid UTF-8 string.
- public string from_uri (string uri, out string hostname = null) throws ConvertError
Converts an escaped ASCII-encoded URI to a local filename in the encoding used for filenames.
- public string from_utf8 (string utf8string, ssize_t len, out size_t bytes_read, out size_t bytes_written) throws ConvertError
Converts a string from UTF-8 to the encoding GLib uses for filenames.
- public string to_uri (string filename, string? hostname = null) throws ConvertError
Converts an absolute filename to an escaped ASCII-encoded URI, with the path component following Section 3.3.
- public string to_utf8 (string opsysstring, ssize_t len, out size_t bytes_read, out size_t bytes_written) throws ConvertError
Converts a string which is in the encoding used by GLib for filenames into a UTF-8 string.
- Hostname
- public bool is_ascii_encoded (string hostname)
Tests if
hostname
contains segments with an ASCII-compatible encoding of an Internationalized Domain Name. - public bool is_ip_address (string hostname)
Tests if
hostname
is the string form of an IPv4 or IPv6 address. - public bool is_non_ascii (string hostname)
Tests if
hostname
contains Unicode characters. - public string to_ascii (string hostname)
Converts
hostname
to its canonical ASCII form; an ASCII-only string containing no uppercase letters and not ending with a trailing dot. - public string to_unicode (string hostname)
Converts
hostname
to its canonical presentation form; a UTF-8 string in Unicode normalization form C, containing no uppercase letters, no forbidden characters, and no ASCII-encoded segments, and not ending with a trailing dot. - Idle
- public uint add (owned SourceFunc function, int priority = DEFAULT_IDLE)
- public uint add_full (int priority, owned SourceFunc function)
Adds a function to be called whenever there are no higher priority events pending.
- public uint add_once (SourceOnceFunc function)
Adds a function to be called whenever there are no higher priority events pending to the default main loop.
- public bool remove_by_data (void* data)
Removes the idle function with the given data.
- Intl
- public unowned string? bind_textdomain_codeset (string domainname, string? codeset)
- public unowned string? bindtextdomain (string domainname, string? dirname)
- public unowned string[] get_language_names ()
Computes a list of applicable locale names, which can be used to e.
- public unowned string[] get_language_names_with_category (string category_name)
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.
- public unowned string? setlocale (LocaleCategory category = ALL, string? locale = "")
Installs the specified system locale or its portion as the new C locale.
- public unowned string strip_context (string msgid, string msgval)
- public unowned string? textdomain (string? domainname)
- KeyFileDesktop
- public const string GROUP
The name of the main group of a desktop entry file, as defined in the Desktop Entry Specification.
- public const string KEY_ACTIONS
A key under g_key_file_desktop_group, whose value is a string list giving the available application actions.
- public const string KEY_CATEGORIES
A key under g_key_file_desktop_group, whose value is a list of strings giving the categories in which the desktop entry should be shown in a menu.
- public const string KEY_COMMENT
A key under g_key_file_desktop_group, whose value is a localized string giving the tooltip for the desktop entry.
- public const string KEY_DBUS_ACTIVATABLE
A key under g_key_file_desktop_group, whose value is a boolean set to true if the application is D-Bus activatable.
- public const string KEY_EXEC
A key under g_key_file_desktop_group, whose value is a string giving the command line to execute.
- public const string KEY_FULLNAME
- public const string KEY_GENERIC_NAME
A key under g_key_file_desktop_group, whose value is a localized string giving the generic name of the desktop entry.
- public const string KEY_GETTEXT_DOMAIN
- public const string KEY_HIDDEN
A key under g_key_file_desktop_group, whose value is a boolean stating whether the desktop entry has been deleted by the user.
- public const string KEY_ICON
A key under g_key_file_desktop_group, whose value is a localized string giving the name of the icon to be displayed for the desktop entry.
- public const string KEY_KEYWORDS
- public const string KEY_MIME_TYPE
A key under g_key_file_desktop_group, whose value is a list of strings giving the MIME types supported by this desktop entry.
- public const string KEY_NAME
A key under g_key_file_desktop_group, whose value is a localized string giving the specific name of the desktop entry.
- public const string KEY_NOT_SHOW_IN
A key under g_key_file_desktop_group, whose value is a list of strings identifying the environments that should not display the desktop entry.
- public const string KEY_NO_DISPLAY
A key under g_key_file_desktop_group, whose value is a boolean stating whether the desktop entry should be shown in menus.
- public const string KEY_ONLY_SHOW_IN
A key under g_key_file_desktop_group, whose value is a list of strings identifying the environments that should display the desktop entry.
- public const string KEY_PATH
A key under g_key_file_desktop_group, whose value is a string containing the working directory to run the program in.
- public const string KEY_STARTUP_NOTIFY
A key under g_key_file_desktop_group, whose value is a boolean stating whether the application supports the Startup Notification Protocol Specification.
- public const string KEY_STARTUP_WM_CLASS
A key under g_key_file_desktop_group, whose value is string identifying the WM class or name hint of a window that the application will create, which can be used to emulate Startup Notification with older applications.
- public const string KEY_TERMINAL
A key under g_key_file_desktop_group, whose value is a boolean stating whether the program should be run in a terminal window.
- public const string KEY_TRY_EXEC
A key under g_key_file_desktop_group, whose value is a string giving the file name of a binary on disk used to determine if the program is actually installed.
- public const string KEY_TYPE
A key under g_key_file_desktop_group, whose value is a string giving the type of the desktop entry.
- public const string KEY_URL
A key under g_key_file_desktop_group, whose value is a string giving the URL to access.
- public const string KEY_VERSION
A key under g_key_file_desktop_group, whose value is a string giving the version of the Desktop Entry Specification used for the desktop entry file.
- public const string TYPE_APPLICATION
The value of the g_key_file_desktop_key_type , key for desktop entries representing applications.
- public const string TYPE_DIRECTORY
The value of the g_key_file_desktop_key_type , key for desktop entries representing directories.
- public const string TYPE_LINK
The value of the g_key_file_desktop_key_type , key for desktop entries representing links to documents.
- Log
- public bool get_debug_enabled ()
Return whether debug output from the GLib logging system is enabled.
- public void remove_handler (string? log_domain, uint handler_id)
Removes the log handler.
- public LogLevelFlags set_always_fatal (LogLevelFlags log_levels)
Sets the message levels which are always fatal, in any log domain.
- public void set_debug_enabled (bool enabled)
Enable or disable debug output from the GLib logging system for all domains.
- public void set_default_handler (LogFunc log_func)
Installs a default log handler which is used if no log handler has been set for the particular log domain and log level combination.
- public LogLevelFlags set_fatal_mask (string log_domain, LogLevelFlags log_levels)
Sets the log levels which are fatal in the given domain.
- public uint set_handler (string? log_domain, LogLevelFlags log_levels, LogFunc log_func)
Sets the log handler for a domain and a set of log levels.
- public void set_handler_full (string? log_domain, LogLevelFlags log_levels, owned LogFunc log_func)
Like [func@GLib.
- public void set_writer_func (owned LogWriterFunc func)
Set a writer function which will be called to format and write out each log message.
- public void writer_default_set_use_stderr (bool use_stderr)
Configure whether the built-in log functions will output all log messages to `stderr`.
- public bool writer_default_would_drop (LogLevelFlags log_level, string log_domain)
Check whether [func@GLib.
- public string writer_format_fields (LogLevelFlags log_levels, LogField[] fields, bool use_color)
Format a structured log message as a string suitable for outputting to the terminal (or elsewhere).
- public bool writer_is_journald (int output_fd)
Check whether the given
output_fd
file descriptor is a connection to the systemd journal, or something else (like a log file or `stdout` or `stderr`). - public bool writer_supports_color (int output_fd)
Check whether the given
output_fd
file descriptor supports ANSI color escape sequences. - public LogFunc default_handler
The default log handler set up by GLib; [func@GLib.
- public LogWriterFunc writer_default
Format a structured log message and output it to the default log destination for the platform.
- public LogWriterFunc writer_journald
Format a structured log message and send it to the systemd journal as a set of key–value pairs.
- public LogWriterFunc writer_standard_streams
Format a structured log message and print it to either `stdout` or `stderr`, depending on its log level.
- Markup
- CollectType - A mixed enumerated type and flags field.
- public bool collect_attributes (string element_name, string[] attribute_names, string[] attribute_values, ...) throws MarkupError
Collects the attributes of the element from the data passed to the MarkupParser start_element function, dealing with common error conditions and supporting boolean values.
- public string escape_text (string text, ssize_t length = -1)
Escapes text so that the markup parser will parse it verbatim.
- public string printf_escaped (string format, ...)
Formats arguments according to
format
, escaping all string and character arguments in the fashion of escape_text. - public string vprintf_escaped (string format, va_list args)
Formats the data in
args
according toformat
, escaping all string and character arguments in the fashion of escape_text . - Math - Binding to the C standard library's maths functions
- public const double E
The base of natural logarithms.
- public const double LN10
- public const double LN2
- public const double LOG_2_BASE_10
- public const double PI
The value of pi (ratio of circle's circumference to its diameter).
- public const double PI_2
- public const double PI_4
- public const double SQRT2
- public double acos (double x)
Calculates the arc cosine of
x
. - public float acosf (float x)
Calculates the arc cosine of
x
. - public double acosh (double x)
Calculates the inverse hyperbolic cosine of
x
. - public float acoshf (float x)
Calculates the inverse hyperbolic cosine of
x
. - public double asin (double x)
Calculates the arc sine of
x
. - public float asinf (float x)
Calculates the arc sine of
x
. - public double asinh (double x)
Returns the inverse hyperbolic sine of
x
, that is the value whose hyperbolic sine isx
. - public float asinhf (float x)
Returns the inverse hyperbolic sine of
x
, that is the value whose hyperbolic sine isx
. - public double atan (double x)
Calculates the arc tangent of
x
. - public double atan2 (double y, double x)
Calculates the arc tangent of the two variables
x
andy
. - public float atan2f (float y, float x)
Calculates the arc tangent of the two variables
x
andy
. - public float atanf (float x)
Calculates the arc tangent of
x
. - public double atanh (double x)
Returns the inverse hyperbolic tangent of
x
. - public float atanhf (float x)
Returns the inverse hyperbolic tangent of
x
. - public double cbrt (double x)
Returns the (real) cube root of x.
- public float cbrtf (float x)
Returns the (real) cube root of
x
. - public double ceil (double x)
Rounds
x
up to the nearest integer. - public float ceilf (float x)
Rounds
x
up to the nearest integer. - public double copysign (double x, double y)
Returns a value whose absolute value matches that of
x
, but whose sign bit matches that ofy
. - public float copysignf (float x, float y)
Returns a value whose absolute value matches that of
x
, but whose sign bit matches that ofy
. - public double cos (double x)
Returns the cosine of
x
. - public float cosf (float x)
Returns the cosine of
x
. - public double cosh (double x)
Returns the hyperbolic cosine of
x
. - public float coshf (float x)
Returns the hyperbolic cosine of
x
. - public double drem (double x, double y)
Computes the remainder of dividing x by y.
- public float dremf (float x, float y)
Computes the remainder of dividing
x
byy
. - public double erf (double x0)
Returns the error function of
x0
. - public double erfc (double x0)
Returns the complementary error function of
x0
, that is1.0 - erf(x0)
. - public float erfcf (float x0)
Returns the complementary error function of
x0
, that is1.0 - erf(x0)
. - public float erff (float x0)
Returns the error function of x0.
- public double exp (double x)
Returns the value of the base of natural logarithms raised to the power of
x
. - public double exp10 (double x)
Returns the value of 10 raised to the power of
x
. - public float exp10f (float x)
Returns the value of 10 raised to the power of
x
. - public double exp2 (double x)
Returns the value of 2 raised to the power of
x
. - public float exp2f (float x)
Returns the value of 2 raised to the power of
x
. - public float expf (float x)
Returns the value of the base of natural logarithms raised to the power of
x
. - public double expm1 (double x)
Returns a value equivalent to
exp(x) - 1
. - public float expm1f (float x)
Returns a value equivalent to
exp(x) - 1
. - public double fabs (double x)
Returns the absolute value.
- public float fabsf (float x)
Returns the absolute value.
- public double fdim (double x, double y)
Returns
max(x - y, 0)
. - public float fdimf (float x, float y)
Returns
max(x - y, 0)
. - public int finite (double value)
Returns the value of not-a-number (NaN) checking.
- public int finitef (float value)
Returns the value of not-a-number ( float.NAN) checking.
- public double floor (double x)
Rounds
x
down to the nearest integer. - public float floorf (float x)
Rounds
x
down to the nearest integer. - public double fma (double x, double y, double z)
Computes
x * y + z
. - public float fmaf (float x, float y, float z)
Computes
x * y + z
. - public double fmax (double x, double y)
Returns the larger value of
x
andy
. - public float fmaxf (float x, float y)
Returns the larger value of
x
andy
. - public double fmin (double x, double y)
Returns the smaller value of
x
andy
. - public float fminf (float x, float y)
Returns the smaller value of
x
andy
. - public double fmod (double x, double y)
Computes the remainder of dividing
x
byy
. - public float fmodf (float x, float y)
Computes the remainder of dividing
x
byy
. - public double frexp (double x, out int exponent)
Split the number
x
into a normalized fraction and an exponent. - public float frexpf (float x, out int exponent)
Split the number
x
into a normalized fraction and an exponent. - public double gamma (double x0)
Computes the natural logarithm of the Gamma function.
- public float gammaf (float x0)
Computes the natural logarithm of the Gamma function.
- public double hypot (double x, double y)
Returns the length of the hypotenuse of a right-angle triangle with sides of length
x
andy
, or the distance of the point(x,y)
from the origin. - public float hypotf (float x, float y)
Returns the length of the hypotenuse of a right-angle triangle.
- public int ilogb (double x)
Returns the exponent part of their argument as a signed integer.
- public int ilogbf (float x)
Returns the exponent part of their argument as a signed integer.
- public int isinf (double value)
- public int isinff (float value)
Returns the value of infinity checking.
- public int isnan (double value)
- public int isnanf (float value)
Returns a non-zero value if
value
is not-a-number ( float.NAN). - public double j0 (double x0)
Returns Bessel function of
x0
of the first kind of order 0. - public float j0f (float x0)
Returns Bessel function of
x0
of the first kind of order 0. - public double j1 (double x0)
Returns Bessel function of
x0
of the first kind of order 1. - public float j1f (float x0)
Returns Bessel function of
x0
of the first kind of order 1. - public double jn (int x0, double x1)
Returns Bessel function of
x
of the first kind of ordern
. - public float jnf (int x0, float x1)
Returns Bessel function of
x
of the first kind of ordern
. - public double ldexp (double x, int exponent)
Returns the result of multiplying the floating-point number
x
by 2 raised to the powerexponent
. - public float ldexpf (float x, int exponent)
Returns the result of multiplying the floating-point number
x
by 2 raised to the powerexponent
. - public double lgamma (double x0)
Returns the natural logarithm of the absolute value of the Gamma function.
- public double lgamma_r (double x0, out int signgamp)
Returns the natural logarithm of the absolute value of the Gamma function.
- public float lgamma_rf (float x0, out int signgamp)
Returns the natural logarithm of the absolute value of the Gamma function.
- public float lgammaf (float x0)
Returns the natural logarithm of the absolute value of the Gamma function.
- public int64 llrint (double x)
Rounds it's argument to the nearest integer value, using the current rounding direction.
- public int64 llrintf (float x)
Rounds it's argument to the nearest integer value, using the current rounding direction.
- public int64 llround (double x)
Rounds it's argument to the nearest integer value, rounding away from zero, regardless of the current rounding direction.
- public int64 llroundf (float x)
Rounds it's argument to the nearest integer value, rounding away from zero, regardless of the current rounding direction.
- public double log (double x)
Returns the natural logarithm of
x
. - public double log10 (double x)
Returns the base 10 logarithm of
x
. - public float log10f (float x)
Returns the base 10 logarithm of
x
. - public double log1p (double x)
Returns a value equivalent to
log(1 + x)
. - public float log1pf (float x)
Returns a value equivalent to
log(1 + x)
. - public double log2 (double x)
Returns the base 2 logarithm of
x
. - public float log2f (float x)
Returns the base 2 logarithm of
x
. - public double logb (double x)
Extracts the exponent of
x
and returns it as a floating-point value. - public float logbf (float x)
Extracts the exponent of x and returns it as a floating-point value.
- public float logf (float x)
Returns the natural logarithm of
x
. - public long lrint (double x)
Rounds it's argument to the nearest integer value, using the current rounding direction.
- public long lrintf (float x)
Rounds it's argument to the nearest integer value, using the current rounding direction.
- public long lround (double x)
Rounds it's argument to the nearest integer value, rounding away from zero, regardless of the current rounding direction.
- public long lroundf (float x)
Rounds it's argument to the nearest integer value, rounding away from zero, regardless of the current rounding direction.
- public double modf (double x, out double iptr)
Breaks the argument
x
into an integral part and a fractional part, each of which has the same sign asx
. - public float modff (float x, out float iptr)
Breaks the argument
x
into an integral part and a fractional part. each of which has the same sign asx
. - public double nan (string tagb)
Returns a representation (determined by
tagb
) of a quiet double.NAN. - public float nanf (string tagb)
Returns a representation (determined by
tag
) of a quiet float.NAN. - public double nearbyint (double x)
Rounds argument
x
to an integer value in floating point format, using the current rounding direction and without raising the inexact exception. - public float nearbyintf (float x)
Rounds argument
x
to an integer value in floating point format, using the current rounding direction and without raising the inexact exception. - public double nextafter (double x, double y)
Returns the next representable neighbor of
x
in the direction towardsy
. - public float nextafterf (float x, float y)
Returns the next representable neighbor of
x
in the direction towardsy
. - public double nexttoward (double x, double y)
- public float nexttowardf (float x, double y)
- public double pow (double x, double y)
Returns the value of
x
raised to the power ofy
. - public double pow10 (double x)
Returns the value of 10 raised to the power of
x
. - public float pow10f (float x)
Returns the value of 10 raised to the power of
x
. - public float powf (float x, float y)
Returns the value of
x
raised to the power ofy
. - public double remainder (double x, double y)
Computes the remainder of dividing
x
byy
. - public float remainderf (float x, float y)
Computes the remainder of dividing
x
byy
. - public double remquo (double x, double y, out int quo)
Computes the remainder and part of the quotient upon division of
x
byy
. - public float remquof (float x, float y, out int quo)
Computes the remainder and part of the quotient upon division of
x
byy
. - public double rint (double x)
Rounds it's argument to an integer value in floating point format, using the current rounding direction and with raising the inexact exception.
- public float rintf (float x)
Rounds it's argument to an integer value in floating point format. using the current rounding direction and with raising the inexact exception.
- public double round (double x)
Rounds argument
x
to the nearest integer, but round halfway cases away from zero, (regardless of the current rounding direction), instead of to the nearest even integer like rint. - public float roundf (float x)
Rounds argument
x
to the nearest integer, but round halfway cases away from zero (regardless of the current rounding direction), instead of to the nearest even integer like rint. - public double scalb (double x, double n)
Multiplies
x
by 2 to the powern
. - public float scalbf (float x, float n)
Multiplies
x
by 2 to the powern
. - public double scalbln (double x, long n)
This function is equivalent to GLib.Math.ldexp.
- public float scalblnf (float x, long n)
This function is equivalent to Math.ldexp.
- public double scalbn (double x, int n)
Multiplies it's first argument
x
by 2 to the powern
. - public float scalbnf (float x, int n)
Multiplies it's first argument
x
by 2 to the powern
. - public double significand (double x)
Returns the mantissa of
x
scaled to the range[1,2]
. - public float significandf (float x)
Returns the mantissa of
x
scaled to the range[1,2]
. - public double sin (double x)
Returns the sine of
x
. - public void sincos (double x, out double sinx, out double cosx)
computes both sine and cosine of
x
at the same time. - public void sincosf (float x, out float sinx, out float cosx)
Computes both sine and cosine of
x
at the same time. - public float sinf (float x)
Returns the sine of
x
, wherex
is given in radians. - public double sinh (double x)
Returns the hyperbolic sine of
x
. - public float sinhf (float x)
returns the hyperbolic sine of
x
. - public double sqrt (double x)
Returns the non-negative square root of
x
. - public float sqrtf (float x)
Returns the non-negative square root of
x
. - public double tan (double x)
Returns the tangent of
x
, wherex
is given in radians. - public float tanf (float x)
Returns the tangent of
x
. - public double tanh (double x)
returns the hyperbolic tangent of
x
. - public float tanhf (float x)
Returns the hyperbolic tangent of
x
. - public double tgamma (double x0)
Returns the value of Gamma function for the argument
x0
. - public float tgammaf (float x0)
Returns the value of Gamma function for the argument
x0
. - public double trunc (double x)
Rounds argument
x
to the nearest integer not larger in absolute value. - public float truncf (float x)
Rounds argument
x
to the nearest integer not larger in absolute value. - public double y0 (double x0)
Returns Bessel function of
x0
of the second kind of order 0. - public float y0f (float x0)
Returns Bessel function of x0 of the second kind of order 0.
- public double y1 (double x0)
Returns Bessel function of
x0
of the second kind of order 1. - public float y1f (float x0)
Returns Bessel function of
x0
of the second kind of order 1. - public double yn (int x0, double x1)
Returns Bessel function of
x1
of the second kind of orderx0
. - public float ynf (int x0, float x1)
Returns Bessel function of
x1
of the second kind of orderx0
. - Memory
- public void* @set (void* dest, int src, size_t n)
Copies src into each of the first count characters of the object pointed to by dest.
- public int cmp (void* s1, void* s2, size_t n)
Copies count characters from the object pointed to by src to the object pointed to by dest.
- public void* copy (void* dest, void* src, size_t n)
Copies count characters from the object pointed to by src to the object pointed to by dest.
- public void* dup (void* mem, uint n)
Allocates
byte_size
bytes of memory, and copiesbyte_size
bytes into it frommem
. - public void* dup2 (void* mem, size_t n)
Allocates
byte_size
bytes of memory, and copiesbyte_size
bytes into it frommem
. - public void* move (void* dest, void* src, size_t n)
- OsInfoKey
- public const string BUG_REPORT_URL
- public const string DOCUMENTATION_URL
- public const string HOME_URL
- public const string ID
- public const string NAME
- public const string PRETTY_NAME
- public const string PRIVACY_POLICY_URL
- public const string SUPPORT_URL
- public const string VERSION
- public const string VERSION_CODENAME
- public const string VERSION_ID
- Path
- public const char DIR_SEPARATOR
- public const string DIR_SEPARATOR_S
- public const char SEARCHPATH_SEPARATOR
- public const string SEARCHPATH_SEPARATOR_S
- public string build_filename (string first_element, ...)
Creates a filename from a series of elements using the correct separator for the current platform.
- public string build_filename_valist (string first_element, va_list args)
Creates a filename from a list of elements using the correct separator for the current platform.
- public string build_path (string separator, string first_element, ...)
Creates a path from a series of elements using
separator
as the separator between elements. - public string get_basename (string file_name)
Gets the last component of the filename.
- public string get_dirname (string file_name)
Gets the directory components of a file name.
- public bool is_absolute (string file_name)
Returns true if the given
file_name
is an absolute file name. - public bool is_dir_separator (unichar c)
- public unowned string skip_root (string file_name)
Returns a pointer into
file_name
after the root component, i. - Priority
- public const int DEFAULT
Use this for default priority event sources.
- public const int DEFAULT_IDLE
Use this for default priority idle functions.
- public const int HIGH
Use this for high priority event sources.
- public const int HIGH_IDLE
Use this for high priority idle functions.
- public const int LOW
Use this for very low priority background tasks.
- Process
- public SignalHandlerFunc @signal (ProcessSignal signum, SignalHandlerFunc handler)
Sets the error handler for signal sig.
- public void abort ()
Causes abnormal program termination unless ABRT is being caught by a signal handler passed to signal and the handler does not return.
- public bool check_exit_status (int wait_status) throws Error
An old name for check_wait_status, deprecated because its name is misleading.
- public bool check_wait_status (int wait_status) throws Error
Set throws if
wait_status
indicates the child exited abnormally (e. - public void close_pid (Pid pid)
On some platforms, notably Windows, the Pid type represents a resource which must be closed to prevent resource leaking.
- public bool core_dump (int status)
Returns true if the child process exited and triggered a core dump
- public void exit (int status)
Causes normal program termination to occur.
- public int exit_status (int status)
Returns the exit status if the process exited
- public bool if_continued (int status)
Returns true if the status was returned for a child process that has continued.
- public bool if_exited (int status)
Returns true if the child process terminated normally
- public bool if_signaled (int status)
Returns true if the child process terminated because of an unhalded signal.
- public bool if_stopped (int status)
Returns a true if the child process stopped.
- public int raise (ProcessSignal sig)
Sends signal sig to the program.
- public bool spawn_async (string? working_directory, string[] argv, string[]? envp, SpawnFlags _flags, SpawnChildSetupFunc? child_setup, out Pid child_pid) throws SpawnError
Executes a child program asynchronously.
- public bool spawn_async_with_fds (string? working_directory, string[] argv, string[]? envp, SpawnFlags _flags, SpawnChildSetupFunc? child_setup, out Pid child_pid = null, int stdin_fd = -1, int stdout_fd = -1, int stderr_fd = -1) throws SpawnError
Executes a child program asynchronously.
- public bool spawn_async_with_pipes (string? working_directory, string[] argv, string[]? envp, SpawnFlags _flags, SpawnChildSetupFunc? child_setup, out Pid child_pid, out int standard_input = null, out int standard_output = null, out int standard_error = null) throws SpawnError
Identical to spawn_async_with_pipes_and_fds but with `n_fds` set to zero, so no FD assignments are used.
- public bool spawn_async_with_pipes_and_fds (string? working_directory, string[] argv, string[]? envp, SpawnFlags _flags, SpawnChildSetupFunc? child_setup, int stdin_fd, int stdout_fd, int stderr_fd, int[] source_fds, int[] target_fds, out Pid child_pid, out int standard_input = null, out int standard_output = null, out int standard_error = null) throws SpawnError
Executes a child program asynchronously (your program will not block waiting for the child to exit).
- public bool spawn_command_line_async (string command_line) throws SpawnError
A simple version of spawn_async that parses a command line with parse_argv and passes it to spawn_async.
- public bool spawn_command_line_sync (string command_line, out string standard_output = null, out string standard_error = null, out int wait_status = null) throws SpawnError
A simple version of spawn_sync with little-used parameters removed, taking a command line instead of an argument vector.
- public bool spawn_sync (string? working_directory, string[] argv, string[]? envp, SpawnFlags _flags, SpawnChildSetupFunc? child_setup, out string standard_output = null, out string standard_error = null, out int wait_status = null) throws SpawnError
Executes a child synchronously (waits for the child to exit before returning).
- public ProcessSignal stop_sig (int status)
Returns the signal number of the signal caused the child process to stop when GLib.Process.if_stopped is true
- public ProcessSignal term_sig (int status)
Returns the ID of the signal that forced the child process to terminate.
- Random
- public bool boolean ()
- public double double_range (double begin, double end)
Returns a random double equally distributed over the range [
begin
. - public int32 int_range (int32 begin, int32 end)
Returns a random int32 equally distributed over the range [
begin
. - public double next_double ()
Returns a random double equally distributed over the range [0.
- public uint32 next_int ()
Return a random uint32 equally distributed over the range [0.
- public void set_seed (uint32 seed)
Sets the seed for the global random number generator, which is used by the g_random_* functions, to
seed
. - Shell
- public bool parse_argv (string command_line, out string[] argvp) throws ShellError
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.
- public string quote (string unquoted_string)
Quotes a string so that the shell (/bin/sh) will interpret the quoted string to mean
unquoted_string
. - public string unquote (string quoted_string) throws ShellError
Unquotes a string as the shell (/bin/sh) would.
- Slice
- public void* alloc (size_t block_size)
Allocates a block of memory from the libc allocator.
- public void* alloc0 (size_t block_size)
Allocates a block of memory via alloc and initializes the returned memory to 0.
- public void* copy (size_t block_size, void* mem_block)
Allocates a block of memory from the slice allocator and copies
block_size
bytes into it frommem_block
. - public void free (size_t block_size, void* mem_block)
Frees a block of memory.
- public void free_chain_with_offset (size_t block_size, void* mem_chain, size_t next_offset)
Frees a linked list of memory blocks of structure type
type
. - public int64 get_config (SliceConfig ckey)
- public int64[] get_config_state (SliceConfig ckey, int64 address)
- public void set_config (SliceConfig ckey, int64 value)
- SpacedPrimes
- public uint closest (uint num)
Gets the smallest prime number from a built-in array of primes which is larger than
num
. - Test
- FileType - The type of file to return the filename for, when used with build_filename.
- public delegate bool LogFatalFunc (string? log_domain, LogLevelFlags log_levels, string message)
Specifies the prototype of fatal log handler functions.
- public void add (string testpath, void* fixture, TestFixtureFunc fsetup, TestFixtureFunc ftest, TestFixtureFunc fteardown)
- public void add_data_func (string testpath, owned TestDataFunc test_funcvoid)
Create a new test case, similar to TestCase.
- public void add_data_func_full (string testpath, owned TestDataFunc test_func)
Create a new test case, as with add_data_func, but freeing
test_data
after the test run is complete. - public void add_func (string testpath, owned TestFunc test_funcvoid)
Create a new test case, similar to TestCase.
- public void assert_expected_messages ()
- public void bug (string bug_uri_snippet)
This function adds a message to test reports that associates a bug URI with a test case.
- public void bug_base (string uri_pattern)
Specify the base URI for bug reports.
- public string build_filename (FileType file_type, string[] path_segments)
Creates the pathname to a data file that is required for a test.
- public void disable_crash_reporting ()
Attempt to disable system crash reporting infrastructure.
- public void expect_message (string? log_domain, LogLevelFlags log_level, string pattern)
Indicates that a message with the given
log_domain
andlog_level
, with text matchingpattern
, is expected to be logged. - public void fail ()
Indicates that a test failed.
- public void fail_printf (string format, ...)
Equivalent to fail , but also record a message like skip_printf.
- public bool failed ()
Returns whether a test has already failed.
- public unowned string get_dir (FileType file_type)
Gets the pathname of the directory containing test files of the type specified by
file_type
. - public unowned string get_filename (FileType file_type, string[] path_segments)
Gets the pathname to a data file that is required for a test.
- public unowned string get_path ()
Gets the test path for the test currently being run.
- public void incomplete (string? msg = null)
Indicates that a test failed because of some incomplete functionality.
- public void incomplete_printf (string format, ...)
Equivalent to incomplete, but the explanation is formatted as if by to_string.
- public void init (ref unowned string[] args, ...)
Initialize the GLib testing framework, e.
- public bool initialized ()
- public void log_set_fatal_handler (LogFatalFunc log_func)
Installs a non-error fatal log handler which can be used to decide whether log messages which are counted as fatal abort the program.
- public void maximized_result (double maximized_quantity, string format, ...)
Report the result of a performance or measurement test.
- public void message (string format, ...)
Add a message to the test report.
- public void minimized_result (double minimized_quantity, string format, ...)
Report the result of a performance or measurement test.
- public bool perf ()
- public bool quick ()
- public bool quiet ()
- public bool rand_bit ()
- public double rand_double ()
Get a reproducible random floating point number, see rand_int for details on test case random numbers.
- public double rand_double_range (double begin, double end)
Get a reproducible random floating pointer number out of a specified range, see rand_int for details on test case random numbers.
- public int32 rand_int ()
Get a reproducible random integer number.
- public int32 rand_int_range (int32 begin, int32 end)
Get a reproducible random integer number out of a specified range, see rand_int for details on test case random numbers.
- public int run ()
Runs all tests under the toplevel suite which can be retrieved with get_root.
- public void set_nonfatal_assertions ()
Changes the behaviour of the various `g_assert_*()` macros, assert_expected_messages and the various `g_test_trap_assert_*()` macros to not abort to program, but instead call fail and continue.
- public void skip (string? msg = null)
Indicates that a test was skipped.
- public void skip_printf (string format, ...)
- public bool slow ()
- public bool subprocess ()
Returns true (after init has been called) if the test program is running under trap_subprocess.
- public void summary (string summary)
Set the summary for a test, which describes what the test checks, and how it goes about checking it.
- public bool thorough ()
- public double timer_elapsed ()
Get the number of seconds since the last start of the timer with timer_start.
- public double timer_last ()
Report the last result of timer_elapsed.
- public void timer_start ()
Start a timing test.
- public void trap_assert_failed ()
- public void trap_assert_passed ()
- public void trap_assert_stderr (string serrpattern)
- public void trap_assert_stderr_unmatched (string serrpattern)
- public void trap_assert_stdout (string soutpattern)
- public void trap_assert_stdout_unmatched (string soutpattern)
- public bool trap_fork (uint64 usec_timeout, TestTrapFlags test_trap_flags)
Fork the current test program to execute a test case that might not return or that might abort.
- public bool trap_has_passed ()
Check the result of the last trap_subprocess call.
- public bool trap_reached_timeout ()
Check the result of the last trap_subprocess call.
- public void trap_subprocess (string? test_path, uint64 usec_timeout, TestSubprocessFlags test_flags)
Respawns the test program to run only
test_path
in a subprocess. - public bool verbose ()
- Timeout
- public uint add (uint interval, owned SourceFunc function, int priority = DEFAULT)
- public uint add_full (int priority, uint interval, owned SourceFunc function)
Sets a function to be called at regular intervals, with the given priority.
- public uint add_once (uint interval, SourceOnceFunc function)
Sets a function to be called after
interval
milliseconds have elapsed, with the default priority, g_priority_default. - public uint add_seconds (uint interval, owned SourceFunc function, int priority = DEFAULT)
- public uint add_seconds_full (int priority, uint interval, owned SourceFunc function)
Sets a function to be called at regular intervals, with
priority
. - public uint add_seconds_once (uint interval, SourceOnceFunc function)
This function behaves like add_once but with a range in seconds.
- Unix
- SignalSource - The `GSource` struct is an opaque data type representing an event source.
- public bool open_pipe (int[] fds, int flags) throws Error
Similar to the UNIX pipe call, but on modern systems like Linux uses the
pipe2
system call, which atomically creates a pipe with the configured flags. - public bool set_fd_nonblocking (int fd, bool nonblock) throws Error
Control the non-blocking state of the given file descriptor, according to
nonblock
. - public uint signal_add (int signum, owned SourceFunc handler, int priority = DEFAULT)
A convenience function for SignalSource, which attaches to the default MainContext.
- Uuid
- public bool string_is_valid (string str)
Parses the string
str
and verify if it is a UUID. - public string string_random ()
Generates a random UUID (RFC 4122 version 4) as a string.
- Version
- public const uint @2_26
- public const uint @2_28
- public const uint @2_30
- public const uint @2_32
- public const uint @2_34
- public const uint @2_36
- public const uint @2_38
- public const uint @2_40
- public const uint @2_42
- public const uint @2_44
- public const uint @2_46
- public const uint @2_48
- public const uint @2_50
- public const uint @2_52
- public const uint @2_54
- public const uint @2_56
- public const uint @2_58
- public const uint @2_60
- public const uint @2_62
- public const uint @2_64
- public const uint @2_66
- public const uint @2_68
- public const uint @2_70
- public const uint @2_72
- public const uint @2_74
- public const uint @2_76
- public const uint @2_78
- public const uint CUR_STABLE
- public const uint MAJOR
The major version number of the GLib library.
- public const uint MAX_ALLOWED
- public const uint MICRO
The micro version number of the GLib library.
- public const uint MINOR
The minor version number of the GLib library.
- public const uint MIN_REQUIRED
A macro that should be defined by the user prior to including the glib.
- public const uint PREV_STABLE
- public const uint binary_age
- public const uint interface_age
- public const uint major
- public const uint micro
- public const uint minor
- public bool CHECK (uint required_major, uint required_minor = 0, uint required_micro = 0)
- public unowned string? check (uint required_major, uint required_minor = 0, uint required_micro = 0)
Checks that the GLib library in use is compatible with the given version.
- public uint encode (uint major, uint minor)
- Win32
- public const int MSG_HANDLE
- public bool check_windows_version (int major, int minor, int spver, OSType os_type)
- public string error_message (int error)
- public int ftruncate (int f, uint size)
- public string[] get_command_line ()
- public string get_package_installation_directory_of_module (void* hmodule)
- public uint get_windows_version ()
- public string getlocale ()
- public bool have_widechar_api ()
- public bool is_nt_based ()
- public string locale_filename_from_utf8 (string utf8filename)
Classes:
Structs:
Enums:
Error domains:
Constants:
Delegates:
Methods:
Fields:
Methods:
Methods:
Methods:
Methods:
Methods:
Methods:
Constants:
Methods:
Methods:
Methods:
Methods:
Methods:
Methods:
Methods:
Methods:
Methods:
Constants:
Constants:
Methods:
Fields:
Enums:
Methods:
Constants:
Methods:
Methods:
Constants:
Constants:
Methods:
Constants:
Methods:
Methods:
Methods:
Methods:
Methods:
Enums:
Delegates:
Methods:
Methods:
Classes:
Methods:
Methods:
Constants:
Methods:
Enums:
Constants:
Methods:
Classes:
Structs:
- bool -
- char
- dev_t
- double
- float -
- gid_t
- int
- int16
- int32
- int64
- int8
- intptr
- long
- off_t
- pid_t
- short
- size_t
- socklen_t
- ssize_t
- time_t - Arithmetic type capable of representing times.
- uchar
- uid_t
- uint
- uint16
- uint32
- uint64
- uint8
- uintptr
- ulong
- unichar
- unichar2
- ushort
- va_list - Struct to hold information about variadic function arguments