GLib

object GLib

Skipped during bindings generation

  • alias Strv: Unsupported string with cType gchar**

  • parameter out_num: out_num: Out parameter is not supported

  • parameter out_num: out_num: Out parameter is not supported

  • parameter endptr: endptr: Out parameter is not supported

  • parameter endptr: endptr: Out parameter is not supported

  • parameter endptr: endptr: Out parameter is not supported

  • parameter arg1: long double

  • parameter arg1: Unsupported string with cType const char* const*

  • parameter func: VoidFunc

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter atomic: Unsupported pointer to primitive type

  • parameter clear_func: DestroyNotify

  • parameter arc: Unsupported pointer to primitive type

  • parameter arc: Unsupported pointer to primitive type

  • parameter arc: Unsupported pointer to primitive type

  • parameter arc: Unsupported pointer to primitive type

  • parameter out_len: out_len: Out parameter is not supported

  • function base64_decode_inplace: In/Out parameter is not supported

  • function base64_decode_step: In/Out parameter is not supported

  • parameter data: Array parameter of type guint8 is not supported

  • function base64_encode_close: In/Out parameter is not supported

  • function base64_encode_step: In/Out parameter is not supported

  • parameter address: Unsupported pointer to primitive type

  • parameter address: Unsupported pointer to primitive type

  • parameter address: Unsupported pointer to primitive type

  • function build_filename: Varargs parameter is not supported

  • parameter args: va_list

  • function build_path: Varargs parameter is not supported

  • parameter tag_ptr: Unsupported pointer to primitive type

  • parameter destroy: DestroyNotify

  • function clear_pointer: In/Out parameter is not supported

  • parameter destroy: DestroyNotify

  • parameter data: Array parameter of type guint8 is not supported

  • parameter key: Array parameter of type guint8 is not supported

  • parameter key: Array parameter of type guint8 is not supported

  • parameter str: Array parameter of type guint8 is not supported

  • parameter str: Array parameter of type guint8 is not supported

  • parameter str: Array parameter of type guint8 is not supported

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter datalist: Data

  • parameter destroy_func: DestroyNotify

  • parameter contents: contents: Out parameter is not supported

  • parameter name_used: name_used: Out parameter is not supported

  • parameter contents: Array parameter of type guint8 is not supported

  • parameter contents: Array parameter of type guint8 is not supported

  • parameter hostname: hostname: Out parameter is not supported

  • parameter bytes_read: bytes_read: Out parameter is not supported

  • parameter bytes_read: bytes_read: Out parameter is not supported

  • function fopen: Return type gpointer is unsupported

  • function fprintf: Varargs parameter is not supported

  • parameter stream: Unsupported pointer to primitive type

  • parameter charset: charset: Out parameter is not supported

  • parameter charset: charset: Out parameter is not supported

  • parameter filename_charsets: filename_charsets: Out parameter is not supported

  • function iconv: In/Out parameter is not supported

  • parameter bytes_read: bytes_read: Out parameter is not supported

  • parameter opsysstring: Array parameter of type guint8 is not supported

  • function log: Varargs parameter is not supported

  • function log_set_default_handler: Return type LogFunc is unsupported

  • function log_structured: Varargs parameter is not supported

  • parameter fields: LogField

  • function log_structured_standard: Varargs parameter is not supported

  • parameter fields: LogField

  • parameter domains: Unsupported string with cType const gchar* const*

  • parameter fields: LogField

  • parameter fields: LogField

  • parameter fields: LogField

  • parameter fields: LogField

  • parameter args: va_list

  • parameter buf: StatBuf

  • function markup_collect_attributes: Varargs parameter is not supported

  • function markup_printf_escaped: Varargs parameter is not supported

  • parameter args: va_list

  • parameter nullify_location: Unsupported pointer to primitive type

  • parameter keys: DebugKey

  • parameter address: Unsupported pointer to primitive type

  • parameter out_ptr: out_ptr: Out parameter is not supported

  • parameter preserve_mask: guintptr

  • parameter address: Unsupported pointer to primitive type

  • parameter address: Unsupported pointer to primitive type

  • parameter address: Unsupported pointer to primitive type

  • function prefix_error: In/Out parameter is not supported

  • function prefix_error_literal: In/Out parameter is not supported

  • function print: Varargs parameter is not supported

  • function printerr: Varargs parameter is not supported

  • function printf: Varargs parameter is not supported

  • parameter args: va_list

  • parameter dest: dest: Out parameter is not supported

  • function propagate_prefixed_error: Varargs parameter is not supported

  • parameter clear_func: DestroyNotify

  • parameter rc: Unsupported pointer to primitive type

  • parameter rc: Unsupported pointer to primitive type

  • parameter rc: Unsupported pointer to primitive type

  • parameter rc: Unsupported pointer to primitive type

  • function set_error: Varargs parameter is not supported

  • parameter err: err: Out parameter is not supported

  • function set_prgname_once: C function g_set_prgname_once is ignored

  • parameter func: PrintFunc

  • parameter func: PrintFunc

  • function set_user_dirs: Varargs parameter is not supported

  • parameter argcp: argcp: Out parameter is not supported

  • parameter n_values: Unsupported pointer to primitive type

  • function snprintf: Varargs parameter is not supported

  • parameter array: Array parameter of type gpointer is not supported

  • parameter child_pid: child_pid: Out parameter is not supported

  • parameter child_pid: child_pid: Out parameter is not supported

  • parameter child_pid: child_pid: Out parameter is not supported

  • parameter source_fds: Array parameter of type gint is not supported

  • parameter standard_output: standard_output: Out parameter is not supported

  • parameter standard_output: standard_output: Out parameter is not supported

  • function sprintf: Varargs parameter is not supported

  • parameter buf: StatBuf

  • parameter ascii_alternates: ascii_alternates: Out parameter is not supported

  • function strconcat: Varargs parameter is not supported

  • function strdup_printf: Varargs parameter is not supported

  • parameter args: va_list

  • function strjoin: Varargs parameter is not supported

  • parameter endptr: endptr: Out parameter is not supported

  • parameter test_func: TestDataFunc

  • parameter test_func: TestDataFunc

  • parameter test_func: TestFunc

  • parameter data_setup: TestFixtureFunc

  • function test_build_filename: Varargs parameter is not supported

  • parameter data_setup: TestFixtureFunc

  • function test_create_suite: Return type TestSuite is unsupported

  • function test_fail_printf: Varargs parameter is not supported

  • function test_get_filename: Varargs parameter is not supported

  • function test_get_root: Return type TestSuite is unsupported

  • function test_incomplete_printf: Varargs parameter is not supported

  • function test_init: Varargs parameter is not supported

  • function test_maximized_result: Varargs parameter is not supported

  • function test_message: Varargs parameter is not supported

  • function test_minimized_result: Varargs parameter is not supported

  • parameter destroy_func: DestroyNotify

  • parameter suite: TestSuite

  • function test_skip_printf: Varargs parameter is not supported

  • parameter str: Array parameter of type gunichar is not supported

  • parameter str: Array parameter of type gunichar is not supported

  • parameter ch: ch: Out parameter is not supported

  • parameter a: a: Out parameter is not supported

  • parameter result: result: Out parameter is not supported

  • parameter mirrored_ch: mirrored_ch: Out parameter is not supported

  • parameter outbuf: outbuf: Out parameter is not supported

  • parameter result_len: Unsupported pointer to primitive type

  • parameter string: Array parameter of type gunichar is not supported

  • function unix_get_passwd_entry: Return type gpointer is unsupported

  • parameter fds: Array parameter of type gint is not supported

  • parameter str: Array parameter of type guint16 is not supported

  • parameter str: Array parameter of type guint16 is not supported

  • parameter items_read: items_read: Out parameter is not supported

  • parameter items_written: items_written: Out parameter is not supported

  • parameter items_read: items_read: Out parameter is not supported

  • parameter str: Array parameter of type guint8 is not supported

  • parameter str: Array parameter of type guint8 is not supported

  • parameter utb: Unsupported pointer to primitive type

  • parameter string: string: Out parameter is not supported

  • parameter file: Unsupported pointer to primitive type

  • parameter args: va_list

  • parameter args: va_list

  • parameter args: va_list

  • callback OptionArgFunc: Callbacks that throw are not supported

  • callback OptionErrorFunc: Callbacks that throw are not supported

  • callback OptionParseFunc: Callbacks that throw are not supported

Properties

Link copied to clipboard
const val ALLOC_AND_FREE: <Error class: unknown class> = 2
Link copied to clipboard
const val ALLOC_ONLY: <Error class: unknown class> = 1
Link copied to clipboard
const val ALLOCATOR_LIST: <Error class: unknown class> = 1
Link copied to clipboard
const val ALLOCATOR_NODE: <Error class: unknown class> = 3
Link copied to clipboard
const val ALLOCATOR_SLIST: <Error class: unknown class> = 2
Link copied to clipboard
const val ANALYZER_ANALYZING: <Error class: unknown class> = 1
Link copied to clipboard
const val ASCII_DTOSTR_BUF_SIZE: <Error class: unknown class> = 39

A good size for a buffer to be passed into func@GLib.ascii_dtostr. It is guaranteed to be enough for all output of that function on systems with 64bit IEEE-compatible doubles.

Link copied to clipboard
const val ATOMIC_REF_COUNT_INIT: <Error class: unknown class> = 1

Evaluates to the initial reference count for gatomicrefcount.

Link copied to clipboard
const val BIG_ENDIAN: <Error class: unknown class> = 4321

Specifies one of the possible types of byte order. See %G_BYTE_ORDER.

Link copied to clipboard
const val C_STD_VERSION: <Error class: unknown class> = 199000

The C standard version the code is compiling against, it's normally defined with the same value of __STDC_VERSION__ for C standard compatible compilers, while it uses the lowest standard version in pure MSVC, given that in such compiler the definition depends on a compilation flag.

Link copied to clipboard
const val CSET_A_2_Z: String

The set of uppercase ASCII alphabet characters. Used for specifying valid identifier characters in #GScannerConfig.

Link copied to clipboard
const val CSET_a_2_z: String

The set of lowercase ASCII alphabet characters. Used for specifying valid identifier characters in #GScannerConfig.

Link copied to clipboard
const val CSET_DIGITS: String

The set of ASCII digits. Used for specifying valid identifier characters in #GScannerConfig.

Link copied to clipboard
const val DATALIST_FLAGS_MASK: <Error class: unknown class> = 3

A bitmask that restricts the possible flags passed to g_datalist_set_flags(). Passing a flags value where flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.

Link copied to clipboard
const val DATE_BAD_DAY: <Error class: unknown class> = 0

Represents an invalid #GDateDay.

Link copied to clipboard
const val DATE_BAD_JULIAN: <Error class: unknown class> = 0

Represents an invalid Julian day number.

Link copied to clipboard
const val DATE_BAD_YEAR: <Error class: unknown class> = 0

Represents an invalid year.

Link copied to clipboard
const val DIR_SEPARATOR: <Error class: unknown class> = 47

The directory separator character. This is '/' on UNIX machines and '\' under Windows.

Link copied to clipboard

The directory separator as a string. This is "/" on UNIX machines and "\" under Windows.

Link copied to clipboard
const val E: <Error class: unknown class> = 2.718282

The base of natural logarithms.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Expands to "" on all modern compilers, and to FUNCTION on gcc version 2.x. Don't use it.

Link copied to clipboard

Expands to "" on all modern compilers, and to PRETTY_FUNCTION on gcc version 2.x. Don't use it.

Link copied to clipboard
const val GSIZE_FORMAT: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val HAVE_GINT64: <Error class: unknown class> = 1
Link copied to clipboard
const val HAVE_GNUC_VARARGS: <Error class: unknown class> = 1
Link copied to clipboard
const val HAVE_GNUC_VISIBILITY: <Error class: unknown class> = 1

Defined to 1 if gcc-style visibility handling is supported.

Link copied to clipboard
const val HAVE_GROWING_STACK: <Error class: unknown class> = 0
Link copied to clipboard
const val HAVE_ISO_VARARGS: <Error class: unknown class> = 1
Link copied to clipboard
const val HOOK_FLAG_USER_SHIFT: <Error class: unknown class> = 4

The position of the first bit which is not reserved for internal use be the #GHook implementation, i.e. 1 << G_HOOK_FLAG_USER_SHIFT is the first bit which can be used for application-defined flags.

Link copied to clipboard
const val IEEE754_DOUBLE_BIAS: <Error class: unknown class> = 1023

The bias by which exponents in double-precision floats are offset.

Link copied to clipboard
const val IEEE754_FLOAT_BIAS: <Error class: unknown class>

The bias by which exponents in single-precision floats are offset.

Link copied to clipboard

The name of the main group of a desktop entry file, as defined in the Desktop Entry Specification. Consult the specification for more details about the meanings of the keys below.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string list giving the available application actions.

Link copied to clipboard

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.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized string giving the tooltip for the desktop entry.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean set to true if the application is D-Bus activatable.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string giving the command line to execute. It is only valid for desktop entries with the Application type.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized string giving the generic name of the desktop entry.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean stating whether the desktop entry has been deleted by the user.

Link copied to clipboard

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.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list of strings giving the MIME types supported by this desktop entry.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized string giving the specific name of the desktop entry.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean stating whether the desktop entry should be shown in menus.

Link copied to clipboard

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.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list of strings identifying the environments that should display the desktop entry.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string containing the working directory to run the program in. It is only valid for desktop entries with the Application type.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean stating whether the application supports the Startup Notification Protocol Specification.

Link copied to clipboard

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.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean stating whether the program should be run in a terminal window.

Link copied to clipboard

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. It is only valid for desktop entries with the Application type.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string giving the type of the desktop entry.

Link copied to clipboard

A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string giving the URL to access. It is only valid for desktop entries with the Link type.

Link copied to clipboard

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.

Link copied to clipboard

The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop entries representing applications.

Link copied to clipboard

The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop entries representing directories.

Link copied to clipboard

The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop entries representing links to documents.

Link copied to clipboard
const val LITTLE_ENDIAN: <Error class: unknown class> = 1234

Specifies one of the possible types of byte order. See %G_BYTE_ORDER.

Link copied to clipboard
const val LN10: <Error class: unknown class> = 2.302585

The natural logarithm of 10.

Link copied to clipboard
const val LN2: <Error class: unknown class> = 0.693147

The natural logarithm of 2.

Link copied to clipboard
const val LOG_2_BASE_10: <Error class: unknown class> = 0.30103

Multiplying the base 2 exponent by this number yields the base 10 exponent.

Link copied to clipboard
const val LOG_DOMAIN: Char = '0'

Defines the log domain. See #log-domains.

Link copied to clipboard
const val LOG_FATAL_MASK: <Error class: unknown class> = 5

GLib log levels that are considered fatal by default.

Link copied to clipboard
const val LOG_LEVEL_USER_SHIFT: <Error class: unknown class> = 8

Log levels below 1<<G_LOG_LEVEL_USER_SHIFT are used by GLib. Higher bits can be used for user-defined log levels.

Link copied to clipboard
const val macro__has_attribute___noreturn__: <Error class: unknown class> = 0
Link copied to clipboard
const val MAJOR_VERSION: <Error class: unknown class> = 2

The major version number of the GLib library.

Link copied to clipboard
const val MAXINT16: Short
Link copied to clipboard
const val MAXINT32: <Error class: unknown class>
Link copied to clipboard
const val MAXINT64: <Error class: unknown class>
Link copied to clipboard
const val MAXINT8: <Error class: unknown class>
Link copied to clipboard
const val MAXUINT16: <Error class: unknown class>
Link copied to clipboard
const val MAXUINT32: <Error class: unknown class>
Link copied to clipboard
const val MAXUINT64: <Error class: unknown class>
Link copied to clipboard
const val MAXUINT8: <Error class: unknown class>
Link copied to clipboard
const val MICRO_VERSION: <Error class: unknown class> = 2

The micro version number of the GLib library.

Link copied to clipboard
const val MININT16: Short

The minimum value which can be held in a #gint16.

Link copied to clipboard
const val MININT32: <Error class: unknown class>

The minimum value which can be held in a #gint32.

Link copied to clipboard
const val MININT64: <Error class: unknown class>

The minimum value which can be held in a #gint64.

Link copied to clipboard
const val MININT8: <Error class: unknown class>

The minimum value which can be held in a #gint8.

Link copied to clipboard
const val MINOR_VERSION: <Error class: unknown class> = 82

The minor version number of the GLib library.

Link copied to clipboard
Link copied to clipboard

If a long option in the main group has this name, it is not treated as a regular option. Instead it collects all non-option arguments which would otherwise be left in argv. The option must be of type %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY or %G_OPTION_ARG_FILENAME_ARRAY.

Link copied to clipboard
const val PDP_ENDIAN: <Error class: unknown class> = 3412

Specifies one of the possible types of byte order (currently unused). See %G_BYTE_ORDER.

Link copied to clipboard
const val PI: <Error class: unknown class> = 3.141593

The value of pi (ratio of circle's circumference to its diameter).

Link copied to clipboard
const val PI_2: <Error class: unknown class> = 1.570796

Pi divided by 2.

Link copied to clipboard
const val PI_4: <Error class: unknown class> = 0.785398

Pi divided by 4.

Link copied to clipboard
const val PID_FORMAT: String

A format specifier that can be used in printf()-style format strings when printing a #GPid.

Link copied to clipboard

A format specifier that can be used in printf()-style format strings when printing the @fd member of a #GPollFD.

Link copied to clipboard
const val PRIORITY_DEFAULT: <Error class: unknown class> = 0

Use this for default priority event sources.

Link copied to clipboard
const val PRIORITY_DEFAULT_IDLE: <Error class: unknown class> = 200

Use this for default priority idle functions.

Link copied to clipboard
const val PRIORITY_HIGH: <Error class: unknown class>

Use this for high priority event sources.

Link copied to clipboard
const val PRIORITY_HIGH_IDLE: <Error class: unknown class> = 100

Use this for high priority idle functions.

Link copied to clipboard
const val PRIORITY_LOW: <Error class: unknown class> = 300

Use this for very low priority background tasks.

Link copied to clipboard
const val REF_COUNT_INIT: <Error class: unknown class>

Evaluates to the initial reference count for grefcount.

Link copied to clipboard
const val SEARCHPATH_SEPARATOR: <Error class: unknown class> = 58

The search path separator character. This is ':' on UNIX machines and ';' under Windows.

Link copied to clipboard

The search path separator as a string. This is ":" on UNIX machines and ";" under Windows.

Link copied to clipboard
const val SIZEOF_LONG: <Error class: unknown class> = 8
Link copied to clipboard
const val SIZEOF_SIZE_T: <Error class: unknown class> = 8
Link copied to clipboard
const val SIZEOF_SSIZE_T: <Error class: unknown class> = 8
Link copied to clipboard
const val SIZEOF_VOID_P: <Error class: unknown class> = 8
Link copied to clipboard
const val SOURCE_CONTINUE: Boolean = true

Use this macro as the return value of a callback@GLib.SourceFunc to leave the struct@GLib.Source in the main loop.

Link copied to clipboard
const val SOURCE_REMOVE: Boolean = false

Use this macro as the return value of a callback@GLib.SourceFunc to remove the struct@GLib.Source from the main loop.

Link copied to clipboard
const val SQRT2: <Error class: unknown class> = 1.414214

The square root of two.

Link copied to clipboard

The standard delimiters, used in func@GLib.strdelimit.

Link copied to clipboard
const val SYSDEF_AF_INET: <Error class: unknown class> = 2
Link copied to clipboard
const val SYSDEF_AF_INET6: <Error class: unknown class> = 10
Link copied to clipboard
const val SYSDEF_AF_UNIX: <Error class: unknown class> = 1
Link copied to clipboard
const val SYSDEF_MSG_DONTROUTE: <Error class: unknown class> = 4
Link copied to clipboard
const val SYSDEF_MSG_OOB: <Error class: unknown class> = 1
Link copied to clipboard
const val SYSDEF_MSG_PEEK: <Error class: unknown class> = 2
Link copied to clipboard

Creates a unique temporary directory for each unit test and uses g_set_user_dirs() to set XDG directories to point into subdirectories of it for the duration of the unit test. The directory tree is cleaned up after the test finishes successfully. Note that this doesn’t take effect until g_test_run() is called, so calls to (for example) g_get_user_home_dir() will return the system-wide value when made in a test program’s main() function.

Link copied to clipboard
const val TIME_SPAN_DAY: <Error class: unknown class> = 86400000000

Evaluates to a time span of one day.

Link copied to clipboard
const val TIME_SPAN_HOUR: <Error class: unknown class> = 3600000000

Evaluates to a time span of one hour.

Link copied to clipboard
const val TIME_SPAN_MILLISECOND: <Error class: unknown class> = 1000

Evaluates to a time span of one millisecond.

Link copied to clipboard
const val TIME_SPAN_MINUTE: <Error class: unknown class> = 60000000

Evaluates to a time span of one minute.

Link copied to clipboard
const val TIME_SPAN_SECOND: <Error class: unknown class> = 1000000

Evaluates to a time span of one second.

Link copied to clipboard
const val UNICHAR_MAX_DECOMPOSITION_LENGTH: <Error class: unknown class> = 18

The maximum length (in codepoints) of a compatibility or canonical decomposition of a single Unicode character.

Link copied to clipboard

Generic delimiters characters as defined in RFC 3986. Includes :/?#[]@.

Subcomponent delimiter characters as defined in RFC 3986. Includes !$&'()*+,;=.

Link copied to clipboard
const val USEC_PER_SEC: <Error class: unknown class> = 1000000

Number of microseconds in one second (1 million). This macro is provided for code readability.

Link copied to clipboard
const val VA_COPY_AS_ARRAY: <Error class: unknown class> = 1
Link copied to clipboard
const val VERSION_MIN_REQUIRED: <Error class: unknown class> = 2

A macro that should be defined by the user prior to including the glib.h header. The definition should be one of the predefined GLib version macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...

Link copied to clipboard
const val WIN32_MSG_HANDLE: <Error class: unknown class> = 19981206

Functions

Link copied to clipboard
fun access(filename: String, mode: <Error class: unknown class>): <Error class: unknown class>

A wrapper for the POSIX access() function. This function is used to test a pathname for one or several of read, write or execute permissions, or just existence.

Link copied to clipboard
fun alignedAlloc(nBlocks: <Error class: unknown class>, nBlockBytes: <Error class: unknown class>, alignment: <Error class: unknown class>): <Error class: unknown class>?

This function is similar to g_malloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to align the allocated memory to with the given alignment value. Additionally, it will detect possible overflow during multiplication.

Link copied to clipboard
fun alignedAlloc0(nBlocks: <Error class: unknown class>, nBlockBytes: <Error class: unknown class>, alignment: <Error class: unknown class>): <Error class: unknown class>?

This function is similar to g_aligned_alloc(), but it will also clear the allocated memory before returning it.

Link copied to clipboard
fun alignedFree(mem: <Error class: unknown class>? = null)

Frees the memory allocated by g_aligned_alloc().

Link copied to clipboard
fun alignedFreeSized(mem: <Error class: unknown class>? = null, alignment: <Error class: unknown class>, size: <Error class: unknown class>)

Frees the memory pointed to by @mem, assuming it is has the given @size and

Link copied to clipboard
fun asciiDigitValue(c: Char): <Error class: unknown class>

Determines the numeric value of a character as a decimal digit. If the character is not a decimal digit according to func@GLib.ascii_isdigit, -1 is returned.

Link copied to clipboard
fun asciiStrcasecmp(s1: String, s2: String): <Error class: unknown class>

Compare two strings, ignoring the case of ASCII characters.

Link copied to clipboard
fun asciiStrdown(str: String, len: Long): String

Converts all upper case ASCII letters to lower case ASCII letters, with semantics that exactly match func@GLib.ascii_tolower.

Link copied to clipboard
fun asciiStrncasecmp(s1: String, s2: String, n: <Error class: unknown class>): <Error class: unknown class>

Compare @s1 and @s2, ignoring the case of ASCII characters and any characters after the first @n in each string. If either string is less than @n bytes long, comparison will stop at the first nul byte encountered.

Link copied to clipboard
fun asciiStrup(str: String, len: Long): String

Converts all lower case ASCII letters to upper case ASCII letters, with semantics that exactly match func@GLib.ascii_toupper.

Link copied to clipboard

Convert a character to ASCII lower case. If the character is not an ASCII upper case letter, it is returned unchanged.

Link copied to clipboard

Convert a character to ASCII upper case. If the character is not an ASCII lower case letter, it is returned unchanged.

Link copied to clipboard
fun asciiXdigitValue(c: Char): <Error class: unknown class>

Determines the numeric value of a character as a hexadecimal digit. If the character is not a hex digit according to func@GLib.ascii_isxdigit, -1 is returned.

Link copied to clipboard
fun assertionMessage(domain: String, file: String, line: <Error class: unknown class>, func: String, message: String)
Link copied to clipboard
fun assertionMessageCmpint(domain: String, file: String, line: <Error class: unknown class>, func: String, expr: String, arg1: <Error class: unknown class>, cmp: String, arg2: <Error class: unknown class>, numtype: Char)
Link copied to clipboard
fun assertionMessageCmpstr(domain: String, file: String, line: <Error class: unknown class>, func: String, expr: String, arg1: String, cmp: String, arg2: String)
Link copied to clipboard
fun assertionMessageError(domain: String, file: String, line: <Error class: unknown class>, func: String, expr: String, error: Error, errorDomain: <Error class: unknown class>, errorCode: <Error class: unknown class>)
Link copied to clipboard
fun assertionMessageExpr(domain: String? = null, file: String, line: <Error class: unknown class>, func: String, expr: String? = null)

Internal function used to print messages from the public g_assert() and g_assert_not_reached() macros.

Link copied to clipboard
fun assertWarning(logDomain: String, file: String, line: <Error class: unknown class>, prettyFunction: String, expression: String)
Link copied to clipboard
fun atomicRcBoxAcquire(memBlock: <Error class: unknown class>): <Error class: unknown class>

Atomically acquires a reference on the data pointed by @mem_block.

Link copied to clipboard
fun atomicRcBoxAlloc(blockSize: <Error class: unknown class>): <Error class: unknown class>

Allocates @block_size bytes of memory, and adds atomic reference counting semantics to it.

Link copied to clipboard
fun atomicRcBoxAlloc0(blockSize: <Error class: unknown class>): <Error class: unknown class>

Allocates @block_size bytes of memory, and adds atomic reference counting semantics to it.

Link copied to clipboard
fun atomicRcBoxDup(blockSize: <Error class: unknown class>, memBlock: <Error class: unknown class>): <Error class: unknown class>

Allocates a new block of data with atomic reference counting semantics, and copies @block_size bytes of @mem_block into it.

Link copied to clipboard
fun atomicRcBoxGetSize(memBlock: <Error class: unknown class>): <Error class: unknown class>

Retrieves the size of the reference counted data pointed by @mem_block.

Link copied to clipboard
fun atomicRcBoxRelease(memBlock: <Error class: unknown class>)

Atomically releases a reference on the data pointed by @mem_block.

Link copied to clipboard
fun basename(fileName: String): String

Gets the name of the file without any leading directory components. It returns a pointer into the given file name string.

Link copied to clipboard
fun bitNthLsf(mask: <Error class: unknown class>, nthBit: <Error class: unknown class>): <Error class: unknown class>

Find the position of the first bit set in @mask, searching from (but not including) @nth_bit upwards. Bits are numbered from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63, usually). To start searching from the 0th bit, set @nth_bit to -1.

Link copied to clipboard
fun bitNthMsf(mask: <Error class: unknown class>, nthBit: <Error class: unknown class>): <Error class: unknown class>

Find the position of the first bit set in @mask, searching from (but not including) @nth_bit downwards. Bits are numbered from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63, usually). To start searching from the last bit, set @nth_bit to -1 or GLIB_SIZEOF_LONG * 8.

Link copied to clipboard
fun bitStorage(number: <Error class: unknown class>): <Error class: unknown class>

Gets the number of bits used to hold @number, e.g. if @number is 4, 3 bits are needed.

Link copied to clipboard
Link copied to clipboard

Creates a filename from a vector of elements using the correct separator for the current platform.

Link copied to clipboard
fun buildPathv(separator: String, args: List<String>): String

Behaves exactly like g_build_path(), but takes the path elements as a string array, instead of variadic arguments.

Link copied to clipboard
fun canonicalizeFilename(filename: String, relativeTo: String? = null): String

Gets the canonical file name from @filename. All triple slashes are turned into single slashes, and all .. and .s resolved against @relative_to.

Link copied to clipboard
fun chdir(path: String): <Error class: unknown class>

A wrapper for the POSIX chdir() function. The function changes the current directory of the process to @path.

Link copied to clipboard
fun checkVersion(requiredMajor: <Error class: unknown class>, requiredMinor: <Error class: unknown class>, requiredMicro: <Error class: unknown class>): String?

Checks that the GLib library in use is compatible with the given version.

Link copied to clipboard
fun childWatchAdd(priority: <Error class: unknown class>, pid: <Error class: unknown class>, function: ChildWatchFunc): <Error class: unknown class>

Sets a function to be called when the child indicated by @pid exits, at the priority @priority.

Link copied to clipboard
fun childWatchSourceNew(pid: <Error class: unknown class>): Source

Creates a new child_watch source.

Link copied to clipboard
fun clearError(): <Error class: unknown class><Unit>

If @err or *@err is null, does nothing. Otherwise, calls g_error_free() on *@err and sets *@err to null.

Link copied to clipboard
fun close(fd: <Error class: unknown class>): <Error class: unknown class><Boolean>

This wraps the close() call. In case of error, %errno will be preserved, but the error will also be stored as a #GError in @error. In case of success, %errno is undefined.

Link copied to clipboard
fun closefrom(lowfd: <Error class: unknown class>): <Error class: unknown class>

Close every file descriptor equal to or greater than @lowfd.

Link copied to clipboard
fun computeChecksumForBytes(checksumType: ChecksumType, data: Bytes): String?

Computes the checksum for a binary @data. This is a convenience wrapper for g_checksum_new(), g_checksum_get_string() and g_checksum_free().

Link copied to clipboard
fun computeChecksumForString(checksumType: ChecksumType, str: String, length: Long): String?

Computes the checksum of a string.

Link copied to clipboard
fun computeHmacForBytes(digestType: ChecksumType, key: Bytes, data: Bytes): String

Computes the HMAC for a binary @data. This is a convenience wrapper for g_hmac_new(), g_hmac_get_string() and g_hmac_unref().

Link copied to clipboard
fun convertErrorQuark(): <Error class: unknown class>
Link copied to clipboard
fun datasetDestroy(datasetLocation: <Error class: unknown class>)

Destroys the dataset, freeing all memory allocated, and calling any destroy functions set for data elements.

Link copied to clipboard
fun datasetForeach(datasetLocation: <Error class: unknown class>, func: DataForeachFunc)

Calls the given function for each data element which is associated with the given location. Note that this function is NOT thread-safe. So unless @dataset_location can be protected from any modifications during invocation of this function, it should not be called.

Link copied to clipboard
fun datasetIdGetData(datasetLocation: <Error class: unknown class>, keyId: <Error class: unknown class>): <Error class: unknown class>?

Gets the data element corresponding to a #GQuark.

Link copied to clipboard
fun datasetIdRemoveNoNotify(datasetLocation: <Error class: unknown class>, keyId: <Error class: unknown class>): <Error class: unknown class>?

Removes an element, without calling its destroy notification function.

Link copied to clipboard
fun dcgettext(domain: String? = null, msgid: String, category: <Error class: unknown class>): String

This is a variant of g_dgettext() that allows specifying a locale category instead of always using LC_MESSAGES. See g_dgettext() for more information about how this functions differs from calling dcgettext() directly.

Link copied to clipboard
fun dgettext(domain: String? = null, msgid: String): String

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.

Link copied to clipboard
fun directEqual(v1: <Error class: unknown class>? = null, v2: <Error class: unknown class>? = null): Boolean

Compares two #gpointer arguments and returns true if they are equal. It can be passed to g_hash_table_new() as the @key_equal_func parameter, when using opaque pointers compared by pointer value as keys in a #GHashTable.

Link copied to clipboard
fun directHash(v: <Error class: unknown class>? = null): <Error class: unknown class>

Converts a gpointer to a hash value. It can be passed to g_hash_table_new() as the @hash_func parameter, when using opaque pointers compared by pointer value as keys in a #GHashTable.

Link copied to clipboard
fun dngettext(domain: String? = null, msgid: String, msgidPlural: String, n: <Error class: unknown class>): String

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.

Link copied to clipboard
fun doubleEqual(v1: <Error class: unknown class>, v2: <Error class: unknown class>): Boolean

Compares the two #gdouble values being pointed to and returns true if they are equal. It can be passed to g_hash_table_new() as the @key_equal_func parameter, when using non-null pointers to doubles as keys in a #GHashTable.

Link copied to clipboard
fun doubleHash(v: <Error class: unknown class>): <Error class: unknown class>

Converts a pointer to a #gdouble to a hash value. It can be passed to g_hash_table_new() as the @hash_func parameter, It can be passed to g_hash_table_new() as the @hash_func parameter, when using non-null pointers to doubles as keys in a #GHashTable.

Link copied to clipboard
fun dpgettext(domain: String? = null, msgctxtid: String, msgidoffset: <Error class: unknown class>): String

This function is a variant of g_dgettext() which supports a disambiguating message context. GNU gettext uses the '\004' character to separate the message context and message id in @msgctxtid. If 0 is passed as @msgidoffset, this function will fall back to trying to use the deprecated convention of using "|" as a separation character.

Link copied to clipboard
fun dpgettext2(domain: String? = null, context: String, msgid: String): String

This function is a variant of g_dgettext() which supports a disambiguating message context. GNU gettext uses the '\004' character to separate the message context and message id in @msgctxtid.

Link copied to clipboard
fun environGetenv(envp: List<String>? = null, variable: String): String?

Returns the value of the environment variable @variable in the provided list @envp.

Link copied to clipboard
fun environSetenv(envp: List<String>? = null, variable: String, value: String, overwrite: Boolean): List<String>

Sets the environment variable @variable in the provided list

Link copied to clipboard
fun environUnsetenv(envp: List<String>? = null, variable: String): List<String>

Removes the environment variable @variable from the provided environment @envp.

Link copied to clipboard
fun fdwalkSetCloexec(lowfd: <Error class: unknown class>): <Error class: unknown class>

Mark every file descriptor equal to or greater than @lowfd to be closed at the next execve() or similar, as if via the FD_CLOEXEC flag.

Link copied to clipboard
fun fileErrorFromErrno(errNo: <Error class: unknown class>): FileError

Gets a #GFileError constant based on the passed-in @err_no.

Link copied to clipboard
fun fileErrorQuark(): <Error class: unknown class>
Link copied to clipboard

Returns the display basename for the particular filename, guaranteed to be valid UTF-8. The display name might not be identical to the filename, for instance there might be problems converting it to UTF-8, and some files can be translated in the display.

Link copied to clipboard

Converts a filename into a valid UTF-8 string. The conversion is not necessarily reversible, so you should keep the original around and use the return value of this function only for display purposes. Unlike g_filename_to_utf8(), the result is guaranteed to be non-null even if the filename actually isn't in the GLib file name encoding.

Link copied to clipboard
fun filenameToUri(filename: String, hostname: String? = null): <Error class: unknown class><String>

Converts an absolute filename to an escaped ASCII-encoded URI, with the path component following Section 3.3. of RFC 2396.

Link copied to clipboard
fun fileReadLink(filename: String): <Error class: unknown class><String>

Reads the contents of the symbolic link @filename like the POSIX readlink() function.

Link copied to clipboard
fun fileTest(filename: String, test: FileTest): Boolean

Returns true if any of the tests in the bitfield @test are true. For example, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) will return true if the file exists; the check whether it's a directory doesn't matter since the existence test is true. With the current set of available tests, there's no point passing in more than one test at a time.

Link copied to clipboard

Locates the first executable named @program in the user's path, in the same way that execvp() would locate it. Returns an allocated string with the absolute path name, or null if the program is not found in the path. If @program is already an absolute path, returns a copy of

Link copied to clipboard
fun formatSize(size: <Error class: unknown class>): String

Formats a size (for example the size of a file) into a human readable string. Sizes are rounded to the nearest size prefix (kB, MB, GB) and are displayed rounded to the nearest tenth. E.g. the file size 3292528 bytes will be converted into the string "3.2 MB". The returned string is UTF-8, and may use a non-breaking space to separate the number and units, to ensure they aren’t separated when line wrapped.

Link copied to clipboard
fun formatSizeForDisplay(size: <Error class: unknown class>): String

Formats a size (for example the size of a file) into a human readable string. Sizes are rounded to the nearest size prefix (KB, MB, GB) and are displayed rounded to the nearest tenth. E.g. the file size 3292528 bytes will be converted into the string "3.1 MB".

Link copied to clipboard
fun formatSizeFull(size: <Error class: unknown class>, flags: FormatSizeFlags): String

Formats a size.

Link copied to clipboard
fun free(mem: <Error class: unknown class>? = null)

Frees the memory pointed to by @mem.

Link copied to clipboard
fun freeSized(mem: <Error class: unknown class>? = null, size: <Error class: unknown class>)

Frees the memory pointed to by @mem, assuming it is has the given @size.

Link copied to clipboard

Gets a human-readable name for the application, as set by g_set_application_name(). This name should be localized if possible, and is intended for display to the user. Contrast with g_get_prgname(), which gets a non-localized name. If g_set_application_name() has not been called, returns the result of g_get_prgname() (which may be null if g_set_prgname() has also not been called).

Link copied to clipboard

Gets the character set for the current locale.

Link copied to clipboard

Gets the current directory.

Link copied to clipboard
fun getCurrentTime(result: TimeVal)

Equivalent to the UNIX gettimeofday() function, but portable.

Link copied to clipboard
fun getenv(variable: String): String?

Returns the value of an environment variable.

Link copied to clipboard

Gets the list of environment variables for the current process.

Link copied to clipboard

Gets the current user's home directory.

Link copied to clipboard

Return a name for the machine.

Link copied to clipboard

Computes a list of applicable locale names, which can be used to e.g. construct locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable and always contains the default locale "C".

Link copied to clipboard

Computes a list of applicable locale names with a locale category name, which can be used to construct the fallback locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable and always contains the default locale "C".

Link copied to clipboard

Returns a list of derived variants of @locale, which can be used to e.g. construct locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable. This function handles territory, charset and extra locale modifiers. See man:setlocale for information about locales and their format.

Link copied to clipboard
fun getMonotonicTime(): <Error class: unknown class>

Queries the system monotonic time.

Link copied to clipboard
fun getNumProcessors(): <Error class: unknown class>

Determine the approximate number of threads that the system will schedule simultaneously for this process. This is intended to be used as a parameter to g_thread_pool_new() for CPU bound tasks and similar cases.

Link copied to clipboard
fun getOsInfo(keyName: String): String?

Get information about the operating system.

Link copied to clipboard

Gets the name of the program. This name should not be localized, in contrast to g_get_application_name().

Link copied to clipboard

Gets the real name of the user. This usually comes from the user's entry in the passwd file. The encoding of the returned string is system-defined. (On Windows, it is, however, always UTF-8.) If the real user name cannot be determined, the string "Unknown" is returned.

Link copied to clipboard
fun getRealTime(): <Error class: unknown class>

Queries the system wall-clock time.

Link copied to clipboard

Returns an ordered list of base directories in which to access system-wide configuration information.

Link copied to clipboard

Returns an ordered list of base directories in which to access system-wide application data.

Link copied to clipboard

Gets the directory to use for temporary files.

Link copied to clipboard

Returns a base directory in which to store non-essential, cached data specific to particular user.

Link copied to clipboard

Returns a base directory in which to store user-specific application configuration information such as user preferences and settings.

Link copied to clipboard

Returns a base directory in which to access application data such as icons that is customized for a particular user.

Link copied to clipboard

Gets the user name of the current user. The encoding of the returned string is system-defined. On UNIX, it might be the preferred file name encoding, or something else, and there is no guarantee that it is even consistent on a machine. On Windows, it is always UTF-8.

Link copied to clipboard

Returns a directory that is unique to the current user on the local system.

Link copied to clipboard

Returns the full path of a special directory using its logical id.

Link copied to clipboard

Returns a base directory in which to store state files specific to particular user.

Link copied to clipboard

Tests if @hostname contains segments with an ASCII-compatible encoding of an Internationalized Domain Name. If this returns true, you should decode the hostname with g_hostname_to_unicode() before displaying it to the user.

Link copied to clipboard

Tests if @hostname is the string form of an IPv4 or IPv6 address. (Eg, "192.168.0.1".)

Link copied to clipboard

Tests if @hostname contains Unicode characters. If this returns true, you need to encode the hostname with g_hostname_to_ascii() before using it in non-IDN-aware contexts.

Link copied to clipboard
fun hostnameToAscii(hostname: String): String?

Converts @hostname to its canonical ASCII form; an ASCII-only string containing no uppercase letters and not ending with a trailing dot.

Link copied to clipboard

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.

Link copied to clipboard
fun idleAdd(priority: <Error class: unknown class>, function: SourceFunc): <Error class: unknown class>

Adds a function to be called whenever there are no higher priority events pending.

Link copied to clipboard
fun idleAddOnce(function: SourceOnceFunc): <Error class: unknown class>

Adds a function to be called whenever there are no higher priority events pending to the default main loop. The function is given the default idle priority, const@GLib.PRIORITY_DEFAULT_IDLE.

Link copied to clipboard
fun idleRemoveByData(data: <Error class: unknown class>? = null): Boolean

Removes the idle function with the given data.

Link copied to clipboard

Creates a new idle source.

Link copied to clipboard
fun int64Equal(v1: <Error class: unknown class>, v2: <Error class: unknown class>): Boolean

Compares the two #gint64 values being pointed to and returns true if they are equal. It can be passed to g_hash_table_new() as the @key_equal_func parameter, when using non-null pointers to 64-bit integers as keys in a #GHashTable.

Link copied to clipboard
fun int64Hash(v: <Error class: unknown class>): <Error class: unknown class>

Converts a pointer to a #gint64 to a hash value.

Link copied to clipboard
fun intEqual(v1: <Error class: unknown class>, v2: <Error class: unknown class>): Boolean

Compares the two #gint values being pointed to and returns true if they are equal. It can be passed to g_hash_table_new() as the @key_equal_func parameter, when using non-null pointers to integers as keys in a #GHashTable.

Link copied to clipboard
fun internStaticString(string: String? = null): String

Returns a canonical representation for @string. Interned strings can be compared for equality by comparing the pointers, instead of using strcmp(). g_intern_static_string() does not copy the string, therefore @string must not be freed or modified.

Link copied to clipboard
fun internString(string: String? = null): String

Returns a canonical representation for @string. Interned strings can be compared for equality by comparing the pointers, instead of using strcmp().

Link copied to clipboard
fun intHash(v: <Error class: unknown class>): <Error class: unknown class>

Converts a pointer to a #gint to a hash value. It can be passed to g_hash_table_new() as the @hash_func parameter, when using non-null pointers to integer values as keys in a #GHashTable.

Link copied to clipboard
fun ioAddWatch(channel: IoChannel, priority: <Error class: unknown class>, condition: IoCondition, func: IoFunc): <Error class: unknown class>

Adds the #GIOChannel into the default main loop context with the given priority.

Link copied to clipboard
fun ioCreateWatch(channel: IoChannel, condition: IoCondition): Source

Creates a #GSource that's dispatched when @condition is met for the given @channel. For example, if condition is %G_IO_IN, the source will be dispatched when there's data available for reading.

Link copied to clipboard

Gets the names of all variables set in the environment.

Link copied to clipboard
fun logDefaultHandler(logDomain: String? = null, logLevel: LogLevelFlags, message: String? = null, unusedData: <Error class: unknown class>? = null)

The default log handler set up by GLib; func@GLib.log_set_default_handler allows to install an alternate default log handler.

Link copied to clipboard

Return whether debug output from the GLib logging system is enabled.

Link copied to clipboard
fun logRemoveHandler(logDomain: String, handlerId: <Error class: unknown class>)

Removes the log handler.

Link copied to clipboard

Sets the message levels which are always fatal, in any log domain.

Link copied to clipboard

Enable or disable debug output from the GLib logging system for all domains.

Link copied to clipboard
fun logSetFatalMask(logDomain: String, fatalMask: LogLevelFlags): LogLevelFlags

Sets the log levels which are fatal in the given domain.

Link copied to clipboard
fun logSetHandler(logDomain: String? = null, logLevels: LogLevelFlags, logFunc: LogFunc): <Error class: unknown class>

Like func@GLib.log_set_handler, but takes a destroy notify for the @user_data.

Link copied to clipboard

Set a writer function which will be called to format and write out each log message.

Link copied to clipboard
fun logVariant(logDomain: String? = null, logLevel: LogLevelFlags, fields: Variant)

Log a message with structured data, accepting the data within a type@GLib.Variant.

Link copied to clipboard

Configure whether the built-in log functions will output all log messages to stderr.

Link copied to clipboard
fun logWriterDefaultWouldDrop(logLevel: LogLevelFlags, logDomain: String? = null): Boolean

Check whether func@GLib.log_writer_default and func@GLib.log_default_handler would ignore a message with the given domain and level.

Link copied to clipboard
fun logWriterIsJournald(outputFd: <Error class: unknown class>): Boolean

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).

Link copied to clipboard
fun logWriterSupportsColor(outputFd: <Error class: unknown class>): Boolean

Check whether the given @output_fd file descriptor supports ANSI color escape sequences.

Link copied to clipboard

Returns the currently firing source for this thread.

Link copied to clipboard
fun mainDepth(): <Error class: unknown class>

Returns the depth of the stack of calls to method@GLib.MainContext.dispatch on any #GMainContext in the current thread. That is, when called from the toplevel, it gives 0. When called from within a callback from method@GLib.MainContext.iteration (or method@GLib.MainLoop.run, etc.) it returns 1. When called from within a callback to a recursive call to method@GLib.MainContext.iteration, it returns 2. And so forth.

Link copied to clipboard
fun malloc(nBytes: <Error class: unknown class>): <Error class: unknown class>?

Allocates @n_bytes bytes of memory. If @n_bytes is 0 it returns null.

Link copied to clipboard
fun malloc0(nBytes: <Error class: unknown class>): <Error class: unknown class>?

Allocates @n_bytes bytes of memory, initialized to 0's. If @n_bytes is 0 it returns null.

Link copied to clipboard
fun malloc0N(nBlocks: <Error class: unknown class>, nBlockBytes: <Error class: unknown class>): <Error class: unknown class>?

This function is similar to g_malloc0(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication.

Link copied to clipboard
fun mallocN(nBlocks: <Error class: unknown class>, nBlockBytes: <Error class: unknown class>): <Error class: unknown class>?

This function is similar to g_malloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication.

Link copied to clipboard
fun markupErrorQuark(): <Error class: unknown class>
Link copied to clipboard
fun markupEscapeText(text: String, length: Long): String

Escapes text so that the markup parser will parse it verbatim. Less than, greater than, ampersand, etc. are replaced with the corresponding entities. This function would typically be used when writing out a file to be parsed with the markup parser.

Link copied to clipboard
fun memdup(mem: <Error class: unknown class>? = null, byteSize: <Error class: unknown class>): <Error class: unknown class>?

Allocates @byte_size bytes of memory, and copies @byte_size bytes into it from @mem. If @mem is NULL it returns NULL.

Link copied to clipboard
fun memdup2(mem: <Error class: unknown class>? = null, byteSize: <Error class: unknown class>): <Error class: unknown class>?

Allocates @byte_size bytes of memory, and copies @byte_size bytes into it from @mem. If @mem is NULL it returns NULL.

Link copied to clipboard

Checks whether the allocator used by g_malloc() is the system's malloc implementation. If it returns true memory allocated with malloc() can be used interchangeably with memory allocated using g_malloc(). This function is useful for avoiding an extra copy of allocated memory returned by a non-GLib-based API.

Link copied to clipboard

GLib used to support some tools for memory profiling, but this no longer works. There are many other useful tools for memory profiling these days which can be used instead.

Link copied to clipboard
fun memSetVtable(vtable: MemVTable)

This function used to let you override the memory allocation function. However, its use was incompatible with the use of global constructors in GLib and GIO, because those use the GLib allocators before main is reached. Therefore this function is now deprecated and is just a stub.

Link copied to clipboard
fun mkdirWithParents(pathname: String, mode: <Error class: unknown class>): <Error class: unknown class>

Create a directory if it doesn't already exist. Create intermediate parent directories as needed, too.

Link copied to clipboard
fun mkdtemp(tmpl: String): String?

Creates a temporary directory. See the mkdtemp() documentation on most UNIX-like systems.

Link copied to clipboard
fun mkdtempFull(tmpl: String, mode: <Error class: unknown class>): String?

Creates a temporary directory. See the mkdtemp() documentation on most UNIX-like systems.

Link copied to clipboard
fun mkstemp(tmpl: String): <Error class: unknown class>

Opens a temporary file. See the mkstemp() documentation on most UNIX-like systems.

Link copied to clipboard
fun mkstempFull(tmpl: String, flags: <Error class: unknown class>, mode: <Error class: unknown class>): <Error class: unknown class>

Opens a temporary file. See the mkstemp() documentation on most UNIX-like systems.

Link copied to clipboard
fun numberParserErrorQuark(): <Error class: unknown class>
Link copied to clipboard
fun onErrorQuery(prgName: String)

Prompts the user with [E]xit, [H]alt, show [S]tack trace or [P]roceed. This function is intended to be used for debugging use only. The following example shows how it can be used together with the g_log() functions.

Link copied to clipboard

Invokes gdb, which attaches to the current process and shows a stack trace. Called by g_on_error_query() when the "Stack trace" option is selected. You can get the current process's program name with g_get_prgname(), assuming that you have called gtk_init() or gdk_init().

Link copied to clipboard
fun optionErrorQuark(): <Error class: unknown class>
Link copied to clipboard
fun pathGetBasename(fileName: String): String

Gets the last component of the filename.

Link copied to clipboard
fun pathGetDirname(fileName: String): String

Gets the directory components of a file name. For example, the directory component of /usr/bin/test is /usr/bin. The directory component of / is /.

Link copied to clipboard
fun pathIsAbsolute(fileName: String): Boolean

Returns true if the given @file_name is an absolute file name. Note that this is a somewhat vague concept on Windows.

Link copied to clipboard
fun pathSkipRoot(fileName: String): String?

Returns a pointer into @file_name after the root component, i.e. after the "/" in UNIX or "C:\" under Windows. If @file_name is not an absolute path it returns null.

Link copied to clipboard
fun patternMatch(pspec: PatternSpec, stringLength: <Error class: unknown class>, string: String, stringReversed: String? = null): Boolean

Matches a string against a compiled pattern.

Link copied to clipboard
fun patternMatchSimple(pattern: String, string: String): Boolean

Matches a string against a pattern given as a string.

Link copied to clipboard

Matches a string against a compiled pattern.

Link copied to clipboard
fun poll(fds: PollFd, nfds: <Error class: unknown class>, timeout: <Error class: unknown class>): <Error class: unknown class>

Polls @fds, as with the poll() system call, but portably. (On systems that don't have poll(), it is emulated using select().) This is used internally by #GMainContext, but it can be called directly if you need to block until a file descriptor is ready, but don't want to run the full main loop.

Link copied to clipboard
fun qsortWithData(pbase: <Error class: unknown class>, totalElems: <Error class: unknown class>, size: <Error class: unknown class>, compareFunc: CompareDataFunc)

This is just like the standard C man:qsort(3) function, but the comparison routine accepts a user data argument (like man:qsort_r(3)).

Link copied to clipboard
fun quarkFromStaticString(string: String? = null): <Error class: unknown class>

Gets the #GQuark identifying the given (static) string. If the string does not currently have an associated #GQuark, a new #GQuark is created, linked to the given string.

Link copied to clipboard
fun quarkFromString(string: String? = null): <Error class: unknown class>

Gets the #GQuark identifying the given string. If the string does not currently have an associated #GQuark, a new #GQuark is created, using a copy of the string.

Link copied to clipboard
fun quarkToString(quark: <Error class: unknown class>): String

Gets the string associated with the given #GQuark.

Link copied to clipboard
fun quarkTryString(string: String? = null): <Error class: unknown class>

Gets the #GQuark associated with the given string, or 0 if string is null or it has no associated #GQuark.

Link copied to clipboard
fun randomDouble(): <Error class: unknown class>

Returns a random #gdouble equally distributed over the range [0..1).

Link copied to clipboard
fun randomDoubleRange(begin: <Error class: unknown class>, end: <Error class: unknown class>): <Error class: unknown class>

Returns a random #gdouble equally distributed over the range [@begin..@end).

Link copied to clipboard
fun randomInt(): <Error class: unknown class>

Return a random #guint32 equally distributed over the range 0..2^32-1.

Link copied to clipboard
fun randomIntRange(begin: <Error class: unknown class>, end: <Error class: unknown class>): <Error class: unknown class>

Returns a random #gint32 equally distributed over the range @begin..@end-1.

Link copied to clipboard
fun randomSetSeed(seed: <Error class: unknown class>)

Sets the seed for the global random number generator, which is used by the g_random_* functions, to @seed.

Link copied to clipboard
fun rcBoxAcquire(memBlock: <Error class: unknown class>): <Error class: unknown class>

Acquires a reference on the data pointed by @mem_block.

Link copied to clipboard
fun rcBoxAlloc(blockSize: <Error class: unknown class>): <Error class: unknown class>

Allocates @block_size bytes of memory, and adds reference counting semantics to it.

Link copied to clipboard
fun rcBoxAlloc0(blockSize: <Error class: unknown class>): <Error class: unknown class>

Allocates @block_size bytes of memory, and adds reference counting semantics to it.

Link copied to clipboard
fun rcBoxDup(blockSize: <Error class: unknown class>, memBlock: <Error class: unknown class>): <Error class: unknown class>

Allocates a new block of data with reference counting semantics, and copies @block_size bytes of @mem_block into it.

Link copied to clipboard
fun rcBoxGetSize(memBlock: <Error class: unknown class>): <Error class: unknown class>

Retrieves the size of the reference counted data pointed by @mem_block.

Link copied to clipboard
fun rcBoxRelease(memBlock: <Error class: unknown class>)

Releases a reference on the data pointed by @mem_block.

Link copied to clipboard
fun realloc(mem: <Error class: unknown class>? = null, nBytes: <Error class: unknown class>): <Error class: unknown class>?

Reallocates the memory pointed to by @mem, so that it now has space for

Link copied to clipboard
fun reallocN(mem: <Error class: unknown class>? = null, nBlocks: <Error class: unknown class>, nBlockBytes: <Error class: unknown class>): <Error class: unknown class>?

This function is similar to g_realloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication.

Link copied to clipboard

Acquires a reference on a string.

Link copied to clipboard
fun refStringLength(str: String): <Error class: unknown class>

Retrieves the length of @str.

Link copied to clipboard

Creates a new reference counted string and copies the contents of @str into it.

Link copied to clipboard

Creates a new reference counted string and copies the content of @str into it.

Link copied to clipboard

Creates a new reference counted string and copies the contents of @str into it, up to @len bytes.

Link copied to clipboard

Releases a reference on a string; if it was the last reference, the resources allocated by the string are freed as well.

Link copied to clipboard

Resets the cache used for g_get_user_special_dir(), so that the latest on-disk version is used. Call this only if you just changed the data on disk yourself.

Link copied to clipboard
Link copied to clipboard
fun returnIfFailWarning(logDomain: String? = null, prettyFunction: String, expression: String? = null)

Internal function used to print messages from the public func@GLib.return_if_fail and func@GLib.return_val_if_fail macros.

Link copied to clipboard
fun rmdir(filename: String): <Error class: unknown class>

A wrapper for the POSIX rmdir() function. The rmdir() function deletes a directory from the filesystem.

Link copied to clipboard
fun setApplicationName(applicationName: String)

Sets a human-readable name for the application. This name should be localized if possible, and is intended for display to the user. Contrast with g_set_prgname(), which sets a non-localized name. g_set_prgname() will be called automatically by gtk_init(), but g_set_application_name() will not.

Link copied to clipboard
fun setenv(variable: String, value: String, overwrite: Boolean): Boolean

Sets an environment variable. On UNIX, both the variable's name and value can be arbitrary byte strings, except that the variable's name cannot contain '='. On Windows, they should be in UTF-8.

Link copied to clipboard
fun setPrgname(prgname: String)

Sets the name of the program. This name should not be localized, in contrast to g_set_application_name().

Link copied to clipboard
fun shellErrorQuark(): <Error class: unknown class>
Link copied to clipboard
fun shellQuote(unquotedString: String): String

Quotes a string so that the shell (/bin/sh) will interpret the quoted string to mean @unquoted_string.

Link copied to clipboard
fun shellUnquote(quotedString: String): <Error class: unknown class><String>

Unquotes a string as the shell (/bin/sh) would.

Link copied to clipboard
fun sliceAlloc(blockSize: <Error class: unknown class>): <Error class: unknown class>?

Allocates a block of memory from the libc allocator.

Link copied to clipboard
fun sliceAlloc0(blockSize: <Error class: unknown class>): <Error class: unknown class>?

Allocates a block of memory via g_slice_alloc() and initializes the returned memory to 0.

Link copied to clipboard
fun sliceCopy(blockSize: <Error class: unknown class>, memBlock: <Error class: unknown class>? = null): <Error class: unknown class>?

Allocates a block of memory from the slice allocator and copies @block_size bytes into it from @mem_block.

Link copied to clipboard
fun sliceFree1(blockSize: <Error class: unknown class>, memBlock: <Error class: unknown class>? = null)

Frees a block of memory.

Link copied to clipboard
fun sliceFreeChainWithOffset(blockSize: <Error class: unknown class>, memChain: <Error class: unknown class>? = null, nextOffset: <Error class: unknown class>)

Frees a linked list of memory blocks of structure type @type.

Link copied to clipboard
fun sliceGetConfig(ckey: SliceConfig): <Error class: unknown class>
Link copied to clipboard
fun sliceSetConfig(ckey: SliceConfig, value: <Error class: unknown class>)
Link copied to clipboard
fun spacedPrimesClosest(num: <Error class: unknown class>): <Error class: unknown class>

Gets the smallest prime number from a built-in array of primes which is larger than @num. This is used within GLib to calculate the optimum size of a #GHashTable.

Link copied to clipboard
fun spawnCheckExitStatus(waitStatus: <Error class: unknown class>): <Error class: unknown class><Boolean>

An old name for g_spawn_check_wait_status(), deprecated because its name is misleading.

Link copied to clipboard
fun spawnCheckWaitStatus(waitStatus: <Error class: unknown class>): <Error class: unknown class><Boolean>

Set @error if @wait_status indicates the child exited abnormally (e.g. with a nonzero exit code, or via a fatal signal).

Link copied to clipboard
fun spawnClosePid(pid: <Error class: unknown class>)

On some platforms, notably Windows, the #GPid type represents a resource which must be closed to prevent resource leaking. g_spawn_close_pid() is provided for this purpose. It should be used on all platforms, even though it doesn't do anything under UNIX.

Link copied to clipboard
fun spawnCommandLineAsync(commandLine: String): <Error class: unknown class><Boolean>

A simple version of g_spawn_async() that parses a command line with g_shell_parse_argv() and passes it to g_spawn_async().

Link copied to clipboard
fun spawnErrorQuark(): <Error class: unknown class>
Link copied to clipboard
fun spawnExitErrorQuark(): <Error class: unknown class>
Link copied to clipboard
fun strcanon(string: String, validChars: String, substitutor: Char): String

For each character in @string, if the character is not in @valid_chars, replaces the character with @substitutor.

Link copied to clipboard
fun strcasecmp(s1: String, s2: String): <Error class: unknown class>

A case-insensitive string comparison, corresponding to the standard strcasecmp() function on platforms which support it.

Link copied to clipboard
fun strchomp(string: String): String

Removes trailing whitespace from a string.

Link copied to clipboard
fun strchug(string: String): String

Removes leading whitespace from a string, by moving the rest of the characters forward.

Link copied to clipboard
fun strcmp0(str1: String? = null, str2: String? = null): <Error class: unknown class>

Compares @str1 and @str2 like strcmp(). Handles null gracefully by sorting it before non-null strings. Comparing two null pointers returns 0.

Link copied to clipboard
fun strcompress(source: String): String

Makes a copy of a string replacing C string-style escape sequences with their one byte equivalent:

Link copied to clipboard
fun strdelimit(string: String, delimiters: String? = null, newDelimiter: Char): String

Converts any delimiter characters in @string to @new_delimiter.

Link copied to clipboard
fun strdown(string: String): String

Converts a string to lower case.

Link copied to clipboard
fun strdup(str: String? = null): String

Duplicates a string. If @str is NULL it returns NULL.

Link copied to clipboard
fun strdupv(strArray: List<String>? = null): List<String>?

Copies an array of strings. The copy is a deep copy; each string is also copied.

Link copied to clipboard
fun strEqual(v1: <Error class: unknown class>, v2: <Error class: unknown class>): Boolean

Compares two strings for byte-by-byte equality and returns true if they are equal. It can be passed to g_hash_table_new() as the

Link copied to clipboard
fun strerror(errnum: <Error class: unknown class>): String

Returns a string corresponding to the given error code, e.g. "no such process".

Link copied to clipboard
fun strescape(source: String, exceptions: String? = null): String

It replaces the following special characters in the string @source with their corresponding C escape sequence:

Link copied to clipboard
fun strfreev(strArray: List<String>? = null)

Frees an array of strings, as well as each string it contains.

Link copied to clipboard
fun strHash(v: <Error class: unknown class>): <Error class: unknown class>

Converts a string to a hash value.

Link copied to clipboard
fun strHasPrefix(str: String, prefix: String): Boolean

Looks whether the string @str begins with @prefix.

Link copied to clipboard
fun strHasSuffix(str: String, suffix: String): Boolean

Looks whether a string ends with @suffix.

Link copied to clipboard
fun stripContext(msgid: String, msgval: String): String

An auxiliary function for gettext() support (see Q_()).

Link copied to clipboard

Determines if a string is pure ASCII. A string is pure ASCII if it contains no bytes with the high bit set.

Link copied to clipboard
fun strjoinv(separator: String? = null, strArray: List<String>): String

Joins an array of strings together to form one long string, with the optional @separator inserted between each of them.

Link copied to clipboard
fun strlcat(dest: String, src: String, destSize: <Error class: unknown class>): <Error class: unknown class>

Portability wrapper that calls strlcat() on systems which have it, and emulates it otherwise. Appends nul-terminated @src string to @dest, guaranteeing nul-termination for @dest. The total size of @dest won't exceed @dest_size.

Link copied to clipboard
fun strlcpy(dest: String, src: String, destSize: <Error class: unknown class>): <Error class: unknown class>

Portability wrapper that calls strlcpy() on systems which have it, and emulates strlcpy() otherwise. Copies @src to @dest; @dest is guaranteed to be nul-terminated; @src must be nul-terminated;

Link copied to clipboard
fun strMatchString(searchTerm: String, potentialHit: String, acceptAlternates: Boolean): Boolean

Checks if a search conducted for @search_term should match

Link copied to clipboard
fun strncasecmp(s1: String, s2: String, n: <Error class: unknown class>): <Error class: unknown class>

A case-insensitive string comparison, corresponding to the standard strncasecmp() function on platforms which support it. It is similar to func@GLib.strcasecmp except it only compares the first @n characters of the strings.

Link copied to clipboard
fun strndup(str: String? = null, n: <Error class: unknown class>): String?

Duplicates the first @n bytes of a string, returning a newly-allocated buffer @n + 1 bytes long which will always be nul-terminated. If @str is less than @n bytes long the buffer is padded with nuls. If @str is NULL it returns NULL.

Link copied to clipboard
fun strnfill(length: <Error class: unknown class>, fillChar: Char): String

Creates a new string @length bytes long filled with @fill_char.

Link copied to clipboard
fun strreverse(string: String): String

Reverses all of the bytes in a string. For example, g_strreverse ("abcdef") will result in "fedcba".

Link copied to clipboard
fun strrstr(haystack: String, needle: String): String?

Searches the string @haystack for the last occurrence of the string @needle.

Link copied to clipboard
fun strrstrLen(haystack: String, haystackLen: Long, needle: String): String?

Searches the string @haystack for the last occurrence of the string @needle, limiting the length of the search to @haystack_len.

Link copied to clipboard
fun strsignal(signum: <Error class: unknown class>): String

Returns a string describing the given signal, e.g. "Segmentation fault". If the signal is unknown, it returns “unknown signal ()”.

Link copied to clipboard
fun strsplit(string: String, delimiter: String, maxTokens: <Error class: unknown class>): List<String>

Splits a string into a maximum of @max_tokens pieces, using the given

Link copied to clipboard
fun strsplitSet(string: String, delimiters: String, maxTokens: <Error class: unknown class>): List<String>

Splits @string into a number of tokens not containing any of the characters in @delimiters. A token is the (possibly empty) longest string that does not contain any of the characters in @delimiters. If @max_tokens is reached, the remainder is appended to the last token.

Link copied to clipboard
fun strstrLen(haystack: String, haystackLen: Long, needle: String): String?

Searches the string @haystack for the first occurrence of the string @needle, limiting the length of the search to @haystack_len or a nul terminator byte (whichever is reached first).

Link copied to clipboard
fun strToAscii(str: String, fromLocale: String? = null): String

Transliterate @str to plain ASCII.

Link copied to clipboard
fun strup(string: String): String

Converts a string to upper case.

Link copied to clipboard

Checks if an array of strings contains the string @str according to func@GLib.str_equal. @strv must not be NULL.

Link copied to clipboard
fun strvEqual(strv1: List<String>, strv2: List<String>): Boolean

Checks if two arrays of strings contain exactly the same elements in exactly the same order.

Link copied to clipboard
fun strvGetType(): <Error class: unknown class>
Link copied to clipboard
fun strvLength(strArray: List<String>): <Error class: unknown class>

Returns the length of an array of strings. @str_array must not be NULL.

Link copied to clipboard
fun testAssertExpectedMessagesInternal(domain: String, file: String, line: <Error class: unknown class>, func: String)
Link copied to clipboard
fun testBug(bugUriSnippet: String)

This function adds a message to test reports that associates a bug URI with a test case.

Link copied to clipboard
fun testBugBase(uriPattern: String)

Specify the base URI for bug reports.

Link copied to clipboard

Attempt to disable system crash reporting infrastructure.

Link copied to clipboard
fun testExpectMessage(logDomain: String? = null, logLevel: LogLevelFlags, pattern: String)

Indicates that a message with the given @log_domain and @log_level, with text matching @pattern, is expected to be logged.

Link copied to clipboard
fun testFail()

Indicates that a test failed. This function can be called multiple times from the same test. You can use this function if your test failed in a recoverable way.

Link copied to clipboard

Returns whether a test has already failed. This will be the case when g_test_fail(), g_test_incomplete() or g_test_skip() have been called, but also if an assertion has failed.

Link copied to clipboard

Gets the pathname of the directory containing test files of the type specified by @file_type.

Link copied to clipboard

Gets the test path for the test currently being run.

Link copied to clipboard
fun testIncomplete(msg: String? = null)

Indicates that a test failed because of some incomplete functionality. This function can be called multiple times from the same test.

Link copied to clipboard

Installs a non-error fatal log handler which can be used to decide whether log messages which are counted as fatal abort the program.

Link copied to clipboard
Link copied to clipboard
fun testQueueFree(gfreePointer: <Error class: unknown class>? = null)

Enqueue a pointer to be released with g_free() during the next teardown phase. This is equivalent to calling g_test_queue_destroy() with a destroy callback of g_free().

Link copied to clipboard
fun testRandDouble(): <Error class: unknown class>

Get a reproducible random floating point number, see g_test_rand_int() for details on test case random numbers.

Link copied to clipboard
fun testRandDoubleRange(rangeStart: <Error class: unknown class>, rangeEnd: <Error class: unknown class>): <Error class: unknown class>

Get a reproducible random floating pointer number out of a specified range, see g_test_rand_int() for details on test case random numbers.

Link copied to clipboard
fun testRandInt(): <Error class: unknown class>

Get a reproducible random integer number.

Link copied to clipboard
fun testRandIntRange(begin: <Error class: unknown class>, end: <Error class: unknown class>): <Error class: unknown class>

Get a reproducible random integer number out of a specified range, see g_test_rand_int() for details on test case random numbers.

Link copied to clipboard
fun testRun(): <Error class: unknown class>

Runs all tests under the toplevel suite which can be retrieved with g_test_get_root(). Similar to g_test_run_suite(), the test cases to be run are filtered according to test path arguments (-p testpath and -s testpath) as parsed by g_test_init(). g_test_run_suite() or g_test_run() may only be called once in a program.

Link copied to clipboard

Changes the behaviour of the various g_assert_*() macros, g_test_assert_expected_messages() and the various g_test_trap_assert_*() macros to not abort to program, but instead call g_test_fail() and continue. (This also changes the behavior of g_test_fail() so that it will not cause the test program to abort after completing the failed test.)

Link copied to clipboard
fun testSkip(msg: String? = null)

Indicates that a test was skipped.

Link copied to clipboard

Returns true (after g_test_init() has been called) if the test program is running under g_test_trap_subprocess().

Link copied to clipboard
fun testSummary(summary: String)

Set the summary for a test, which describes what the test checks, and how it goes about checking it. This may be included in test report output, and is useful documentation for anyone reading the source code or modifying a test in future. It must be a single line.

Link copied to clipboard
fun testTimerElapsed(): <Error class: unknown class>

Get the number of seconds since the last start of the timer with g_test_timer_start().

Link copied to clipboard
fun testTimerLast(): <Error class: unknown class>

Report the last result of g_test_timer_elapsed().

Link copied to clipboard

Start a timing test. Call g_test_timer_elapsed() when the task is supposed to be done. Call this function again to restart the timer.

Link copied to clipboard
fun testTrapAssertions(domain: String, file: String, line: <Error class: unknown class>, func: String, assertionFlags: <Error class: unknown class>, pattern: String)
Link copied to clipboard
fun testTrapFork(usecTimeout: <Error class: unknown class>, testTrapFlags: TestTrapFlags): Boolean

Fork the current test program to execute a test case that might not return or that might abort.

Link copied to clipboard

Check the result of the last g_test_trap_subprocess() call.

Link copied to clipboard

Check the result of the last g_test_trap_subprocess() call.

Link copied to clipboard
fun testTrapSubprocess(testPath: String? = null, usecTimeout: <Error class: unknown class>, testFlags: TestSubprocessFlags)

Respawns the test program to run only @test_path in a subprocess.

Link copied to clipboard
fun testTrapSubprocessWithEnvp(testPath: String? = null, envp: List<String>? = null, usecTimeout: <Error class: unknown class>, testFlags: TestSubprocessFlags)

Respawns the test program to run only @test_path in a subprocess with the given @envp environment.

Link copied to clipboard
fun timeoutAdd(priority: <Error class: unknown class>, interval: <Error class: unknown class>, function: SourceFunc): <Error class: unknown class>

Sets a function to be called at regular intervals, with the given priority. The function is called repeatedly until it returns false, at which point the timeout is automatically destroyed and the function will not be called again. The @notify function is called when the timeout is destroyed. The first call to the function will be at the end of the first @interval.

Link copied to clipboard
fun timeoutAddOnce(interval: <Error class: unknown class>, function: SourceOnceFunc): <Error class: unknown class>

Sets a function to be called after @interval milliseconds have elapsed, with the default priority, const@GLib.PRIORITY_DEFAULT.

Link copied to clipboard
fun timeoutAddSeconds(priority: <Error class: unknown class>, interval: <Error class: unknown class>, function: SourceFunc): <Error class: unknown class>

Sets a function to be called at regular intervals, with @priority.

Link copied to clipboard
fun timeoutAddSecondsOnce(interval: <Error class: unknown class>, function: SourceOnceFunc): <Error class: unknown class>

This function behaves like func@GLib.timeout_add_once but with a range in seconds.

Link copied to clipboard
fun timeoutSourceNew(interval: <Error class: unknown class>): Source

Creates a new timeout source.

Link copied to clipboard
fun timeoutSourceNewSeconds(interval: <Error class: unknown class>): Source

Creates a new timeout source.

Link copied to clipboard
fun tryMalloc(nBytes: <Error class: unknown class>): <Error class: unknown class>?

Attempts to allocate @n_bytes, and returns null on failure. Contrast with g_malloc(), which aborts the program on failure.

Link copied to clipboard
fun tryMalloc0(nBytes: <Error class: unknown class>): <Error class: unknown class>?

Attempts to allocate @n_bytes, initialized to 0's, and returns null on failure. Contrast with g_malloc0(), which aborts the program on failure.

Link copied to clipboard
fun tryMalloc0N(nBlocks: <Error class: unknown class>, nBlockBytes: <Error class: unknown class>): <Error class: unknown class>?

This function is similar to g_try_malloc0(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication.

Link copied to clipboard
fun tryMallocN(nBlocks: <Error class: unknown class>, nBlockBytes: <Error class: unknown class>): <Error class: unknown class>?

This function is similar to g_try_malloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication.

Link copied to clipboard
fun tryRealloc(mem: <Error class: unknown class>? = null, nBytes: <Error class: unknown class>): <Error class: unknown class>?

Attempts to realloc @mem to a new size, @n_bytes, and returns null on failure. Contrast with g_realloc(), which aborts the program on failure.

Link copied to clipboard
fun tryReallocN(mem: <Error class: unknown class>? = null, nBlocks: <Error class: unknown class>, nBlockBytes: <Error class: unknown class>): <Error class: unknown class>?

This function is similar to g_try_realloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication.

Link copied to clipboard
fun unicharBreakType(c: <Error class: unknown class>): UnicodeBreakType

Determines the break type of @c. @c should be a Unicode character (to derive a character from UTF-8 encoded text, use g_utf8_get_char()). The break type is used to find word and line breaks ("text boundaries"), Pango implements the Unicode boundary resolution algorithms and normally you would use a function such as pango_break() instead of caring about break types yourself.

Link copied to clipboard
fun unicharCombiningClass(uc: <Error class: unknown class>): <Error class: unknown class>

Determines the canonical combining class of a Unicode character.

Link copied to clipboard
fun unicharDigitValue(c: <Error class: unknown class>): <Error class: unknown class>

Determines the numeric value of a character as a decimal digit.

Link copied to clipboard
fun unicharGetScript(ch: <Error class: unknown class>): UnicodeScript

Looks up the #GUnicodeScript for a particular character (as defined by Unicode Standard Annex \#24). No check is made for @ch being a valid Unicode character; if you pass in invalid character, the result is undefined.

Link copied to clipboard
fun unicharIsalnum(c: <Error class: unknown class>): Boolean

Determines whether a character is alphanumeric. Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIsalpha(c: <Error class: unknown class>): Boolean

Determines whether a character is alphabetic (i.e. a letter). Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIscntrl(c: <Error class: unknown class>): Boolean

Determines whether a character is a control character. Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIsdefined(c: <Error class: unknown class>): Boolean

Determines if a given character is assigned in the Unicode standard.

Link copied to clipboard
fun unicharIsdigit(c: <Error class: unknown class>): Boolean

Determines whether a character is numeric (i.e. a digit). This covers ASCII 0-9 and also digits in other languages/scripts. Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIsgraph(c: <Error class: unknown class>): Boolean

Determines whether a character is printable and not a space (returns false for control characters, format characters, and spaces). g_unichar_isprint() is similar, but returns true for spaces. Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIslower(c: <Error class: unknown class>): Boolean

Determines whether a character is a lowercase letter. Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIsmark(c: <Error class: unknown class>): Boolean

Determines whether a character is a mark (non-spacing mark, combining mark, or enclosing mark in Unicode speak). Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIsprint(c: <Error class: unknown class>): Boolean

Determines whether a character is printable. Unlike g_unichar_isgraph(), returns true for spaces. Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIspunct(c: <Error class: unknown class>): Boolean

Determines whether a character is punctuation or a symbol. Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIsspace(c: <Error class: unknown class>): Boolean

Determines whether a character is a space, tab, or line separator (newline, carriage return, etc.). Given some UTF-8 text, obtain a character value with g_utf8_get_char().

Link copied to clipboard
fun unicharIstitle(c: <Error class: unknown class>): Boolean

Determines if a character is titlecase. Some characters in Unicode which are composites, such as the DZ digraph have three case variants instead of just two. The titlecase form is used at the beginning of a word where only the first letter is capitalized. The titlecase form of the DZ digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z.

Link copied to clipboard
fun unicharIsupper(c: <Error class: unknown class>): Boolean

Determines if a character is uppercase.

Link copied to clipboard
fun unicharIswide(c: <Error class: unknown class>): Boolean

Determines if a character is typically rendered in a double-width cell.

Link copied to clipboard
fun unicharIswideCjk(c: <Error class: unknown class>): Boolean

Determines if a character is typically rendered in a double-width cell under legacy East Asian locales. If a character is wide according to g_unichar_iswide(), then it is also reported wide with this function, but the converse is not necessarily true. See the Unicode Standard Annex #11 for details.

Link copied to clipboard
fun unicharIsxdigit(c: <Error class: unknown class>): Boolean

Determines if a character is a hexadecimal digit.

Link copied to clipboard
fun unicharIszerowidth(c: <Error class: unknown class>): Boolean

Determines if a given character typically takes zero width when rendered. The return value is true for all non-spacing and enclosing marks (e.g., combining accents), format characters, zero-width space, but not U+00AD SOFT HYPHEN.

Link copied to clipboard
fun unicharTolower(c: <Error class: unknown class>): <Error class: unknown class>

Converts a character to lower case.

Link copied to clipboard
fun unicharTotitle(c: <Error class: unknown class>): <Error class: unknown class>

Converts a character to the titlecase.

Link copied to clipboard
fun unicharToupper(c: <Error class: unknown class>): <Error class: unknown class>

Converts a character to uppercase.

Link copied to clipboard
fun unicharType(c: <Error class: unknown class>): UnicodeType

Classifies a Unicode character by type.

Link copied to clipboard
fun unicharValidate(ch: <Error class: unknown class>): Boolean

Checks whether @ch is a valid Unicode character. Some possible integer values of @ch will not be valid. 0 is considered a valid character, though it's normally a string terminator.

Link copied to clipboard
fun unicharXdigitValue(c: <Error class: unknown class>): <Error class: unknown class>

Determines the numeric value of a character as a hexadecimal digit.

Link copied to clipboard
fun unixErrorQuark(): <Error class: unknown class>
Link copied to clipboard
fun unixFdAdd(fd: <Error class: unknown class>, condition: IoCondition, function: UnixFdSourceFunc): <Error class: unknown class>

Sets a function to be called when the IO condition, as specified by

Link copied to clipboard
fun unixFdAddFull(priority: <Error class: unknown class>, fd: <Error class: unknown class>, condition: IoCondition, function: UnixFdSourceFunc): <Error class: unknown class>

Sets a function to be called when the IO condition, as specified by

Link copied to clipboard
fun unixFdSourceNew(fd: <Error class: unknown class>, condition: IoCondition): Source

Creates a #GSource to watch for a particular I/O condition on a file descriptor.

Link copied to clipboard
fun unixSetFdNonblocking(fd: <Error class: unknown class>, nonblock: Boolean): <Error class: unknown class><Boolean>

Control the non-blocking state of the given file descriptor, according to @nonblock. On most systems this uses %O_NONBLOCK, but on some older ones may use %O_NDELAY.

Link copied to clipboard
fun unixSignalAdd(priority: <Error class: unknown class>, signum: <Error class: unknown class>, handler: SourceFunc): <Error class: unknown class>

A convenience function for g_unix_signal_source_new(), which attaches to the default #GMainContext. You can remove the watch using g_source_remove().

Link copied to clipboard
fun unixSignalSourceNew(signum: <Error class: unknown class>): Source

Create a #GSource that will be dispatched upon delivery of the UNIX signal @signum. In GLib versions before 2.36, only SIGHUP, SIGINT, SIGTERM can be monitored. In GLib 2.36, SIGUSR1 and SIGUSR2 were added. In GLib 2.54, SIGWINCH was added.

Link copied to clipboard
fun unlink(filename: String): <Error class: unknown class>

A wrapper for the POSIX unlink() function. The unlink() function deletes a name from the filesystem. If this was the last link to the file and no processes have it opened, the diskspace occupied by the file is freed.

Link copied to clipboard
fun unsetenv(variable: String)

Removes an environment variable from the environment.

Link copied to clipboard
fun usleep(microseconds: <Error class: unknown class>)

Pauses the current thread for the given number of microseconds.

Link copied to clipboard
fun utf8Casefold(str: String, len: Long): String

Converts a string into a form that is independent of case. The result will not correspond to any particular case, but can be compared for equality or ordered with the results of calling g_utf8_casefold() on other strings.

Link copied to clipboard
fun utf8Collate(str1: String, str2: String): <Error class: unknown class>

Compares two strings for ordering using the linguistically correct rules for the setlocale. When sorting a large number of strings, it will be significantly faster to obtain collation keys with g_utf8_collate_key() and compare the keys with strcmp() when sorting instead of sorting the original strings.

Link copied to clipboard
fun utf8CollateKey(str: String, len: Long): String

Converts a string into a collation key that can be compared with other collation keys produced by the same function using strcmp().

Link copied to clipboard

Converts a string into a collation key that can be compared with other collation keys produced by the same function using strcmp().

Link copied to clipboard
fun utf8FindNextChar(p: String, end: String? = null): String?

Finds the start of the next UTF-8 character in the string after @p.

Link copied to clipboard

Given a position @p with a UTF-8 encoded string @str, find the start of the previous UTF-8 character starting before @p. Returns null if no UTF-8 characters are present in @str before @p.

Link copied to clipboard
fun utf8GetChar(p: String): <Error class: unknown class>

Converts a sequence of bytes encoded as UTF-8 to a Unicode character.

Link copied to clipboard
fun utf8GetCharValidated(p: String, maxLen: Long): <Error class: unknown class>

Convert a sequence of bytes encoded as UTF-8 to a Unicode character. This function checks for incomplete characters, for invalid characters such as characters that are out of the range of Unicode, and for overlong encodings of valid characters.

Link copied to clipboard
fun utf8MakeValid(str: String, len: Long): String

If the provided string is valid UTF-8, return a copy of it. If not, return a copy in which bytes that could not be interpreted as valid Unicode are replaced with the Unicode replacement character (U+FFFD).

Link copied to clipboard
fun utf8Normalize(str: String, len: Long, mode: NormalizeMode): String?

Converts a string into canonical form, standardizing such issues as whether a character with an accent is represented as a base character and combining accent or as a single precomposed character. The string has to be valid UTF-8, otherwise null is returned. You should generally call g_utf8_normalize() before comparing two Unicode strings.

Link copied to clipboard
fun utf8OffsetToPointer(str: String, offset: <Error class: unknown class>): String

Converts from an integer character offset to a pointer to a position within the string.

Link copied to clipboard
fun utf8PointerToOffset(str: String, pos: String): <Error class: unknown class>

Converts from a pointer to position within a string to an integer character offset.

Link copied to clipboard

Finds the previous UTF-8 character in the string before @p.

Link copied to clipboard
fun utf8Strchr(p: String, len: Long, c: <Error class: unknown class>): String?

Finds the leftmost occurrence of the given Unicode character in a UTF-8 encoded string, while limiting the search to @len bytes. If @len is -1, allow unbounded search.

Link copied to clipboard
fun utf8Strdown(str: String, len: Long): String

Converts all Unicode characters in the string that have a case to lowercase. The exact manner that this is done depends on the current locale, and may result in the number of characters in the string changing.

Link copied to clipboard
fun utf8Strlen(p: String, max: Long): <Error class: unknown class>

Computes the length of the string in characters, not including the terminating nul character. If the @max'th byte falls in the middle of a character, the last (partial) character is not counted.

Link copied to clipboard
fun utf8Strncpy(dest: String, src: String, n: <Error class: unknown class>): String

Like the standard C strncpy() function, but copies a given number of characters instead of a given number of bytes. The @src string must be valid UTF-8 encoded text. (Use g_utf8_validate() on all text before trying to use UTF-8 utility functions with it.)

Link copied to clipboard
fun utf8Strrchr(p: String, len: Long, c: <Error class: unknown class>): String?

Find the rightmost occurrence of the given Unicode character in a UTF-8 encoded string, while limiting the search to @len bytes. If @len is -1, allow unbounded search.

Link copied to clipboard
fun utf8Strreverse(str: String, len: Long): String

Reverses a UTF-8 string. @str must be valid UTF-8 encoded text. (Use g_utf8_validate() on all text before trying to use UTF-8 utility functions with it.)

Link copied to clipboard
fun utf8Strup(str: String, len: Long): String

Converts all Unicode characters in the string that have a case to uppercase. The exact manner that this is done depends on the current locale, and may result in the number of characters in the string increasing. (For instance, the German ess-zet will be changed to SS.)

Link copied to clipboard
fun utf8Substring(str: String, startPos: <Error class: unknown class>, endPos: <Error class: unknown class>): String

Copies a substring out of a UTF-8 encoded string. The substring will contain @end_pos - @start_pos characters.

Link copied to clipboard
fun utf8TruncateMiddle(string: String, truncateLength: <Error class: unknown class>): String

Cuts off the middle of the string, preserving half of @truncate_length characters at the beginning and half at the end.

Link copied to clipboard

Parses the string @str and verify if it is a UUID.

Link copied to clipboard

Generates a random UUID (RFC 4122 version 4) as a string. It has the same randomness guarantees as #GRand, so must not be used for cryptographic purposes such as key generation, nonces, salts or one-time pads.

Link copied to clipboard
fun variantGetGtype(): <Error class: unknown class>
Link copied to clipboard
fun warnMessage(domain: String? = null, file: String, line: <Error class: unknown class>, func: String, warnexpr: String? = null)

Internal function used to print messages from the public func@GLib.warn_if_reached and func@GLib.warn_if_fail macros.