diff --git a/GLib-2.0.gir b/GLib-2.0.gir index 23408d4f..5890d4a8 100644 --- a/GLib-2.0.gir +++ b/GLib-2.0.gir @@ -376,7 +376,7 @@ underlying array for use elsewhere. If the reference count of the size of @array will be set to zero. If array contents point to dynamically-allocated memory, they should -be freed separately if @free_seg is %TRUE and no @clear_func +be freed separately if @free_segment is %TRUE and no @clear_func function has been set for @array. This function is not thread-safe. If using a #GArray from multiple @@ -3207,45 +3207,49 @@ thread. - A simple refcounted data type representing an immutable sequence of zero or -more bytes from an unspecified origin. + A simple reference counted data type representing an immutable sequence of +zero or more bytes from an unspecified origin. -The purpose of a #GBytes is to keep the memory region that it holds +The purpose of a `GBytes` is to keep the memory region that it holds alive for as long as anyone holds a reference to the bytes. When the last reference count is dropped, the memory is released. Multiple -unrelated callers can use byte data in the #GBytes without coordinating +unrelated callers can use byte data in the `GBytes` without coordinating their activities, resting assured that the byte data will not change or move while they hold a reference. -A #GBytes can come from many different origins that may have +A `GBytes` can come from many different origins that may have different procedures for freeing the memory region. Examples are -memory from g_malloc(), from memory slices, from a #GMappedFile or -memory from other allocators. +memory from [func@GLib.malloc], from memory slices, from a +[struct@GLib.MappedFile] or memory from other allocators. -#GBytes work well as keys in #GHashTable. Use g_bytes_equal() and -g_bytes_hash() as parameters to g_hash_table_new() or g_hash_table_new_full(). -#GBytes can also be used as keys in a #GTree by passing the g_bytes_compare() -function to g_tree_new(). +`GBytes` work well as keys in [struct@GLib.HashTable]. Use +[method@GLib.Bytes.equal] and [method@GLib.Bytes.hash] as parameters to +[func@GLib.HashTable.new] or [func@GLib.HashTable.new_full]. +`GBytes` can also be used as keys in a [struct@GLib.Tree] by passing the +[method@GLib.Bytes.compare] function to [ctor@GLib.Tree.new]. The data pointed to by this bytes must not be modified. For a mutable -array of bytes see #GByteArray. Use g_bytes_unref_to_array() to create a -mutable array for a #GBytes sequence. To create an immutable #GBytes from -a mutable #GByteArray, use the g_byte_array_free_to_bytes() function. +array of bytes see [struct@GLib.ByteArray]. Use +[method@GLib.Bytes.unref_to_array] to create a mutable array for a `GBytes` +sequence. To create an immutable `GBytes` from a mutable +[struct@GLib.ByteArray], use the [func@GLib.ByteArray.free_to_bytes] +function. - Creates a new #GBytes from @data. + Creates a new [struct@GLib.Bytes] from @data. -@data is copied. If @size is 0, @data may be %NULL. +@data is copied. If @size is 0, @data may be `NULL`. -As an optimization, g_bytes_new() may avoid an extra allocation by copying -the data within the resulting bytes structure if sufficiently small (since GLib 2.84). +As an optimization, [ctor@GLib.Bytes.new] may avoid an extra allocation by +copying the data within the resulting bytes structure if sufficiently small +(since GLib 2.84). - a new #GBytes + a new [struct@GLib.Bytes] - the data to be used for the bytes + the data to be used for the bytes @@ -3257,18 +3261,18 @@ the data within the resulting bytes structure if sufficiently small (since GLib - Creates a new #GBytes from static data. + Creates a new [struct@GLib.Bytes] from static data. -@data must be static (ie: never modified or freed). It may be %NULL if @size +@data must be static (ie: never modified or freed). It may be `NULL` if @size is 0. - a new #GBytes + a new [struct@GLib.Bytes] - the data to be used for the bytes + the data to be used for the bytes @@ -3280,24 +3284,24 @@ is 0. - Creates a new #GBytes from @data. + Creates a new [struct@GLib.Bytes] from @data. -After this call, @data belongs to the #GBytes and may no longer be +After this call, @data belongs to the `GBytes` and may no longer be modified by the caller. The memory of @data has to be dynamically -allocated and will eventually be freed with g_free(). +allocated and will eventually be freed with [func@GLib.free]. -For creating #GBytes with memory from other allocators, see -g_bytes_new_with_free_func(). +For creating `GBytes` with memory from other allocators, see +[ctor@GLib.Bytes.new_with_free_func]. -@data may be %NULL if @size is 0. +@data may be `NULL` if @size is 0. - a new #GBytes + a new [struct@GLib.Bytes] - the data to be used for the bytes + the data to be used for the bytes @@ -3309,7 +3313,7 @@ g_bytes_new_with_free_func(). - Creates a #GBytes from @data. + Creates a [struct@GLib.Bytes] from @data. When the last reference is dropped, @free_func will be called with the @user_data argument. @@ -3317,15 +3321,15 @@ When the last reference is dropped, @free_func will be called with the @data must not be modified after this call is made until @free_func has been called to indicate that the bytes is no longer in use. -@data may be %NULL if @size is 0. +@data may be `NULL` if @size is 0. - a new #GBytes + a new [struct@GLib.Bytes] - the data to be used for the bytes + the data to be used for the bytes @@ -3345,9 +3349,10 @@ been called to indicate that the bytes is no longer in use. - Compares the two #GBytes values. + Compares the two [struct@GLib.Bytes] values. -This function can be used to sort GBytes instances in lexicographical order. +This function can be used to sort `GBytes` instances in lexicographical +order. If @bytes1 and @bytes2 have different length but the shorter one is a prefix of the longer one then the shorter one is considered to be less than @@ -3356,60 +3361,62 @@ comparison. If @bytes1 has a smaller value at that position it is considered less, otherwise greater than @bytes2. a negative value if @bytes1 is less than @bytes2, a positive value - if @bytes1 is greater than @bytes2, and zero if @bytes1 is equal to - @bytes2 + if @bytes1 is greater than @bytes2, and zero if @bytes1 is equal to @bytes2 - a pointer to a #GBytes + a pointer to a [struct@GLib.Bytes] - a pointer to a #GBytes to compare with @bytes1 + a pointer to a [struct@GLib.Bytes] to compare with @bytes1 - Compares the two #GBytes values being pointed to and returns -%TRUE if they are equal. + Compares the two [struct@GLib.Bytes] values being pointed to and returns +`TRUE` if they are equal. -This function can be passed to g_hash_table_new() as the @key_equal_func -parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable. +This function can be passed to [func@GLib.HashTable.new] as the +@key_equal_func parameter, when using non-`NULL` `GBytes` pointers as keys in +a [struct@GLib.HashTable]. - %TRUE if the two keys match. + `TRUE` if the two keys match. - a pointer to a #GBytes + a pointer to a [struct@GLib.Bytes] - a pointer to a #GBytes to compare with @bytes1 + a pointer to a [struct@GLib.Bytes] to compare with @bytes1 - Get the byte data in the #GBytes. This data should not be modified. + Get the byte data in the [struct@GLib.Bytes]. + +This data should not be modified. -This function will always return the same pointer for a given #GBytes. +This function will always return the same pointer for a given `GBytes`. -%NULL may be returned if @size is 0. This is not guaranteed, as the #GBytes -may represent an empty string with @data non-%NULL and @size as 0. %NULL will -not be returned if @size is non-zero. +`NULL` may be returned if @size is 0. This is not guaranteed, as the `GBytes` +may represent an empty string with @data non-`NULL` and @size as 0. `NULL` +will not be returned if @size is non-zero. - a pointer to the byte data, or %NULL + a pointer to the byte data - a #GBytes + a [struct@GLib.Bytes] @@ -3425,27 +3432,27 @@ The region starts at @offset many bytes from the start of the data and contains @n_elements many elements of @element_size size. @n_elements may be zero, but @element_size must always be non-zero. -Ideally, @element_size is a static constant (eg: sizeof a struct). +Ideally, @element_size is a static constant (eg: `sizeof` a struct). This function does careful bounds checking (including checking for -arithmetic overflows) and returns a non-%NULL pointer if the +arithmetic overflows) and returns a non-`NULL` pointer if the specified region lies entirely within the @bytes. If the region is -in some way out of range, or if an overflow has occurred, then %NULL +in some way out of range, or if an overflow has occurred, then `NULL` is returned. Note: it is possible to have a valid zero-size region. In this case, the returned pointer will be equal to the base pointer of the data of -@bytes, plus @offset. This will be non-%NULL except for the case +@bytes, plus @offset. This will be non-`NULL` except for the case where @bytes itself was a zero-sized region. Since it is unlikely that you will be using this function to check for a zero-sized region -in a zero-sized @bytes, %NULL effectively always means "error". +in a zero-sized @bytes, `NULL` effectively always means ‘error’. - the requested region, or %NULL in case of an error + the requested region, or `NULL` in case of an error - a #GBytes + a [struct@GLib.Bytes] @@ -3463,55 +3470,57 @@ in a zero-sized @bytes, %NULL effectively always means "error". - Get the size of the byte data in the #GBytes. + Get the size of the byte data in the [struct@GLib.Bytes]. -This function will always return the same value for a given #GBytes. +This function will always return the same value for a given `GBytes`. the size - a #GBytes + a [struct@GLib.Bytes] - Creates an integer hash code for the byte data in the #GBytes. + Creates an integer hash code for the byte data in the [struct@GLib.Bytes]. -This function can be passed to g_hash_table_new() as the @key_hash_func -parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable. +This function can be passed to [func@GLib.HashTable.new] as the +@key_hash_func parameter, when using non-`NULL` `GBytes` pointers as keys in +a [struct@GLib.HashTable]. a hash value corresponding to the key. - a pointer to a #GBytes key + a pointer to a [struct@GLib.Bytes] key - Creates a #GBytes which is a subsection of another #GBytes. The @offset + -@length may not be longer than the size of @bytes. + Creates a [struct@GLib.Bytes] which is a subsection of another `GBytes`. -A reference to @bytes will be held by the newly created #GBytes until +The @offset + @length may not be longer than the size of @bytes. + +A reference to @bytes will be held by the newly created `GBytes` until the byte data is no longer needed. Since 2.56, if @offset is 0 and @length matches the size of @bytes, then @bytes will be returned with the reference count incremented by 1. If @bytes -is a slice of another #GBytes, then the resulting #GBytes will reference -the same #GBytes instead of @bytes. This allows consumers to simplify the -usage of #GBytes when asynchronously writing to streams. +is a slice of another `GBytes`, then the resulting `GBytes` will reference +the same `GBytes` instead of @bytes. This allows consumers to simplify the +usage of `GBytes` when asynchronously writing to streams. - a new #GBytes + a new [struct@GLib.Bytes] - a #GBytes + a [struct@GLib.Bytes] @@ -3527,51 +3536,55 @@ usage of #GBytes when asynchronously writing to streams. Increase the reference count on @bytes. - the #GBytes + the [struct@GLib.Bytes] - a #GBytes + a [struct@GLib.Bytes] - Releases a reference on @bytes. This may result in the bytes being -freed. If @bytes is %NULL, it will return immediately. + Releases a reference on @bytes. + +This may result in the bytes being freed. If @bytes is `NULL`, it will +return immediately. - a #GBytes + a [struct@GLib.Bytes] - Unreferences the bytes, and returns a new mutable #GByteArray containing -the same byte data. + Unreferences the bytes, and returns a new mutable [struct@GLib.ByteArray] +containing the same byte data. As an optimization, the byte data is transferred to the array without copying -if this was the last reference to bytes and bytes was created with -g_bytes_new(), g_bytes_new_take() or g_byte_array_free_to_bytes() and the -buffer was larger than the size #GBytes may internalize within its allocation. -In all other cases the data is copied. +if this was the last reference to @bytes and @bytes was created with +[ctor@GLib.Bytes.new], [ctor@GLib.Bytes.new_take] or +[func@GLib.ByteArray.free_to_bytes] and the buffer was larger than the size +[struct@GLib.Bytes] may internalize within its allocation. In all other cases +the data is copied. Do not use it if @bytes contains more than %G_MAXUINT -bytes. #GByteArray stores the length of its data in #guint, which -may be shorter than #gsize, that @bytes is using. +bytes. [struct@GLib.ByteArray] stores the length of its data in `guint`, +which may be shorter than `gsize`, that @bytes is using. - a new mutable #GByteArray containing the same byte data + a new mutable [struct@GLib.ByteArray] containing + the same byte data - a #GBytes + a [struct@GLib.Bytes] @@ -3581,20 +3594,21 @@ may be shorter than #gsize, that @bytes is using. contents. As an optimization, the byte data is returned without copying if this was -the last reference to bytes and bytes was created with g_bytes_new(), -g_bytes_new_take() or g_byte_array_free_to_bytes() and the buffer was larger -than the size #GBytes may internalize within its allocation. In all other -cases the data is copied. +the last reference to @bytes and @bytes was created with +[ctor@GLib.Bytes.new], [ctor@GLib.Bytes.new_take] or +[func@GLib.ByteArray.free_to_bytes] and the buffer was larger than the size +[struct@GLib.Bytes] may internalize within its allocation. In all other cases +the data is copied. - a pointer to the same byte data, which should be - freed with g_free() + + a pointer to the same byte data, which should be freed with [func@GLib.free] - a #GBytes + a [struct@GLib.Bytes] @@ -20452,7 +20466,7 @@ add elements to or remove elements from the array. - Frees the memory allocated for the #GPtrArray. If @free_seg is %TRUE + Frees the memory allocated for the #GPtrArray. If @free_segment is %TRUE it frees the memory block holding the elements as well. Pass %FALSE if you want to free the #GPtrArray wrapper but preserve the underlying array for use elsewhere. If the reference count of @array @@ -20460,10 +20474,10 @@ is greater than one, the #GPtrArray wrapper is preserved but the size of @array will be set to zero. If array contents point to dynamically-allocated memory, they should -be freed separately if @free_seg is %TRUE and no #GDestroyNotify +be freed separately if @free_segment is %TRUE and no #GDestroyNotify function has been set for @array. -Note that if the array is %NULL terminated and @free_seg is %FALSE +Note that if the array is %NULL terminated and @free_segment is %FALSE then this will always return an allocated %NULL terminated buffer. If pdata is previously %NULL, a new buffer will be allocated. @@ -20471,7 +20485,7 @@ This function is not thread-safe. If using a #GPtrArray from multiple threads, use only the atomic g_ptr_array_ref() and g_ptr_array_unref() functions. - the pointer array if @free_seg is + the pointer array if @free_segment is %FALSE, otherwise %NULL. The pointer array should be freed using g_free(). @@ -20482,7 +20496,7 @@ functions. - + if %TRUE the actual pointer array is freed as well @@ -34022,6 +34036,27 @@ See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr Nag Mundari. Since 2.74 + + Todhri. Since: 2.84 + + + Garay. Since: 2.84 + + + Tulu-Tigalari. Since: 2.84 + + + Sunuwar. Since: 2.84 + + + Gurung Khema. Since: 2.84 + + + Kirat Rai. Since: 2.84 + + + Ol Onal. Since: 2.84 + Looks up the Unicode script for @iso15924. ISO 15924 assigns four-letter codes to scripts. For example, the code for Arabic is 'Arab'. @@ -35802,29 +35837,54 @@ enumeration. - A stack-allocated #GVariantBuilder must be initialized if it is -used together with g_auto() to avoid warnings or crashes if -function returns before g_variant_builder_init() is called on the -builder. - -This macro can be used as initializer instead of an -explicit zeroing a variable when declaring it and a following -g_variant_builder_init(), but it cannot be assigned to a variable. - -The passed @variant_type should be a static GVariantType to avoid -lifetime issues, as copying the @variant_type does not happen in -the G_VARIANT_BUILDER_INIT() call, but rather in functions that -make sure that #GVariantBuilder is valid. + A stack-allocated [struct@GLib.VariantBuilder] must be initialized +if it is used together with +[`g_auto()`](auto-cleanup.html#variable-declaration). This macro can +be used as initializer when declaring the builder, but it cannot be +assigned to a variable. + +The effects of initializing the builder with +`G_VARIANT_BUILDER_INIT` is the same as initializing it with +[func@GLib.VARIANT_BUILDER_INIT_UNSET], followed by a call to +[method@GLib.VariantBuilder.init]. + +The passed @variant_type should be a static [type@GLib.VariantType] +to avoid lifetime issues, as copying the @variant_type does not +happen in the `G_VARIANT_BUILDER_INIT` call, but rather in functions +that make sure that [struct@GLib.VariantBuilder] is valid. -|[<!-- language="C" --> +```c g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_BYTESTRING); -]| +``` a const GVariantType* + + A stack-allocated [struct@GLib.VariantBuilder] must be initialized +if it is used together with +[`g_auto()`](auto-cleanup.html#variable-declaration). This macro can +be used as initializer when declaring the builder, but it cannot be +assigned to a variable. + +The builder can be initialized to a specific [type@GLib.VariantType] +later with [method@GLib.VariantBuilder.init]. + +Use [func@GLib.VARIANT_BUILDER_INIT] to directly initialize the +builder with a specific [type@GLib.VariantType]. + +```c + g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT_UNSET (); + + if (condition) + return NULL; + + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{su}")); + return g_variant_ref_sink (g_variant_builder_end (&builder)); +``` + A stack-allocated #GVariantDict must be initialized if it is used together with g_auto() to avoid warnings or crashes if function @@ -35854,18 +35914,19 @@ initialized with G_VARIANT_DICT_INIT(). - Converts a string to a const #GVariantType. Depending on the -current debugging level, this function may perform a runtime check -to ensure that @string is a valid GVariant type string. + Converts a string to a const [type@GLib.VariantType]. + +Depending on the current debugging level, this function may perform a runtime +check to ensure that @string is a valid [type@GLib.Variant] type string. It is always a programmer error to use this macro with an invalid -type string. If in doubt, use g_variant_type_string_is_valid() to +type string. If in doubt, use [func@GLib.variant_type_string_is_valid] to check if the string is valid. Since 2.24 - a well-formed #GVariantType type string + a well-formed [type@GLib.VariantType] type string @@ -39726,19 +39787,20 @@ so this type string corresponds to `G_VARIANT_TYPE_DICTIONARY`. Note that, due to the restriction that the key of a dictionary entry must be a basic type, `{**}` is not a valid type string. - Creates a new #GVariantType corresponding to the type string given -by @type_string. It is appropriate to call g_variant_type_free() on -the return value. + Creates a new [type@GLib.VariantType] corresponding to the type string given +by @type_string. + +It is appropriate to call [method@GLib.VariantType.free] on the return value. It is a programmer error to call this function with an invalid type -string. Use g_variant_type_string_is_valid() if you are unsure. +string. Use [func@GLib.VariantType.string_is_valid] if you are unsure. - a new #GVariantType + a new [type@GLib.VariantType] - a valid GVariant type string + a valid [GVariant type string](./struct.VariantType.html#gvariant-type-strings) @@ -39747,16 +39809,15 @@ string. Use g_variant_type_string_is_valid() if you are unsure. Constructs the type corresponding to an array of elements of the type @type. -It is appropriate to call g_variant_type_free() on the return value. +It is appropriate to call [method@GLib.VariantType.first] on the return value. - a new array #GVariantType - + a new array type Since 2.24 - a #GVariantType + an element type @@ -39765,38 +39826,36 @@ Since 2.24 Constructs the type corresponding to a dictionary entry with a key of type @key and a value of type @value. -It is appropriate to call g_variant_type_free() on the return value. +It is appropriate to call [method@GLib.VariantType.free] on the return value. - a new dictionary entry #GVariantType - + a new dictionary entry type Since 2.24 - a basic #GVariantType + a basic type to use for the key - a #GVariantType + a type to use for the value - Constructs the type corresponding to a maybe instance containing -type @type or Nothing. + Constructs the type corresponding to a ‘maybe’ instance containing +type @type or `Nothing`. -It is appropriate to call g_variant_type_free() on the return value. +It is appropriate to call [method@GLib.VariantType.free] on the return value. - a new maybe #GVariantType - + a new ‘maybe’ type Since 2.24 - a #GVariantType + an element type @@ -39804,75 +39863,74 @@ Since 2.24 Constructs a new tuple type, from @items. -@length is the number of items in @items, or -1 to indicate that -@items is %NULL-terminated. +@length is the number of items in @items, or `-1` to indicate that +@items is `NULL`-terminated. -It is appropriate to call g_variant_type_free() on the return value. +It is appropriate to call [method@GLib.VariantType.free] on the return value. - a new tuple #GVariantType - + a new tuple type Since 2.24 - an array of #GVariantTypes, one for each item + an array of types, one for each item - the length of @items, or -1 + the length of @items, or `-1` - Makes a copy of a #GVariantType. It is appropriate to call -g_variant_type_free() on the return value. @type may not be %NULL. - - a new #GVariantType + Makes a copy of a [type@GLib.VariantType]. +It is appropriate to call [method@GLib.VariantType.free] on the return value. +@type may not be `NULL`. + + a new [type@GLib.VariantType] Since 2.24 - a #GVariantType + type to copy - Returns a newly-allocated copy of the type string corresponding to -@type. The returned string is nul-terminated. It is appropriate to -call g_free() on the return value. + Returns a newly-allocated copy of the type string corresponding to @type. + +The returned string is nul-terminated. It is appropriate to call +[func@GLib.free] on the return value. the corresponding type string - Since 2.24 - a #GVariantType + type to copy - Determines the element type of an array or maybe type. + Determines the element type of an array or ‘maybe’ type. -This function may only be used with array or maybe types. +This function may only be used with array or ‘maybe’ types. the element type of @type - Since 2.24 - an array or maybe #GVariantType + an array or ‘maybe’ type @@ -39880,27 +39938,26 @@ Since 2.24 Compares @type1 and @type2 for equality. -Only returns %TRUE if the types are exactly equal. Even if one type -is an indefinite type and the other is a subtype of it, %FALSE will +Only returns true if the types are exactly equal. Even if one type +is an indefinite type and the other is a subtype of it, false will be returned if they are not exactly equal. If you want to check for -subtypes, use g_variant_type_is_subtype_of(). +subtypes, use [method@GLib.VariantType.is_subtype_of]. -The argument types of @type1 and @type2 are only #gconstpointer to -allow use with #GHashTable without function pointer casting. For -both arguments, a valid #GVariantType must be provided. +The argument types of @type1 and @type2 are only `gconstpointer` to +allow use with [type@GLib.HashTable] without function pointer casting. For +both arguments, a valid [type@GLib.VariantType] must be provided. - %TRUE if @type1 and @type2 are exactly equal - + true if @type1 and @type2 are exactly equal Since 2.24 - a #GVariantType + type to compare - a #GVariantType + another type to compare @@ -39911,34 +39968,34 @@ type. This function may only be used with tuple or dictionary entry types, but must not be used with the generic tuple type -%G_VARIANT_TYPE_TUPLE. +`G_VARIANT_TYPE_TUPLE`. In the case of a dictionary entry type, this returns the type of the key. -%NULL is returned in case of @type being %G_VARIANT_TYPE_UNIT. +`NULL` is returned in case of @type being `G_VARIANT_TYPE_UNIT`. -This call, together with g_variant_type_next() provides an iterator +This call, together with [method@GLib.VariantType.next] provides an iterator interface over tuple and dictionary entry types. - - the first item type of @type, or %NULL - + + the first item type of @type, or `NULL` + if the type has no item types Since 2.24 - a tuple or dictionary entry #GVariantType + a tuple or dictionary entry type - Frees a #GVariantType that was allocated with -g_variant_type_copy(), g_variant_type_new() or one of the container -type constructor functions. + Frees a [type@GLib.VariantType] that was allocated with +[method@GLib.VariantType.copy], [ctor@GLib.VariantType.new] or one of the +container type constructor functions. -In the case that @type is %NULL, this function does nothing. +In the case that @type is `NULL`, this function does nothing. Since 2.24 @@ -39946,24 +40003,24 @@ Since 2.24 - a #GVariantType, or %NULL + type to free - Returns the length of the type string corresponding to the given -@type. This function must be used to determine the valid extent of -the memory region returned by g_variant_type_peek_string(). + Returns the length of the type string corresponding to the given @type. + +This function must be used to determine the valid extent of +the memory region returned by [method@GLib.VariantType.peek_string]. the length of the corresponding type string - Since 2.24 - a #GVariantType + type to measure @@ -39971,38 +40028,37 @@ Since 2.24 Hashes @type. -The argument type of @type is only #gconstpointer to allow use with -#GHashTable without function pointer casting. A valid -#GVariantType must be provided. +The argument type of @type is only `gconstpointer` to allow use with +[type@GLib.HashTable] without function pointer casting. A valid +[type@GLib.VariantType] must be provided. the hash value - Since 2.24 - a #GVariantType + type to hash - Determines if the given @type is an array type. This is true if the -type string for @type starts with an 'a'. + Determines if the given @type is an array type. -This function returns %TRUE for any indefinite type for which every -definite subtype is an array type -- %G_VARIANT_TYPE_ARRAY, for +This is true if the type string for @type starts with an `a`. + +This function returns true for any indefinite type for which every +definite subtype is an array type — `G_VARIANT_TYPE_ARRAY`, for example. - %TRUE if @type is an array type - + true if @type is an array type Since 2.24 - a #GVariantType + type to check @@ -40015,17 +40071,16 @@ paths and signatures. Only a basic type may be used as the key of a dictionary entry. -This function returns %FALSE for all indefinite types except -%G_VARIANT_TYPE_BASIC. +This function returns `FALSE` for all indefinite types except +`G_VARIANT_TYPE_BASIC`. - %TRUE if @type is a basic type - + true if @type is a basic type Since 2.24 - a #GVariantType + type to check @@ -40036,18 +40091,17 @@ Since 2.24 Container types are any array, maybe, tuple, or dictionary entry types plus the variant type. -This function returns %TRUE for any indefinite type for which every -definite subtype is a container -- %G_VARIANT_TYPE_ARRAY, for +This function returns true for any indefinite type for which every +definite subtype is a container — `G_VARIANT_TYPE_ARRAY`, for example. - %TRUE if @type is a container type - + true if @type is a container type Since 2.24 - a #GVariantType + type to check @@ -40056,62 +40110,61 @@ Since 2.24 Determines if the given @type is definite (ie: not indefinite). A type is definite if its type string does not contain any indefinite -type characters ('*', '?', or 'r'). +type characters (`*`, `?`, or `r`). -A #GVariant instance may not have an indefinite type, so calling -this function on the result of g_variant_get_type() will always -result in %TRUE being returned. Calling this function on an -indefinite type like %G_VARIANT_TYPE_ARRAY, however, will result in -%FALSE being returned. +A [type@GLib.Variant] instance may not have an indefinite type, so calling +this function on the result of [method@GLib.Variant.get_type] will always +result in true being returned. Calling this function on an +indefinite type like `G_VARIANT_TYPE_ARRAY`, however, will result in +`FALSE` being returned. - %TRUE if @type is definite - + true if @type is definite Since 2.24 - a #GVariantType + type to check - Determines if the given @type is a dictionary entry type. This is -true if the type string for @type starts with a '{'. + Determines if the given @type is a dictionary entry type. -This function returns %TRUE for any indefinite type for which every -definite subtype is a dictionary entry type -- -%G_VARIANT_TYPE_DICT_ENTRY, for example. - - %TRUE if @type is a dictionary entry type +This is true if the type string for @type starts with a `{`. +This function returns true for any indefinite type for which every +definite subtype is a dictionary entry type — +`G_VARIANT_TYPE_DICT_ENTRY`, for example. + + true if @type is a dictionary entry type Since 2.24 - a #GVariantType + type to check - Determines if the given @type is a maybe type. This is true if the -type string for @type starts with an 'm'. + Determines if the given @type is a ‘maybe’ type. -This function returns %TRUE for any indefinite type for which every -definite subtype is a maybe type -- %G_VARIANT_TYPE_MAYBE, for +This is true if the type string for @type starts with an `m`. + +This function returns true for any indefinite type for which every +definite subtype is a ‘maybe’ type — `G_VARIANT_TYPE_MAYBE`, for example. - %TRUE if @type is a maybe type - + true if @type is a ‘maybe’ type Since 2.24 - a #GVariantType + type to check @@ -40119,43 +40172,42 @@ Since 2.24 Checks if @type is a subtype of @supertype. -This function returns %TRUE if @type is a subtype of @supertype. All +This function returns true if @type is a subtype of @supertype. All types are considered to be subtypes of themselves. Aside from that, only indefinite types can have subtypes. - %TRUE if @type is a subtype of @supertype - + true if @type is a subtype of @supertype Since 2.24 - a #GVariantType + type to check - a #GVariantType + type of potential supertype - Determines if the given @type is a tuple type. This is true if the -type string for @type starts with a '(' or if @type is -%G_VARIANT_TYPE_TUPLE. + Determines if the given @type is a tuple type. + +This is true if the type string for @type starts with a `(` or if @type is +`G_VARIANT_TYPE_TUPLE`. -This function returns %TRUE for any indefinite type for which every -definite subtype is a tuple type -- %G_VARIANT_TYPE_TUPLE, for +This function returns true for any indefinite type for which every +definite subtype is a tuple type — `G_VARIANT_TYPE_TUPLE`, for example. - %TRUE if @type is a tuple type - + true if @type is a tuple type Since 2.24 - a #GVariantType + type to check @@ -40163,14 +40215,13 @@ Since 2.24 Determines if the given @type is the variant type. - %TRUE if @type is the variant type - + true if @type is the variant type Since 2.24 - a #GVariantType + type to check @@ -40180,16 +40231,15 @@ Since 2.24 This function may only be used with a dictionary entry type. Other than the additional restriction, this call is equivalent to -g_variant_type_first(). +[method@GLib.VariantType.first]. the key type of the dictionary entry - Since 2.24 - a dictionary entry #GVariantType + a dictionary entry type @@ -40200,19 +40250,18 @@ dictionary entry type. This function may only be used with tuple or dictionary entry types, but must not be used with the generic tuple type -%G_VARIANT_TYPE_TUPLE. +`G_VARIANT_TYPE_TUPLE`. In the case of a dictionary entry type, this function will always -return 2. +return `2`. the number of items in @type - Since 2.24 - a tuple or dictionary entry #GVariantType + a tuple or dictionary entry type @@ -40222,41 +40271,41 @@ Since 2.24 type. @type must be the result of a previous call to -g_variant_type_first() or g_variant_type_next(). +[method@GLib.VariantType.first] or [method@GLib.VariantType.next]. If called on the key type of a dictionary entry then this call returns the value type. If called on the value type of a dictionary -entry then this call returns %NULL. - -For tuples, %NULL is returned when @type is the last item in a tuple. - - the next #GVariantType after @type, or %NULL +entry then this call returns `NULL`. +For tuples, `NULL` is returned when @type is the last item in the tuple. + + the next type after @type, or `NULL` if + there are no further types Since 2.24 - a #GVariantType from a previous call + a type from a previous call - Returns the type string corresponding to the given @type. The -result is not nul-terminated; in order to determine its length you -must call g_variant_type_get_string_length(). + Returns the type string corresponding to the given @type. -To get a nul-terminated string, see g_variant_type_dup_string(). +The result is not nul-terminated; in order to determine its length you +must call [method@GLib.VariantType.get_string_length]. + +To get a nul-terminated string, see [method@GLib.VariantType.dup_string]. the corresponding type string (not nul-terminated) - Since 2.24 - a #GVariantType + type to peek at @@ -40267,13 +40316,12 @@ Since 2.24 This function may only be used with a dictionary entry type. the value type of the dictionary entry - Since 2.24 - a dictionary entry #GVariantType + a dictionary entry type @@ -40299,12 +40347,13 @@ Since 2.24 - Checks if @type_string is a valid GVariant type string. This call is -equivalent to calling g_variant_type_string_scan() and confirming -that the following character is a nul terminator. - - %TRUE if @type_string is exactly one valid type string + Checks if @type_string is a valid +[GVariant type string](./struct.VariantType.html#gvariant-type-strings). +This call is equivalent to calling [func@GLib.VariantType.string_scan] and +confirming that the following character is a nul terminator. + + true if @type_string is exactly one valid type string Since 2.24 @@ -40317,6 +40366,7 @@ Since 2.24 Scan for a single complete and valid GVariant type string in @string. + The memory pointed to by @limit (or bytes beyond it) is never accessed. @@ -40328,9 +40378,9 @@ If there is no valid type string starting at @string, or if the type string does not end before @limit then %FALSE is returned. For the simple case of checking if a string is a valid type string, -see g_variant_type_string_is_valid(). +see [func@GLib.VariantType.string_is_valid]. - %TRUE if a valid type string was found + true if a valid type string was found @@ -40339,11 +40389,11 @@ see g_variant_type_string_is_valid(). - the end of @string, or %NULL + the end of @string - location to store the end pointer, or %NULL + location to store the end pointer @@ -49316,7 +49366,8 @@ Note that keys that expect UTF-8 strings (specifically `"MESSAGE"` and `"GLIB_DOMAIN"`) must be passed as nul-terminated UTF-8 strings until GLib version 2.74.1 because the default log handler did not consider the length of the `GLogField`. Starting with GLib 2.74.1 this is fixed and -non-nul-terminated UTF-8 strings can be passed with their correct length. +non-nul-terminated UTF-8 strings can be passed with their correct length, +with the exception of `"GLIB_DOMAIN"` which was only fixed with GLib 2.82.3. The @log_domain will be converted into a `GLIB_DOMAIN` field. @log_level will be converted into a @@ -49911,6 +49962,12 @@ See your C library manual for more details about lstat(). + + + + + + @@ -50989,9 +51046,9 @@ handle that exception (see [Running GLib Applications](glib-running.html)). - - the program name, needed by gdb for the "[S]tack trace" - option + + the program name, needed by gdb for the + "[S]tack trace" option, or `NULL` to use a default string @@ -61492,12 +61549,13 @@ function. - Checks if @type_string is a valid GVariant type string. This call is -equivalent to calling g_variant_type_string_scan() and confirming -that the following character is a nul terminator. - - %TRUE if @type_string is exactly one valid type string + Checks if @type_string is a valid +[GVariant type string](./struct.VariantType.html#gvariant-type-strings). +This call is equivalent to calling [func@GLib.VariantType.string_scan] and +confirming that the following character is a nul terminator. + + true if @type_string is exactly one valid type string Since 2.24 @@ -61510,6 +61568,7 @@ Since 2.24 Scan for a single complete and valid GVariant type string in @string. + The memory pointed to by @limit (or bytes beyond it) is never accessed. @@ -61521,9 +61580,9 @@ If there is no valid type string starting at @string, or if the type string does not end before @limit then %FALSE is returned. For the simple case of checking if a string is a valid type string, -see g_variant_type_string_is_valid(). +see [func@GLib.VariantType.string_is_valid]. - %TRUE if a valid type string was found + true if a valid type string was found @@ -61532,11 +61591,11 @@ see g_variant_type_string_is_valid(). - the end of @string, or %NULL + the end of @string - location to store the end pointer, or %NULL + location to store the end pointer diff --git a/GObject-2.0.gir b/GObject-2.0.gir index 1f78378d..d9bb7e40 100644 --- a/GObject-2.0.gir +++ b/GObject-2.0.gir @@ -15686,11 +15686,13 @@ definition than to write one yourself using g_enum_register_static(). - An array of #GEnumValue structs for the possible - enumeration values. The array is terminated by a struct with all - members being 0. GObject keeps a reference to the data, so it cannot - be stack-allocated. - + An array of + #GEnumValue structs for the possible enumeration values. The array is + terminated by a struct with all members being 0. GObject keeps a + reference to the data, so it cannot be stack-allocated. + + + @@ -15808,10 +15810,13 @@ definition than to write one yourself using g_flags_register_static(). - An array of #GFlagsValue structs for the possible - flags values. The array is terminated by a struct with all members being 0. - GObject keeps a reference to the data, so it cannot be stack-allocated. - + An array of + #GFlagsValue structs for the possible flags values. The array is + terminated by a struct with all members being 0. GObject keeps a + reference to the data, so it cannot be stack-allocated. + + + diff --git a/Gdk-4.0.gir b/Gdk-4.0.gir index 4549d294..c5a971c6 100644 --- a/Gdk-4.0.gir +++ b/Gdk-4.0.gir @@ -1197,13 +1197,22 @@ when the reference count reaches zero. - + + Returns the color state object representing the oklab color space. + +This is a perceptually uniform color state. + the color state object for oklab - + + Returns the color state object representing the oklch color space. + +This is the polar variant of oklab, in which the hue is encoded as +a polar coordinate. + the color state object for oklch @@ -20909,13 +20918,22 @@ so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y. - + + Returns the color state object representing the oklab color space. + +This is a perceptually uniform color state. + the color state object for oklab - + + Returns the color state object representing the oklch color space. + +This is the polar variant of oklab, in which the hue is encoded as +a polar coordinate. + the color state object for oklch diff --git a/Gio-2.0.gir b/Gio-2.0.gir index 13628253..fa58f7b6 100644 --- a/Gio-2.0.gir +++ b/Gio-2.0.gir @@ -31412,7 +31412,7 @@ with g_file_stop_mountable(). Sends @file to the "Trashcan", if possible. This is similar to deleting it, but the user can recover it before emptying the trashcan. Trashing is disabled for system mounts by default (see -g_unix_mount_is_system_internal()), so this call can return the +g_unix_mount_entry_is_system_internal()), so this call can return the %G_IO_ERROR_NOT_SUPPORTED error. Since GLib 2.66, the `x-gvfs-notrash` unix mount option can be used to disable g_file_trash() support for particular mounts, the %G_IO_ERROR_NOT_SUPPORTED error will be returned in that case. @@ -35732,7 +35732,7 @@ If this returns %FALSE, you cannot perform asynchronous operations on Sends @file to the "Trashcan", if possible. This is similar to deleting it, but the user can recover it before emptying the trashcan. Trashing is disabled for system mounts by default (see -g_unix_mount_is_system_internal()), so this call can return the +g_unix_mount_entry_is_system_internal()), so this call can return the %G_IO_ERROR_NOT_SUPPORTED error. Since GLib 2.66, the `x-gvfs-notrash` unix mount option can be used to disable g_file_trash() support for particular mounts, the %G_IO_ERROR_NOT_SUPPORTED error will be returned in that case. @@ -77010,8 +77010,7 @@ For example, ‘Open file’ or ‘Connect to network host’ name of the #GSource used for idle completion of the task. This function may only be called before the @task is first used in a thread -other than the one it was constructed in. It is called automatically by -g_task_set_source_tag() if not called already. +other than the one it was constructed in. @@ -77125,7 +77124,10 @@ set, for convenience. Sets @task’s name, used in debugging and profiling. -This is a variant of g_task_set_name() that avoids copying @name. +This is a variant of g_task_set_name() that avoids copying @name. + +This function is called automatically by [method@Gio.Task.set_source_tag] +unless a name is set. @@ -83987,6 +83989,271 @@ when the stream is closed. Defines a Unix mount entry (e.g. `/media/cdrom`). This corresponds roughly to a mtab entry. + + Compares two unix mounts. + + 1, 0 or -1 if @mount1 is greater than, equal to, +or less than @mount2, respectively. + + + + + first #GUnixMountEntry to compare. + + + + second #GUnixMountEntry to compare. + + + + + + Makes a copy of @mount_entry. + + a new #GUnixMountEntry + + + + + a #GUnixMountEntry. + + + + + + Frees a unix mount. + + + + + + a #GUnixMountEntry. + + + + + + Gets the device path for a unix mount. + + a string containing the device path. + + + + + a #GUnixMount. + + + + + + Gets the filesystem type for the unix mount. + + a string containing the file system type. + + + + + a #GUnixMount. + + + + + + Gets the mount path for a unix mount. + + the mount path for @mount_entry. + + + + + input #GUnixMountEntry to get the mount path for. + + + + + + Gets a comma-separated list of mount options for the unix mount. For example, +`rw,relatime,seclabel,data=ordered`. + +This is similar to g_unix_mount_point_get_options(), but it takes +a #GUnixMountEntry as an argument. + + a string containing the options, or %NULL if not +available. + + + + + a #GUnixMountEntry. + + + + + + Gets the root of the mount within the filesystem. This is useful e.g. for +mounts created by bind operation, or btrfs subvolumes. + +For example, the root path is equal to "/" for mount created by +"mount /dev/sda1 /mnt/foo" and "/bar" for +"mount --bind /mnt/foo/bar /mnt/bar". + + a string containing the root, or %NULL if not supported. + + + + + a #GUnixMountEntry. + + + + + + Guesses whether a Unix mount can be ejected. + + %TRUE if @mount_entry is deemed to be ejectable. + + + + + a #GUnixMountEntry + + + + + + Guesses the icon of a Unix mount. + + a #GIcon + + + + + a #GUnixMountEntry + + + + + + Guesses the name of a Unix mount. +The result is a translated string. + + A newly allocated string that must + be freed with g_free() + + + + + a #GUnixMountEntry + + + + + + Guesses whether a Unix mount should be displayed in the UI. + + %TRUE if @mount_entry is deemed to be displayable. + + + + + a #GUnixMountEntry + + + + + + Guesses the symbolic icon of a Unix mount. + + a #GIcon + + + + + a #GUnixMountEntry + + + + + + Checks if a unix mount is mounted read only. + + %TRUE if @mount_entry is read only. + + + + + a #GUnixMount. + + + + + + Checks if a Unix mount is a system mount. This is the Boolean OR of +g_unix_is_system_fs_type(), g_unix_is_system_device_path() and +g_unix_is_mount_path_system_internal() on @mount_entry’s properties. + +The definition of what a ‘system’ mount entry is may change over time as new +file system types and device paths are ignored. + + %TRUE if the unix mount is for a system path. + + + + + a #GUnixMount. + + + + + + Gets a #GUnixMountEntry for a given mount path. If @time_read +is set, it will be filled with a unix timestamp for checking +if the mounts have changed since with g_unix_mount_entries_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + +This will return %NULL if there is no mount point at @mount_path. + + a #GUnixMountEntry. + + + + + path for a possible unix mount. + + + + guint64 to contain a timestamp. + + + + + + Gets a #GUnixMountEntry for a given file path. If @time_read +is set, it will be filled with a unix timestamp for checking +if the mounts have changed since with g_unix_mount_entries_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + +This will return %NULL if looking up the mount entry fails, if +@file_path doesn’t exist or there is an I/O error. + + a #GUnixMountEntry. + + + + + file path on some unix mount. + + + + guint64 to contain a timestamp. + + + + Watches #GUnixMounts for changes. @@ -91035,15 +91302,16 @@ The list of file system types considered ‘system’ ones may change - + Gets a #GUnixMountEntry for a given mount path. If @time_read is set, it will be filled with a unix timestamp for checking -if the mounts have changed since with g_unix_mounts_changed_since(). +if the mounts have changed since with g_unix_mount_entries_changed_since(). If more mounts have the same mount path, the last matching mount is returned. This will return %NULL if there is no mount point at @mount_path. + Use g_unix_mount_entry_at() instead. a #GUnixMountEntry. @@ -91059,8 +91327,9 @@ This will return %NULL if there is no mount point at @mount_path. - + Compares two unix mounts. + Use g_unix_mount_entry_compare() instead. 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively. @@ -91077,8 +91346,9 @@ or less than @mount2, respectively. - + Makes a copy of @mount_entry. + Use g_unix_mount_entry_copy() instead. a new #GUnixMountEntry @@ -91090,16 +91360,134 @@ or less than @mount2, respectively. - + + Checks if the unix mounts have changed since a given unix time. + + %TRUE if the mounts have changed since @time. +Since 2.84 + + + + + guint64 to contain a timestamp. + + + + + + Gets a #GList of #GUnixMountEntry containing the unix mounts. +If @time_read is set, it will be filled with the mount +timestamp, allowing for checking if the mounts have changed +with g_unix_mount_entries_changed_since(). + + + a #GList of the UNIX mounts. + + + + + + + guint64 to contain a timestamp, or %NULL + + + + + + Gets an array of [struct@Gio.UnixMountEntry]s containing the Unix mounts +listed in @table_path. + +This is a generalized version of g_unix_mount_entries_get(), mainly intended for +internal testing use. Note that g_unix_mount_entries_get() may parse multiple +hierarchical table files, so this function is not a direct superset of its +functionality. + +If there is an error reading or parsing the file, `NULL` will be returned +and both out parameters will be set to `0`. + + mount + entries, or `NULL` if there was an error loading them + + + + + + + path to the mounts table file (for example `/proc/self/mountinfo`) + + + + return location for the + modification time of @table_path + + + + return location for the + number of mount entries returned + + + + + + Gets a #GUnixMountEntry for a given mount path. If @time_read +is set, it will be filled with a unix timestamp for checking +if the mounts have changed since with g_unix_mount_entries_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + +This will return %NULL if there is no mount point at @mount_path. + + a #GUnixMountEntry. + + + + + path for a possible unix mount. + + + + guint64 to contain a timestamp. + + + + + + Gets a #GUnixMountEntry for a given file path. If @time_read +is set, it will be filled with a unix timestamp for checking +if the mounts have changed since with g_unix_mount_entries_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + +This will return %NULL if looking up the mount entry fails, if +@file_path doesn’t exist or there is an I/O error. + + a #GUnixMountEntry. + + + + + file path on some unix mount. + + + + guint64 to contain a timestamp. + + + + + Gets a #GUnixMountEntry for a given file path. If @time_read is set, it will be filled with a unix timestamp for checking -if the mounts have changed since with g_unix_mounts_changed_since(). +if the mounts have changed since with g_unix_mount_entries_changed_since(). If more mounts have the same mount path, the last matching mount is returned. This will return %NULL if looking up the mount entry fails, if @file_path doesn’t exist or there is an I/O error. + Use g_unix_mount_entry_for() instead. a #GUnixMountEntry. @@ -91115,8 +91503,9 @@ This will return %NULL if looking up the mount entry fails, if - + Frees a unix mount. + Use g_unix_mount_entry_free() instead. @@ -91127,8 +91516,9 @@ This will return %NULL if looking up the mount entry fails, if - + Gets the device path for a unix mount. + Use g_unix_mount_entry_get_device_path() instead. a string containing the device path. @@ -91140,8 +91530,9 @@ This will return %NULL if looking up the mount entry fails, if - + Gets the filesystem type for the unix mount. + Use g_unix_mount_entry_get_fs_type() instead. a string containing the file system type. @@ -91153,8 +91544,9 @@ This will return %NULL if looking up the mount entry fails, if - + Gets the mount path for a unix mount. + Use g_unix_mount_entry_get_mount_path() instead. the mount path for @mount_entry. @@ -91166,12 +91558,13 @@ This will return %NULL if looking up the mount entry fails, if - + Gets a comma-separated list of mount options for the unix mount. For example, `rw,relatime,seclabel,data=ordered`. This is similar to g_unix_mount_point_get_options(), but it takes a #GUnixMountEntry as an argument. + Use g_unix_mount_entry_get_options() instead. a string containing the options, or %NULL if not available. @@ -91184,13 +91577,14 @@ available. - + Gets the root of the mount within the filesystem. This is useful e.g. for mounts created by bind operation, or btrfs subvolumes. For example, the root path is equal to "/" for mount created by "mount /dev/sda1 /mnt/foo" and "/bar" for "mount --bind /mnt/foo/bar /mnt/bar". + Use g_unix_mount_entry_get_root_path() instead. a string containing the root, or %NULL if not supported. @@ -91202,8 +91596,9 @@ For example, the root path is equal to "/" for mount created by - + Guesses whether a Unix mount can be ejected. + Use g_unix_mount_entry_guess_can_eject() instead. %TRUE if @mount_entry is deemed to be ejectable. @@ -91215,8 +91610,9 @@ For example, the root path is equal to "/" for mount created by - + Guesses the icon of a Unix mount. + Use g_unix_mount_entry_guess_icon() instead. a #GIcon @@ -91228,9 +91624,10 @@ For example, the root path is equal to "/" for mount created by - + Guesses the name of a Unix mount. The result is a translated string. + Use g_unix_mount_entry_guess_name() instead. A newly allocated string that must be freed with g_free() @@ -91243,8 +91640,9 @@ The result is a translated string. - + Guesses whether a Unix mount should be displayed in the UI. + Use g_unix_mount_entry_guess_should_display() instead. %TRUE if @mount_entry is deemed to be displayable. @@ -91256,8 +91654,9 @@ The result is a translated string. - + Guesses the symbolic icon of a Unix mount. + Use g_unix_mount_entry_guess_symbolic_icon() instead. a #GIcon @@ -91269,8 +91668,9 @@ The result is a translated string. - + Checks if a unix mount is mounted read only. + Use g_unix_mount_entry_is_readonly() instead. %TRUE if @mount_entry is read only. @@ -91282,13 +91682,14 @@ The result is a translated string. - + Checks if a Unix mount is a system mount. This is the Boolean OR of g_unix_is_system_fs_type(), g_unix_is_system_device_path() and g_unix_is_mount_path_system_internal() on @mount_entry’s properties. The definition of what a ‘system’ mount entry is may change over time as new file system types and device paths are ignored. + Use g_unix_mount_entry_is_system_internal() instead. %TRUE if the unix mount is for a system path. @@ -91390,8 +91791,9 @@ and both out parameters will be set to `0`. - + Checks if the unix mounts have changed since a given unix time. + Use g_unix_mount_entry_free() instead. %TRUE if the mounts have changed since @time. @@ -91403,11 +91805,12 @@ and both out parameters will be set to `0`. - + Gets a #GList of #GUnixMountEntry containing the unix mounts. If @time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed -with g_unix_mounts_changed_since(). +with g_unix_mount_entries_changed_since(). + Use g_unix_mount_entries_get() instead. a #GList of the UNIX mounts. @@ -91422,17 +91825,18 @@ with g_unix_mounts_changed_since(). - + Gets an array of [struct@Gio.UnixMountEntry]s containing the Unix mounts listed in @table_path. -This is a generalized version of g_unix_mounts_get(), mainly intended for -internal testing use. Note that g_unix_mounts_get() may parse multiple +This is a generalized version of g_unix_mount_entries_get(), mainly intended for +internal testing use. Note that g_unix_mount_entries_get() may parse multiple hierarchical table files, so this function is not a direct superset of its functionality. If there is an error reading or parsing the file, `NULL` will be returned and both out parameters will be set to `0`. + Use g_unix_mount_entries_get_from_file() instead. mount entries, or `NULL` if there was an error loading them diff --git a/GioUnix-2.0.gir b/GioUnix-2.0.gir index f77c615f..e181b183 100644 --- a/GioUnix-2.0.gir +++ b/GioUnix-2.0.gir @@ -1173,6 +1173,271 @@ when the stream is closed. Defines a Unix mount entry (e.g. `/media/cdrom`). This corresponds roughly to a mtab entry. + + Gets a #GUnixMountEntry for a given mount path. If @time_read +is set, it will be filled with a unix timestamp for checking +if the mounts have changed since with g_unix_mount_entries_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + +This will return %NULL if there is no mount point at @mount_path. + + a #GUnixMountEntry. + + + + + path for a possible unix mount. + + + + guint64 to contain a timestamp. + + + + + + Compares two unix mounts. + + 1, 0 or -1 if @mount1 is greater than, equal to, +or less than @mount2, respectively. + + + + + first #GUnixMountEntry to compare. + + + + second #GUnixMountEntry to compare. + + + + + + Makes a copy of @mount_entry. + + a new #GUnixMountEntry + + + + + a #GUnixMountEntry. + + + + + + Gets a #GUnixMountEntry for a given file path. If @time_read +is set, it will be filled with a unix timestamp for checking +if the mounts have changed since with g_unix_mount_entries_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + +This will return %NULL if looking up the mount entry fails, if +@file_path doesn’t exist or there is an I/O error. + + a #GUnixMountEntry. + + + + + file path on some unix mount. + + + + guint64 to contain a timestamp. + + + + + + Frees a unix mount. + + + + + + a #GUnixMountEntry. + + + + + + Gets the device path for a unix mount. + + a string containing the device path. + + + + + a #GUnixMount. + + + + + + Gets the filesystem type for the unix mount. + + a string containing the file system type. + + + + + a #GUnixMount. + + + + + + Gets the mount path for a unix mount. + + the mount path for @mount_entry. + + + + + input #GUnixMountEntry to get the mount path for. + + + + + + Gets a comma-separated list of mount options for the unix mount. For example, +`rw,relatime,seclabel,data=ordered`. + +This is similar to g_unix_mount_point_get_options(), but it takes +a #GUnixMountEntry as an argument. + + a string containing the options, or %NULL if not +available. + + + + + a #GUnixMountEntry. + + + + + + Gets the root of the mount within the filesystem. This is useful e.g. for +mounts created by bind operation, or btrfs subvolumes. + +For example, the root path is equal to "/" for mount created by +"mount /dev/sda1 /mnt/foo" and "/bar" for +"mount --bind /mnt/foo/bar /mnt/bar". + + a string containing the root, or %NULL if not supported. + + + + + a #GUnixMountEntry. + + + + + + Guesses whether a Unix mount can be ejected. + + %TRUE if @mount_entry is deemed to be ejectable. + + + + + a #GUnixMountEntry + + + + + + Guesses the icon of a Unix mount. + + a #GIcon + + + + + a #GUnixMountEntry + + + + + + Guesses the name of a Unix mount. +The result is a translated string. + + A newly allocated string that must + be freed with g_free() + + + + + a #GUnixMountEntry + + + + + + Guesses whether a Unix mount should be displayed in the UI. + + %TRUE if @mount_entry is deemed to be displayable. + + + + + a #GUnixMountEntry + + + + + + Guesses the symbolic icon of a Unix mount. + + a #GIcon + + + + + a #GUnixMountEntry + + + + + + Checks if a unix mount is mounted read only. + + %TRUE if @mount_entry is read only. + + + + + a #GUnixMount. + + + + + + Checks if a Unix mount is a system mount. This is the Boolean OR of +g_unix_is_system_fs_type(), g_unix_is_system_device_path() and +g_unix_is_mount_path_system_internal() on @mount_entry’s properties. + +The definition of what a ‘system’ mount entry is may change over time as new +file system types and device paths are ignored. + + %TRUE if the unix mount is for a system path. + + + + + a #GUnixMount. + + + + Watches #GUnixMounts for changes. @@ -1702,10 +1967,136 @@ The list of file system types considered ‘system’ ones may change - + + Gets a #GUnixMountEntry for a given mount path. If @time_read +is set, it will be filled with a unix timestamp for checking +if the mounts have changed since with g_unix_mount_entries_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + +This will return %NULL if there is no mount point at @mount_path. + Use g_unix_mount_entry_at() instead. + + a #GUnixMountEntry. + + + + + path for a possible unix mount. + + + + guint64 to contain a timestamp. + + + + + + Compares two unix mounts. + Use g_unix_mount_entry_compare() instead. + + 1, 0 or -1 if @mount1 is greater than, equal to, +or less than @mount2, respectively. + + + + + first #GUnixMountEntry to compare. + + + + second #GUnixMountEntry to compare. + + + + + + Makes a copy of @mount_entry. + Use g_unix_mount_entry_copy() instead. + + a new #GUnixMountEntry + + + + + a #GUnixMountEntry. + + + + + + Checks if the unix mounts have changed since a given unix time. + + %TRUE if the mounts have changed since @time. +Since 2.84 + + + + + guint64 to contain a timestamp. + + + + + + Gets a #GList of #GUnixMountEntry containing the unix mounts. +If @time_read is set, it will be filled with the mount +timestamp, allowing for checking if the mounts have changed +with g_unix_mount_entries_changed_since(). + + + a #GList of the UNIX mounts. + + + + + + + guint64 to contain a timestamp, or %NULL + + + + + + Gets an array of [struct@Gio.UnixMountEntry]s containing the Unix mounts +listed in @table_path. + +This is a generalized version of g_unix_mount_entries_get(), mainly intended for +internal testing use. Note that g_unix_mount_entries_get() may parse multiple +hierarchical table files, so this function is not a direct superset of its +functionality. + +If there is an error reading or parsing the file, `NULL` will be returned +and both out parameters will be set to `0`. + + mount + entries, or `NULL` if there was an error loading them + + + + + + + path to the mounts table file (for example `/proc/self/mountinfo`) + + + + return location for the + modification time of @table_path + + + + return location for the + number of mount entries returned + + + + + Gets a #GUnixMountEntry for a given mount path. If @time_read is set, it will be filled with a unix timestamp for checking -if the mounts have changed since with g_unix_mounts_changed_since(). +if the mounts have changed since with g_unix_mount_entries_changed_since(). If more mounts have the same mount path, the last matching mount is returned. @@ -1726,7 +2117,7 @@ This will return %NULL if there is no mount point at @mount_path. - + Compares two unix mounts. 1, 0 or -1 if @mount1 is greater than, equal to, @@ -1744,7 +2135,7 @@ or less than @mount2, respectively. - + Makes a copy of @mount_entry. a new #GUnixMountEntry @@ -1757,16 +2148,227 @@ or less than @mount2, respectively. - + + Gets a #GUnixMountEntry for a given file path. If @time_read +is set, it will be filled with a unix timestamp for checking +if the mounts have changed since with g_unix_mount_entries_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + +This will return %NULL if looking up the mount entry fails, if +@file_path doesn’t exist or there is an I/O error. + + a #GUnixMountEntry. + + + + + file path on some unix mount. + + + + guint64 to contain a timestamp. + + + + + + Frees a unix mount. + + + + + + a #GUnixMountEntry. + + + + + + Gets the device path for a unix mount. + + a string containing the device path. + + + + + a #GUnixMount. + + + + + + Gets the filesystem type for the unix mount. + + a string containing the file system type. + + + + + a #GUnixMount. + + + + + + Gets the mount path for a unix mount. + + the mount path for @mount_entry. + + + + + input #GUnixMountEntry to get the mount path for. + + + + + + Gets a comma-separated list of mount options for the unix mount. For example, +`rw,relatime,seclabel,data=ordered`. + +This is similar to g_unix_mount_point_get_options(), but it takes +a #GUnixMountEntry as an argument. + + a string containing the options, or %NULL if not +available. + + + + + a #GUnixMountEntry. + + + + + + Gets the root of the mount within the filesystem. This is useful e.g. for +mounts created by bind operation, or btrfs subvolumes. + +For example, the root path is equal to "/" for mount created by +"mount /dev/sda1 /mnt/foo" and "/bar" for +"mount --bind /mnt/foo/bar /mnt/bar". + + a string containing the root, or %NULL if not supported. + + + + + a #GUnixMountEntry. + + + + + + Guesses whether a Unix mount can be ejected. + + %TRUE if @mount_entry is deemed to be ejectable. + + + + + a #GUnixMountEntry + + + + + + Guesses the icon of a Unix mount. + + a #GIcon + + + + + a #GUnixMountEntry + + + + + + Guesses the name of a Unix mount. +The result is a translated string. + + A newly allocated string that must + be freed with g_free() + + + + + a #GUnixMountEntry + + + + + + Guesses whether a Unix mount should be displayed in the UI. + + %TRUE if @mount_entry is deemed to be displayable. + + + + + a #GUnixMountEntry + + + + + + Guesses the symbolic icon of a Unix mount. + + a #GIcon + + + + + a #GUnixMountEntry + + + + + + Checks if a unix mount is mounted read only. + + %TRUE if @mount_entry is read only. + + + + + a #GUnixMount. + + + + + + Checks if a Unix mount is a system mount. This is the Boolean OR of +g_unix_is_system_fs_type(), g_unix_is_system_device_path() and +g_unix_is_mount_path_system_internal() on @mount_entry’s properties. + +The definition of what a ‘system’ mount entry is may change over time as new +file system types and device paths are ignored. + + %TRUE if the unix mount is for a system path. + + + + + a #GUnixMount. + + + + + Gets a #GUnixMountEntry for a given file path. If @time_read is set, it will be filled with a unix timestamp for checking -if the mounts have changed since with g_unix_mounts_changed_since(). +if the mounts have changed since with g_unix_mount_entries_changed_since(). If more mounts have the same mount path, the last matching mount is returned. This will return %NULL if looking up the mount entry fails, if @file_path doesn’t exist or there is an I/O error. + Use g_unix_mount_entry_for() instead. a #GUnixMountEntry. @@ -1782,8 +2384,9 @@ This will return %NULL if looking up the mount entry fails, if - + Frees a unix mount. + Use g_unix_mount_entry_free() instead. @@ -1794,8 +2397,9 @@ This will return %NULL if looking up the mount entry fails, if - + Gets the device path for a unix mount. + Use g_unix_mount_entry_get_device_path() instead. a string containing the device path. @@ -1807,8 +2411,9 @@ This will return %NULL if looking up the mount entry fails, if - + Gets the filesystem type for the unix mount. + Use g_unix_mount_entry_get_fs_type() instead. a string containing the file system type. @@ -1820,8 +2425,9 @@ This will return %NULL if looking up the mount entry fails, if - + Gets the mount path for a unix mount. + Use g_unix_mount_entry_get_mount_path() instead. the mount path for @mount_entry. @@ -1833,12 +2439,13 @@ This will return %NULL if looking up the mount entry fails, if - + Gets a comma-separated list of mount options for the unix mount. For example, `rw,relatime,seclabel,data=ordered`. This is similar to g_unix_mount_point_get_options(), but it takes a #GUnixMountEntry as an argument. + Use g_unix_mount_entry_get_options() instead. a string containing the options, or %NULL if not available. @@ -1851,13 +2458,14 @@ available. - + Gets the root of the mount within the filesystem. This is useful e.g. for mounts created by bind operation, or btrfs subvolumes. For example, the root path is equal to "/" for mount created by "mount /dev/sda1 /mnt/foo" and "/bar" for "mount --bind /mnt/foo/bar /mnt/bar". + Use g_unix_mount_entry_get_root_path() instead. a string containing the root, or %NULL if not supported. @@ -1869,8 +2477,9 @@ For example, the root path is equal to "/" for mount created by - + Guesses whether a Unix mount can be ejected. + Use g_unix_mount_entry_guess_can_eject() instead. %TRUE if @mount_entry is deemed to be ejectable. @@ -1882,8 +2491,9 @@ For example, the root path is equal to "/" for mount created by - + Guesses the icon of a Unix mount. + Use g_unix_mount_entry_guess_icon() instead. a #GIcon @@ -1895,9 +2505,10 @@ For example, the root path is equal to "/" for mount created by - + Guesses the name of a Unix mount. The result is a translated string. + Use g_unix_mount_entry_guess_name() instead. A newly allocated string that must be freed with g_free() @@ -1910,8 +2521,9 @@ The result is a translated string. - + Guesses whether a Unix mount should be displayed in the UI. + Use g_unix_mount_entry_guess_should_display() instead. %TRUE if @mount_entry is deemed to be displayable. @@ -1923,8 +2535,9 @@ The result is a translated string. - + Guesses the symbolic icon of a Unix mount. + Use g_unix_mount_entry_guess_symbolic_icon() instead. a #GIcon @@ -1936,8 +2549,9 @@ The result is a translated string. - + Checks if a unix mount is mounted read only. + Use g_unix_mount_entry_is_readonly() instead. %TRUE if @mount_entry is read only. @@ -1949,13 +2563,14 @@ The result is a translated string. - + Checks if a Unix mount is a system mount. This is the Boolean OR of g_unix_is_system_fs_type(), g_unix_is_system_device_path() and g_unix_is_mount_path_system_internal() on @mount_entry’s properties. The definition of what a ‘system’ mount entry is may change over time as new file system types and device paths are ignored. + Use g_unix_mount_entry_is_system_internal() instead. %TRUE if the unix mount is for a system path. @@ -2245,8 +2860,9 @@ and both out parameters will be set to `0`. - + Checks if the unix mounts have changed since a given unix time. + Use g_unix_mount_entry_free() instead. %TRUE if the mounts have changed since @time. @@ -2258,11 +2874,12 @@ and both out parameters will be set to `0`. - + Gets a #GList of #GUnixMountEntry containing the unix mounts. If @time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed -with g_unix_mounts_changed_since(). +with g_unix_mount_entries_changed_since(). + Use g_unix_mount_entries_get() instead. a #GList of the UNIX mounts. @@ -2277,17 +2894,18 @@ with g_unix_mounts_changed_since(). - + Gets an array of [struct@Gio.UnixMountEntry]s containing the Unix mounts listed in @table_path. -This is a generalized version of g_unix_mounts_get(), mainly intended for -internal testing use. Note that g_unix_mounts_get() may parse multiple +This is a generalized version of g_unix_mount_entries_get(), mainly intended for +internal testing use. Note that g_unix_mount_entries_get() may parse multiple hierarchical table files, so this function is not a direct superset of its functionality. If there is an error reading or parsing the file, `NULL` will be returned and both out parameters will be set to `0`. + Use g_unix_mount_entries_get_from_file() instead. mount entries, or `NULL` if there was an error loading them