@girs/glib-2.0 2.83.3-4.0.0-beta.21 → 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 +43 -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.
|
|
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
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
import '@girs/gjs';
|
|
11
|
+
|
|
10
12
|
// Module dependencies
|
|
11
13
|
import type GObject from '@girs/gobject-2.0';
|
|
12
14
|
|
|
@@ -9073,15 +9075,26 @@ export namespace GLib {
|
|
|
9073
9075
|
* If you are using #GApplication the program name is set in
|
|
9074
9076
|
* g_application_run(). In case of GDK or GTK it is set in
|
|
9075
9077
|
* gdk_init(), which is called by gtk_init() and the
|
|
9076
|
-
* #GtkApplication::startup handler.
|
|
9077
|
-
* 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].
|
|
9078
9080
|
*
|
|
9079
9081
|
* Since GLib 2.72, this function can be called multiple times
|
|
9080
9082
|
* and is fully thread safe. Prior to GLib 2.72, this function
|
|
9081
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.
|
|
9082
9087
|
* @param prgname the name of the program.
|
|
9083
9088
|
*/
|
|
9084
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;
|
|
9085
9098
|
/**
|
|
9086
9099
|
* Sets an environment variable. On UNIX, both the variable's name and
|
|
9087
9100
|
* value can be arbitrary byte strings, except that the variable's name
|
|
@@ -17429,85 +17442,24 @@ export namespace GLib {
|
|
|
17429
17442
|
steal(): void;
|
|
17430
17443
|
}
|
|
17431
17444
|
|
|
17432
|
-
/**
|
|
17433
|
-
* HMACs should be used when producing a cookie or hash based on data
|
|
17434
|
-
* and a key. Simple mechanisms for using SHA1 and other algorithms to
|
|
17435
|
-
* digest a key and data together are vulnerable to various security
|
|
17436
|
-
* issues.
|
|
17437
|
-
* [HMAC](http://en.wikipedia.org/wiki/HMAC)
|
|
17438
|
-
* uses algorithms like SHA1 in a secure way to produce a digest of a
|
|
17439
|
-
* key and data.
|
|
17440
|
-
*
|
|
17441
|
-
* Both the key and data are arbitrary byte arrays of bytes or characters.
|
|
17442
|
-
*
|
|
17443
|
-
* Support for HMAC Digests has been added in GLib 2.30, and support for SHA-512
|
|
17444
|
-
* in GLib 2.42. Support for SHA-384 was added in GLib 2.52.
|
|
17445
|
-
*
|
|
17446
|
-
* To create a new `GHmac`, use [ctor`GLib`.Hmac.new]. To free a `GHmac`, use
|
|
17447
|
-
* [method`GLib`.Hmac.unref].
|
|
17448
|
-
*/
|
|
17449
17445
|
class Hmac {
|
|
17450
17446
|
static $gtype: GObject.GType<Hmac>;
|
|
17451
17447
|
|
|
17452
17448
|
// Constructors
|
|
17453
17449
|
|
|
17454
|
-
constructor(digest_type: ChecksumType, key:
|
|
17450
|
+
constructor(digest_type: ChecksumType, key: number, key_len: number);
|
|
17455
17451
|
_init(...args: any[]): void;
|
|
17456
17452
|
|
|
17457
|
-
static ['new'](digest_type: ChecksumType, key:
|
|
17453
|
+
static ['new'](digest_type: ChecksumType, key: number, key_len: number): Hmac;
|
|
17458
17454
|
|
|
17459
17455
|
// Methods
|
|
17460
17456
|
|
|
17461
|
-
/**
|
|
17462
|
-
* Copies a #GHmac. If `hmac` has been closed, by calling
|
|
17463
|
-
* g_hmac_get_string() or g_hmac_get_digest(), the copied
|
|
17464
|
-
* HMAC will be closed as well.
|
|
17465
|
-
* @returns the copy of the passed #GHmac. Use g_hmac_unref() when finished using it.
|
|
17466
|
-
*/
|
|
17467
17457
|
copy(): Hmac;
|
|
17468
|
-
|
|
17469
|
-
* Gets the digest from `checksum` as a raw binary array and places it
|
|
17470
|
-
* into `buffer`. The size of the digest depends on the type of checksum.
|
|
17471
|
-
*
|
|
17472
|
-
* Once this function has been called, the #GHmac is closed and can
|
|
17473
|
-
* no longer be updated with g_checksum_update().
|
|
17474
|
-
* @param buffer output buffer
|
|
17475
|
-
*/
|
|
17476
|
-
get_digest(buffer: Uint8Array | string): void;
|
|
17477
|
-
/**
|
|
17478
|
-
* Gets the HMAC as a hexadecimal string.
|
|
17479
|
-
*
|
|
17480
|
-
* Once this function has been called the #GHmac can no longer be
|
|
17481
|
-
* updated with g_hmac_update().
|
|
17482
|
-
*
|
|
17483
|
-
* The hexadecimal characters will be lower case.
|
|
17484
|
-
* @returns the hexadecimal representation of the HMAC. The returned string is owned by the HMAC and should not be modified or freed.
|
|
17485
|
-
*/
|
|
17458
|
+
get_digest(buffer: number, digest_len: number): void;
|
|
17486
17459
|
get_string(): string;
|
|
17487
|
-
/**
|
|
17488
|
-
* Atomically increments the reference count of `hmac` by one.
|
|
17489
|
-
*
|
|
17490
|
-
* This function is MT-safe and may be called from any thread.
|
|
17491
|
-
* @returns the passed in #GHmac.
|
|
17492
|
-
*/
|
|
17493
17460
|
ref(): Hmac;
|
|
17494
|
-
/**
|
|
17495
|
-
* Atomically decrements the reference count of `hmac` by one.
|
|
17496
|
-
*
|
|
17497
|
-
* If the reference count drops to 0, all keys and values will be
|
|
17498
|
-
* destroyed, and all memory allocated by the hash table is released.
|
|
17499
|
-
* This function is MT-safe and may be called from any thread.
|
|
17500
|
-
* Frees the memory allocated for `hmac`.
|
|
17501
|
-
*/
|
|
17502
17461
|
unref(): void;
|
|
17503
|
-
|
|
17504
|
-
* Feeds `data` into an existing #GHmac.
|
|
17505
|
-
*
|
|
17506
|
-
* The HMAC must still be open, that is g_hmac_get_string() or
|
|
17507
|
-
* g_hmac_get_digest() must not have been called on `hmac`.
|
|
17508
|
-
* @param data buffer used to compute the checksum
|
|
17509
|
-
*/
|
|
17510
|
-
update(data: Uint8Array | string): void;
|
|
17462
|
+
update(data: number, length: number): void;
|
|
17511
17463
|
}
|
|
17512
17464
|
|
|
17513
17465
|
/**
|
|
@@ -18399,8 +18351,10 @@ export namespace GLib {
|
|
|
18399
18351
|
load_from_data(data: string, length: number, flags: KeyFileFlags | null): boolean;
|
|
18400
18352
|
/**
|
|
18401
18353
|
* Looks for a key file named `file` in the paths returned from
|
|
18402
|
-
* [func`GLib`.get_user_data_dir] and [func`GLib`.get_system_data_dirs]
|
|
18403
|
-
*
|
|
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
|
|
18404
18358
|
* `full_path`.
|
|
18405
18359
|
*
|
|
18406
18360
|
* If the file could not be loaded then either a [error`GLib`.FileError] or
|
|
@@ -18414,6 +18368,13 @@ export namespace GLib {
|
|
|
18414
18368
|
* Looks for a key file named `file` in the paths specified in `search_dirs,`
|
|
18415
18369
|
* loads the file into `key_file` and returns the file’s full path in `full_path`.
|
|
18416
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
|
+
*
|
|
18417
18378
|
* If the file could not be found in any of the `search_dirs,`
|
|
18418
18379
|
* [error`GLib`.KeyFileError.NOT_FOUND] is returned. If
|
|
18419
18380
|
* the file is found but the OS returns an error when opening or reading the
|
|
@@ -26835,6 +26796,19 @@ export namespace GLib {
|
|
|
26835
26796
|
/**
|
|
26836
26797
|
* A type in the [type`GLib`.Variant] type system.
|
|
26837
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
|
+
*
|
|
26838
26812
|
* This section introduces the [type`GLib`.Variant] type system. It is based, in
|
|
26839
26813
|
* large part, on the D-Bus type system, with two major changes and
|
|
26840
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.
|
|
4
|
-
"description": "GJS TypeScript type definitions for GLib-2.0, generated from library version 2.
|
|
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.
|
|
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": "*"
|