@girs/glib-2.0 2.78.0-3.2.7 → 2.78.0-3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/glib-2.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GLib-2.0, generated from library version 2.78.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.7.
8
+ GJS TypeScript type definitions for GLib-2.0, generated from library version 2.78.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.3.0.
9
9
 
10
10
  GLib provides the core application building blocks for libraries and applications written in C. It provides the core object system used in GNOME, the main loop implementation, and a large set of utility functions for strings and common data structures.
11
11
 
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
package/glib-2.0.d.cts CHANGED
@@ -5282,7 +5282,7 @@ export function atomic_ref_count_init(arc: number): void
5282
5282
  * that the returned binary data is not necessarily zero-terminated,
5283
5283
  * so it should not be used as a character string.
5284
5284
  * @param text zero-terminated string with base64 text to decode
5285
- * @returns newly allocated buffer containing the binary data that @text represents. The returned buffer must be freed with g_free().
5285
+ * @returns newly allocated buffer containing the binary data that @text represents. The returned buffer must be freed with g_free().
5286
5286
  */
5287
5287
  export function base64_decode(text: string): Uint8Array
5288
5288
  /**
@@ -5751,10 +5751,10 @@ export function compute_hmac_for_string(digest_type: ChecksumType, key: Uint8Arr
5751
5751
  *
5752
5752
  * Using extensions such as "//TRANSLIT" may not work (or may not work
5753
5753
  * well) on many platforms. Consider using g_str_to_ascii() instead.
5754
- * @param str the string to convert.
5754
+ * @param str the string to convert.
5755
5755
  * @param to_codeset name of character set into which to convert `str`
5756
5756
  * @param from_codeset character set of `str`.
5757
- * @returns If the conversion was successful, a newly allocated buffer containing the converted string, which must be freed with g_free(). Otherwise %NULL and @error will be set.
5757
+ * @returns If the conversion was successful, a newly allocated buffer containing the converted string, which must be freed with g_free(). Otherwise %NULL and @error will be set.
5758
5758
  */
5759
5759
  export function convert(str: Uint8Array, to_codeset: string, from_codeset: string): [ /* returnType */ Uint8Array, /* bytes_read */ number ]
5760
5760
  export function convert_error_quark(): Quark
@@ -5776,11 +5776,11 @@ export function convert_error_quark(): Quark
5776
5776
  * this is the GNU C converter for CP1255 which does not emit a base
5777
5777
  * character until it knows that the next character is not a mark that
5778
5778
  * could combine with the base character.)
5779
- * @param str the string to convert.
5779
+ * @param str the string to convert.
5780
5780
  * @param to_codeset name of character set into which to convert `str`
5781
5781
  * @param from_codeset character set of `str`.
5782
5782
  * @param fallback UTF-8 string to use in place of characters not present in the target encoding. (The string must be representable in the target encoding). If %NULL, characters not in the target encoding will be represented as Unicode escapes \uxxxx or \Uxxxxyyyy.
5783
- * @returns If the conversion was successful, a newly allocated buffer containing the converted string, which must be freed with g_free(). Otherwise %NULL and @error will be set.
5783
+ * @returns If the conversion was successful, a newly allocated buffer containing the converted string, which must be freed with g_free(). Otherwise %NULL and @error will be set.
5784
5784
  */
5785
5785
  export function convert_with_fallback(str: Uint8Array, to_codeset: string, from_codeset: string, fallback: string): [ /* returnType */ Uint8Array, /* bytes_read */ number ]
5786
5786
  /**
@@ -6145,7 +6145,7 @@ export function dpgettext2(domain: string | null, context: string, msgid: string
6145
6145
  /**
6146
6146
  * Returns the value of the environment variable `variable` in the
6147
6147
  * provided list `envp`.
6148
- * @param envp an environment list (eg, as returned from g_get_environ()), or %NULL for an empty environment list
6148
+ * @param envp an environment list (eg, as returned from g_get_environ()), or %NULL for an empty environment list
6149
6149
  * @param variable the environment variable to get
6150
6150
  * @returns the value of the environment variable, or %NULL if the environment variable is not set in @envp. The returned string is owned by @envp, and will be freed if @variable is set or unset again.
6151
6151
  */
@@ -6153,19 +6153,19 @@ export function environ_getenv(envp: string[] | null, variable: string): string
6153
6153
  /**
6154
6154
  * Sets the environment variable `variable` in the provided list
6155
6155
  * `envp` to `value`.
6156
- * @param envp an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL for an empty environment list
6156
+ * @param envp an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL for an empty environment list
6157
6157
  * @param variable the environment variable to set, must not contain '='
6158
6158
  * @param value the value for to set the variable to
6159
6159
  * @param overwrite whether to change the variable if it already exists
6160
- * @returns the updated environment list. Free it using g_strfreev().
6160
+ * @returns the updated environment list. Free it using g_strfreev().
6161
6161
  */
6162
6162
  export function environ_setenv(envp: string[] | null, variable: string, value: string, overwrite: boolean): string[]
6163
6163
  /**
6164
6164
  * Removes the environment variable `variable` from the provided
6165
6165
  * environment `envp`.
6166
- * @param envp an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL for an empty environment list
6166
+ * @param envp an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL for an empty environment list
6167
6167
  * @param variable the environment variable to remove, must not contain '='
6168
- * @returns the updated environment list. Free it using g_strfreev().
6168
+ * @returns the updated environment list. Free it using g_strfreev().
6169
6169
  */
6170
6170
  export function environ_unsetenv(envp: string[] | null, variable: string): string[]
6171
6171
  /**
@@ -6454,7 +6454,7 @@ export function filename_from_uri(uri: string): [ /* returnType */ string, /* ho
6454
6454
  * %G_CONVERT_ERROR_EMBEDDED_NUL is set and the function returns %NULL.
6455
6455
  * @param utf8string a UTF-8 encoded string.
6456
6456
  * @param len the length of the string, or -1 if the string is nul-terminated.
6457
- * @returns The converted string, or %NULL on an error.
6457
+ * @returns The converted string, or %NULL on an error.
6458
6458
  */
6459
6459
  export function filename_from_utf8(utf8string: string, len: number): [ /* returnType */ string, /* bytes_read */ number, /* bytes_written */ number ]
6460
6460
  /**
@@ -6674,7 +6674,7 @@ export function get_current_time(result: TimeVal): void
6674
6674
  *
6675
6675
  * The return value is freshly allocated and it should be freed with
6676
6676
  * g_strfreev() when it is no longer needed.
6677
- * @returns the list of environment variables
6677
+ * @returns the list of environment variables
6678
6678
  */
6679
6679
  export function get_environ(): string[]
6680
6680
  /**
@@ -6887,7 +6887,7 @@ export function get_real_time(): number
6887
6887
  *
6888
6888
  * The return value is cached and modifying it at runtime is not supported, as
6889
6889
  * it’s not thread-safe to modify environment variables at runtime.
6890
- * @returns a %NULL-terminated array of strings owned by GLib that must not be modified or freed.
6890
+ * @returns a %NULL-terminated array of strings owned by GLib that must not be modified or freed.
6891
6891
  */
6892
6892
  export function get_system_config_dirs(): string[]
6893
6893
  /**
@@ -6925,7 +6925,7 @@ export function get_system_config_dirs(): string[]
6925
6925
  *
6926
6926
  * The return value is cached and modifying it at runtime is not supported, as
6927
6927
  * it’s not thread-safe to modify environment variables at runtime.
6928
- * @returns a %NULL-terminated array of strings owned by GLib that must not be modified or freed.
6928
+ * @returns a %NULL-terminated array of strings owned by GLib that must not be modified or freed.
6929
6929
  */
6930
6930
  export function get_system_data_dirs(): string[]
6931
6931
  /**
@@ -7522,7 +7522,7 @@ export function key_file_error_quark(): Quark
7522
7522
  * array are in system codepage encoding, while in most of the typical
7523
7523
  * use cases for environment variables in GLib-using programs you want
7524
7524
  * the UTF-8 encoding that this function and g_getenv() provide.
7525
- * @returns a %NULL-terminated list of strings which must be freed with g_strfreev().
7525
+ * @returns a %NULL-terminated list of strings which must be freed with g_strfreev().
7526
7526
  */
7527
7527
  export function listenv(): string[]
7528
7528
  /**
@@ -7537,7 +7537,7 @@ export function listenv(): string[]
7537
7537
  * input that may contain embedded nul characters.
7538
7538
  * @param utf8string a UTF-8 encoded string
7539
7539
  * @param len the length of the string, or -1 if the string is nul-terminated.
7540
- * @returns A newly-allocated buffer containing the converted string, or %NULL on an error, and error will be set.
7540
+ * @returns A newly-allocated buffer containing the converted string, or %NULL on an error, and error will be set.
7541
7541
  */
7542
7542
  export function locale_from_utf8(utf8string: string, len: number): [ /* returnType */ Uint8Array, /* bytes_read */ number ]
7543
7543
  /**
@@ -9190,8 +9190,8 @@ export function spaced_primes_closest(num: number): number
9190
9190
  * process and not its identifier. Process handles and process identifiers
9191
9191
  * are different concepts on Windows.
9192
9192
  * @param working_directory child's current working directory, or %NULL to inherit parent's
9193
- * @param argv child's argument vector
9194
- * @param envp child's environment, or %NULL to inherit parent's
9193
+ * @param argv child's argument vector
9194
+ * @param envp child's environment, or %NULL to inherit parent's
9195
9195
  * @param flags flags from #GSpawnFlags
9196
9196
  * @param child_setup function to run in the child just before `exec()`
9197
9197
  * @returns %TRUE on success, %FALSE if error is set
@@ -9218,7 +9218,7 @@ export function spawn_async_with_fds(working_directory: string | null, argv: str
9218
9218
  * so no FD assignments are used.
9219
9219
  * @param working_directory child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding
9220
9220
  * @param argv child's argument vector, in the GLib file name encoding; it must be non-empty and %NULL-terminated
9221
- * @param envp child's environment, or %NULL to inherit parent's, in the GLib file name encoding
9221
+ * @param envp child's environment, or %NULL to inherit parent's, in the GLib file name encoding
9222
9222
  * @param flags flags from #GSpawnFlags
9223
9223
  * @param child_setup function to run in the child just before `exec()`
9224
9224
  * @returns %TRUE on success, %FALSE if an error was set
@@ -9421,7 +9421,7 @@ export function spawn_async_with_pipes(working_directory: string | null, argv: s
9421
9421
  * #GAppLaunchContext, or set the `DISPLAY` environment variable.
9422
9422
  * @param working_directory child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding
9423
9423
  * @param argv child's argument vector, in the GLib file name encoding; it must be non-empty and %NULL-terminated
9424
- * @param envp child's environment, or %NULL to inherit parent's, in the GLib file name encoding
9424
+ * @param envp child's environment, or %NULL to inherit parent's, in the GLib file name encoding
9425
9425
  * @param flags flags from #GSpawnFlags
9426
9426
  * @param child_setup function to run in the child just before `exec()`
9427
9427
  * @param stdin_fd file descriptor to use for child's stdin, or `-1`
@@ -9573,8 +9573,8 @@ export function spawn_exit_error_quark(): Quark
9573
9573
  * function for full details on the other parameters and details on
9574
9574
  * how these functions work on Windows.
9575
9575
  * @param working_directory child's current working directory, or %NULL to inherit parent's
9576
- * @param argv child's argument vector, which must be non-empty and %NULL-terminated
9577
- * @param envp child's environment, or %NULL to inherit parent's
9576
+ * @param argv child's argument vector, which must be non-empty and %NULL-terminated
9577
+ * @param envp child's environment, or %NULL to inherit parent's
9578
9578
  * @param flags flags from #GSpawnFlags
9579
9579
  * @param child_setup function to run in the child just before `exec()`
9580
9580
  * @returns %TRUE on success, %FALSE if an error was set
@@ -11634,7 +11634,7 @@ export function uri_parse(uri_string: string, flags: UriFlags): Uri
11634
11634
  * @param length the length of `params,` or `-1` if it is nul-terminated
11635
11635
  * @param separators the separator byte character set between parameters. (usually `&`, but sometimes `;` or both `&;`). Note that this function works on bytes not characters, so it can't be used to delimit UTF-8 strings for anything but ASCII characters. You may pass an empty set, in which case no splitting will occur.
11636
11636
  * @param flags flags to modify the way the parameters are handled.
11637
- * @returns A hash table of attribute/value pairs, with both names and values fully-decoded; or %NULL on error.
11637
+ * @returns A hash table of attribute/value pairs, with both names and values fully-decoded; or %NULL on error.
11638
11638
  */
11639
11639
  export function uri_parse_params(params: string, length: number, separators: string, flags: UriParamsFlags): HashTable
11640
11640
  /**
@@ -13788,7 +13788,7 @@ export interface BookmarkFile {
13788
13788
  set_visited_date_time(uri: string, visited: DateTime): void
13789
13789
  /**
13790
13790
  * This function outputs `bookmark` as a string.
13791
- * @returns a newly allocated string holding the contents of the #GBookmarkFile
13791
+ * @returns a newly allocated string holding the contents of the #GBookmarkFile
13792
13792
  */
13793
13793
  to_data(): Uint8Array
13794
13794
  /**
@@ -13996,7 +13996,7 @@ export interface Bytes {
13996
13996
  * %NULL may be returned if `size` is 0. This is not guaranteed, as the #GBytes
13997
13997
  * may represent an empty string with `data` non-%NULL and `size` as 0. %NULL will
13998
13998
  * not be returned if `size` is non-zero.
13999
- * @returns a pointer to the byte data, or %NULL
13999
+ * @returns a pointer to the byte data, or %NULL
14000
14000
  */
14001
14001
  get_data(): Uint8Array | null
14002
14002
  /**
@@ -14141,7 +14141,7 @@ export class Bytes {
14141
14141
  *
14142
14142
  * `data` is copied. If `size` is 0, `data` may be %NULL.
14143
14143
  * @constructor
14144
- * @param data the data to be used for the bytes
14144
+ * @param data the data to be used for the bytes
14145
14145
  * @returns a new #GBytes
14146
14146
  */
14147
14147
  constructor(data: Uint8Array | null)
@@ -14150,7 +14150,7 @@ export class Bytes {
14150
14150
  *
14151
14151
  * `data` is copied. If `size` is 0, `data` may be %NULL.
14152
14152
  * @constructor
14153
- * @param data the data to be used for the bytes
14153
+ * @param data the data to be used for the bytes
14154
14154
  * @returns a new #GBytes
14155
14155
  */
14156
14156
  static new(data: Uint8Array | null): Bytes
@@ -14166,7 +14166,7 @@ export class Bytes {
14166
14166
  *
14167
14167
  * `data` may be %NULL if `size` is 0.
14168
14168
  * @constructor
14169
- * @param data the data to be used for the bytes
14169
+ * @param data the data to be used for the bytes
14170
14170
  * @returns a new #GBytes
14171
14171
  */
14172
14172
  static new_take(data: Uint8Array | null): Bytes
@@ -16812,7 +16812,7 @@ export interface KeyFile {
16812
16812
  * and `error` is set to %G_KEY_FILE_ERROR_INVALID_VALUE.
16813
16813
  * @param group_name a group name
16814
16814
  * @param key a key
16815
- * @returns the values associated with the key as a list of booleans, or %NULL if the key was not found or could not be parsed. The returned list of booleans should be freed with g_free() when no longer needed.
16815
+ * @returns the values associated with the key as a list of booleans, or %NULL if the key was not found or could not be parsed. The returned list of booleans should be freed with g_free() when no longer needed.
16816
16816
  */
16817
16817
  get_boolean_list(group_name: string, key: string): boolean[]
16818
16818
  /**
@@ -16852,7 +16852,7 @@ export interface KeyFile {
16852
16852
  * and `error` is set to %G_KEY_FILE_ERROR_INVALID_VALUE.
16853
16853
  * @param group_name a group name
16854
16854
  * @param key a key
16855
- * @returns the values associated with the key as a list of doubles, or %NULL if the key was not found or could not be parsed. The returned list of doubles should be freed with g_free() when no longer needed.
16855
+ * @returns the values associated with the key as a list of doubles, or %NULL if the key was not found or could not be parsed. The returned list of doubles should be freed with g_free() when no longer needed.
16856
16856
  */
16857
16857
  get_double_list(group_name: string, key: string): number[]
16858
16858
  /**
@@ -16896,7 +16896,7 @@ export interface KeyFile {
16896
16896
  * and `error` is set to %G_KEY_FILE_ERROR_INVALID_VALUE.
16897
16897
  * @param group_name a group name
16898
16898
  * @param key a key
16899
- * @returns the values associated with the key as a list of integers, or %NULL if the key was not found or could not be parsed. The returned list of integers should be freed with g_free() when no longer needed.
16899
+ * @returns the values associated with the key as a list of integers, or %NULL if the key was not found or could not be parsed. The returned list of integers should be freed with g_free() when no longer needed.
16900
16900
  */
16901
16901
  get_integer_list(group_name: string, key: string): number[]
16902
16902
  /**
@@ -16993,7 +16993,7 @@ export interface KeyFile {
16993
16993
  * and `error` is set to %G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
16994
16994
  * @param group_name a group name
16995
16995
  * @param key a key
16996
- * @returns a %NULL-terminated string array or %NULL if the specified key cannot be found. The array should be freed with g_strfreev().
16996
+ * @returns a %NULL-terminated string array or %NULL if the specified key cannot be found. The array should be freed with g_strfreev().
16997
16997
  */
16998
16998
  get_string_list(group_name: string, key: string): string[]
16999
16999
  /**
@@ -24186,7 +24186,7 @@ export class Uri {
24186
24186
  * @param length the length of `params,` or `-1` if it is nul-terminated
24187
24187
  * @param separators the separator byte character set between parameters. (usually `&`, but sometimes `;` or both `&;`). Note that this function works on bytes not characters, so it can't be used to delimit UTF-8 strings for anything but ASCII characters. You may pass an empty set, in which case no splitting will occur.
24188
24188
  * @param flags flags to modify the way the parameters are handled.
24189
- * @returns A hash table of attribute/value pairs, with both names and values fully-decoded; or %NULL on error.
24189
+ * @returns A hash table of attribute/value pairs, with both names and values fully-decoded; or %NULL on error.
24190
24190
  */
24191
24191
  static parse_params(params: string, length: number, separators: string, flags: UriParamsFlags): HashTable
24192
24192
  /**
@@ -24493,7 +24493,7 @@ export interface Variant {
24493
24493
  * returning a constant string, the string is duplicated.
24494
24494
  *
24495
24495
  * The return value must be freed using g_free().
24496
- * @returns a newly allocated string
24496
+ * @returns a newly allocated string
24497
24497
  */
24498
24498
  dup_bytestring(): Uint8Array
24499
24499
  /**
@@ -24592,7 +24592,7 @@ export interface Variant {
24592
24592
  * array of bytes.
24593
24593
  *
24594
24594
  * The return value remains valid as long as `value` exists.
24595
- * @returns the constant string
24595
+ * @returns the constant string
24596
24596
  */
24597
24597
  get_bytestring(): Uint8Array
24598
24598
  /**
package/glib-2.0.d.ts CHANGED
@@ -5284,7 +5284,7 @@ function atomic_ref_count_init(arc: number): void
5284
5284
  * that the returned binary data is not necessarily zero-terminated,
5285
5285
  * so it should not be used as a character string.
5286
5286
  * @param text zero-terminated string with base64 text to decode
5287
- * @returns newly allocated buffer containing the binary data that @text represents. The returned buffer must be freed with g_free().
5287
+ * @returns newly allocated buffer containing the binary data that @text represents. The returned buffer must be freed with g_free().
5288
5288
  */
5289
5289
  function base64_decode(text: string): Uint8Array
5290
5290
  /**
@@ -5753,10 +5753,10 @@ function compute_hmac_for_string(digest_type: ChecksumType, key: Uint8Array, str
5753
5753
  *
5754
5754
  * Using extensions such as "//TRANSLIT" may not work (or may not work
5755
5755
  * well) on many platforms. Consider using g_str_to_ascii() instead.
5756
- * @param str the string to convert.
5756
+ * @param str the string to convert.
5757
5757
  * @param to_codeset name of character set into which to convert `str`
5758
5758
  * @param from_codeset character set of `str`.
5759
- * @returns If the conversion was successful, a newly allocated buffer containing the converted string, which must be freed with g_free(). Otherwise %NULL and @error will be set.
5759
+ * @returns If the conversion was successful, a newly allocated buffer containing the converted string, which must be freed with g_free(). Otherwise %NULL and @error will be set.
5760
5760
  */
5761
5761
  function convert(str: Uint8Array, to_codeset: string, from_codeset: string): [ /* returnType */ Uint8Array, /* bytes_read */ number ]
5762
5762
  function convert_error_quark(): Quark
@@ -5778,11 +5778,11 @@ function convert_error_quark(): Quark
5778
5778
  * this is the GNU C converter for CP1255 which does not emit a base
5779
5779
  * character until it knows that the next character is not a mark that
5780
5780
  * could combine with the base character.)
5781
- * @param str the string to convert.
5781
+ * @param str the string to convert.
5782
5782
  * @param to_codeset name of character set into which to convert `str`
5783
5783
  * @param from_codeset character set of `str`.
5784
5784
  * @param fallback UTF-8 string to use in place of characters not present in the target encoding. (The string must be representable in the target encoding). If %NULL, characters not in the target encoding will be represented as Unicode escapes \uxxxx or \Uxxxxyyyy.
5785
- * @returns If the conversion was successful, a newly allocated buffer containing the converted string, which must be freed with g_free(). Otherwise %NULL and @error will be set.
5785
+ * @returns If the conversion was successful, a newly allocated buffer containing the converted string, which must be freed with g_free(). Otherwise %NULL and @error will be set.
5786
5786
  */
5787
5787
  function convert_with_fallback(str: Uint8Array, to_codeset: string, from_codeset: string, fallback: string): [ /* returnType */ Uint8Array, /* bytes_read */ number ]
5788
5788
  /**
@@ -6147,7 +6147,7 @@ function dpgettext2(domain: string | null, context: string, msgid: string): stri
6147
6147
  /**
6148
6148
  * Returns the value of the environment variable `variable` in the
6149
6149
  * provided list `envp`.
6150
- * @param envp an environment list (eg, as returned from g_get_environ()), or %NULL for an empty environment list
6150
+ * @param envp an environment list (eg, as returned from g_get_environ()), or %NULL for an empty environment list
6151
6151
  * @param variable the environment variable to get
6152
6152
  * @returns the value of the environment variable, or %NULL if the environment variable is not set in @envp. The returned string is owned by @envp, and will be freed if @variable is set or unset again.
6153
6153
  */
@@ -6155,19 +6155,19 @@ function environ_getenv(envp: string[] | null, variable: string): string | null
6155
6155
  /**
6156
6156
  * Sets the environment variable `variable` in the provided list
6157
6157
  * `envp` to `value`.
6158
- * @param envp an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL for an empty environment list
6158
+ * @param envp an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL for an empty environment list
6159
6159
  * @param variable the environment variable to set, must not contain '='
6160
6160
  * @param value the value for to set the variable to
6161
6161
  * @param overwrite whether to change the variable if it already exists
6162
- * @returns the updated environment list. Free it using g_strfreev().
6162
+ * @returns the updated environment list. Free it using g_strfreev().
6163
6163
  */
6164
6164
  function environ_setenv(envp: string[] | null, variable: string, value: string, overwrite: boolean): string[]
6165
6165
  /**
6166
6166
  * Removes the environment variable `variable` from the provided
6167
6167
  * environment `envp`.
6168
- * @param envp an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL for an empty environment list
6168
+ * @param envp an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL for an empty environment list
6169
6169
  * @param variable the environment variable to remove, must not contain '='
6170
- * @returns the updated environment list. Free it using g_strfreev().
6170
+ * @returns the updated environment list. Free it using g_strfreev().
6171
6171
  */
6172
6172
  function environ_unsetenv(envp: string[] | null, variable: string): string[]
6173
6173
  /**
@@ -6456,7 +6456,7 @@ function filename_from_uri(uri: string): [ /* returnType */ string, /* hostname
6456
6456
  * %G_CONVERT_ERROR_EMBEDDED_NUL is set and the function returns %NULL.
6457
6457
  * @param utf8string a UTF-8 encoded string.
6458
6458
  * @param len the length of the string, or -1 if the string is nul-terminated.
6459
- * @returns The converted string, or %NULL on an error.
6459
+ * @returns The converted string, or %NULL on an error.
6460
6460
  */
6461
6461
  function filename_from_utf8(utf8string: string, len: number): [ /* returnType */ string, /* bytes_read */ number, /* bytes_written */ number ]
6462
6462
  /**
@@ -6676,7 +6676,7 @@ function get_current_time(result: TimeVal): void
6676
6676
  *
6677
6677
  * The return value is freshly allocated and it should be freed with
6678
6678
  * g_strfreev() when it is no longer needed.
6679
- * @returns the list of environment variables
6679
+ * @returns the list of environment variables
6680
6680
  */
6681
6681
  function get_environ(): string[]
6682
6682
  /**
@@ -6889,7 +6889,7 @@ function get_real_time(): number
6889
6889
  *
6890
6890
  * The return value is cached and modifying it at runtime is not supported, as
6891
6891
  * it’s not thread-safe to modify environment variables at runtime.
6892
- * @returns a %NULL-terminated array of strings owned by GLib that must not be modified or freed.
6892
+ * @returns a %NULL-terminated array of strings owned by GLib that must not be modified or freed.
6893
6893
  */
6894
6894
  function get_system_config_dirs(): string[]
6895
6895
  /**
@@ -6927,7 +6927,7 @@ function get_system_config_dirs(): string[]
6927
6927
  *
6928
6928
  * The return value is cached and modifying it at runtime is not supported, as
6929
6929
  * it’s not thread-safe to modify environment variables at runtime.
6930
- * @returns a %NULL-terminated array of strings owned by GLib that must not be modified or freed.
6930
+ * @returns a %NULL-terminated array of strings owned by GLib that must not be modified or freed.
6931
6931
  */
6932
6932
  function get_system_data_dirs(): string[]
6933
6933
  /**
@@ -7524,7 +7524,7 @@ function key_file_error_quark(): Quark
7524
7524
  * array are in system codepage encoding, while in most of the typical
7525
7525
  * use cases for environment variables in GLib-using programs you want
7526
7526
  * the UTF-8 encoding that this function and g_getenv() provide.
7527
- * @returns a %NULL-terminated list of strings which must be freed with g_strfreev().
7527
+ * @returns a %NULL-terminated list of strings which must be freed with g_strfreev().
7528
7528
  */
7529
7529
  function listenv(): string[]
7530
7530
  /**
@@ -7539,7 +7539,7 @@ function listenv(): string[]
7539
7539
  * input that may contain embedded nul characters.
7540
7540
  * @param utf8string a UTF-8 encoded string
7541
7541
  * @param len the length of the string, or -1 if the string is nul-terminated.
7542
- * @returns A newly-allocated buffer containing the converted string, or %NULL on an error, and error will be set.
7542
+ * @returns A newly-allocated buffer containing the converted string, or %NULL on an error, and error will be set.
7543
7543
  */
7544
7544
  function locale_from_utf8(utf8string: string, len: number): [ /* returnType */ Uint8Array, /* bytes_read */ number ]
7545
7545
  /**
@@ -9192,8 +9192,8 @@ function spaced_primes_closest(num: number): number
9192
9192
  * process and not its identifier. Process handles and process identifiers
9193
9193
  * are different concepts on Windows.
9194
9194
  * @param working_directory child's current working directory, or %NULL to inherit parent's
9195
- * @param argv child's argument vector
9196
- * @param envp child's environment, or %NULL to inherit parent's
9195
+ * @param argv child's argument vector
9196
+ * @param envp child's environment, or %NULL to inherit parent's
9197
9197
  * @param flags flags from #GSpawnFlags
9198
9198
  * @param child_setup function to run in the child just before `exec()`
9199
9199
  * @returns %TRUE on success, %FALSE if error is set
@@ -9220,7 +9220,7 @@ function spawn_async_with_fds(working_directory: string | null, argv: string[],
9220
9220
  * so no FD assignments are used.
9221
9221
  * @param working_directory child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding
9222
9222
  * @param argv child's argument vector, in the GLib file name encoding; it must be non-empty and %NULL-terminated
9223
- * @param envp child's environment, or %NULL to inherit parent's, in the GLib file name encoding
9223
+ * @param envp child's environment, or %NULL to inherit parent's, in the GLib file name encoding
9224
9224
  * @param flags flags from #GSpawnFlags
9225
9225
  * @param child_setup function to run in the child just before `exec()`
9226
9226
  * @returns %TRUE on success, %FALSE if an error was set
@@ -9423,7 +9423,7 @@ function spawn_async_with_pipes(working_directory: string | null, argv: string[]
9423
9423
  * #GAppLaunchContext, or set the `DISPLAY` environment variable.
9424
9424
  * @param working_directory child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding
9425
9425
  * @param argv child's argument vector, in the GLib file name encoding; it must be non-empty and %NULL-terminated
9426
- * @param envp child's environment, or %NULL to inherit parent's, in the GLib file name encoding
9426
+ * @param envp child's environment, or %NULL to inherit parent's, in the GLib file name encoding
9427
9427
  * @param flags flags from #GSpawnFlags
9428
9428
  * @param child_setup function to run in the child just before `exec()`
9429
9429
  * @param stdin_fd file descriptor to use for child's stdin, or `-1`
@@ -9575,8 +9575,8 @@ function spawn_exit_error_quark(): Quark
9575
9575
  * function for full details on the other parameters and details on
9576
9576
  * how these functions work on Windows.
9577
9577
  * @param working_directory child's current working directory, or %NULL to inherit parent's
9578
- * @param argv child's argument vector, which must be non-empty and %NULL-terminated
9579
- * @param envp child's environment, or %NULL to inherit parent's
9578
+ * @param argv child's argument vector, which must be non-empty and %NULL-terminated
9579
+ * @param envp child's environment, or %NULL to inherit parent's
9580
9580
  * @param flags flags from #GSpawnFlags
9581
9581
  * @param child_setup function to run in the child just before `exec()`
9582
9582
  * @returns %TRUE on success, %FALSE if an error was set
@@ -11636,7 +11636,7 @@ function uri_parse(uri_string: string, flags: UriFlags): Uri
11636
11636
  * @param length the length of `params,` or `-1` if it is nul-terminated
11637
11637
  * @param separators the separator byte character set between parameters. (usually `&`, but sometimes `;` or both `&;`). Note that this function works on bytes not characters, so it can't be used to delimit UTF-8 strings for anything but ASCII characters. You may pass an empty set, in which case no splitting will occur.
11638
11638
  * @param flags flags to modify the way the parameters are handled.
11639
- * @returns A hash table of attribute/value pairs, with both names and values fully-decoded; or %NULL on error.
11639
+ * @returns A hash table of attribute/value pairs, with both names and values fully-decoded; or %NULL on error.
11640
11640
  */
11641
11641
  function uri_parse_params(params: string, length: number, separators: string, flags: UriParamsFlags): HashTable
11642
11642
  /**
@@ -13790,7 +13790,7 @@ interface BookmarkFile {
13790
13790
  set_visited_date_time(uri: string, visited: DateTime): void
13791
13791
  /**
13792
13792
  * This function outputs `bookmark` as a string.
13793
- * @returns a newly allocated string holding the contents of the #GBookmarkFile
13793
+ * @returns a newly allocated string holding the contents of the #GBookmarkFile
13794
13794
  */
13795
13795
  to_data(): Uint8Array
13796
13796
  /**
@@ -13998,7 +13998,7 @@ interface Bytes {
13998
13998
  * %NULL may be returned if `size` is 0. This is not guaranteed, as the #GBytes
13999
13999
  * may represent an empty string with `data` non-%NULL and `size` as 0. %NULL will
14000
14000
  * not be returned if `size` is non-zero.
14001
- * @returns a pointer to the byte data, or %NULL
14001
+ * @returns a pointer to the byte data, or %NULL
14002
14002
  */
14003
14003
  get_data(): Uint8Array | null
14004
14004
  /**
@@ -14143,7 +14143,7 @@ class Bytes {
14143
14143
  *
14144
14144
  * `data` is copied. If `size` is 0, `data` may be %NULL.
14145
14145
  * @constructor
14146
- * @param data the data to be used for the bytes
14146
+ * @param data the data to be used for the bytes
14147
14147
  * @returns a new #GBytes
14148
14148
  */
14149
14149
  constructor(data: Uint8Array | null)
@@ -14152,7 +14152,7 @@ class Bytes {
14152
14152
  *
14153
14153
  * `data` is copied. If `size` is 0, `data` may be %NULL.
14154
14154
  * @constructor
14155
- * @param data the data to be used for the bytes
14155
+ * @param data the data to be used for the bytes
14156
14156
  * @returns a new #GBytes
14157
14157
  */
14158
14158
  static new(data: Uint8Array | null): Bytes
@@ -14168,7 +14168,7 @@ class Bytes {
14168
14168
  *
14169
14169
  * `data` may be %NULL if `size` is 0.
14170
14170
  * @constructor
14171
- * @param data the data to be used for the bytes
14171
+ * @param data the data to be used for the bytes
14172
14172
  * @returns a new #GBytes
14173
14173
  */
14174
14174
  static new_take(data: Uint8Array | null): Bytes
@@ -16814,7 +16814,7 @@ interface KeyFile {
16814
16814
  * and `error` is set to %G_KEY_FILE_ERROR_INVALID_VALUE.
16815
16815
  * @param group_name a group name
16816
16816
  * @param key a key
16817
- * @returns the values associated with the key as a list of booleans, or %NULL if the key was not found or could not be parsed. The returned list of booleans should be freed with g_free() when no longer needed.
16817
+ * @returns the values associated with the key as a list of booleans, or %NULL if the key was not found or could not be parsed. The returned list of booleans should be freed with g_free() when no longer needed.
16818
16818
  */
16819
16819
  get_boolean_list(group_name: string, key: string): boolean[]
16820
16820
  /**
@@ -16854,7 +16854,7 @@ interface KeyFile {
16854
16854
  * and `error` is set to %G_KEY_FILE_ERROR_INVALID_VALUE.
16855
16855
  * @param group_name a group name
16856
16856
  * @param key a key
16857
- * @returns the values associated with the key as a list of doubles, or %NULL if the key was not found or could not be parsed. The returned list of doubles should be freed with g_free() when no longer needed.
16857
+ * @returns the values associated with the key as a list of doubles, or %NULL if the key was not found or could not be parsed. The returned list of doubles should be freed with g_free() when no longer needed.
16858
16858
  */
16859
16859
  get_double_list(group_name: string, key: string): number[]
16860
16860
  /**
@@ -16898,7 +16898,7 @@ interface KeyFile {
16898
16898
  * and `error` is set to %G_KEY_FILE_ERROR_INVALID_VALUE.
16899
16899
  * @param group_name a group name
16900
16900
  * @param key a key
16901
- * @returns the values associated with the key as a list of integers, or %NULL if the key was not found or could not be parsed. The returned list of integers should be freed with g_free() when no longer needed.
16901
+ * @returns the values associated with the key as a list of integers, or %NULL if the key was not found or could not be parsed. The returned list of integers should be freed with g_free() when no longer needed.
16902
16902
  */
16903
16903
  get_integer_list(group_name: string, key: string): number[]
16904
16904
  /**
@@ -16995,7 +16995,7 @@ interface KeyFile {
16995
16995
  * and `error` is set to %G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
16996
16996
  * @param group_name a group name
16997
16997
  * @param key a key
16998
- * @returns a %NULL-terminated string array or %NULL if the specified key cannot be found. The array should be freed with g_strfreev().
16998
+ * @returns a %NULL-terminated string array or %NULL if the specified key cannot be found. The array should be freed with g_strfreev().
16999
16999
  */
17000
17000
  get_string_list(group_name: string, key: string): string[]
17001
17001
  /**
@@ -24188,7 +24188,7 @@ class Uri {
24188
24188
  * @param length the length of `params,` or `-1` if it is nul-terminated
24189
24189
  * @param separators the separator byte character set between parameters. (usually `&`, but sometimes `;` or both `&;`). Note that this function works on bytes not characters, so it can't be used to delimit UTF-8 strings for anything but ASCII characters. You may pass an empty set, in which case no splitting will occur.
24190
24190
  * @param flags flags to modify the way the parameters are handled.
24191
- * @returns A hash table of attribute/value pairs, with both names and values fully-decoded; or %NULL on error.
24191
+ * @returns A hash table of attribute/value pairs, with both names and values fully-decoded; or %NULL on error.
24192
24192
  */
24193
24193
  static parse_params(params: string, length: number, separators: string, flags: UriParamsFlags): HashTable
24194
24194
  /**
@@ -24495,7 +24495,7 @@ interface Variant {
24495
24495
  * returning a constant string, the string is duplicated.
24496
24496
  *
24497
24497
  * The return value must be freed using g_free().
24498
- * @returns a newly allocated string
24498
+ * @returns a newly allocated string
24499
24499
  */
24500
24500
  dup_bytestring(): Uint8Array
24501
24501
  /**
@@ -24594,7 +24594,7 @@ interface Variant {
24594
24594
  * array of bytes.
24595
24595
  *
24596
24596
  * The return value remains valid as long as `value` exists.
24597
- * @returns the constant string
24597
+ * @returns the constant string
24598
24598
  */
24599
24599
  get_bytestring(): Uint8Array
24600
24600
  /**
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "@girs/glib-2.0",
3
- "version": "2.78.0-3.2.7",
3
+ "version": "2.78.0-3.3.0",
4
4
  "description": "GJS TypeScript type definitions for GLib-2.0, generated from library version 2.78.0",
5
5
  "type": "module",
6
6
  "module": "glib-2.0.js",
7
7
  "main": "glib-2.0.js",
8
8
  "exports": {
9
- "./ambient": "./glib-2.0-ambient.d.ts",
10
- "./import": "./glib-2.0-import.d.ts",
9
+ "./ambient": {
10
+ "types": "./glib-2.0-ambient.d.ts",
11
+ "default": "./glib-2.0-ambient.js"
12
+ },
13
+ "./import": {
14
+ "types": "./glib-2.0-import.d.ts",
15
+ "default": "./glib-2.0-import.js"
16
+ },
11
17
  ".": {
12
18
  "import": {
13
19
  "types": "./glib-2.0.d.ts",
@@ -25,8 +31,8 @@
25
31
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit glib-2.0.d.cts"
26
32
  },
27
33
  "dependencies": {
28
- "@girs/gjs": "^3.2.7",
29
- "@girs/gobject-2.0": "^2.78.0-3.2.7"
34
+ "@girs/gjs": "^3.3.0",
35
+ "@girs/gobject-2.0": "^2.78.0-3.3.0"
30
36
  },
31
37
  "devDependencies": {
32
38
  "typescript": "*"
@@ -43,7 +49,7 @@
43
49
  "license": "MIT",
44
50
  "repository": {
45
51
  "type": "git",
46
- "url": "git+https://github.com/gjsify/types.git"
52
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
47
53
  },
48
54
  "bugs": {
49
55
  "url": "https://github.com/gjsify/ts-for-gir/issues"