@girs/glib-2.0 2.84.0-4.0.0-beta.23 → 2.84.2-4.0.0-beta.24
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 +1 -1
- package/glib-2.0.d.ts +41 -69
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for GLib-2.0, generated from library version 2.84.
|
|
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.
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
## Install
|
package/glib-2.0.d.ts
CHANGED
|
@@ -9075,15 +9075,26 @@ export namespace GLib {
|
|
|
9075
9075
|
* If you are using #GApplication the program name is set in
|
|
9076
9076
|
* g_application_run(). In case of GDK or GTK it is set in
|
|
9077
9077
|
* gdk_init(), which is called by gtk_init() and the
|
|
9078
|
-
* #GtkApplication::startup handler.
|
|
9079
|
-
* taking the last component of `argv[`0].
|
|
9078
|
+
* #GtkApplication::startup handler. By default, the program name is
|
|
9079
|
+
* found by taking the last component of `argv[`0].
|
|
9080
9080
|
*
|
|
9081
9081
|
* Since GLib 2.72, this function can be called multiple times
|
|
9082
9082
|
* and is fully thread safe. Prior to GLib 2.72, this function
|
|
9083
9083
|
* could only be called once per process.
|
|
9084
|
+
*
|
|
9085
|
+
* See the [GTK documentation](https://docs.gtk.org/gtk4/migrating-3to4.html#set-a-proper-application-id)
|
|
9086
|
+
* for requirements on integrating g_set_prgname() with GTK applications.
|
|
9084
9087
|
* @param prgname the name of the program.
|
|
9085
9088
|
*/
|
|
9086
9089
|
function set_prgname(prgname: string): void;
|
|
9090
|
+
/**
|
|
9091
|
+
* If g_get_prgname() is not set, this is the same as setting
|
|
9092
|
+
* the name via g_set_prgname() and %TRUE is returned. Otherwise,
|
|
9093
|
+
* does nothing and returns %FALSE. This is thread-safe.
|
|
9094
|
+
* @param prgname the name of the program.
|
|
9095
|
+
* @returns whether g_prgname was initialized by the call.
|
|
9096
|
+
*/
|
|
9097
|
+
function set_prgname_once(prgname: string): boolean;
|
|
9087
9098
|
/**
|
|
9088
9099
|
* Sets an environment variable. On UNIX, both the variable's name and
|
|
9089
9100
|
* value can be arbitrary byte strings, except that the variable's name
|
|
@@ -17431,85 +17442,24 @@ export namespace GLib {
|
|
|
17431
17442
|
steal(): void;
|
|
17432
17443
|
}
|
|
17433
17444
|
|
|
17434
|
-
/**
|
|
17435
|
-
* HMACs should be used when producing a cookie or hash based on data
|
|
17436
|
-
* and a key. Simple mechanisms for using SHA1 and other algorithms to
|
|
17437
|
-
* digest a key and data together are vulnerable to various security
|
|
17438
|
-
* issues.
|
|
17439
|
-
* [HMAC](http://en.wikipedia.org/wiki/HMAC)
|
|
17440
|
-
* uses algorithms like SHA1 in a secure way to produce a digest of a
|
|
17441
|
-
* key and data.
|
|
17442
|
-
*
|
|
17443
|
-
* Both the key and data are arbitrary byte arrays of bytes or characters.
|
|
17444
|
-
*
|
|
17445
|
-
* Support for HMAC Digests has been added in GLib 2.30, and support for SHA-512
|
|
17446
|
-
* in GLib 2.42. Support for SHA-384 was added in GLib 2.52.
|
|
17447
|
-
*
|
|
17448
|
-
* To create a new `GHmac`, use [ctor`GLib`.Hmac.new]. To free a `GHmac`, use
|
|
17449
|
-
* [method`GLib`.Hmac.unref].
|
|
17450
|
-
*/
|
|
17451
17445
|
class Hmac {
|
|
17452
17446
|
static $gtype: GObject.GType<Hmac>;
|
|
17453
17447
|
|
|
17454
17448
|
// Constructors
|
|
17455
17449
|
|
|
17456
|
-
constructor(digest_type: ChecksumType, key:
|
|
17450
|
+
constructor(digest_type: ChecksumType, key: number, key_len: number);
|
|
17457
17451
|
_init(...args: any[]): void;
|
|
17458
17452
|
|
|
17459
|
-
static ['new'](digest_type: ChecksumType, key:
|
|
17453
|
+
static ['new'](digest_type: ChecksumType, key: number, key_len: number): Hmac;
|
|
17460
17454
|
|
|
17461
17455
|
// Methods
|
|
17462
17456
|
|
|
17463
|
-
/**
|
|
17464
|
-
* Copies a #GHmac. If `hmac` has been closed, by calling
|
|
17465
|
-
* g_hmac_get_string() or g_hmac_get_digest(), the copied
|
|
17466
|
-
* HMAC will be closed as well.
|
|
17467
|
-
* @returns the copy of the passed #GHmac. Use g_hmac_unref() when finished using it.
|
|
17468
|
-
*/
|
|
17469
17457
|
copy(): Hmac;
|
|
17470
|
-
|
|
17471
|
-
* Gets the digest from `checksum` as a raw binary array and places it
|
|
17472
|
-
* into `buffer`. The size of the digest depends on the type of checksum.
|
|
17473
|
-
*
|
|
17474
|
-
* Once this function has been called, the #GHmac is closed and can
|
|
17475
|
-
* no longer be updated with g_checksum_update().
|
|
17476
|
-
* @param buffer output buffer
|
|
17477
|
-
*/
|
|
17478
|
-
get_digest(buffer: Uint8Array | string): void;
|
|
17479
|
-
/**
|
|
17480
|
-
* Gets the HMAC as a hexadecimal string.
|
|
17481
|
-
*
|
|
17482
|
-
* Once this function has been called the #GHmac can no longer be
|
|
17483
|
-
* updated with g_hmac_update().
|
|
17484
|
-
*
|
|
17485
|
-
* The hexadecimal characters will be lower case.
|
|
17486
|
-
* @returns the hexadecimal representation of the HMAC. The returned string is owned by the HMAC and should not be modified or freed.
|
|
17487
|
-
*/
|
|
17458
|
+
get_digest(buffer: number, digest_len: number): void;
|
|
17488
17459
|
get_string(): string;
|
|
17489
|
-
/**
|
|
17490
|
-
* Atomically increments the reference count of `hmac` by one.
|
|
17491
|
-
*
|
|
17492
|
-
* This function is MT-safe and may be called from any thread.
|
|
17493
|
-
* @returns the passed in #GHmac.
|
|
17494
|
-
*/
|
|
17495
17460
|
ref(): Hmac;
|
|
17496
|
-
/**
|
|
17497
|
-
* Atomically decrements the reference count of `hmac` by one.
|
|
17498
|
-
*
|
|
17499
|
-
* If the reference count drops to 0, all keys and values will be
|
|
17500
|
-
* destroyed, and all memory allocated by the hash table is released.
|
|
17501
|
-
* This function is MT-safe and may be called from any thread.
|
|
17502
|
-
* Frees the memory allocated for `hmac`.
|
|
17503
|
-
*/
|
|
17504
17461
|
unref(): void;
|
|
17505
|
-
|
|
17506
|
-
* Feeds `data` into an existing #GHmac.
|
|
17507
|
-
*
|
|
17508
|
-
* The HMAC must still be open, that is g_hmac_get_string() or
|
|
17509
|
-
* g_hmac_get_digest() must not have been called on `hmac`.
|
|
17510
|
-
* @param data buffer used to compute the checksum
|
|
17511
|
-
*/
|
|
17512
|
-
update(data: Uint8Array | string): void;
|
|
17462
|
+
update(data: number, length: number): void;
|
|
17513
17463
|
}
|
|
17514
17464
|
|
|
17515
17465
|
/**
|
|
@@ -18401,8 +18351,10 @@ export namespace GLib {
|
|
|
18401
18351
|
load_from_data(data: string, length: number, flags: KeyFileFlags | null): boolean;
|
|
18402
18352
|
/**
|
|
18403
18353
|
* Looks for a key file named `file` in the paths returned from
|
|
18404
|
-
* [func`GLib`.get_user_data_dir] and [func`GLib`.get_system_data_dirs]
|
|
18405
|
-
*
|
|
18354
|
+
* [func`GLib`.get_user_data_dir] and [func`GLib`.get_system_data_dirs].
|
|
18355
|
+
*
|
|
18356
|
+
* The search algorithm from [method`GLib`.KeyFile.load_from_dirs] is used. If
|
|
18357
|
+
* `file` is found, it’s loaded into `key_file` and its full path is returned in
|
|
18406
18358
|
* `full_path`.
|
|
18407
18359
|
*
|
|
18408
18360
|
* If the file could not be loaded then either a [error`GLib`.FileError] or
|
|
@@ -18416,6 +18368,13 @@ export namespace GLib {
|
|
|
18416
18368
|
* Looks for a key file named `file` in the paths specified in `search_dirs,`
|
|
18417
18369
|
* loads the file into `key_file` and returns the file’s full path in `full_path`.
|
|
18418
18370
|
*
|
|
18371
|
+
* `search_dirs` are checked in the order listed in the array, with the highest
|
|
18372
|
+
* priority directory listed first. Within each directory, `file` is looked for.
|
|
18373
|
+
* If it’s not found, `-` characters in `file` are progressively replaced with
|
|
18374
|
+
* directory separators to search subdirectories of the search directory. If the
|
|
18375
|
+
* file has not been found after all `-` characters have been replaced, the next
|
|
18376
|
+
* search directory in `search_dirs` is checked.
|
|
18377
|
+
*
|
|
18419
18378
|
* If the file could not be found in any of the `search_dirs,`
|
|
18420
18379
|
* [error`GLib`.KeyFileError.NOT_FOUND] is returned. If
|
|
18421
18380
|
* the file is found but the OS returns an error when opening or reading the
|
|
@@ -26837,6 +26796,19 @@ export namespace GLib {
|
|
|
26837
26796
|
/**
|
|
26838
26797
|
* A type in the [type`GLib`.Variant] type system.
|
|
26839
26798
|
*
|
|
26799
|
+
* [type`GLib`.Variant] types are represented as strings, but have a strict
|
|
26800
|
+
* syntax described below. All [type`GLib`.VariantType]s passed to GLib must be
|
|
26801
|
+
* valid, and they are typically expected to be static (i.e. not provided by
|
|
26802
|
+
* user input) as they determine how binary [type`GLib`.Variant] data is
|
|
26803
|
+
* interpreted.
|
|
26804
|
+
*
|
|
26805
|
+
* To convert a static string to a [type`GLib`.VariantType] in C, use the
|
|
26806
|
+
* [func`GLib`.VARIANT_TYPE] casting macro. When GLib is compiled with checks
|
|
26807
|
+
* enabled, it will validate the type. To check if an arbitrary string is a
|
|
26808
|
+
* valid [type`GLib`.VariantType], use [func`GLib`.VariantType.string_is_valid].
|
|
26809
|
+
*
|
|
26810
|
+
* ## GVariant Type System
|
|
26811
|
+
*
|
|
26840
26812
|
* This section introduces the [type`GLib`.Variant] type system. It is based, in
|
|
26841
26813
|
* large part, on the D-Bus type system, with two major changes and
|
|
26842
26814
|
* some minor lifting of restrictions. The
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/glib-2.0",
|
|
3
|
-
"version": "2.84.
|
|
4
|
-
"description": "GJS TypeScript type definitions for GLib-2.0, generated from library version 2.84.
|
|
3
|
+
"version": "2.84.2-4.0.0-beta.24",
|
|
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",
|
|
7
7
|
"main": "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.
|
|
35
|
-
"@girs/gobject-2.0": "^2.84.
|
|
34
|
+
"@girs/gjs": "^4.0.0-beta.24",
|
|
35
|
+
"@girs/gobject-2.0": "^2.84.2-4.0.0-beta.24"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"typescript": "*"
|