@girs/glib-2.0 2.84.2-4.0.0-beta.24 → 2.84.2-4.0.0-beta.25

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/glib-2.0.d.ts +48 -48
  3. package/package.json +3 -3
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.84.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.24.
8
+ GJS TypeScript type definitions for GLib-2.0, generated from library version 2.84.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.25.
9
9
 
10
10
 
11
11
  ## Install
package/glib-2.0.d.ts CHANGED
@@ -11280,7 +11280,7 @@ export namespace GLib {
11280
11280
  * @param str a UCS-4 encoded string
11281
11281
  * @returns a pointer to a newly allocated UTF-16 string. This value must be freed with [func@GLib.free].
11282
11282
  */
11283
- function ucs4_to_utf16(str: number[]): [number, number, number];
11283
+ function ucs4_to_utf16(str: string): [number, number, number];
11284
11284
  /**
11285
11285
  * Convert a string from a 32-bit fixed width representation as UCS-4.
11286
11286
  * to UTF-8.
@@ -11289,7 +11289,7 @@ export namespace GLib {
11289
11289
  * @param str a UCS-4 encoded string
11290
11290
  * @returns a pointer to a newly allocated UTF-8 string. This value must be freed with [func@GLib.free]. If an error occurs, @items_read will be set to the position of the first invalid input character.
11291
11291
  */
11292
- function ucs4_to_utf8(str: number[]): [string, number, number];
11292
+ function ucs4_to_utf8(str: string): [string, number, number];
11293
11293
  /**
11294
11294
  * Determines the break type of `c`. `c` should be a Unicode character
11295
11295
  * (to derive a character from UTF-8 encoded text, use
@@ -11300,13 +11300,13 @@ export namespace GLib {
11300
11300
  * @param c a Unicode character
11301
11301
  * @returns the break type of @c
11302
11302
  */
11303
- function unichar_break_type(c: number): UnicodeBreakType;
11303
+ function unichar_break_type(c: string): UnicodeBreakType;
11304
11304
  /**
11305
11305
  * Determines the canonical combining class of a Unicode character.
11306
11306
  * @param uc a Unicode character
11307
11307
  * @returns the combining class of the character
11308
11308
  */
11309
- function unichar_combining_class(uc: number): number;
11309
+ function unichar_combining_class(uc: string): number;
11310
11310
  /**
11311
11311
  * Performs a single composition step of the
11312
11312
  * Unicode canonical composition algorithm.
@@ -11328,7 +11328,7 @@ export namespace GLib {
11328
11328
  * @param b a Unicode character
11329
11329
  * @returns %TRUE if the characters could be composed
11330
11330
  */
11331
- function unichar_compose(a: number, b: number): [boolean, number];
11331
+ function unichar_compose(a: string, b: string): [boolean, string];
11332
11332
  /**
11333
11333
  * Performs a single decomposition step of the
11334
11334
  * Unicode canonical decomposition algorithm.
@@ -11356,14 +11356,14 @@ export namespace GLib {
11356
11356
  * @param ch a Unicode character
11357
11357
  * @returns %TRUE if the character could be decomposed
11358
11358
  */
11359
- function unichar_decompose(ch: number): [boolean, number, number];
11359
+ function unichar_decompose(ch: string): [boolean, string, string];
11360
11360
  /**
11361
11361
  * Determines the numeric value of a character as a decimal
11362
11362
  * digit.
11363
11363
  * @param c a Unicode character
11364
11364
  * @returns If @c is a decimal digit (according to g_unichar_isdigit()), its numeric value. Otherwise, -1.
11365
11365
  */
11366
- function unichar_digit_value(c: number): number;
11366
+ function unichar_digit_value(c: string): number;
11367
11367
  /**
11368
11368
  * Computes the canonical or compatibility decomposition of a
11369
11369
  * Unicode character. For compatibility decomposition,
@@ -11389,7 +11389,7 @@ export namespace GLib {
11389
11389
  * @param result_len length of @result
11390
11390
  * @returns the length of the full decomposition.
11391
11391
  */
11392
- function unichar_fully_decompose(ch: number, compat: boolean, result_len: number): [number, number];
11392
+ function unichar_fully_decompose(ch: string, compat: boolean, result_len: number): [number, string];
11393
11393
  /**
11394
11394
  * In Unicode, some characters are "mirrored". This means that their
11395
11395
  * images are mirrored horizontally in text that is laid out from right
@@ -11403,7 +11403,7 @@ export namespace GLib {
11403
11403
  * @param ch a Unicode character
11404
11404
  * @returns %TRUE if @ch has a mirrored character, %FALSE otherwise
11405
11405
  */
11406
- function unichar_get_mirror_char(ch: number): [boolean, number];
11406
+ function unichar_get_mirror_char(ch: string): [boolean, string];
11407
11407
  /**
11408
11408
  * Looks up the #GUnicodeScript for a particular character (as defined
11409
11409
  * by Unicode Standard Annex \#24). No check is made for `ch` being a
@@ -11415,7 +11415,7 @@ export namespace GLib {
11415
11415
  * @param ch a Unicode character
11416
11416
  * @returns the #GUnicodeScript for the character.
11417
11417
  */
11418
- function unichar_get_script(ch: number): UnicodeScript;
11418
+ function unichar_get_script(ch: string): UnicodeScript;
11419
11419
  /**
11420
11420
  * Determines whether a character is alphanumeric.
11421
11421
  * Given some UTF-8 text, obtain a character value
@@ -11423,7 +11423,7 @@ export namespace GLib {
11423
11423
  * @param c a Unicode character
11424
11424
  * @returns %TRUE if @c is an alphanumeric character
11425
11425
  */
11426
- function unichar_isalnum(c: number): boolean;
11426
+ function unichar_isalnum(c: string): boolean;
11427
11427
  /**
11428
11428
  * Determines whether a character is alphabetic (i.e. a letter).
11429
11429
  * Given some UTF-8 text, obtain a character value with
@@ -11431,7 +11431,7 @@ export namespace GLib {
11431
11431
  * @param c a Unicode character
11432
11432
  * @returns %TRUE if @c is an alphabetic character
11433
11433
  */
11434
- function unichar_isalpha(c: number): boolean;
11434
+ function unichar_isalpha(c: string): boolean;
11435
11435
  /**
11436
11436
  * Determines whether a character is a control character.
11437
11437
  * Given some UTF-8 text, obtain a character value with
@@ -11439,14 +11439,14 @@ export namespace GLib {
11439
11439
  * @param c a Unicode character
11440
11440
  * @returns %TRUE if @c is a control character
11441
11441
  */
11442
- function unichar_iscntrl(c: number): boolean;
11442
+ function unichar_iscntrl(c: string): boolean;
11443
11443
  /**
11444
11444
  * Determines if a given character is assigned in the Unicode
11445
11445
  * standard.
11446
11446
  * @param c a Unicode character
11447
11447
  * @returns %TRUE if the character has an assigned value
11448
11448
  */
11449
- function unichar_isdefined(c: number): boolean;
11449
+ function unichar_isdefined(c: string): boolean;
11450
11450
  /**
11451
11451
  * Determines whether a character is numeric (i.e. a digit). This
11452
11452
  * covers ASCII 0-9 and also digits in other languages/scripts. Given
@@ -11454,7 +11454,7 @@ export namespace GLib {
11454
11454
  * @param c a Unicode character
11455
11455
  * @returns %TRUE if @c is a digit
11456
11456
  */
11457
- function unichar_isdigit(c: number): boolean;
11457
+ function unichar_isdigit(c: string): boolean;
11458
11458
  /**
11459
11459
  * Determines whether a character is printable and not a space
11460
11460
  * (returns %FALSE for control characters, format characters, and
@@ -11464,7 +11464,7 @@ export namespace GLib {
11464
11464
  * @param c a Unicode character
11465
11465
  * @returns %TRUE if @c is printable unless it's a space
11466
11466
  */
11467
- function unichar_isgraph(c: number): boolean;
11467
+ function unichar_isgraph(c: string): boolean;
11468
11468
  /**
11469
11469
  * Determines whether a character is a lowercase letter.
11470
11470
  * Given some UTF-8 text, obtain a character value with
@@ -11472,7 +11472,7 @@ export namespace GLib {
11472
11472
  * @param c a Unicode character
11473
11473
  * @returns %TRUE if @c is a lowercase letter
11474
11474
  */
11475
- function unichar_islower(c: number): boolean;
11475
+ function unichar_islower(c: string): boolean;
11476
11476
  /**
11477
11477
  * Determines whether a character is a mark (non-spacing mark,
11478
11478
  * combining mark, or enclosing mark in Unicode speak).
@@ -11486,7 +11486,7 @@ export namespace GLib {
11486
11486
  * @param c a Unicode character
11487
11487
  * @returns %TRUE if @c is a mark character
11488
11488
  */
11489
- function unichar_ismark(c: number): boolean;
11489
+ function unichar_ismark(c: string): boolean;
11490
11490
  /**
11491
11491
  * Determines whether a character is printable.
11492
11492
  * Unlike g_unichar_isgraph(), returns %TRUE for spaces.
@@ -11495,7 +11495,7 @@ export namespace GLib {
11495
11495
  * @param c a Unicode character
11496
11496
  * @returns %TRUE if @c is printable
11497
11497
  */
11498
- function unichar_isprint(c: number): boolean;
11498
+ function unichar_isprint(c: string): boolean;
11499
11499
  /**
11500
11500
  * Determines whether a character is punctuation or a symbol.
11501
11501
  * Given some UTF-8 text, obtain a character value with
@@ -11503,7 +11503,7 @@ export namespace GLib {
11503
11503
  * @param c a Unicode character
11504
11504
  * @returns %TRUE if @c is a punctuation or symbol character
11505
11505
  */
11506
- function unichar_ispunct(c: number): boolean;
11506
+ function unichar_ispunct(c: string): boolean;
11507
11507
  /**
11508
11508
  * Determines whether a character is a space, tab, or line separator
11509
11509
  * (newline, carriage return, etc.). Given some UTF-8 text, obtain a
@@ -11515,7 +11515,7 @@ export namespace GLib {
11515
11515
  * @param c a Unicode character
11516
11516
  * @returns %TRUE if @c is a space character
11517
11517
  */
11518
- function unichar_isspace(c: number): boolean;
11518
+ function unichar_isspace(c: string): boolean;
11519
11519
  /**
11520
11520
  * Determines if a character is titlecase. Some characters in
11521
11521
  * Unicode which are composites, such as the DZ digraph
@@ -11526,20 +11526,20 @@ export namespace GLib {
11526
11526
  * @param c a Unicode character
11527
11527
  * @returns %TRUE if the character is titlecase
11528
11528
  */
11529
- function unichar_istitle(c: number): boolean;
11529
+ function unichar_istitle(c: string): boolean;
11530
11530
  /**
11531
11531
  * Determines if a character is uppercase.
11532
11532
  * @param c a Unicode character
11533
11533
  * @returns %TRUE if @c is an uppercase character
11534
11534
  */
11535
- function unichar_isupper(c: number): boolean;
11535
+ function unichar_isupper(c: string): boolean;
11536
11536
  /**
11537
11537
  * Determines if a character is typically rendered in a double-width
11538
11538
  * cell.
11539
11539
  * @param c a Unicode character
11540
11540
  * @returns %TRUE if the character is wide
11541
11541
  */
11542
- function unichar_iswide(c: number): boolean;
11542
+ function unichar_iswide(c: string): boolean;
11543
11543
  /**
11544
11544
  * Determines if a character is typically rendered in a double-width
11545
11545
  * cell under legacy East Asian locales. If a character is wide according to
@@ -11554,13 +11554,13 @@ export namespace GLib {
11554
11554
  * @param c a Unicode character
11555
11555
  * @returns %TRUE if the character is wide in legacy East Asian locales
11556
11556
  */
11557
- function unichar_iswide_cjk(c: number): boolean;
11557
+ function unichar_iswide_cjk(c: string): boolean;
11558
11558
  /**
11559
11559
  * Determines if a character is a hexadecimal digit.
11560
11560
  * @param c a Unicode character.
11561
11561
  * @returns %TRUE if the character is a hexadecimal digit
11562
11562
  */
11563
- function unichar_isxdigit(c: number): boolean;
11563
+ function unichar_isxdigit(c: string): boolean;
11564
11564
  /**
11565
11565
  * Determines if a given character typically takes zero width when rendered.
11566
11566
  * The return value is %TRUE for all non-spacing and enclosing marks
@@ -11574,37 +11574,37 @@ export namespace GLib {
11574
11574
  * @param c a Unicode character
11575
11575
  * @returns %TRUE if the character has zero width
11576
11576
  */
11577
- function unichar_iszerowidth(c: number): boolean;
11577
+ function unichar_iszerowidth(c: string): boolean;
11578
11578
  /**
11579
11579
  * Converts a single character to UTF-8.
11580
11580
  * @param c a Unicode character code
11581
11581
  * @returns number of bytes written
11582
11582
  */
11583
- function unichar_to_utf8(c: number): [number, string];
11583
+ function unichar_to_utf8(c: string): [number, string];
11584
11584
  /**
11585
11585
  * Converts a character to lower case.
11586
11586
  * @param c a Unicode character.
11587
11587
  * @returns the result of converting @c to lower case. If @c is not an upperlower or titlecase character, or has no lowercase equivalent @c is returned unchanged.
11588
11588
  */
11589
- function unichar_tolower(c: number): number;
11589
+ function unichar_tolower(c: string): string;
11590
11590
  /**
11591
11591
  * Converts a character to the titlecase.
11592
11592
  * @param c a Unicode character
11593
11593
  * @returns the result of converting @c to titlecase. If @c is not an uppercase or lowercase character, @c is returned unchanged.
11594
11594
  */
11595
- function unichar_totitle(c: number): number;
11595
+ function unichar_totitle(c: string): string;
11596
11596
  /**
11597
11597
  * Converts a character to uppercase.
11598
11598
  * @param c a Unicode character
11599
11599
  * @returns the result of converting @c to uppercase. If @c is not a lowercase or titlecase character, or has no upper case equivalent @c is returned unchanged.
11600
11600
  */
11601
- function unichar_toupper(c: number): number;
11601
+ function unichar_toupper(c: string): string;
11602
11602
  /**
11603
11603
  * Classifies a Unicode character by type.
11604
11604
  * @param c a Unicode character
11605
11605
  * @returns the type of the character.
11606
11606
  */
11607
- function unichar_type(c: number): UnicodeType;
11607
+ function unichar_type(c: string): UnicodeType;
11608
11608
  /**
11609
11609
  * Checks whether `ch` is a valid Unicode character.
11610
11610
  *
@@ -11613,21 +11613,21 @@ export namespace GLib {
11613
11613
  * @param ch a Unicode character
11614
11614
  * @returns `TRUE` if @ch is a valid Unicode character
11615
11615
  */
11616
- function unichar_validate(ch: number): boolean;
11616
+ function unichar_validate(ch: string): boolean;
11617
11617
  /**
11618
11618
  * Determines the numeric value of a character as a hexadecimal
11619
11619
  * digit.
11620
11620
  * @param c a Unicode character
11621
11621
  * @returns If @c is a hex digit (according to g_unichar_isxdigit()), its numeric value. Otherwise, -1.
11622
11622
  */
11623
- function unichar_xdigit_value(c: number): number;
11623
+ function unichar_xdigit_value(c: string): number;
11624
11624
  /**
11625
11625
  * Computes the canonical decomposition of a Unicode character.
11626
11626
  * @param ch a Unicode character.
11627
11627
  * @param result_len location to store the length of the return value.
11628
11628
  * @returns a newly allocated string of Unicode characters. @result_len is set to the resulting length of the string.
11629
11629
  */
11630
- function unicode_canonical_decomposition(ch: number, result_len: number): number;
11630
+ function unicode_canonical_decomposition(ch: string, result_len: number): string;
11631
11631
  /**
11632
11632
  * Computes the canonical ordering of a string in-place.
11633
11633
  * This rearranges decomposed characters in the string
@@ -11635,7 +11635,7 @@ export namespace GLib {
11635
11635
  * manual for more information.
11636
11636
  * @param string a UCS-4 encoded string.
11637
11637
  */
11638
- function unicode_canonical_ordering(string: number[]): void;
11638
+ function unicode_canonical_ordering(string: string): void;
11639
11639
  /**
11640
11640
  * Looks up the Unicode script for `iso1`5924. ISO 15924 assigns four-letter
11641
11641
  * codes to scripts. For example, the code for Arabic is 'Arab'.
@@ -12217,7 +12217,7 @@ export namespace GLib {
12217
12217
  * @param str a UTF-16 encoded string
12218
12218
  * @returns a pointer to a newly allocated UCS-4 string. This value must be freed with [func@GLib.free].
12219
12219
  */
12220
- function utf16_to_ucs4(str: number[]): [number, number, number];
12220
+ function utf16_to_ucs4(str: number[]): [string, number, number];
12221
12221
  /**
12222
12222
  * Convert a string from UTF-16 to UTF-8.
12223
12223
  *
@@ -12349,7 +12349,7 @@ export namespace GLib {
12349
12349
  * @param p a pointer to Unicode character encoded as UTF-8
12350
12350
  * @returns the resulting character
12351
12351
  */
12352
- function utf8_get_char(p: string): number;
12352
+ function utf8_get_char(p: string): string;
12353
12353
  /**
12354
12354
  * Convert a sequence of bytes encoded as UTF-8 to a Unicode character.
12355
12355
  *
@@ -12364,7 +12364,7 @@ export namespace GLib {
12364
12364
  * @param max_len the maximum number of bytes to read, or `-1` if @p is nul-terminated
12365
12365
  * @returns the resulting character. If @p points to a partial sequence at the end of a string that could begin a valid character (or if @max_len is zero), returns `(gunichar)-2`; otherwise, if @p does not point to a valid UTF-8 encoded Unicode character, returns `(gunichar)-1`.
12366
12366
  */
12367
- function utf8_get_char_validated(p: string, max_len: number): number;
12367
+ function utf8_get_char_validated(p: string, max_len: number): string;
12368
12368
  /**
12369
12369
  * If the provided string is valid UTF-8, return a copy of it. If not,
12370
12370
  * return a copy in which bytes that could not be interpreted as valid Unicode
@@ -12464,7 +12464,7 @@ export namespace GLib {
12464
12464
  * @param c a Unicode character
12465
12465
  * @returns `NULL` if the string does not contain the character, otherwise, a pointer to the start of the leftmost occurrence of the character in the string.
12466
12466
  */
12467
- function utf8_strchr(p: string, len: number, c: number): string | null;
12467
+ function utf8_strchr(p: string, len: number, c: string): string | null;
12468
12468
  /**
12469
12469
  * Converts all Unicode characters in the string that have a case
12470
12470
  * to lowercase. The exact manner that this is done depends
@@ -12510,7 +12510,7 @@ export namespace GLib {
12510
12510
  * @param c a Unicode character
12511
12511
  * @returns `NULL` if the string does not contain the character, otherwise, a pointer to the start of the rightmost occurrence of the character in the string.
12512
12512
  */
12513
- function utf8_strrchr(p: string, len: number, c: number): string | null;
12513
+ function utf8_strrchr(p: string, len: number, c: string): string | null;
12514
12514
  /**
12515
12515
  * Reverses a UTF-8 string.
12516
12516
  *
@@ -12563,7 +12563,7 @@ export namespace GLib {
12563
12563
  * @param len the maximum length of @str to use, in bytes. If @len is negative, then the string is nul-terminated.
12564
12564
  * @returns a pointer to a newly allocated UCS-4 string. This value must be freed with [func@GLib.free].
12565
12565
  */
12566
- function utf8_to_ucs4(str: string, len: number): [number, number, number];
12566
+ function utf8_to_ucs4(str: string, len: number): [string, number, number];
12567
12567
  /**
12568
12568
  * Convert a string from UTF-8 to a 32-bit fixed width
12569
12569
  * representation as UCS-4, assuming valid UTF-8 input.
@@ -12575,7 +12575,7 @@ export namespace GLib {
12575
12575
  * @param len the maximum length of @str to use, in bytes. If @len is negative, then the string is nul-terminated.
12576
12576
  * @returns a pointer to a newly allocated UCS-4 string. This value must be freed with [func@GLib.free].
12577
12577
  */
12578
- function utf8_to_ucs4_fast(str: string, len: number): [number, number];
12578
+ function utf8_to_ucs4_fast(str: string, len: number): [string, number];
12579
12579
  /**
12580
12580
  * Convert a string from UTF-8 to UTF-16.
12581
12581
  *
@@ -17765,7 +17765,7 @@ export namespace GLib {
17765
17765
  * This function cannot be called on a channel with %NULL encoding.
17766
17766
  * @returns a #GIOStatus
17767
17767
  */
17768
- read_unichar(): [IOStatus, number];
17768
+ read_unichar(): [IOStatus, string];
17769
17769
  /**
17770
17770
  * Increments the reference count of a #GIOChannel.
17771
17771
  * @returns the @channel that was passed in (since 2.6)
@@ -17922,7 +17922,7 @@ export namespace GLib {
17922
17922
  * @param thechar a character
17923
17923
  * @returns a #GIOStatus
17924
17924
  */
17925
- write_unichar(thechar: number): IOStatus;
17925
+ write_unichar(thechar: string): IOStatus;
17926
17926
  }
17927
17927
 
17928
17928
  /**
@@ -23131,7 +23131,7 @@ export namespace GLib {
23131
23131
  * @param wc a Unicode character
23132
23132
  * @returns @string
23133
23133
  */
23134
- append_unichar(wc: number): String;
23134
+ append_unichar(wc: string): String;
23135
23135
  /**
23136
23136
  * Appends `unescaped` to `string,` escaping any characters that
23137
23137
  * are reserved in URIs using URI-style escape sequences.
@@ -23256,7 +23256,7 @@ export namespace GLib {
23256
23256
  * @param wc a Unicode character
23257
23257
  * @returns @string
23258
23258
  */
23259
- insert_unichar(pos: number, wc: number): String;
23259
+ insert_unichar(pos: number, wc: string): String;
23260
23260
  /**
23261
23261
  * Overwrites part of a string, lengthening it if necessary.
23262
23262
  * @param pos the position at which to start overwriting
@@ -23308,7 +23308,7 @@ export namespace GLib {
23308
23308
  * @param wc a Unicode character
23309
23309
  * @returns @string
23310
23310
  */
23311
- prepend_unichar(wc: number): String;
23311
+ prepend_unichar(wc: string): String;
23312
23312
  /**
23313
23313
  * Replaces the string `find` with the string `replace` in a #GString up to
23314
23314
  * `limit` times. If the number of instances of `find` in the #GString is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/glib-2.0",
3
- "version": "2.84.2-4.0.0-beta.24",
3
+ "version": "2.84.2-4.0.0-beta.25",
4
4
  "description": "GJS TypeScript type definitions for GLib-2.0, generated from library version 2.84.2",
5
5
  "type": "module",
6
6
  "module": "glib-2.0.js",
@@ -31,8 +31,8 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.0.0-beta.24",
35
- "@girs/gobject-2.0": "^2.84.2-4.0.0-beta.24"
34
+ "@girs/gjs": "^4.0.0-beta.25",
35
+ "@girs/gobject-2.0": "^2.84.2-4.0.0-beta.25"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "*"