@girs/gobject-2.0 2.86.0-4.0.0-beta.38 → 2.86.4-4.0.0-beta.39
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/gobject-2.0.d.ts +124 -159
- 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 GObject-2.0, generated from library version 2.86.
|
|
8
|
+
GJS TypeScript type definitions for GObject-2.0, generated from library version 2.86.4 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.39.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
package/gobject-2.0.d.ts
CHANGED
|
@@ -449,15 +449,29 @@ export namespace GObject {
|
|
|
449
449
|
*/
|
|
450
450
|
const VALUE_COLLECT_FORMAT_MAX_LENGTH: number;
|
|
451
451
|
/**
|
|
452
|
-
*
|
|
453
|
-
* exist for the duration of the process.
|
|
452
|
+
* Flag to indicate that a string in a [struct`GObject`.Value] is canonical and
|
|
453
|
+
* will exist for the duration of the process.
|
|
454
|
+
*
|
|
455
|
+
* See [method`GObject`.Value.set_interned_string].
|
|
456
|
+
*
|
|
457
|
+
* This flag should be checked by implementations of
|
|
458
|
+
* [callback`GObject`.TypeValueFreeFunc], [callback`GObject`.TypeValueCollectFunc]
|
|
459
|
+
* and [callback`GObject`.TypeValueLCopyFunc].
|
|
454
460
|
*/
|
|
455
461
|
const VALUE_INTERNED_STRING: number;
|
|
456
462
|
/**
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
463
|
+
* Flag to indicate that allocated data in a [struct`GObject`.Value] shouldn’t be
|
|
464
|
+
* copied.
|
|
465
|
+
*
|
|
466
|
+
* If passed to [func`GObject`.VALUE_COLLECT], allocated data won’t be copied
|
|
467
|
+
* but used verbatim. This does not affect ref-counted types like objects.
|
|
468
|
+
*
|
|
469
|
+
* This does not affect usage of [method`GObject`.Value.copy]: the data will
|
|
460
470
|
* be copied if it is not ref-counted.
|
|
471
|
+
*
|
|
472
|
+
* This flag should be checked by implementations of
|
|
473
|
+
* [callback`GObject`.TypeValueFreeFunc], [callback`GObject`.TypeValueCollectFunc]
|
|
474
|
+
* and [callback`GObject`.TypeValueLCopyFunc].
|
|
461
475
|
*/
|
|
462
476
|
const VALUE_NOCOPY_CONTENTS: number;
|
|
463
477
|
/**
|
|
@@ -951,9 +965,9 @@ export namespace GObject {
|
|
|
951
965
|
* ```
|
|
952
966
|
*
|
|
953
967
|
* @param g_enum_type the type identifier of the type being completed
|
|
954
|
-
* @param const_values An array of #GEnumValue
|
|
968
|
+
* @param const_values An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
|
|
955
969
|
*/
|
|
956
|
-
function enum_complete_type_info(g_enum_type: GType, const_values: EnumValue): TypeInfo;
|
|
970
|
+
function enum_complete_type_info(g_enum_type: GType, const_values: EnumValue[]): TypeInfo;
|
|
957
971
|
/**
|
|
958
972
|
* Returns the #GEnumValue for a value.
|
|
959
973
|
* @param enum_class a #GEnumClass
|
|
@@ -1001,9 +1015,9 @@ export namespace GObject {
|
|
|
1001
1015
|
* function of a #GTypePlugin implementation, see the example for
|
|
1002
1016
|
* g_enum_complete_type_info() above.
|
|
1003
1017
|
* @param g_flags_type the type identifier of the type being completed
|
|
1004
|
-
* @param const_values An array of #GFlagsValue
|
|
1018
|
+
* @param const_values An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
|
|
1005
1019
|
*/
|
|
1006
|
-
function flags_complete_type_info(g_flags_type: GType, const_values: FlagsValue): TypeInfo;
|
|
1020
|
+
function flags_complete_type_info(g_flags_type: GType, const_values: FlagsValue[]): TypeInfo;
|
|
1007
1021
|
/**
|
|
1008
1022
|
* Returns the first #GFlagsValue which is set in `value`.
|
|
1009
1023
|
* @param flags_class a #GFlagsClass
|
|
@@ -2492,21 +2506,23 @@ export namespace GObject {
|
|
|
2492
2506
|
function type_set_qdata(type: GType, quark: GLib.Quark, data?: any | null): void;
|
|
2493
2507
|
function type_test_flags(type: GType, flags: number): boolean;
|
|
2494
2508
|
/**
|
|
2495
|
-
*
|
|
2496
|
-
*
|
|
2497
|
-
* @param src_type source type to be copied
|
|
2498
|
-
* @param dest_type destination type for copying
|
|
2499
|
-
* @returns
|
|
2509
|
+
* Checks whether a [method`GObject`.Value.copy] is able to copy values of type
|
|
2510
|
+
* `src_type` into values of type `dest_type`.
|
|
2511
|
+
* @param src_type source type to be copied
|
|
2512
|
+
* @param dest_type destination type for copying
|
|
2513
|
+
* @returns true if the copy is possible; false otherwise
|
|
2500
2514
|
*/
|
|
2501
2515
|
function value_type_compatible(src_type: GType, dest_type: GType): boolean;
|
|
2502
2516
|
/**
|
|
2503
|
-
*
|
|
2504
|
-
* of type `src_type` into values of type `dest_type`.
|
|
2505
|
-
*
|
|
2506
|
-
*
|
|
2507
|
-
*
|
|
2508
|
-
*
|
|
2509
|
-
* @
|
|
2517
|
+
* Checks whether [method`GObject`.Value.transform] is able to transform values
|
|
2518
|
+
* of type `src_type` into values of type `dest_type`.
|
|
2519
|
+
*
|
|
2520
|
+
* Note that for the types to be transformable, they must be compatible or a
|
|
2521
|
+
* transformation function must be registered using
|
|
2522
|
+
* [func`GObject`.Value.register_transform_func].
|
|
2523
|
+
* @param src_type source type
|
|
2524
|
+
* @param dest_type target type
|
|
2525
|
+
* @returns true if the transformation is possible; false otherwise
|
|
2510
2526
|
*/
|
|
2511
2527
|
function value_type_transformable(src_type: GType, dest_type: GType): boolean;
|
|
2512
2528
|
function variant_get_gtype(): GType;
|
|
@@ -4860,10 +4876,10 @@ export namespace GObject {
|
|
|
4860
4876
|
* Since 2.56 if `module` is %NULL this will call g_type_register_static()
|
|
4861
4877
|
* instead. This can be used when making a static build of the module.
|
|
4862
4878
|
* @param name name for the type
|
|
4863
|
-
* @param const_static_values an array of #GEnumValue
|
|
4879
|
+
* @param const_static_values an array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
|
|
4864
4880
|
* @returns the new or existing type ID
|
|
4865
4881
|
*/
|
|
4866
|
-
register_enum(name: string, const_static_values: EnumValue): GType;
|
|
4882
|
+
register_enum(name: string, const_static_values: EnumValue[]): GType;
|
|
4867
4883
|
/**
|
|
4868
4884
|
* Looks up or registers a flags type that is implemented with a particular
|
|
4869
4885
|
* type plugin. If a type with name `type_name` was previously registered,
|
|
@@ -4876,10 +4892,10 @@ export namespace GObject {
|
|
|
4876
4892
|
* Since 2.56 if `module` is %NULL this will call g_type_register_static()
|
|
4877
4893
|
* instead. This can be used when making a static build of the module.
|
|
4878
4894
|
* @param name name for the type
|
|
4879
|
-
* @param const_static_values an array of #GFlagsValue
|
|
4895
|
+
* @param const_static_values an array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0.
|
|
4880
4896
|
* @returns the new or existing type ID
|
|
4881
4897
|
*/
|
|
4882
|
-
register_flags(name: string, const_static_values: FlagsValue): GType;
|
|
4898
|
+
register_flags(name: string, const_static_values: FlagsValue[]): GType;
|
|
4883
4899
|
/**
|
|
4884
4900
|
* Looks up or registers a type that is implemented with a particular
|
|
4885
4901
|
* type plugin. If a type with name `type_name` was previously registered,
|
|
@@ -5396,10 +5412,6 @@ export namespace GObject {
|
|
|
5396
5412
|
|
|
5397
5413
|
callback: any;
|
|
5398
5414
|
|
|
5399
|
-
// Constructors
|
|
5400
|
-
|
|
5401
|
-
_init(...args: any[]): void;
|
|
5402
|
-
|
|
5403
5415
|
// Static methods
|
|
5404
5416
|
|
|
5405
5417
|
/**
|
|
@@ -5836,10 +5848,6 @@ export namespace GObject {
|
|
|
5836
5848
|
|
|
5837
5849
|
data: any;
|
|
5838
5850
|
notify: ClosureNotify;
|
|
5839
|
-
|
|
5840
|
-
// Constructors
|
|
5841
|
-
|
|
5842
|
-
_init(...args: any[]): void;
|
|
5843
5851
|
}
|
|
5844
5852
|
|
|
5845
5853
|
/**
|
|
@@ -5855,10 +5863,6 @@ export namespace GObject {
|
|
|
5855
5863
|
maximum: number;
|
|
5856
5864
|
n_values: number;
|
|
5857
5865
|
values: EnumValue;
|
|
5858
|
-
|
|
5859
|
-
// Constructors
|
|
5860
|
-
|
|
5861
|
-
_init(...args: any[]): void;
|
|
5862
5866
|
}
|
|
5863
5867
|
|
|
5864
5868
|
/**
|
|
@@ -5883,7 +5887,6 @@ export namespace GObject {
|
|
|
5883
5887
|
value_nick: string;
|
|
5884
5888
|
}>,
|
|
5885
5889
|
);
|
|
5886
|
-
_init(...args: any[]): void;
|
|
5887
5890
|
}
|
|
5888
5891
|
|
|
5889
5892
|
/**
|
|
@@ -5898,10 +5901,6 @@ export namespace GObject {
|
|
|
5898
5901
|
mask: number;
|
|
5899
5902
|
n_values: number;
|
|
5900
5903
|
values: FlagsValue;
|
|
5901
|
-
|
|
5902
|
-
// Constructors
|
|
5903
|
-
|
|
5904
|
-
_init(...args: any[]): void;
|
|
5905
5904
|
}
|
|
5906
5905
|
|
|
5907
5906
|
/**
|
|
@@ -5926,7 +5925,6 @@ export namespace GObject {
|
|
|
5926
5925
|
value_nick: string;
|
|
5927
5926
|
}>,
|
|
5928
5927
|
);
|
|
5929
|
-
_init(...args: any[]): void;
|
|
5930
5928
|
}
|
|
5931
5929
|
|
|
5932
5930
|
type InitiallyUnownedClass = typeof InitiallyUnowned;
|
|
@@ -5942,10 +5940,6 @@ export namespace GObject {
|
|
|
5942
5940
|
interface_init: InterfaceInitFunc;
|
|
5943
5941
|
interface_finalize: InterfaceFinalizeFunc;
|
|
5944
5942
|
interface_data: any;
|
|
5945
|
-
|
|
5946
|
-
// Constructors
|
|
5947
|
-
|
|
5948
|
-
_init(...args: any[]): void;
|
|
5949
5943
|
}
|
|
5950
5944
|
|
|
5951
5945
|
type ObjectClass = typeof Object;
|
|
@@ -5959,10 +5953,6 @@ export namespace GObject {
|
|
|
5959
5953
|
// Fields
|
|
5960
5954
|
|
|
5961
5955
|
pspec: ParamSpec;
|
|
5962
|
-
|
|
5963
|
-
// Constructors
|
|
5964
|
-
|
|
5965
|
-
_init(...args: any[]): void;
|
|
5966
5956
|
}
|
|
5967
5957
|
|
|
5968
5958
|
type ParamSpecClass = typeof ParamSpec;
|
|
@@ -5976,10 +5966,6 @@ export namespace GObject {
|
|
|
5976
5966
|
abstract class ParamSpecPool {
|
|
5977
5967
|
static $gtype: GType<ParamSpecPool>;
|
|
5978
5968
|
|
|
5979
|
-
// Constructors
|
|
5980
|
-
|
|
5981
|
-
_init(...args: any[]): void;
|
|
5982
|
-
|
|
5983
5969
|
// Methods
|
|
5984
5970
|
|
|
5985
5971
|
/**
|
|
@@ -6039,10 +6025,6 @@ export namespace GObject {
|
|
|
6039
6025
|
instance_size: number;
|
|
6040
6026
|
n_preallocs: number;
|
|
6041
6027
|
value_type: GType;
|
|
6042
|
-
|
|
6043
|
-
// Constructors
|
|
6044
|
-
|
|
6045
|
-
_init(...args: any[]): void;
|
|
6046
6028
|
}
|
|
6047
6029
|
|
|
6048
6030
|
/**
|
|
@@ -6055,10 +6037,6 @@ export namespace GObject {
|
|
|
6055
6037
|
// Fields
|
|
6056
6038
|
|
|
6057
6039
|
name: string;
|
|
6058
|
-
|
|
6059
|
-
// Constructors
|
|
6060
|
-
|
|
6061
|
-
_init(...args: any[]): void;
|
|
6062
6040
|
}
|
|
6063
6041
|
|
|
6064
6042
|
/**
|
|
@@ -6073,10 +6051,6 @@ export namespace GObject {
|
|
|
6073
6051
|
signal_id: number;
|
|
6074
6052
|
detail: GLib.Quark;
|
|
6075
6053
|
run_type: SignalFlags;
|
|
6076
|
-
|
|
6077
|
-
// Constructors
|
|
6078
|
-
|
|
6079
|
-
_init(...args: any[]): void;
|
|
6080
6054
|
}
|
|
6081
6055
|
|
|
6082
6056
|
/**
|
|
@@ -6096,10 +6070,6 @@ export namespace GObject {
|
|
|
6096
6070
|
return_type: GType;
|
|
6097
6071
|
n_params: number;
|
|
6098
6072
|
param_types: GType[];
|
|
6099
|
-
|
|
6100
|
-
// Constructors
|
|
6101
|
-
|
|
6102
|
-
_init(...args: any[]): void;
|
|
6103
6073
|
}
|
|
6104
6074
|
|
|
6105
6075
|
/**
|
|
@@ -6108,10 +6078,6 @@ export namespace GObject {
|
|
|
6108
6078
|
class TypeClass {
|
|
6109
6079
|
static $gtype: GType<TypeClass>;
|
|
6110
6080
|
|
|
6111
|
-
// Constructors
|
|
6112
|
-
|
|
6113
|
-
_init(...args: any[]): void;
|
|
6114
|
-
|
|
6115
6081
|
// Static methods
|
|
6116
6082
|
|
|
6117
6083
|
static adjust_private_offset(g_class: any | null, private_size_or_offset: number): void;
|
|
@@ -6257,10 +6223,6 @@ export namespace GObject {
|
|
|
6257
6223
|
// Fields
|
|
6258
6224
|
|
|
6259
6225
|
type_flags: TypeFundamentalFlags;
|
|
6260
|
-
|
|
6261
|
-
// Constructors
|
|
6262
|
-
|
|
6263
|
-
_init(...args: any[]): void;
|
|
6264
6226
|
}
|
|
6265
6227
|
|
|
6266
6228
|
/**
|
|
@@ -6288,10 +6250,6 @@ export namespace GObject {
|
|
|
6288
6250
|
instance_size: number;
|
|
6289
6251
|
n_preallocs: number;
|
|
6290
6252
|
instance_init: InstanceInitFunc;
|
|
6291
|
-
|
|
6292
|
-
// Constructors
|
|
6293
|
-
|
|
6294
|
-
_init(...args: any[]): void;
|
|
6295
6253
|
}
|
|
6296
6254
|
|
|
6297
6255
|
/**
|
|
@@ -6300,10 +6258,6 @@ export namespace GObject {
|
|
|
6300
6258
|
class TypeInstance {
|
|
6301
6259
|
static $gtype: GType<TypeInstance>;
|
|
6302
6260
|
|
|
6303
|
-
// Constructors
|
|
6304
|
-
|
|
6305
|
-
_init(...args: any[]): void;
|
|
6306
|
-
|
|
6307
6261
|
// Methods
|
|
6308
6262
|
|
|
6309
6263
|
get_private(private_type: GType): any | null;
|
|
@@ -6315,10 +6269,6 @@ export namespace GObject {
|
|
|
6315
6269
|
class TypeInterface {
|
|
6316
6270
|
static $gtype: GType<TypeInterface>;
|
|
6317
6271
|
|
|
6318
|
-
// Constructors
|
|
6319
|
-
|
|
6320
|
-
_init(...args: any[]): void;
|
|
6321
|
-
|
|
6322
6272
|
// Static methods
|
|
6323
6273
|
|
|
6324
6274
|
/**
|
|
@@ -6390,10 +6340,6 @@ export namespace GObject {
|
|
|
6390
6340
|
unuse_plugin: TypePluginUnuse;
|
|
6391
6341
|
complete_type_info: TypePluginCompleteTypeInfo;
|
|
6392
6342
|
complete_interface_info: TypePluginCompleteInterfaceInfo;
|
|
6393
|
-
|
|
6394
|
-
// Constructors
|
|
6395
|
-
|
|
6396
|
-
_init(...args: any[]): void;
|
|
6397
6343
|
}
|
|
6398
6344
|
|
|
6399
6345
|
/**
|
|
@@ -6410,10 +6356,6 @@ export namespace GObject {
|
|
|
6410
6356
|
type_name: string;
|
|
6411
6357
|
class_size: number;
|
|
6412
6358
|
instance_size: number;
|
|
6413
|
-
|
|
6414
|
-
// Constructors
|
|
6415
|
-
|
|
6416
|
-
_init(...args: any[]): void;
|
|
6417
6359
|
}
|
|
6418
6360
|
|
|
6419
6361
|
/**
|
|
@@ -6442,47 +6384,50 @@ export namespace GObject {
|
|
|
6442
6384
|
collect_value: TypeValueCollectFunc;
|
|
6443
6385
|
lcopy_format: string;
|
|
6444
6386
|
lcopy_value: TypeValueLCopyFunc;
|
|
6445
|
-
|
|
6446
|
-
// Constructors
|
|
6447
|
-
|
|
6448
|
-
_init(...args: any[]): void;
|
|
6449
6387
|
}
|
|
6450
6388
|
|
|
6451
6389
|
/**
|
|
6452
6390
|
* An opaque structure used to hold different types of values.
|
|
6453
6391
|
*
|
|
6392
|
+
* Before it can be used, a `GValue` has to be initialized to a specific type by
|
|
6393
|
+
* calling [method`GObject`.Value.init] on it.
|
|
6394
|
+
*
|
|
6395
|
+
* Many types which are stored within a `GValue` need to allocate data on the
|
|
6396
|
+
* heap, so [method`GObject`.Value.unset] must always be called on a `GValue` to
|
|
6397
|
+
* free any such data once you’re finished with the `GValue`, even if the
|
|
6398
|
+
* `GValue` itself is stored on the stack.
|
|
6399
|
+
*
|
|
6454
6400
|
* The data within the structure has protected scope: it is accessible only
|
|
6455
|
-
* to functions within a
|
|
6456
|
-
* the g_value_*() API. That is, code
|
|
6457
|
-
* types.
|
|
6401
|
+
* to functions within a [struct`GObject`.TypeValueTable] structure, or
|
|
6402
|
+
* implementations of the `g_value_*()` API. That is, code which implements new
|
|
6403
|
+
* fundamental types.
|
|
6458
6404
|
*
|
|
6459
|
-
*
|
|
6405
|
+
* `GValue` users cannot make any assumptions about how data is stored
|
|
6460
6406
|
* within the 2 element `data` union, and the `g_type` member should
|
|
6461
|
-
* only be accessed through the
|
|
6407
|
+
* only be accessed through the [func`GObject`.VALUE_TYPE] macro and related
|
|
6408
|
+
* macros.
|
|
6462
6409
|
*/
|
|
6463
6410
|
class Value {
|
|
6464
6411
|
static $gtype: GType<Value>;
|
|
6465
6412
|
|
|
6466
|
-
// Constructors
|
|
6467
|
-
|
|
6468
|
-
_init(...args: any[]): void;
|
|
6469
|
-
|
|
6470
6413
|
// Static methods
|
|
6471
6414
|
|
|
6472
6415
|
/**
|
|
6473
|
-
*
|
|
6474
|
-
*
|
|
6475
|
-
* @param src_type source type to be copied
|
|
6476
|
-
* @param dest_type destination type for copying
|
|
6416
|
+
* Checks whether a [method`GObject`.Value.copy] is able to copy values of type
|
|
6417
|
+
* `src_type` into values of type `dest_type`.
|
|
6418
|
+
* @param src_type source type to be copied
|
|
6419
|
+
* @param dest_type destination type for copying
|
|
6477
6420
|
*/
|
|
6478
6421
|
static type_compatible(src_type: GType, dest_type: GType): boolean;
|
|
6479
6422
|
/**
|
|
6480
|
-
*
|
|
6481
|
-
* of type `src_type` into values of type `dest_type`.
|
|
6482
|
-
*
|
|
6483
|
-
*
|
|
6484
|
-
*
|
|
6485
|
-
*
|
|
6423
|
+
* Checks whether [method`GObject`.Value.transform] is able to transform values
|
|
6424
|
+
* of type `src_type` into values of type `dest_type`.
|
|
6425
|
+
*
|
|
6426
|
+
* Note that for the types to be transformable, they must be compatible or a
|
|
6427
|
+
* transformation function must be registered using
|
|
6428
|
+
* [func`GObject`.Value.register_transform_func].
|
|
6429
|
+
* @param src_type source type
|
|
6430
|
+
* @param dest_type target type
|
|
6486
6431
|
*/
|
|
6487
6432
|
static type_transformable(src_type: GType, dest_type: GType): boolean;
|
|
6488
6433
|
|
|
@@ -6490,7 +6435,7 @@ export namespace GObject {
|
|
|
6490
6435
|
|
|
6491
6436
|
/**
|
|
6492
6437
|
* Copies the value of `src_value` into `dest_value`.
|
|
6493
|
-
* @param dest_value
|
|
6438
|
+
* @param dest_value an initialized [struct@GObject.Value] structure of the same type as @src_value
|
|
6494
6439
|
*/
|
|
6495
6440
|
copy(dest_value: Value | any): void;
|
|
6496
6441
|
/**
|
|
@@ -6513,8 +6458,9 @@ export namespace GObject {
|
|
|
6513
6458
|
dup_variant(): GLib.Variant | null;
|
|
6514
6459
|
/**
|
|
6515
6460
|
* Determines if `value` will fit inside the size of a pointer value.
|
|
6461
|
+
*
|
|
6516
6462
|
* This is an internal function introduced mainly for C marshallers.
|
|
6517
|
-
* @returns
|
|
6463
|
+
* @returns true if @value will fit inside a pointer value; false otherwise
|
|
6518
6464
|
*/
|
|
6519
6465
|
fits_pointer(): boolean;
|
|
6520
6466
|
/**
|
|
@@ -6626,33 +6572,51 @@ export namespace GObject {
|
|
|
6626
6572
|
*/
|
|
6627
6573
|
get_variant(): GLib.Variant | null;
|
|
6628
6574
|
/**
|
|
6629
|
-
* Initializes `value`
|
|
6630
|
-
*
|
|
6631
|
-
*
|
|
6575
|
+
* Initializes `value` to store values of the given `type,` and sets its value
|
|
6576
|
+
* to the default for `type`.
|
|
6577
|
+
*
|
|
6578
|
+
* This must be called before any other methods on a [struct`GObject`.Value], so
|
|
6579
|
+
* the value knows what type it’s meant to store.
|
|
6580
|
+
*
|
|
6581
|
+
* ```c
|
|
6582
|
+
* GValue value = G_VALUE_INIT;
|
|
6583
|
+
*
|
|
6584
|
+
* g_value_init (&value, SOME_G_TYPE);
|
|
6585
|
+
* …
|
|
6586
|
+
* g_value_unset (&value);
|
|
6587
|
+
* ```
|
|
6588
|
+
* @param g_type type the [struct@GObject.Value] should hold values of
|
|
6589
|
+
* @returns the [struct@GObject.Value] structure that has been passed in
|
|
6632
6590
|
*/
|
|
6633
6591
|
init(g_type: GType): unknown;
|
|
6634
6592
|
/**
|
|
6635
|
-
* Initializes and sets `value` from an instantiatable type
|
|
6636
|
-
*
|
|
6593
|
+
* Initializes and sets `value` from an instantiatable type.
|
|
6594
|
+
*
|
|
6595
|
+
* This calls the [callback`GObject`.TypeValueCollectFunc] function for the type
|
|
6596
|
+
* the [struct`GObject`.Value] contains.
|
|
6637
6597
|
*
|
|
6638
6598
|
* Note: The `value` will be initialised with the exact type of
|
|
6639
|
-
* `instance`. If you wish to set the `value
|
|
6640
|
-
* (such as a parent class
|
|
6641
|
-
*
|
|
6599
|
+
* `instance`. If you wish to set the `value’`s type to a different
|
|
6600
|
+
* [type`GObject`.Type] (such as a parent class type), you need to manually call
|
|
6601
|
+
* [method`GObject`.Value.init] and [method`GObject`.Value.set_instance].
|
|
6642
6602
|
* @param instance the instance
|
|
6643
6603
|
*/
|
|
6644
6604
|
init_from_instance(instance: TypeInstance): void;
|
|
6645
6605
|
/**
|
|
6646
|
-
* Returns the value contents as pointer.
|
|
6647
|
-
*
|
|
6606
|
+
* Returns the value contents as a pointer.
|
|
6607
|
+
*
|
|
6608
|
+
* This function asserts that [method`GObject`.Value.fits_pointer] returned true
|
|
6609
|
+
* for the passed in value.
|
|
6610
|
+
*
|
|
6648
6611
|
* This is an internal function introduced mainly for C marshallers.
|
|
6649
|
-
* @returns the value contents as pointer
|
|
6612
|
+
* @returns the value contents as a pointer
|
|
6650
6613
|
*/
|
|
6651
6614
|
peek_pointer(): any | null;
|
|
6652
6615
|
/**
|
|
6653
6616
|
* Clears the current value in `value` and resets it to the default value
|
|
6654
|
-
* (as if the value had just been initialized
|
|
6655
|
-
*
|
|
6617
|
+
* (as if the value had just been initialized using
|
|
6618
|
+
* [method`GObject`.Value.init]).
|
|
6619
|
+
* @returns the [struct@GObject.Value] structure that has been passed in
|
|
6656
6620
|
*/
|
|
6657
6621
|
reset(): unknown;
|
|
6658
6622
|
/**
|
|
@@ -6662,7 +6626,7 @@ export namespace GObject {
|
|
|
6662
6626
|
set_boolean(v_boolean: boolean): void;
|
|
6663
6627
|
/**
|
|
6664
6628
|
* Set the contents of a %G_TYPE_BOXED derived #GValue to `v_boxed`.
|
|
6665
|
-
* @param v_boxed boxed
|
|
6629
|
+
* @param v_boxed caller-owned boxed object to be duplicated for the #GValue
|
|
6666
6630
|
*/
|
|
6667
6631
|
set_boxed(v_boxed?: any | null): void;
|
|
6668
6632
|
/**
|
|
@@ -6701,8 +6665,10 @@ export namespace GObject {
|
|
|
6701
6665
|
*/
|
|
6702
6666
|
set_gtype(v_gtype: GType): void;
|
|
6703
6667
|
/**
|
|
6704
|
-
* Sets `value` from an instantiatable type
|
|
6705
|
-
*
|
|
6668
|
+
* Sets `value` from an instantiatable type.
|
|
6669
|
+
*
|
|
6670
|
+
* This calls the [callback`GObject`.TypeValueCollectFunc] function for the type
|
|
6671
|
+
* the [struct`GObject`.Value] contains.
|
|
6706
6672
|
* @param instance the instance
|
|
6707
6673
|
*/
|
|
6708
6674
|
set_instance(instance?: any | null): void;
|
|
@@ -6855,21 +6821,27 @@ export namespace GObject {
|
|
|
6855
6821
|
take_variant(variant?: GLib.Variant | null): void;
|
|
6856
6822
|
/**
|
|
6857
6823
|
* Tries to cast the contents of `src_value` into a type appropriate
|
|
6858
|
-
* to store in `dest_value
|
|
6859
|
-
*
|
|
6860
|
-
*
|
|
6861
|
-
*
|
|
6862
|
-
*
|
|
6863
|
-
*
|
|
6864
|
-
*
|
|
6865
|
-
*
|
|
6824
|
+
* to store in `dest_value`.
|
|
6825
|
+
*
|
|
6826
|
+
* If a transformation is not possible, `dest_value` is not modified.
|
|
6827
|
+
*
|
|
6828
|
+
* For example, this could transform a `G_TYPE_INT` value into a `G_TYPE_FLOAT`
|
|
6829
|
+
* value.
|
|
6830
|
+
*
|
|
6831
|
+
* Performing transformations between value types might incur precision loss.
|
|
6832
|
+
* Especially transformations into strings might reveal seemingly arbitrary
|
|
6833
|
+
* results and the format of particular transformations to strings is not
|
|
6834
|
+
* guaranteed over time.
|
|
6835
|
+
* @param dest_value target value
|
|
6836
|
+
* @returns true on success; false otherwise
|
|
6866
6837
|
*/
|
|
6867
6838
|
transform(dest_value: Value | any): boolean;
|
|
6868
6839
|
/**
|
|
6869
|
-
* Clears the current value in `value` (if any) and
|
|
6870
|
-
*
|
|
6871
|
-
*
|
|
6872
|
-
*
|
|
6840
|
+
* Clears the current value in `value` (if any) and ‘unsets’ the type.
|
|
6841
|
+
*
|
|
6842
|
+
* This releases all resources associated with this [struct`GObject`.Value]. An
|
|
6843
|
+
* unset value is the same as a cleared (zero-filled)
|
|
6844
|
+
* [struct`GObject`.Value] structure set to `G_VALUE_INIT`.
|
|
6873
6845
|
*/
|
|
6874
6846
|
unset(): void;
|
|
6875
6847
|
}
|
|
@@ -6909,7 +6881,6 @@ export namespace GObject {
|
|
|
6909
6881
|
// Constructors
|
|
6910
6882
|
|
|
6911
6883
|
constructor(n_prealloced: number);
|
|
6912
|
-
_init(...args: any[]): void;
|
|
6913
6884
|
|
|
6914
6885
|
static ['new'](n_prealloced: number): ValueArray;
|
|
6915
6886
|
|
|
@@ -7005,10 +6976,6 @@ export namespace GObject {
|
|
|
7005
6976
|
*/
|
|
7006
6977
|
class WeakRef {
|
|
7007
6978
|
static $gtype: GType<WeakRef>;
|
|
7008
|
-
|
|
7009
|
-
// Constructors
|
|
7010
|
-
|
|
7011
|
-
_init(...args: any[]): void;
|
|
7012
6979
|
}
|
|
7013
6980
|
|
|
7014
6981
|
/**
|
|
@@ -7036,7 +7003,6 @@ export namespace GObject {
|
|
|
7036
7003
|
v_pointer: any;
|
|
7037
7004
|
}>,
|
|
7038
7005
|
);
|
|
7039
|
-
_init(...args: any[]): void;
|
|
7040
7006
|
}
|
|
7041
7007
|
|
|
7042
7008
|
class _Value__data__union {
|
|
@@ -7069,7 +7035,6 @@ export namespace GObject {
|
|
|
7069
7035
|
v_pointer: any;
|
|
7070
7036
|
}>,
|
|
7071
7037
|
);
|
|
7072
|
-
_init(...args: any[]): void;
|
|
7073
7038
|
}
|
|
7074
7039
|
|
|
7075
7040
|
namespace TypePlugin {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gobject-2.0",
|
|
3
|
-
"version": "2.86.
|
|
4
|
-
"description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.86.
|
|
3
|
+
"version": "2.86.4-4.0.0-beta.39",
|
|
4
|
+
"description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.86.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gobject-2.0.js",
|
|
7
7
|
"main": "gobject-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/glib-2.0": "2.86.
|
|
34
|
+
"@girs/gjs": "4.0.0-beta.39",
|
|
35
|
+
"@girs/glib-2.0": "2.86.4-4.0.0-beta.39" },
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "*"
|
|
38
38
|
},
|