@girs/girepository-3.0 3.0.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.
@@ -0,0 +1,2638 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
+ */
8
+
9
+ import './girepository-3.0-ambient.d.ts';
10
+ import './girepository-3.0-import.d.ts';
11
+ /**
12
+ * GIRepository-3.0
13
+ */
14
+
15
+ import type Gio from '@girs/gio-2.0';
16
+ import type GObject from '@girs/gobject-2.0';
17
+ import type GLib from '@girs/glib-2.0';
18
+ import type GModule from '@girs/gmodule-2.0';
19
+
20
+ export namespace GIRepository {
21
+
22
+ /**
23
+ * The type of array in a [class`GIRepository`.TypeInfo].
24
+ */
25
+ enum ArrayType {
26
+ /**
27
+ * a C array, `char[]` for instance
28
+ */
29
+ C,
30
+ /**
31
+ * a [type`GLib`.Array] array
32
+ */
33
+ ARRAY,
34
+ /**
35
+ * a [type`GLib`.PtrArray] array
36
+ */
37
+ PTR_ARRAY,
38
+ /**
39
+ * a [type`GLib`.ByteArray] array
40
+ */
41
+ BYTE_ARRAY,
42
+ }
43
+ /**
44
+ * The direction of a [class`GIRepository`.ArgInfo].
45
+ */
46
+ enum Direction {
47
+ /**
48
+ * ‘in’ argument.
49
+ */
50
+ IN,
51
+ /**
52
+ * ‘out’ argument.
53
+ */
54
+ OUT,
55
+ /**
56
+ * ‘in and out’ argument.
57
+ */
58
+ INOUT,
59
+ }
60
+ /**
61
+ * An error occurring while invoking a function via
62
+ * [method`GIRepository`.FunctionInfo.invoke].
63
+ */
64
+ enum InvokeError {
65
+ /**
66
+ * invocation failed, unknown error.
67
+ */
68
+ FAILED,
69
+ /**
70
+ * symbol couldn’t be found in any of the
71
+ * libraries associated with the typelib of the function.
72
+ */
73
+ SYMBOL_NOT_FOUND,
74
+ /**
75
+ * the arguments provided didn’t match
76
+ * the expected arguments for the function’s type signature.
77
+ */
78
+ ARGUMENT_MISMATCH,
79
+ }
80
+ /**
81
+ * An error code used with `GI_REPOSITORY_ERROR` in a [type`GLib`.Error]
82
+ * returned from a [class`GIRepository`.Repository] routine.
83
+ */
84
+ enum RepositoryError {
85
+ /**
86
+ * the typelib could not be found.
87
+ */
88
+ TYPELIB_NOT_FOUND,
89
+ /**
90
+ * the namespace does not match the
91
+ * requested namespace.
92
+ */
93
+ NAMESPACE_MISMATCH,
94
+ /**
95
+ * the version of the
96
+ * typelib does not match the requested version.
97
+ */
98
+ NAMESPACE_VERSION_CONFLICT,
99
+ /**
100
+ * the library used by the typelib
101
+ * could not be found.
102
+ */
103
+ LIBRARY_NOT_FOUND,
104
+ }
105
+ /**
106
+ * Scope type of a [class`GIRepository`.ArgInfo] representing callback,
107
+ * determines how the callback is invoked and is used to decided when the invoke
108
+ * structs can be freed.
109
+ */
110
+ enum ScopeType {
111
+ /**
112
+ * The argument is not of callback type.
113
+ */
114
+ INVALID,
115
+ /**
116
+ * The callback and associated `user_data` is only
117
+ * used during the call to this function.
118
+ */
119
+ CALL,
120
+ /**
121
+ * The callback and associated `user_data` is
122
+ * only used until the callback is invoked, and the callback.
123
+ * is invoked always exactly once.
124
+ */
125
+ ASYNC,
126
+ /**
127
+ * The callback and associated
128
+ * `user_data` is used until the caller is notified via the
129
+ * [type`GLib`.DestroyNotify].
130
+ */
131
+ NOTIFIED,
132
+ /**
133
+ * The callback and associated `user_data` is
134
+ * used until the process terminates
135
+ */
136
+ FOREVER,
137
+ }
138
+ /**
139
+ * `GITransfer` specifies who’s responsible for freeing the resources after an
140
+ * ownership transfer is complete.
141
+ *
142
+ * The transfer is the exchange of data between two parts, from the callee to
143
+ * the caller.
144
+ *
145
+ * The callee is either a function/method/signal or an object/interface where a
146
+ * property is defined. The caller is the side accessing a property or calling a
147
+ * function.
148
+ *
149
+ * In the case of a containing type such as a list, an array or a hash table the
150
+ * container itself is specified differently from the items within the
151
+ * container. Each container is freed differently, check the documentation for
152
+ * the types themselves for information on how to free them.
153
+ */
154
+ enum Transfer {
155
+ /**
156
+ * Transfer nothing from the callee (function or the type
157
+ * instance the property belongs to) to the caller. The callee retains the
158
+ * ownership of the transfer and the caller doesn’t need to do anything to
159
+ * free up the resources of this transfer.
160
+ */
161
+ NOTHING,
162
+ /**
163
+ * Transfer the container (list, array, hash table) from
164
+ * the callee to the caller. The callee retains the ownership of the
165
+ * individual items in the container and the caller has to free up the
166
+ * container resources ([func`GLib`.List.free],
167
+ * [func`GLib`.HashTable.destroy], etc) of this transfer.
168
+ */
169
+ CONTAINER,
170
+ /**
171
+ * Transfer everything, e.g. the container and its
172
+ * contents from the callee to the caller. This is the case when the callee
173
+ * creates a copy of all the data it returns. The caller is responsible for
174
+ * cleaning up the container and item resources of this transfer.
175
+ */
176
+ EVERYTHING,
177
+ }
178
+ /**
179
+ * The type tag of a [class`GIRepository`.TypeInfo].
180
+ */
181
+ enum TypeTag {
182
+ /**
183
+ * void
184
+ */
185
+ VOID,
186
+ /**
187
+ * boolean
188
+ */
189
+ BOOLEAN,
190
+ /**
191
+ * 8-bit signed integer
192
+ */
193
+ INT8,
194
+ /**
195
+ * 8-bit unsigned integer
196
+ */
197
+ UINT8,
198
+ /**
199
+ * 16-bit signed integer
200
+ */
201
+ INT16,
202
+ /**
203
+ * 16-bit unsigned integer
204
+ */
205
+ UINT16,
206
+ /**
207
+ * 32-bit signed integer
208
+ */
209
+ INT32,
210
+ /**
211
+ * 32-bit unsigned integer
212
+ */
213
+ UINT32,
214
+ /**
215
+ * 64-bit signed integer
216
+ */
217
+ INT64,
218
+ /**
219
+ * 64-bit unsigned integer
220
+ */
221
+ UINT64,
222
+ /**
223
+ * float
224
+ */
225
+ FLOAT,
226
+ /**
227
+ * double floating point
228
+ */
229
+ DOUBLE,
230
+ /**
231
+ * a [type`GObject`.Type]
232
+ */
233
+ GTYPE,
234
+ /**
235
+ * a UTF-8 encoded string
236
+ */
237
+ UTF8,
238
+ /**
239
+ * a filename, encoded in the same encoding
240
+ * as the native filesystem is using.
241
+ */
242
+ FILENAME,
243
+ /**
244
+ * an array
245
+ */
246
+ ARRAY,
247
+ /**
248
+ * an extended interface object
249
+ */
250
+ INTERFACE,
251
+ /**
252
+ * a [type`GLib`.List]
253
+ */
254
+ GLIST,
255
+ /**
256
+ * a [type`GLib`.SList]
257
+ */
258
+ GSLIST,
259
+ /**
260
+ * a [type`GLib`.HashTable]
261
+ */
262
+ GHASH,
263
+ /**
264
+ * a [type`GLib`.Error]
265
+ */
266
+ ERROR,
267
+ /**
268
+ * Unicode character
269
+ */
270
+ UNICHAR,
271
+ }
272
+ /**
273
+ * Flags for a [class`GIRepository`.FieldInfo].
274
+ * @bitfield
275
+ */
276
+ enum FieldInfoFlags {
277
+ /**
278
+ * field is readable.
279
+ */
280
+ READABLE,
281
+ /**
282
+ * field is writable.
283
+ */
284
+ WRITABLE,
285
+ }
286
+ /**
287
+ * Flags for a [class`GIRepository`.FunctionInfo] struct.
288
+ * @bitfield
289
+ */
290
+ enum FunctionInfoFlags {
291
+ /**
292
+ * is a method.
293
+ */
294
+ IS_METHOD,
295
+ /**
296
+ * is a constructor.
297
+ */
298
+ IS_CONSTRUCTOR,
299
+ /**
300
+ * is a getter of a [class`GIRepository`.PropertyInfo].
301
+ */
302
+ IS_GETTER,
303
+ /**
304
+ * is a setter of a [class`GIRepository`.PropertyInfo].
305
+ */
306
+ IS_SETTER,
307
+ /**
308
+ * represents a virtual function.
309
+ */
310
+ WRAPS_VFUNC,
311
+ }
312
+ /**
313
+ * Flags that control how a typelib is loaded.
314
+ * @bitfield
315
+ */
316
+ enum RepositoryLoadFlags {
317
+ /**
318
+ * No flags set.
319
+ */
320
+ NONE,
321
+ /**
322
+ * Lazily load the typelib.
323
+ */
324
+ LAZY,
325
+ }
326
+ /**
327
+ * Flags of a [class`GIRepository`.VFuncInfo] struct.
328
+ * @bitfield
329
+ */
330
+ enum VFuncInfoFlags {
331
+ /**
332
+ * chains up to the parent type
333
+ */
334
+ CHAIN_UP,
335
+ /**
336
+ * overrides
337
+ */
338
+ OVERRIDE,
339
+ /**
340
+ * does not override
341
+ */
342
+ NOT_OVERRIDE,
343
+ }
344
+ /**
345
+ * Number of entries in [enum`GIRepository`.TypeTag].
346
+ */
347
+ const TYPE_TAG_N_TYPES: number
348
+ /**
349
+ * Get the error quark which represents [type`GIRepository`.InvokeError].
350
+ * @returns error quark
351
+ */
352
+ function invoke_error_quark(): GLib.Quark
353
+ /**
354
+ * Convert a data pointer from a GLib data structure to a
355
+ * [type`GIRepository`.Argument].
356
+ *
357
+ * GLib data structures, such as [type`GLib`.List], [type`GLib`.SList], and
358
+ * [type`GLib`.HashTable], all store data pointers.
359
+ *
360
+ * In the case where the list or hash table is storing single types rather than
361
+ * structs, these data pointers may have values stuffed into them via macros
362
+ * such as `GPOINTER_TO_INT`.
363
+ *
364
+ * Use this function to ensure that all values are correctly extracted from
365
+ * stuffed pointers, regardless of the machine’s architecture or endianness.
366
+ *
367
+ * This function fills in the appropriate field of `arg` with the value extracted
368
+ * from `hash_pointer,` depending on `storage_type`.
369
+ * @param storage_type a [type`GIRepository`.TypeTag] obtained from [method`GIRepository`.TypeInfo.get_storage_type]
370
+ * @param hash_pointer a pointer, such as a [struct`GLib`.HashTable] data pointer
371
+ */
372
+ function type_tag_argument_from_hash_pointer(storage_type: TypeTag, hash_pointer: any | null): /* arg */ Argument
373
+ /**
374
+ * Convert a [type`GIRepository`.Argument] to data pointer for use in a GLib
375
+ * data structure.
376
+ *
377
+ * GLib data structures, such as [type`GLib`.List], [type`GLib`.SList], and
378
+ * [type`GLib`.HashTable], all store data pointers.
379
+ *
380
+ * In the case where the list or hash table is storing single types rather than
381
+ * structs, these data pointers may have values stuffed into them via macros
382
+ * such as `GPOINTER_TO_INT`.
383
+ *
384
+ * Use this function to ensure that all values are correctly stuffed into
385
+ * pointers, regardless of the machine’s architecture or endianness.
386
+ *
387
+ * This function returns a pointer stuffed with the appropriate field of `arg,`
388
+ * depending on `storage_type`.
389
+ * @param storage_type a [type`GIRepository`.TypeTag] obtained from [method`GIRepository`.TypeInfo.get_storage_type]
390
+ * @param arg a [type`GIRepository`.Argument] with the value to stuff into a pointer
391
+ * @returns A stuffed pointer, that can be stored in a [struct@GLib.HashTable], for example
392
+ */
393
+ function type_tag_hash_pointer_from_argument(storage_type: TypeTag, arg: Argument): any | null
394
+ /**
395
+ * Obtain a string representation of `type`
396
+ * @param type the type_tag
397
+ * @returns the string
398
+ */
399
+ function type_tag_to_string(type: TypeTag): string
400
+ interface ArgInfo {
401
+
402
+ // Owm methods of GIRepository-3.0.GIRepository.ArgInfo
403
+
404
+ /**
405
+ * Obtain the index of the user data argument. This is only valid
406
+ * for arguments which are callbacks.
407
+ * @returns `TRUE` if the argument has a user data argument
408
+ */
409
+ get_closure_index(): [ /* returnType */ boolean, /* out_closure_index */ number ]
410
+ /**
411
+ * Obtains the index of the [type`GLib`.DestroyNotify] argument. This is only
412
+ * valid for arguments which are callbacks.
413
+ * @returns `TRUE` if the argument has a [type@GLib.DestroyNotify] argument
414
+ */
415
+ get_destroy_index(): [ /* returnType */ boolean, /* out_destroy_index */ number ]
416
+ /**
417
+ * Obtain the direction of the argument. Check [type`GIRepository`.Direction]
418
+ * for possible direction values.
419
+ * @returns The direction
420
+ */
421
+ get_direction(): Direction
422
+ /**
423
+ * Obtain the ownership transfer for this argument.
424
+ * [type`GIRepository`.Transfer] contains a list of possible values.
425
+ * @returns The transfer
426
+ */
427
+ get_ownership_transfer(): Transfer
428
+ /**
429
+ * Obtain the scope type for this argument.
430
+ *
431
+ * The scope type explains how a callback is going to be invoked, most
432
+ * importantly when the resources required to invoke it can be freed.
433
+ *
434
+ * [type`GIRepository`.ScopeType] contains a list of possible values.
435
+ * @returns The scope type
436
+ */
437
+ get_scope(): ScopeType
438
+ /**
439
+ * Obtain the type information for `info`.
440
+ * @returns The [class@GIRepository.TypeInfo] holding the type information for @info, free it with [method@GIRepository.BaseInfo.unref] when done
441
+ */
442
+ get_type_info(): TypeInfo
443
+ /**
444
+ * Obtain if the argument is a pointer to a struct or object that will
445
+ * receive an output of a function.
446
+ *
447
+ * The default assumption for `GI_DIRECTION_OUT` arguments which have allocation
448
+ * is that the callee allocates; if this is `TRUE`, then the caller must
449
+ * allocate.
450
+ * @returns `TRUE` if caller is required to have allocated the argument
451
+ */
452
+ is_caller_allocates(): boolean
453
+ /**
454
+ * Obtain if the argument is optional.
455
+ *
456
+ * For ‘out’ arguments this means that you can pass `NULL` in order to ignore
457
+ * the result.
458
+ * @returns `TRUE` if it is an optional argument
459
+ */
460
+ is_optional(): boolean
461
+ /**
462
+ * Obtain if the argument is a return value. It can either be a
463
+ * parameter or a return value.
464
+ * @returns `TRUE` if it is a return value
465
+ */
466
+ is_return_value(): boolean
467
+ /**
468
+ * Obtain if an argument is only useful in C.
469
+ * @returns `TRUE` if argument is only useful in C.
470
+ */
471
+ is_skip(): boolean
472
+ /**
473
+ * Obtain information about a the type of given argument `info;` this
474
+ * function is a variant of [method`GIRepository`.ArgInfo.get_type_info] designed
475
+ * for stack allocation.
476
+ *
477
+ * The initialized `type` must not be referenced after `info` is deallocated.
478
+ *
479
+ * Once you are done with `type,` it must be cleared using
480
+ * [method`GIRepository`.BaseInfo.clear].
481
+ */
482
+ load_type_info(): /* type */ TypeInfo
483
+ /**
484
+ * Obtain if the type of the argument includes the possibility of `NULL`.
485
+ *
486
+ * For ‘in’ values this means that `NULL` is a valid value. For ‘out’
487
+ * values, this means that `NULL` may be returned.
488
+ *
489
+ * See also [method`GIRepository`.ArgInfo.is_optional].
490
+ * @returns `TRUE` if the value may be `NULL`
491
+ */
492
+ may_be_null(): boolean
493
+ }
494
+
495
+ /**
496
+ * `GIArgInfo` represents an argument of a callable.
497
+ *
498
+ * An argument is always part of a [class`GIRepository`.CallableInfo].
499
+ * @class
500
+ */
501
+ class ArgInfo extends BaseInfo {
502
+
503
+ // Own properties of GIRepository-3.0.GIRepository.ArgInfo
504
+
505
+ static name: string
506
+ }
507
+
508
+ interface BaseInfo {
509
+
510
+ // Owm methods of GIRepository-3.0.GIRepository.BaseInfo
511
+
512
+ /**
513
+ * Clears memory allocated internally by a stack-allocated
514
+ * [type`GIRepository`.BaseInfo].
515
+ *
516
+ * This does not deallocate the [type`GIRepository`.BaseInfo] struct itself. It
517
+ * does clear the struct to zero so that calling this function subsequent times
518
+ * on the same struct is a no-op.
519
+ *
520
+ * This must only be called on stack-allocated [type`GIRepository`.BaseInfo]s.
521
+ * Use [method`GIRepository`.BaseInfo.unref] for heap-allocated ones.
522
+ */
523
+ clear(): void
524
+ /**
525
+ * Compare two `GIBaseInfo`s.
526
+ *
527
+ * Using pointer comparison is not practical since many functions return
528
+ * different instances of `GIBaseInfo` that refers to the same part of the
529
+ * TypeLib; use this function instead to do `GIBaseInfo` comparisons.
530
+ * @param info2 a #GIBaseInfo
531
+ * @returns `TRUE` if and only if @info1 equals @info2.
532
+ */
533
+ equal(info2: BaseInfo): boolean
534
+ /**
535
+ * Retrieve an arbitrary attribute associated with this node.
536
+ * @param name a freeform string naming an attribute
537
+ * @returns The value of the attribute, or `NULL` if no such attribute exists
538
+ */
539
+ get_attribute(name: string): string | null
540
+ /**
541
+ * Obtain the container of the `info`.
542
+ *
543
+ * The container is the parent `GIBaseInfo`. For instance, the parent of a
544
+ * [class`GIRepository`.FunctionInfo] is an [class`GIRepository`.ObjectInfo] or
545
+ * [class`GIRepository`.InterfaceInfo].
546
+ * @returns the container
547
+ */
548
+ get_container(): BaseInfo
549
+ /**
550
+ * Obtain the name of the `info`.
551
+ *
552
+ * What the name represents depends on the type of the
553
+ * `info`. For instance for [class`GIRepository`.FunctionInfo] it is the name of
554
+ * the function.
555
+ * @returns the name of @info or `NULL` if it lacks a name.
556
+ */
557
+ get_name(): string | null
558
+ /**
559
+ * Obtain the namespace of `info`.
560
+ * @returns the namespace
561
+ */
562
+ get_namespace(): string
563
+ /**
564
+ * Obtain the typelib this `info` belongs to
565
+ * @returns the typelib
566
+ */
567
+ get_typelib(): Typelib
568
+ /**
569
+ * Obtain whether the `info` is represents a metadata which is
570
+ * deprecated.
571
+ * @returns `TRUE` if deprecated
572
+ */
573
+ is_deprecated(): boolean
574
+ /**
575
+ * Iterate over all attributes associated with this node.
576
+ *
577
+ * The iterator structure is typically stack allocated, and must have its first
578
+ * member initialized to `NULL`. Attributes are arbitrary namespaced key–value
579
+ * pairs which can be attached to almost any item. They are intended for use
580
+ * by software higher in the toolchain than bindings, and are distinct from
581
+ * normal GIR annotations.
582
+ *
583
+ * Both the `name` and `value` should be treated as constants
584
+ * and must not be freed.
585
+ *
586
+ * ```c
587
+ * void
588
+ * print_attributes (GIBaseInfo *info)
589
+ * {
590
+ * GIAttributeIter iter = GI_ATTRIBUTE_ITER_INIT;
591
+ * const char *name;
592
+ * const char *value;
593
+ * while (gi_base_info_iterate_attributes (info, &iter, &name, &value))
594
+ * {
595
+ * g_print ("attribute name: %s value: %s", name, value);
596
+ * }
597
+ * }
598
+ * ```
599
+ * @param iterator a [type`GIRepository`.AttributeIter] structure, must be initialized; see below
600
+ * @returns `TRUE` if there are more attributes
601
+ */
602
+ iterate_attributes(iterator: AttributeIter): [ /* returnType */ boolean, /* iterator */ AttributeIter, /* name */ string, /* value */ string ]
603
+ /**
604
+ * Increases the reference count of `info`.
605
+ * @returns the same @info.
606
+ */
607
+ ref(): BaseInfo
608
+ /**
609
+ * Decreases the reference count of `info`. When its reference count
610
+ * drops to 0, the info is freed.
611
+ *
612
+ * This must not be called on stack-allocated [type`GIRepository`.BaseInfo]s —
613
+ * use [method`GIRepository`.BaseInfo.clear] for that.
614
+ */
615
+ unref(): void
616
+ }
617
+
618
+ /**
619
+ * `GIBaseInfo` is the common base struct of all other Info structs
620
+ * accessible through the [class`GIRepository`.Repository] API.
621
+ *
622
+ * All info structures can be cast to a `GIBaseInfo`, for instance:
623
+ *
624
+ * ```c
625
+ * GIFunctionInfo *function_info = …;
626
+ * GIBaseInfo *info = (GIBaseInfo *) function_info;
627
+ * ```
628
+ *
629
+ * Most [class`GIRepository`.Repository] APIs returning a `GIBaseInfo` are
630
+ * actually creating a new struct; in other words,
631
+ * [method`GIRepository`.BaseInfo.unref] has to be called when done accessing the
632
+ * data.
633
+ *
634
+ * `GIBaseInfo` structuress are normally accessed by calling either
635
+ * [method`GIRepository`.Repository.find_by_name],
636
+ * [method`GIRepository`.Repository.find_by_gtype] or
637
+ * [method`GIRepository`.get_info].
638
+ *
639
+ * ```c
640
+ * GIBaseInfo *button_info =
641
+ * gi_repository_find_by_name (NULL, "Gtk", "Button");
642
+ *
643
+ * // use button_info…
644
+ *
645
+ * gi_base_info_unref (button_info);
646
+ * ```
647
+ * @class
648
+ */
649
+ class BaseInfo {
650
+
651
+ // Own properties of GIRepository-3.0.GIRepository.BaseInfo
652
+
653
+ static name: string
654
+ }
655
+
656
+ interface CallableInfo {
657
+
658
+ // Owm methods of GIRepository-3.0.GIRepository.CallableInfo
659
+
660
+ /**
661
+ * Whether the callable can throw a [type`GLib`.Error]
662
+ * @returns `TRUE` if this `GICallableInfo` can throw a [type@GLib.Error]
663
+ */
664
+ can_throw_gerror(): boolean
665
+ /**
666
+ * Obtain information about a particular argument of this callable.
667
+ * @param n the argument index to fetch
668
+ * @returns the [class@GIRepository.ArgInfo]. Free it with [method@GIRepository.BaseInfo.unref] when done.
669
+ */
670
+ get_arg(n: number): ArgInfo
671
+ /**
672
+ * See whether the caller owns the return value of this callable.
673
+ *
674
+ * [type`GIRepository`.Transfer] contains a list of possible transfer values.
675
+ * @returns the transfer mode for the return value of the callable
676
+ */
677
+ get_caller_owns(): Transfer
678
+ /**
679
+ * Obtains the ownership transfer for the instance argument.
680
+ *
681
+ * [type`GIRepository`.Transfer] contains a list of possible transfer values.
682
+ * @returns the transfer mode of the instance argument
683
+ */
684
+ get_instance_ownership_transfer(): Transfer
685
+ /**
686
+ * Obtain the number of arguments (both ‘in’ and ‘out’) for this callable.
687
+ * @returns The number of arguments this callable expects.
688
+ */
689
+ get_n_args(): number
690
+ /**
691
+ * Retrieve an arbitrary attribute associated with the return value.
692
+ * @param name a freeform string naming an attribute
693
+ * @returns The value of the attribute, or `NULL` if no such attribute exists
694
+ */
695
+ get_return_attribute(name: string): string | null
696
+ /**
697
+ * Obtain the return type of a callable item as a [class`GIRepository`.TypeInfo].
698
+ *
699
+ * If the callable doesn’t return anything, a [class`GIRepository`.TypeInfo] of
700
+ * type [enum`GIRepository`.TypeTag.VOID] will be returned.
701
+ * @returns the [class@GIRepository.TypeInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
702
+ */
703
+ get_return_type(): TypeInfo
704
+ /**
705
+ * Invoke the given `GICallableInfo` by calling the given `function` pointer.
706
+ *
707
+ * The set of arguments passed to `function` will be constructed according to the
708
+ * introspected type of the `GICallableInfo`, using `in_args,` `out_args`
709
+ * and `error`.
710
+ * @param function_ function pointer to call
711
+ * @param in_args array of ‘in’ arguments
712
+ * @param out_args array of ‘out’ arguments allocated by the caller, to be populated with outputted values
713
+ * @returns `TRUE` if the callable was executed successfully and didn’t throw a [type@GLib.Error]; `FALSE` if @error is set
714
+ */
715
+ invoke(function_: any | null, in_args: Argument[], out_args: Argument[]): [ /* returnType */ boolean, /* return_value */ Argument ]
716
+ /**
717
+ * Determines if the callable info is a method.
718
+ *
719
+ * For [class`GIRepository`.VFuncInfo]s, [class`GIRepository`.CallbackInfo]s, and
720
+ * [class`GIRepository`.SignalInfo]s, this is always true. Otherwise, this looks
721
+ * at the `GI_FUNCTION_IS_METHOD` flag on the [class`GIRepository`.FunctionInfo].
722
+ *
723
+ * Concretely, this function returns whether
724
+ * [method`GIRepository`.CallableInfo.get_n_args] matches the number of arguments
725
+ * in the raw C method. For methods, there is one more C argument than is
726
+ * exposed by introspection: the `self` or `this` object.
727
+ * @returns `TRUE` if @info is a method, `FALSE` otherwise
728
+ */
729
+ is_method(): boolean
730
+ /**
731
+ * Iterate over all attributes associated with the return value.
732
+ *
733
+ * The iterator structure is typically stack allocated, and must have its
734
+ * first member initialized to `NULL`.
735
+ *
736
+ * Both the `name` and `value` should be treated as constants
737
+ * and must not be freed.
738
+ *
739
+ * See [method`GIRepository`.BaseInfo.iterate_attributes] for an example of how
740
+ * to use a similar API.
741
+ * @param iterator a [type`GIRepository`.AttributeIter] structure, must be initialized; see below
742
+ * @returns `TRUE` if there are more attributes
743
+ */
744
+ iterate_return_attributes(iterator: AttributeIter): [ /* returnType */ boolean, /* iterator */ AttributeIter, /* name */ string, /* value */ string ]
745
+ /**
746
+ * Obtain information about a particular argument of this callable; this
747
+ * function is a variant of [method`GIRepository`.CallableInfo.get_arg] designed
748
+ * for stack allocation.
749
+ *
750
+ * The initialized `arg` must not be referenced after `info` is deallocated.
751
+ *
752
+ * Once you are done with `arg,` it must be cleared using
753
+ * [method`GIRepository`.BaseInfo.clear].
754
+ * @param n the argument index to fetch
755
+ */
756
+ load_arg(n: number): /* arg */ ArgInfo
757
+ /**
758
+ * Obtain information about a return value of callable; this
759
+ * function is a variant of [method`GIRepository`.CallableInfo.get_return_type]
760
+ * designed for stack allocation.
761
+ *
762
+ * The initialized `type` must not be referenced after `info` is deallocated.
763
+ *
764
+ * Once you are done with `type,` it must be cleared using
765
+ * [method`GIRepository`.BaseInfo.clear].
766
+ */
767
+ load_return_type(): /* type */ TypeInfo
768
+ /**
769
+ * See if a callable could return `NULL`.
770
+ * @returns `TRUE` if callable could return `NULL`
771
+ */
772
+ may_return_null(): boolean
773
+ /**
774
+ * See if a callable’s return value is only useful in C.
775
+ * @returns `TRUE` if return value is only useful in C.
776
+ */
777
+ skip_return(): boolean
778
+ }
779
+
780
+ /**
781
+ * `GICallableInfo` represents an entity which is callable.
782
+ *
783
+ * Examples of callable are:
784
+ *
785
+ * - functions ([class`GIRepository`.FunctionInfo])
786
+ * - virtual functions ([class`GIRepository`.VFuncInfo])
787
+ * - callbacks ([class`GIRepository`.CallbackInfo]).
788
+ *
789
+ * A callable has a list of arguments ([class`GIRepository`.ArgInfo]), a return
790
+ * type, direction and a flag which decides if it returns `NULL`.
791
+ * @class
792
+ */
793
+ class CallableInfo extends BaseInfo {
794
+
795
+ // Own properties of GIRepository-3.0.GIRepository.CallableInfo
796
+
797
+ static name: string
798
+ }
799
+
800
+ interface CallbackInfo {
801
+ }
802
+
803
+ /**
804
+ * `GICallbackInfo` represents a callback.
805
+ * @class
806
+ */
807
+ class CallbackInfo extends CallableInfo {
808
+
809
+ // Own properties of GIRepository-3.0.GIRepository.CallbackInfo
810
+
811
+ static name: string
812
+ }
813
+
814
+ interface ConstantInfo {
815
+
816
+ // Owm methods of GIRepository-3.0.GIRepository.ConstantInfo
817
+
818
+ /**
819
+ * Obtain the type of the constant as a [class`GIRepository`.TypeInfo].
820
+ * @returns The [class@GIRepository.TypeInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
821
+ */
822
+ get_type_info(): TypeInfo
823
+ }
824
+
825
+ /**
826
+ * `GIConstantInfo` represents a constant.
827
+ *
828
+ * A constant has a type associated – which can be obtained by calling
829
+ * [method`GIRepository`.ConstantInfo.get_type_info] – and a value – which can be
830
+ * obtained by calling [method`GIRepository`.ConstantInfo.get_value].
831
+ * @class
832
+ */
833
+ class ConstantInfo extends BaseInfo {
834
+
835
+ // Own properties of GIRepository-3.0.GIRepository.ConstantInfo
836
+
837
+ static name: string
838
+ }
839
+
840
+ interface EnumInfo {
841
+
842
+ // Owm methods of GIRepository-3.0.GIRepository.EnumInfo
843
+
844
+ /**
845
+ * Obtain the string form of the quark for the error domain associated with
846
+ * this enum, if any.
847
+ * @returns the string form of the error domain associated with this enum, or `NULL`.
848
+ */
849
+ get_error_domain(): string | null
850
+ /**
851
+ * Obtain an enum type method at index `n`.
852
+ * @param n index of method to get
853
+ * @returns the [class@GIRepository.FunctionInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
854
+ */
855
+ get_method(n: number): FunctionInfo
856
+ /**
857
+ * Obtain the number of methods that this enum type has.
858
+ * @returns number of methods
859
+ */
860
+ get_n_methods(): number
861
+ /**
862
+ * Obtain the number of values this enumeration contains.
863
+ * @returns the number of enumeration values
864
+ */
865
+ get_n_values(): number
866
+ /**
867
+ * Obtain the tag of the type used for the enum in the C ABI. This will
868
+ * will be a signed or unsigned integral type.
869
+ *
870
+ * Note that in the current implementation the width of the type is
871
+ * computed correctly, but the signed or unsigned nature of the type
872
+ * may not match the sign of the type used by the C compiler.
873
+ * @returns the storage type for the enumeration
874
+ */
875
+ get_storage_type(): TypeTag
876
+ /**
877
+ * Obtain a value for this enumeration.
878
+ * @param n index of value to fetch
879
+ * @returns the enumeration value, free the struct with [method@GIRepository.BaseInfo.unref] when done.
880
+ */
881
+ get_value(n: number): ValueInfo
882
+ }
883
+
884
+ /**
885
+ * A `GIEnumInfo` represents an enumeration.
886
+ *
887
+ * The `GIEnumInfo` contains a set of values (each a
888
+ * [class`GIRepository`.ValueInfo]) and a type.
889
+ *
890
+ * The [class`GIRepository`.ValueInfo] for a value is fetched by calling
891
+ * [method`GIRepository`.EnumInfo.get_value] on a `GIEnumInfo`.
892
+ * @class
893
+ */
894
+ class EnumInfo extends RegisteredTypeInfo {
895
+
896
+ // Own properties of GIRepository-3.0.GIRepository.EnumInfo
897
+
898
+ static name: string
899
+ }
900
+
901
+ interface FieldInfo {
902
+
903
+ // Owm methods of GIRepository-3.0.GIRepository.FieldInfo
904
+
905
+ /**
906
+ * Obtain the flags for this `GIFieldInfo`. See
907
+ * [flags`GIRepository`.FieldInfoFlags] for possible flag values.
908
+ * @returns the flags
909
+ */
910
+ get_flags(): FieldInfoFlags
911
+ /**
912
+ * Obtain the offset of the field member, in bytes. This is relative
913
+ * to the beginning of the struct or union.
914
+ * @returns the field offset, in bytes
915
+ */
916
+ get_offset(): number
917
+ /**
918
+ * Obtain the size of the field member, in bits. This is how
919
+ * much space you need to allocate to store the field.
920
+ * @returns the field size, in bits
921
+ */
922
+ get_size(): number
923
+ /**
924
+ * Obtain the type of a field as a [type`GIRepository`.TypeInfo].
925
+ * @returns the [type@GIRepository.TypeInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
926
+ */
927
+ get_type_info(): TypeInfo
928
+ }
929
+
930
+ /**
931
+ * A `GIFieldInfo` struct represents a field of a struct, union, or object.
932
+ *
933
+ * The `GIFieldInfo` is fetched by calling
934
+ * [method`GIRepository`.StructInfo.get_field],
935
+ * [method`GIRepository`.UnionInfo.get_field] or
936
+ * [method`GIRepository`.ObjectInfo.get_field].
937
+ *
938
+ * A field has a size, type and a struct offset associated and a set of flags,
939
+ * which are currently `GI_FIELD_IS_READABLE` or `GI_FIELD_IS_WRITABLE`.
940
+ *
941
+ * See also: [type`GIRepository`.StructInfo], [type`GIRepository`.UnionInfo],
942
+ * [type`GIRepository`.ObjectInfo]
943
+ * @class
944
+ */
945
+ class FieldInfo extends BaseInfo {
946
+
947
+ // Own properties of GIRepository-3.0.GIRepository.FieldInfo
948
+
949
+ static name: string
950
+ }
951
+
952
+ interface FlagsInfo {
953
+ }
954
+
955
+ /**
956
+ * A `GIFlagsInfo` represents an enumeration which defines flag values
957
+ * (independently set bits).
958
+ *
959
+ * The `GIFlagsInfo` contains a set of values (each a
960
+ * [class`GIRepository`.ValueInfo]) and a type.
961
+ *
962
+ * The [class`GIRepository`.ValueInfo] for a value is fetched by calling
963
+ * [method`GIRepository`.EnumInfo.get_value] on a `GIFlagsInfo`.
964
+ * @class
965
+ */
966
+ class FlagsInfo extends EnumInfo {
967
+
968
+ // Own properties of GIRepository-3.0.GIRepository.FlagsInfo
969
+
970
+ static name: string
971
+ }
972
+
973
+ interface FunctionInfo {
974
+
975
+ // Owm methods of GIRepository-3.0.GIRepository.FunctionInfo
976
+
977
+ /**
978
+ * Obtain the [type`GIRepository`.FunctionInfoFlags] for the `info`.
979
+ * @returns the flags
980
+ */
981
+ get_flags(): FunctionInfoFlags
982
+ /**
983
+ * Obtain the property associated with this `GIFunctionInfo`.
984
+ *
985
+ * Only `GIFunctionInfo`s with the flag `GI_FUNCTION_IS_GETTER` or
986
+ * `GI_FUNCTION_IS_SETTER` have a property set. For other cases,
987
+ * `NULL` will be returned.
988
+ * @returns The property or `NULL` if not set. Free it with [method@GIRepository.BaseInfo.unref] when done.
989
+ */
990
+ get_property(): PropertyInfo | null
991
+ /**
992
+ * Obtain the symbol of the function.
993
+ *
994
+ * The symbol is the name of the exported function, suitable to be used as an
995
+ * argument to [method`GModule`.Module.symbol].
996
+ * @returns the symbol
997
+ */
998
+ get_symbol(): string
999
+ /**
1000
+ * Obtain the virtual function associated with this `GIFunctionInfo`.
1001
+ *
1002
+ * Only `GIFunctionInfo`s with the flag `GI_FUNCTION_WRAPS_VFUNC` have
1003
+ * a virtual function set. For other cases, `NULL` will be returned.
1004
+ * @returns The virtual function or `NULL` if not set. Free it by calling [method@GIRepository.BaseInfo.unref] when done.
1005
+ */
1006
+ get_vfunc(): VFuncInfo | null
1007
+ }
1008
+
1009
+ /**
1010
+ * `GIFunctionInfo` represents a function, method or constructor.
1011
+ *
1012
+ * To find out what kind of entity a `GIFunctionInfo` represents, call
1013
+ * [method`GIRepository`.FunctionInfo.get_flags].
1014
+ *
1015
+ * See also [class`GIRepository`.CallableInfo] for information on how to retrieve
1016
+ * arguments and other metadata.
1017
+ * @class
1018
+ */
1019
+ class FunctionInfo extends CallableInfo {
1020
+
1021
+ // Own properties of GIRepository-3.0.GIRepository.FunctionInfo
1022
+
1023
+ static name: string
1024
+ }
1025
+
1026
+ interface InterfaceInfo {
1027
+
1028
+ // Owm methods of GIRepository-3.0.GIRepository.InterfaceInfo
1029
+
1030
+ /**
1031
+ * Obtain a method of the interface type given a `name`.
1032
+ *
1033
+ * `NULL` will be returned if there’s no method available with that name.
1034
+ * @param name name of method to obtain
1035
+ * @returns The [class@GIRepository.FunctionInfo] or `NULL` if none found. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1036
+ */
1037
+ find_method(name: string): FunctionInfo | null
1038
+ /**
1039
+ * Obtain a signal of the interface type given a `name`.
1040
+ *
1041
+ * `NULL` will be returned if there’s no signal available with that name.
1042
+ * @param name name of signal to find
1043
+ * @returns The [class@GIRepository.SignalInfo] or `NULL` if none found. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1044
+ */
1045
+ find_signal(name: string): SignalInfo | null
1046
+ /**
1047
+ * Locate a virtual function slot with name `name`.
1048
+ *
1049
+ * See the documentation for [method`GIRepository`.ObjectInfo.find_vfunc] for
1050
+ * more information on virtuals.
1051
+ * @param name The name of a virtual function to find.
1052
+ * @returns The [class@GIRepository.VFuncInfo], or `NULL` if none found. Free it with [method@GIRepository.BaseInfo.unref] when done.
1053
+ */
1054
+ find_vfunc(name: string): VFuncInfo | null
1055
+ /**
1056
+ * Obtain an interface type constant at index `n`.
1057
+ * @param n index of constant to get
1058
+ * @returns The [class@GIRepository.ConstantInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1059
+ */
1060
+ get_constant(n: number): ConstantInfo
1061
+ /**
1062
+ * Returns the layout C structure associated with this `GInterface`.
1063
+ * @returns The [class@GIRepository.StructInfo] or `NULL` if unknown. Free it with [method@GIRepository.BaseInfo.unref] when done.
1064
+ */
1065
+ get_iface_struct(): StructInfo | null
1066
+ /**
1067
+ * Obtain an interface type method at index `n`.
1068
+ * @param n index of method to get
1069
+ * @returns The [class@GIRepository.FunctionInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1070
+ */
1071
+ get_method(n: number): FunctionInfo
1072
+ /**
1073
+ * Obtain the number of constants that this interface type has.
1074
+ * @returns number of constants
1075
+ */
1076
+ get_n_constants(): number
1077
+ /**
1078
+ * Obtain the number of methods that this interface type has.
1079
+ * @returns number of methods
1080
+ */
1081
+ get_n_methods(): number
1082
+ /**
1083
+ * Obtain the number of prerequisites for this interface type.
1084
+ *
1085
+ * A prerequisite is another interface that needs to be implemented for
1086
+ * interface, similar to a base class for [class`GObject`.Object]s.
1087
+ * @returns number of prerequisites
1088
+ */
1089
+ get_n_prerequisites(): number
1090
+ /**
1091
+ * Obtain the number of properties that this interface type has.
1092
+ * @returns number of properties
1093
+ */
1094
+ get_n_properties(): number
1095
+ /**
1096
+ * Obtain the number of signals that this interface type has.
1097
+ * @returns number of signals
1098
+ */
1099
+ get_n_signals(): number
1100
+ /**
1101
+ * Obtain the number of virtual functions that this interface type has.
1102
+ * @returns number of virtual functions
1103
+ */
1104
+ get_n_vfuncs(): number
1105
+ /**
1106
+ * Obtain an interface type’s prerequisite at index `n`.
1107
+ * @param n index of prerequisite to get
1108
+ * @returns The prerequisite as a [class@GIRepository.BaseInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1109
+ */
1110
+ get_prerequisite(n: number): BaseInfo
1111
+ /**
1112
+ * Obtain an interface type property at index `n`.
1113
+ * @param n index of property to get
1114
+ * @returns The [class@GIRepository.PropertyInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1115
+ */
1116
+ get_property(n: number): PropertyInfo
1117
+ /**
1118
+ * Obtain an interface type signal at index `n`.
1119
+ * @param n index of signal to get
1120
+ * @returns The [class@GIRepository.SignalInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1121
+ */
1122
+ get_signal(n: number): SignalInfo
1123
+ /**
1124
+ * Obtain an interface type virtual function at index `n`.
1125
+ * @param n index of virtual function to get
1126
+ * @returns the [class@GIRepository.VFuncInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1127
+ */
1128
+ get_vfunc(n: number): VFuncInfo
1129
+ }
1130
+
1131
+ /**
1132
+ * `GIInterfaceInfo` represents a `GInterface` type.
1133
+ *
1134
+ * A `GInterface` has methods, fields, properties, signals,
1135
+ * interfaces, constants, virtual functions and prerequisites.
1136
+ * @class
1137
+ */
1138
+ class InterfaceInfo extends RegisteredTypeInfo {
1139
+
1140
+ // Own properties of GIRepository-3.0.GIRepository.InterfaceInfo
1141
+
1142
+ static name: string
1143
+ }
1144
+
1145
+ interface ObjectInfo {
1146
+
1147
+ // Owm methods of GIRepository-3.0.GIRepository.ObjectInfo
1148
+
1149
+ /**
1150
+ * Obtain a method of the object type given a `name`.
1151
+ *
1152
+ * `NULL` will be returned if there’s no method available with that name.
1153
+ * @param name name of method to obtain
1154
+ * @returns The [class@GIRepository.FunctionInfo], or `NULL` if no method could be found. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1155
+ */
1156
+ find_method(name: string): FunctionInfo | null
1157
+ /**
1158
+ * Obtain a method of the object given a `name,` searching both the
1159
+ * object `info` and any interfaces it implements.
1160
+ *
1161
+ * `NULL` will be returned if there’s no method available with that name.
1162
+ *
1163
+ * Note that this function does *not* search parent classes; you will have
1164
+ * to chain up if that’s desired.
1165
+ * @param name name of method to obtain
1166
+ * @returns The [class@GIRepository.FunctionInfo], or `NULL` if none was found. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1167
+ */
1168
+ find_method_using_interfaces(name: string): [ /* returnType */ FunctionInfo | null, /* declarer */ BaseInfo | null ]
1169
+ /**
1170
+ * Obtain a signal of the object type given a `name`.
1171
+ *
1172
+ * `NULL` will be returned if there’s no signal available with that name.
1173
+ * @param name name of signal
1174
+ * @returns The [class@GIRepository.SignalInfo], or `NULL` if no signal could be found. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1175
+ */
1176
+ find_signal(name: string): SignalInfo | null
1177
+ /**
1178
+ * Locate a virtual function slot with name `name`.
1179
+ *
1180
+ * Note that the namespace for virtuals is distinct from that of methods; there
1181
+ * may or may not be a concrete method associated for a virtual. If there is
1182
+ * one, it may be retrieved using [method`GIRepository`.VFuncInfo.get_invoker],
1183
+ * otherwise that method will return `NULL`.
1184
+ *
1185
+ * See the documentation for [method`GIRepository`.VFuncInfo.get_invoker] for
1186
+ * more information on invoking virtuals.
1187
+ * @param name the name of a virtual function to find.
1188
+ * @returns The [class@GIRepository.VFuncInfo], or `NULL` if none is found. Free it with [method@GIRepository.BaseInfo.unref] when done.
1189
+ */
1190
+ find_vfunc(name: string): VFuncInfo | null
1191
+ /**
1192
+ * Locate a virtual function slot with name `name,` searching both the object
1193
+ * `info` and any interfaces it implements.
1194
+ *
1195
+ * `NULL` will be returned if there’s no vfunc available with that name.
1196
+ *
1197
+ * Note that the namespace for virtuals is distinct from that of methods; there
1198
+ * may or may not be a concrete method associated for a virtual. If there is
1199
+ * one, it may be retrieved using [method`GIRepository`.VFuncInfo.get_invoker],
1200
+ * otherwise that method will return `NULL`.
1201
+ *
1202
+ * Note that this function does *not* search parent classes; you will have
1203
+ * to chain up if that’s desired.
1204
+ * @param name name of vfunc to obtain
1205
+ * @returns The [class@GIRepository.VFuncInfo], or `NULL` if none was found. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1206
+ */
1207
+ find_vfunc_using_interfaces(name: string): [ /* returnType */ VFuncInfo | null, /* declarer */ BaseInfo | null ]
1208
+ /**
1209
+ * Obtain if the object type is an abstract type, i.e. if it cannot be
1210
+ * instantiated.
1211
+ * @returns `TRUE` if the object type is abstract
1212
+ */
1213
+ get_abstract(): boolean
1214
+ /**
1215
+ * Every [class`GObject`.Object] has two structures; an instance structure and a
1216
+ * class structure. This function returns the metadata for the class structure.
1217
+ * @returns The [class@GIRepository.StructInfo] or `NULL` if it’s unknown. Free with [method@GIRepository.BaseInfo.unref] when done.
1218
+ */
1219
+ get_class_struct(): StructInfo | null
1220
+ /**
1221
+ * Obtain an object type constant at index `n`.
1222
+ * @param n index of constant to get
1223
+ * @returns The [class@GIRepository.ConstantInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1224
+ */
1225
+ get_constant(n: number): ConstantInfo
1226
+ /**
1227
+ * Obtain an object type field at index `n`.
1228
+ * @param n index of field to get
1229
+ * @returns The [class@GIRepository.FieldInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1230
+ */
1231
+ get_field(n: number): FieldInfo
1232
+ /**
1233
+ * Checks whether the object type is a final type, i.e. if it cannot
1234
+ * be derived.
1235
+ * @returns `TRUE` if the object type is final
1236
+ */
1237
+ get_final(): boolean
1238
+ /**
1239
+ * Obtain if the object type is of a fundamental type which is not
1240
+ * `G_TYPE_OBJECT`.
1241
+ *
1242
+ * This is mostly for supporting `GstMiniObject`.
1243
+ * @returns `TRUE` if the object type is a fundamental type
1244
+ */
1245
+ get_fundamental(): boolean
1246
+ /**
1247
+ * Obtain the symbol name of the function that should be called to convert
1248
+ * an object instance pointer of this object type to a [type`GObject`.Value].
1249
+ *
1250
+ * It’s mainly used for fundamental types. The type signature for the symbol
1251
+ * is [type`GIRepository`.ObjectInfoGetValueFunction]. To fetch the function
1252
+ * pointer see [method`GIRepository`.ObjectInfo.get_get_value_function_pointer].
1253
+ * @returns the symbol, or `NULL` if the object type has no get-value function
1254
+ */
1255
+ get_get_value_function_name(): string | null
1256
+ /**
1257
+ * Obtain an object type interface at index `n`.
1258
+ * @param n index of interface to get
1259
+ * @returns The [class@GIRepository.InterfaceInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1260
+ */
1261
+ get_interface(n: number): InterfaceInfo
1262
+ /**
1263
+ * Obtain an object type method at index `n`.
1264
+ * @param n index of method to get
1265
+ * @returns The [class@GIRepository.FunctionInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1266
+ */
1267
+ get_method(n: number): FunctionInfo
1268
+ /**
1269
+ * Obtain the number of constants that this object type has.
1270
+ * @returns number of constants
1271
+ */
1272
+ get_n_constants(): number
1273
+ /**
1274
+ * Obtain the number of fields that this object type has.
1275
+ * @returns number of fields
1276
+ */
1277
+ get_n_fields(): number
1278
+ /**
1279
+ * Obtain the number of interfaces that this object type has.
1280
+ * @returns number of interfaces
1281
+ */
1282
+ get_n_interfaces(): number
1283
+ /**
1284
+ * Obtain the number of methods that this object type has.
1285
+ * @returns number of methods
1286
+ */
1287
+ get_n_methods(): number
1288
+ /**
1289
+ * Obtain the number of properties that this object type has.
1290
+ * @returns number of properties
1291
+ */
1292
+ get_n_properties(): number
1293
+ /**
1294
+ * Obtain the number of signals that this object type has.
1295
+ * @returns number of signals
1296
+ */
1297
+ get_n_signals(): number
1298
+ /**
1299
+ * Obtain the number of virtual functions that this object type has.
1300
+ * @returns number of virtual functions
1301
+ */
1302
+ get_n_vfuncs(): number
1303
+ /**
1304
+ * Obtain the parent of the object type.
1305
+ * @returns The `GIObjectInfo`. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1306
+ */
1307
+ get_parent(): ObjectInfo | null
1308
+ /**
1309
+ * Obtain an object type property at index `n`.
1310
+ * @param n index of property to get
1311
+ * @returns The [class@GIRepository.PropertyInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1312
+ */
1313
+ get_property(n: number): PropertyInfo
1314
+ /**
1315
+ * Obtain the symbol name of the function that should be called to ref this
1316
+ * object type.
1317
+ *
1318
+ * It’s mainly used for fundamental types. The type signature for
1319
+ * the symbol is [type`GIRepository`.ObjectInfoRefFunction]. To fetch the
1320
+ * function pointer see
1321
+ * [method`GIRepository`.ObjectInfo.get_ref_function_pointer].
1322
+ * @returns the symbol, or `NULL` if the object type has no ref function
1323
+ */
1324
+ get_ref_function_name(): string | null
1325
+ /**
1326
+ * Obtain the symbol name of the function that should be called to set a
1327
+ * [type`GObject`.Value], given an object instance pointer of this object type.
1328
+ *
1329
+ * It’s mainly used for fundamental types. The type signature for the symbol
1330
+ * is [type`GIRepository`.ObjectInfoSetValueFunction]. To fetch the function
1331
+ * pointer see [method`GIRepository`.ObjectInfo.get_set_value_function_pointer].
1332
+ * @returns the symbol, or `NULL` if the object type has no set-value function
1333
+ */
1334
+ get_set_value_function_name(): string | null
1335
+ /**
1336
+ * Obtain an object type signal at index `n`.
1337
+ * @param n index of signal to get
1338
+ * @returns The [class@GIRepository.SignalInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1339
+ */
1340
+ get_signal(n: number): SignalInfo
1341
+ /**
1342
+ * Obtain the name of the function which, when called, will return the
1343
+ * [type`GObject`.Type] for this object type.
1344
+ * @returns the type init function name
1345
+ */
1346
+ get_type_init_function_name(): string
1347
+
1348
+ // Overloads of get_type_init_function_name
1349
+
1350
+ /**
1351
+ * Obtain the type init function for `info`.
1352
+ *
1353
+ * The type init function is the function which will register the
1354
+ * [type`GObject`.Type] within the GObject type system. Usually this is not
1355
+ * called by language bindings or applications — use
1356
+ * [method`GIRepository`.RegisteredTypeInfo.get_g_type] directly instead.
1357
+ * @returns the symbol name of the type init function, suitable for passing into [method@GModule.Module.symbol], or `NULL` if unknown
1358
+ */
1359
+ get_type_init_function_name(): string | null
1360
+ /**
1361
+ * Obtain the name of the object’s class/type.
1362
+ * @returns name of the object’s type
1363
+ */
1364
+ get_type_name(): string
1365
+
1366
+ // Overloads of get_type_name
1367
+
1368
+ /**
1369
+ * Obtain the type name of the struct within the GObject type system.
1370
+ *
1371
+ * This type can be passed to [func`GObject`.type_name] to get a
1372
+ * [type`GObject`.Type].
1373
+ * @returns the type name, or `NULL` if unknown
1374
+ */
1375
+ get_type_name(): string | null
1376
+ /**
1377
+ * Obtain the symbol name of the function that should be called to unref this
1378
+ * object type.
1379
+ *
1380
+ * It’s mainly used for fundamental types. The type signature for the symbol is
1381
+ * [type`GIRepository`.ObjectInfoUnrefFunction]. To fetch the function pointer
1382
+ * see [method`GIRepository`.ObjectInfo.get_unref_function_pointer].
1383
+ * @returns the symbol, or `NULL` if the object type has no unref function
1384
+ */
1385
+ get_unref_function_name(): string | null
1386
+ /**
1387
+ * Obtain an object type virtual function at index `n`.
1388
+ * @param n index of virtual function to get
1389
+ * @returns The [class@GIRepository.VFuncInfo]. Free the struct by calling [method@GIRepository.BaseInfo.unref] when done.
1390
+ */
1391
+ get_vfunc(n: number): VFuncInfo
1392
+ }
1393
+
1394
+ /**
1395
+ * `GIObjectInfo` represents a classed type.
1396
+ *
1397
+ * Classed types in [type`GObject`.Type] inherit from
1398
+ * [type`GObject`.TypeInstance]; the most common type is [class`GObject`.Object].
1399
+ *
1400
+ * A `GIObjectInfo` doesn’t represent a specific instance of a classed type,
1401
+ * instead this represent the object type (i.e. the class).
1402
+ *
1403
+ * A `GIObjectInfo` has methods, fields, properties, signals, interfaces,
1404
+ * constants and virtual functions.
1405
+ * @class
1406
+ */
1407
+ class ObjectInfo extends RegisteredTypeInfo {
1408
+
1409
+ // Own properties of GIRepository-3.0.GIRepository.ObjectInfo
1410
+
1411
+ static name: string
1412
+ }
1413
+
1414
+ interface PropertyInfo {
1415
+
1416
+ // Owm methods of GIRepository-3.0.GIRepository.PropertyInfo
1417
+
1418
+ /**
1419
+ * Obtain the flags for this property info.
1420
+ *
1421
+ * See [type`GObject`.ParamFlags] for more information about possible flag
1422
+ * values.
1423
+ * @returns the flags
1424
+ */
1425
+ get_flags(): GObject.ParamFlags
1426
+ /**
1427
+ * Obtains the getter function associated with this `GIPropertyInfo`.
1428
+ *
1429
+ * The setter is only available for `G_PARAM_READABLE` properties.
1430
+ * @returns The function info, or `NULL` if not set. Free it with [method@GIRepository.BaseInfo.unref] when done.
1431
+ */
1432
+ get_getter(): FunctionInfo | null
1433
+ /**
1434
+ * Obtain the ownership transfer for this property.
1435
+ *
1436
+ * See [type`GIRepository`.Transfer] for more information about transfer values.
1437
+ * @returns the transfer
1438
+ */
1439
+ get_ownership_transfer(): Transfer
1440
+ /**
1441
+ * Obtains the setter function associated with this `GIPropertyInfo`.
1442
+ *
1443
+ * The setter is only available for `G_PARAM_WRITABLE` properties that
1444
+ * are also not `G_PARAM_CONSTRUCT_ONLY`.
1445
+ * @returns The function info, or `NULL` if not set. Free it with [method@GIRepository.BaseInfo.unref] when done.
1446
+ */
1447
+ get_setter(): FunctionInfo | null
1448
+ /**
1449
+ * Obtain the type information for the property `info`.
1450
+ * @returns The [class@GIRepository.TypeInfo]. Free it with [method@GIRepository.BaseInfo.unref] when done.
1451
+ */
1452
+ get_type_info(): TypeInfo
1453
+ }
1454
+
1455
+ /**
1456
+ * `GIPropertyInfo` represents a property in a [class`GObject`.Object].
1457
+ *
1458
+ * A property belongs to either a [class`GIRepository`.ObjectInfo] or a
1459
+ * [class`GIRepository`.InterfaceInfo].
1460
+ * @class
1461
+ */
1462
+ class PropertyInfo extends BaseInfo {
1463
+
1464
+ // Own properties of GIRepository-3.0.GIRepository.PropertyInfo
1465
+
1466
+ static name: string
1467
+ }
1468
+
1469
+ interface RegisteredTypeInfo {
1470
+
1471
+ // Owm methods of GIRepository-3.0.GIRepository.RegisteredTypeInfo
1472
+
1473
+ /**
1474
+ * Obtain the [type`GObject`.Type] for this registered type.
1475
+ *
1476
+ * If there is no type information associated with `info,` or the shared library
1477
+ * which provides the `type_init` function for `info` cannot be called, then
1478
+ * `G_TYPE_NONE` is returned.
1479
+ * @returns the [type@GObject.Type], or `G_TYPE_NONE` if unknown
1480
+ */
1481
+ get_g_type(): GObject.GType
1482
+ /**
1483
+ * Obtain the type init function for `info`.
1484
+ *
1485
+ * The type init function is the function which will register the
1486
+ * [type`GObject`.Type] within the GObject type system. Usually this is not
1487
+ * called by language bindings or applications — use
1488
+ * [method`GIRepository`.RegisteredTypeInfo.get_g_type] directly instead.
1489
+ * @returns the symbol name of the type init function, suitable for passing into [method@GModule.Module.symbol], or `NULL` if unknown
1490
+ */
1491
+ get_type_init_function_name(): string | null
1492
+ /**
1493
+ * Obtain the type name of the struct within the GObject type system.
1494
+ *
1495
+ * This type can be passed to [func`GObject`.type_name] to get a
1496
+ * [type`GObject`.Type].
1497
+ * @returns the type name, or `NULL` if unknown
1498
+ */
1499
+ get_type_name(): string | null
1500
+ /**
1501
+ * Get whether the registered type is a boxed type.
1502
+ *
1503
+ * A boxed type is a subtype of the fundamental `G_TYPE_BOXED` type.
1504
+ * It’s a type which has registered a [type`GObject`.Type], and which has
1505
+ * associated copy and free functions.
1506
+ *
1507
+ * Most boxed types are `struct`s; some are `union`s; and it’s possible for a
1508
+ * boxed type to be neither, but that is currently unsupported by
1509
+ * libgirepository. It’s also possible for a `struct` or `union` to have
1510
+ * associated copy and/or free functions *without* being a boxed type, by virtue
1511
+ * of not having registered a [type`GObject`.Type].
1512
+ *
1513
+ * This function will return false for [type`GObject`.Type]s which are not boxed,
1514
+ * such as classes or interfaces. It will also return false for the `struct`s
1515
+ * associated with a class or interface, which return true from
1516
+ * [method`GIRepository`.StructInfo.is_gtype_struct].
1517
+ * @returns true if @info is a boxed type
1518
+ */
1519
+ is_boxed(): boolean
1520
+ }
1521
+
1522
+ /**
1523
+ * `GIRegisteredTypeInfo` represents an entity with a [type`GObject`.Type]
1524
+ * associated.
1525
+ *
1526
+ * Could be either a [class`GIRepository`.EnumInfo],
1527
+ * [class`GIRepository`.InterfaceInfo], [class`GIRepository`.ObjectInfo],
1528
+ * [class`GIRepository`.StructInfo] or a [class`GIRepository`.UnionInfo].
1529
+ *
1530
+ * A registered type info struct has a name and a type function.
1531
+ *
1532
+ * To get the name call [method`GIRepository`.RegisteredTypeInfo.get_type_name].
1533
+ * Most users want to call [method`GIRepository`.RegisteredTypeInfo.get_g_type]
1534
+ * and don’t worry about the rest of the details.
1535
+ *
1536
+ * If the registered type is a subtype of `G_TYPE_BOXED`,
1537
+ * [method`GIRepository`.RegisteredTypeInfo.is_boxed] will return true, and
1538
+ * [method`GIRepository`.RegisteredTypeInfo.get_type_name] is guaranteed to
1539
+ * return a non-`NULL` value. This is relevant for the
1540
+ * [class`GIRepository`.StructInfo] and [class`GIRepository`.UnionInfo]
1541
+ * subclasses.
1542
+ * @class
1543
+ */
1544
+ class RegisteredTypeInfo extends BaseInfo {
1545
+
1546
+ // Own properties of GIRepository-3.0.GIRepository.RegisteredTypeInfo
1547
+
1548
+ static name: string
1549
+ }
1550
+
1551
+ module Repository {
1552
+
1553
+ // Constructor properties interface
1554
+
1555
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1556
+ }
1557
+
1558
+ }
1559
+
1560
+ interface Repository {
1561
+
1562
+ // Owm methods of GIRepository-3.0.GIRepository.Repository
1563
+
1564
+ /**
1565
+ * Obtain an unordered list of versions (either currently loaded or
1566
+ * available) for `namespace_` in this `repository`.
1567
+ *
1568
+ * The list is guaranteed to be `NULL` terminated. The `NULL` terminator is not
1569
+ * counted in `n_versions_out`.
1570
+ * @param namespace_ GI namespace, e.g. `Gtk`
1571
+ * @returns the array of versions.
1572
+ */
1573
+ enumerate_versions(namespace_: string): string[]
1574
+ /**
1575
+ * Searches for the enum type corresponding to the given [type`GLib`.Error]
1576
+ * domain.
1577
+ *
1578
+ * Before calling this function for a particular namespace, you must call
1579
+ * [method`GIRepository`.Repository.require] to load the namespace, or otherwise
1580
+ * ensure the namespace has already been loaded.
1581
+ * @param domain a [type`GLib`.Error] domain
1582
+ * @returns [class@GIRepository.EnumInfo] representing metadata about @domain’s enum type, or `NULL` if none found
1583
+ */
1584
+ find_by_error_domain(domain: GLib.Quark): EnumInfo | null
1585
+ /**
1586
+ * Searches all loaded namespaces for a particular [type`GObject`.Type].
1587
+ *
1588
+ * Note that in order to locate the metadata, the namespace corresponding to
1589
+ * the type must first have been loaded. There is currently no
1590
+ * mechanism for determining the namespace which corresponds to an
1591
+ * arbitrary [type`GObject`.Type] — thus, this function will operate most
1592
+ * reliably when you know the [type`GObject`.Type] is from a loaded namespace.
1593
+ * @param gtype [type`GObject`.Type] to search for
1594
+ * @returns [class@GIRepository.BaseInfo] representing metadata about @type, or `NULL` if none found
1595
+ */
1596
+ find_by_gtype(gtype: GObject.GType): BaseInfo | null
1597
+ /**
1598
+ * Searches for a particular entry in a namespace.
1599
+ *
1600
+ * Before calling this function for a particular namespace, you must call
1601
+ * [method`GIRepository`.Repository.require] to load the namespace, or otherwise
1602
+ * ensure the namespace has already been loaded.
1603
+ * @param namespace_ Namespace which will be searched
1604
+ * @param name Entry name to find
1605
+ * @returns [class@GIRepository.BaseInfo] representing metadata about @name, or `NULL` if none found
1606
+ */
1607
+ find_by_name(namespace_: string, name: string): BaseInfo | null
1608
+ /**
1609
+ * This function returns the ‘C prefix’, or the C level namespace
1610
+ * associated with the given introspection namespace.
1611
+ *
1612
+ * Each C symbol starts with this prefix, as well each [type`GObject`.Type] in
1613
+ * the library.
1614
+ *
1615
+ * Note: The namespace must have already been loaded using a function
1616
+ * such as [method`GIRepository`.Repository.require] before calling this
1617
+ * function.
1618
+ * @param namespace_ Namespace to inspect
1619
+ * @returns C namespace prefix, or `NULL` if none associated
1620
+ */
1621
+ get_c_prefix(namespace_: string): string | null
1622
+ /**
1623
+ * Retrieves all (transitive) versioned dependencies for
1624
+ * `namespace_`.
1625
+ *
1626
+ * The returned strings are of the form `namespace-version`.
1627
+ *
1628
+ * Note: `namespace_` must have already been loaded using a function
1629
+ * such as [method`GIRepository`.Repository.require] before calling this
1630
+ * function.
1631
+ *
1632
+ * To get only the immediate dependencies for `namespace_,` use
1633
+ * [method`GIRepository`.Repository.get_immediate_dependencies].
1634
+ *
1635
+ * The list is guaranteed to be `NULL` terminated. The `NULL` terminator is not
1636
+ * counted in `n_dependencies_out`.
1637
+ * @param namespace_ Namespace of interest
1638
+ * @returns String array of all versioned dependencies
1639
+ */
1640
+ get_dependencies(namespace_: string): string[]
1641
+ /**
1642
+ * Return an array of the immediate versioned dependencies for `namespace_`.
1643
+ * Returned strings are of the form `namespace-version`.
1644
+ *
1645
+ * Note: `namespace_` must have already been loaded using a function
1646
+ * such as [method`GIRepository`.Repository.require] before calling this
1647
+ * function.
1648
+ *
1649
+ * To get the transitive closure of dependencies for `namespace_,` use
1650
+ * [method`GIRepository`.Repository.get_dependencies].
1651
+ *
1652
+ * The list is guaranteed to be `NULL` terminated. The `NULL` terminator is not
1653
+ * counted in `n_dependencies_out`.
1654
+ * @param namespace_ Namespace of interest
1655
+ * @returns String array of immediate versioned dependencies
1656
+ */
1657
+ get_immediate_dependencies(namespace_: string): string[]
1658
+ /**
1659
+ * This function returns a particular metadata entry in the
1660
+ * given namespace `namespace_`.
1661
+ *
1662
+ * The namespace must have already been loaded before calling this function.
1663
+ * See [method`GIRepository`.Repository.get_n_infos] to find the maximum number
1664
+ * of entries. It is an error to pass an invalid `idx` to this function.
1665
+ * @param namespace_ Namespace to inspect
1666
+ * @param idx 0-based offset into namespace metadata for entry
1667
+ * @returns [class@GIRepository.BaseInfo] containing metadata
1668
+ */
1669
+ get_info(namespace_: string, idx: number): BaseInfo
1670
+ /**
1671
+ * Returns the current search path [class`GIRepository`.Repository] will use when
1672
+ * loading shared libraries referenced by imported namespaces.
1673
+ *
1674
+ * The list is internal to [class`GIRepository`.Repository] and should not be
1675
+ * freed, nor should its string elements.
1676
+ *
1677
+ * The list is guaranteed to be `NULL` terminated. The `NULL` terminator is not
1678
+ * counted in `n_paths_out`.
1679
+ * @returns list of search paths, most important first
1680
+ */
1681
+ get_library_path(): string[]
1682
+ /**
1683
+ * Return the list of currently loaded namespaces.
1684
+ *
1685
+ * The list is guaranteed to be `NULL` terminated. The `NULL` terminator is not
1686
+ * counted in `n_namespaces_out`.
1687
+ * @returns list of namespaces
1688
+ */
1689
+ get_loaded_namespaces(): string[]
1690
+ /**
1691
+ * This function returns the number of metadata entries in
1692
+ * given namespace `namespace_`.
1693
+ *
1694
+ * The namespace must have already been loaded before calling this function.
1695
+ * @param namespace_ Namespace to inspect
1696
+ * @returns number of metadata entries
1697
+ */
1698
+ get_n_infos(namespace_: string): number
1699
+ /**
1700
+ * Look up the implemented interfaces for `gtype`.
1701
+ *
1702
+ * This function cannot fail per se; but for a totally ‘unknown’
1703
+ * [type`GObject`.Type], it may return 0 implemented interfaces.
1704
+ *
1705
+ * The semantics of this function are designed for a dynamic binding,
1706
+ * where in certain cases (such as a function which returns an
1707
+ * interface which may have ‘hidden’ implementation classes), not all
1708
+ * data may be statically known, and will have to be determined from
1709
+ * the [type`GObject`.Type] of the object. An example is
1710
+ * [func`Gio`.File.new_for_path] returning a concrete class of
1711
+ * `GLocalFile`, which is a [type`GObject`.Type] we see at runtime, but
1712
+ * not statically.
1713
+ * @param gtype a [type`GObject`.Type] whose fundamental type is `G_TYPE_OBJECT`
1714
+ */
1715
+ get_object_gtype_interfaces(gtype: GObject.GType): /* interfaces_out */ InterfaceInfo[]
1716
+ /**
1717
+ * Returns the current search path [class`GIRepository`.Repository] will use when
1718
+ * loading typelib files.
1719
+ *
1720
+ * The list is internal to [class`GIRepository`.Repository] and should not be
1721
+ * freed, nor should its string elements.
1722
+ *
1723
+ * The list is guaranteed to be `NULL` terminated. The `NULL` terminator is not
1724
+ * counted in `n_paths_out`.
1725
+ * @returns list of search paths, most important first
1726
+ */
1727
+ get_search_path(): string[]
1728
+ /**
1729
+ * This function returns an array of paths to the
1730
+ * shared C libraries associated with the given namespace `namespace_`.
1731
+ *
1732
+ * There may be no shared library path associated, in which case this
1733
+ * function will return `NULL`.
1734
+ *
1735
+ * Note: The namespace must have already been loaded using a function
1736
+ * such as [method`GIRepository`.Repository.require] before calling this
1737
+ * function.
1738
+ *
1739
+ * The list is internal to [class`GIRepository`.Repository] and should not be
1740
+ * freed, nor should its string elements.
1741
+ *
1742
+ * The list is guaranteed to be `NULL` terminated. The `NULL` terminator is not
1743
+ * counted in `out_n_elements`.
1744
+ * @param namespace_ Namespace to inspect
1745
+ * @returns Array of paths to shared libraries, or `NULL` if none are associated
1746
+ */
1747
+ get_shared_libraries(namespace_: string): string[] | null
1748
+ /**
1749
+ * If namespace `namespace_` is loaded, return the full path to the
1750
+ * .typelib file it was loaded from.
1751
+ *
1752
+ * If the typelib for namespace `namespace_` was included in a shared library,
1753
+ * return the special string `<builtin>`.
1754
+ * @param namespace_ GI namespace to use, e.g. `Gtk`
1755
+ * @returns Filesystem path (or `<builtin>`) if successful, `NULL` if namespace is not loaded
1756
+ */
1757
+ get_typelib_path(namespace_: string): string | null
1758
+ /**
1759
+ * This function returns the loaded version associated with the given
1760
+ * namespace `namespace_`.
1761
+ *
1762
+ * Note: The namespace must have already been loaded using a function
1763
+ * such as [method`GIRepository`.Repository.require] before calling this
1764
+ * function.
1765
+ * @param namespace_ Namespace to inspect
1766
+ * @returns Loaded version
1767
+ */
1768
+ get_version(namespace_: string): string
1769
+ /**
1770
+ * Check whether a particular namespace (and optionally, a specific
1771
+ * version thereof) is currently loaded.
1772
+ *
1773
+ * This function is likely to only be useful in unusual circumstances; in order
1774
+ * to act upon metadata in the namespace, you should call
1775
+ * [method`GIRepository`.Repository.require] instead which will ensure the
1776
+ * namespace is loaded, and return as quickly as this function will if it has
1777
+ * already been loaded.
1778
+ * @param namespace_ Namespace of interest
1779
+ * @param version Required version, may be `NULL` for latest
1780
+ * @returns `TRUE` if namespace-version is loaded, `FALSE` otherwise
1781
+ */
1782
+ is_registered(namespace_: string, version: string | null): boolean
1783
+ /**
1784
+ * Load the given `typelib` into the repository.
1785
+ * @param typelib the typelib to load
1786
+ * @param flags flags affecting the loading operation
1787
+ * @returns namespace of the loaded typelib
1788
+ */
1789
+ load_typelib(typelib: Typelib, flags: RepositoryLoadFlags): string
1790
+ /**
1791
+ * Prepends `directory` to the search path that is used to
1792
+ * search shared libraries referenced by imported namespaces.
1793
+ *
1794
+ * Multiple calls to this function all contribute to the final
1795
+ * list of paths.
1796
+ *
1797
+ * The list of paths is unique to `repository`. When a typelib is loaded by the
1798
+ * repository, the list of paths from the `repository` at that instant is used
1799
+ * by the typelib for loading its modules.
1800
+ *
1801
+ * If the library is not found in the directories configured
1802
+ * in this way, loading will fall back to the system library
1803
+ * path (i.e. `LD_LIBRARY_PATH` and `DT_RPATH` in ELF systems).
1804
+ * See the documentation of your dynamic linker for full details.
1805
+ * @param directory a single directory to scan for shared libraries
1806
+ */
1807
+ prepend_library_path(directory: string): void
1808
+ /**
1809
+ * Prepends `directory` to the typelib search path.
1810
+ *
1811
+ * See also: gi_repository_get_search_path().
1812
+ * @param directory directory name to prepend to the typelib search path
1813
+ */
1814
+ prepend_search_path(directory: string): void
1815
+ /**
1816
+ * Force the namespace `namespace_` to be loaded if it isn’t already.
1817
+ *
1818
+ * If `namespace_` is not loaded, this function will search for a
1819
+ * `.typelib` file using the repository search path. In addition, a
1820
+ * version `version` of namespace may be specified. If `version` is
1821
+ * not specified, the latest will be used.
1822
+ * @param namespace_ GI namespace to use, e.g. `Gtk`
1823
+ * @param version Version of namespace, may be `NULL` for latest
1824
+ * @param flags Set of [flags`GIRepository`.RepositoryLoadFlags], may be 0
1825
+ * @returns a pointer to the [type@GIRepository.Typelib] if successful, `NULL` otherwise
1826
+ */
1827
+ require(namespace_: string, version: string | null, flags: RepositoryLoadFlags): Typelib
1828
+ /**
1829
+ * Force the namespace `namespace_` to be loaded if it isn’t already.
1830
+ *
1831
+ * If `namespace_` is not loaded, this function will search for a
1832
+ * `.typelib` file within the private directory only. In addition, a
1833
+ * version `version` of namespace should be specified. If `version` is
1834
+ * not specified, the latest will be used.
1835
+ * @param typelib_dir Private directory where to find the requested typelib
1836
+ * @param namespace_ GI namespace to use, e.g. `Gtk`
1837
+ * @param version Version of namespace, may be `NULL` for latest
1838
+ * @param flags Set of [flags`GIRepository`.RepositoryLoadFlags], may be 0
1839
+ * @returns a pointer to the [type@GIRepository.Typelib] if successful, `NULL` otherwise
1840
+ */
1841
+ require_private(typelib_dir: string, namespace_: string, version: string | null, flags: RepositoryLoadFlags): Typelib
1842
+
1843
+ // Class property signals of GIRepository-3.0.GIRepository.Repository
1844
+
1845
+ connect(sigName: string, callback: (...args: any[]) => void): number
1846
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1847
+ emit(sigName: string, ...args: any[]): void
1848
+ disconnect(id: number): void
1849
+ }
1850
+
1851
+ /**
1852
+ * `GIRepository` is used to manage repositories of namespaces. Namespaces
1853
+ * are represented on disk by type libraries (`.typelib` files).
1854
+ *
1855
+ * The individual pieces of API within a type library are represented by
1856
+ * subclasses of [class`GIRepository`.BaseInfo]. These can be found using
1857
+ * methods like [method`GIRepository`.Repository.find_by_name] or
1858
+ * [method`GIRepository`.Repository.get_info].
1859
+ *
1860
+ * You are responsible for ensuring that the lifetime of the
1861
+ * [class`GIRepository`.Repository] exceeds that of the lifetime of any of its
1862
+ * [class`GIRepository`.BaseInfo]s. This cannot be guaranteed by using internal
1863
+ * references within libgirepository as that would affect performance.
1864
+ *
1865
+ * ### Discovery of type libraries
1866
+ *
1867
+ * `GIRepository` will typically look for a `girepository-1.0` directory
1868
+ * under the library directory used when compiling gobject-introspection. On a
1869
+ * standard Linux system this will end up being `/usr/lib/girepository-1.0`.
1870
+ *
1871
+ * It is possible to control the search paths programmatically, using
1872
+ * [method`GIRepository`.Repository.prepend_search_path]. It is also possible to
1873
+ * modify the search paths by using the `GI_TYPELIB_PATH` environment variable.
1874
+ * The environment variable takes precedence over the default search path
1875
+ * and the [method`GIRepository`.Repository.prepend_search_path] calls.
1876
+ * @class
1877
+ */
1878
+ class Repository extends GObject.Object {
1879
+
1880
+ // Own properties of GIRepository-3.0.GIRepository.Repository
1881
+
1882
+ static name: string
1883
+ static $gtype: GObject.GType<Repository>
1884
+
1885
+ // Constructors of GIRepository-3.0.GIRepository.Repository
1886
+
1887
+ constructor(config?: Repository.ConstructorProperties)
1888
+ /**
1889
+ * Create a new [class`GIRepository`.Repository].
1890
+ * @constructor
1891
+ * @returns a new [class@GIRepository.Repository]
1892
+ */
1893
+ constructor()
1894
+ /**
1895
+ * Create a new [class`GIRepository`.Repository].
1896
+ * @constructor
1897
+ * @returns a new [class@GIRepository.Repository]
1898
+ */
1899
+ static new(): Repository
1900
+ _init(config?: Repository.ConstructorProperties): void
1901
+ /**
1902
+ * Dump the introspection data from the types specified in `input_filename` to
1903
+ * `output_filename`.
1904
+ *
1905
+ * The input file should be a
1906
+ * UTF-8 Unix-line-ending text file, with each line containing either
1907
+ * `get-type:` followed by the name of a [type`GObject`.Type] `_get_type`
1908
+ * function, or `error-quark:` followed by the name of an error quark function.
1909
+ * No extra whitespace is allowed.
1910
+ *
1911
+ * This function will overwrite the contents of the output file.
1912
+ * @param input_filename Input filename (for example `input.txt`)
1913
+ * @param output_filename Output filename (for example `output.xml`)
1914
+ * @returns true on success, false on error
1915
+ */
1916
+ static dump(input_filename: string, output_filename: string): boolean
1917
+ static error_quark(): GLib.Quark
1918
+ /**
1919
+ * Obtain the option group for girepository.
1920
+ *
1921
+ * It’s used by the dumper and for programs that want to provide introspection
1922
+ * information
1923
+ * @returns the option group
1924
+ */
1925
+ static get_option_group(): GLib.OptionGroup
1926
+ }
1927
+
1928
+ interface SignalInfo {
1929
+
1930
+ // Owm methods of GIRepository-3.0.GIRepository.SignalInfo
1931
+
1932
+ /**
1933
+ * Obtain the class closure for this signal if one is set.
1934
+ *
1935
+ * The class closure is a virtual function on the type that the signal belongs
1936
+ * to. If the signal lacks a closure, `NULL` will be returned.
1937
+ * @returns the class closure, or `NULL` if none is set
1938
+ */
1939
+ get_class_closure(): VFuncInfo | null
1940
+ /**
1941
+ * Obtain the flags for this signal info.
1942
+ *
1943
+ * See [flags`GObject`.SignalFlags] for more information about possible flag
1944
+ * values.
1945
+ * @returns the flags
1946
+ */
1947
+ get_flags(): GObject.SignalFlags
1948
+ /**
1949
+ * Obtain if the returning `TRUE` in the signal handler will stop the emission
1950
+ * of the signal.
1951
+ * @returns `TRUE` if returning `TRUE` stops the signal emission
1952
+ */
1953
+ true_stops_emit(): boolean
1954
+ }
1955
+
1956
+ /**
1957
+ * `GISignalInfo` represents a signal.
1958
+ *
1959
+ * It’s a sub-struct of [class`GIRepository`.CallableInfo] and contains a set of
1960
+ * flags and a class closure.
1961
+ *
1962
+ * See [class`GIRepository`.CallableInfo] for information on how to retrieve
1963
+ * arguments and other metadata from the signal.
1964
+ * @class
1965
+ */
1966
+ class SignalInfo extends CallableInfo {
1967
+
1968
+ // Own properties of GIRepository-3.0.GIRepository.SignalInfo
1969
+
1970
+ static name: string
1971
+ }
1972
+
1973
+ interface StructInfo {
1974
+
1975
+ // Owm methods of GIRepository-3.0.GIRepository.StructInfo
1976
+
1977
+ /**
1978
+ * Obtain the type information for field named `name`.
1979
+ * @param name a field name
1980
+ * @returns The [class@GIRepository.FieldInfo], or `NULL` if not found. Free it with [method@GIRepository.BaseInfo.unref] when done.
1981
+ */
1982
+ find_field(name: string): FieldInfo | null
1983
+ /**
1984
+ * Obtain the type information for method named `name`.
1985
+ * @param name a method name
1986
+ * @returns The [class@GIRepository.FunctionInfo], or `NULL` if none was found. Free it with [method@GIRepository.BaseInfo.unref] when done.
1987
+ */
1988
+ find_method(name: string): FunctionInfo | null
1989
+ /**
1990
+ * Obtain the required alignment of the structure.
1991
+ * @returns required alignment, in bytes
1992
+ */
1993
+ get_alignment(): number
1994
+ /**
1995
+ * Retrieves the name of the copy function for `info,` if any is set.
1996
+ * @returns the name of the copy function, or `NULL` if the structure has no copy function
1997
+ */
1998
+ get_copy_function_name(): string | null
1999
+ /**
2000
+ * Obtain the type information for field with specified index.
2001
+ * @param n a field index
2002
+ * @returns The [class@GIRepository.FieldInfo]. Free it with [method@GIRepository.BaseInfo.unref] when done.
2003
+ */
2004
+ get_field(n: number): FieldInfo
2005
+ /**
2006
+ * Retrieves the name of the free function for `info,` if any is set.
2007
+ * @returns the name of the free function, or `NULL` if the structure has no free function
2008
+ */
2009
+ get_free_function_name(): string | null
2010
+ /**
2011
+ * Obtain the type information for method with specified index.
2012
+ * @param n a method index
2013
+ * @returns The [class@GIRepository.FunctionInfo]. Free it with [method@GIRepository.BaseInfo.unref] when done.
2014
+ */
2015
+ get_method(n: number): FunctionInfo
2016
+ /**
2017
+ * Obtain the number of fields this structure has.
2018
+ * @returns number of fields
2019
+ */
2020
+ get_n_fields(): number
2021
+ /**
2022
+ * Obtain the number of methods this structure has.
2023
+ * @returns number of methods
2024
+ */
2025
+ get_n_methods(): number
2026
+ /**
2027
+ * Obtain the total size of the structure.
2028
+ * @returns size of the structure, in bytes
2029
+ */
2030
+ get_size(): number
2031
+ /**
2032
+ * Gets whether the structure is foreign, i.e. if it’s expected to be overridden
2033
+ * by a native language binding instead of relying of introspected bindings.
2034
+ * @returns `TRUE` if the structure is foreign
2035
+ */
2036
+ is_foreign(): boolean
2037
+ /**
2038
+ * Return true if this structure represents the ‘class structure’ for some
2039
+ * [class`GObject`.Object] or `GInterface`.
2040
+ *
2041
+ * This function is mainly useful to hide this kind of structure from generated
2042
+ * public APIs.
2043
+ * @returns `TRUE` if this is a class struct, `FALSE` otherwise
2044
+ */
2045
+ is_gtype_struct(): boolean
2046
+ }
2047
+
2048
+ /**
2049
+ * `GIStructInfo` represents a generic C structure type.
2050
+ *
2051
+ * A structure has methods and fields.
2052
+ * @class
2053
+ */
2054
+ class StructInfo extends RegisteredTypeInfo {
2055
+
2056
+ // Own properties of GIRepository-3.0.GIRepository.StructInfo
2057
+
2058
+ static name: string
2059
+ }
2060
+
2061
+ interface TypeInfo {
2062
+
2063
+ // Owm methods of GIRepository-3.0.GIRepository.TypeInfo
2064
+
2065
+ /**
2066
+ * Convert a data pointer from a GLib data structure to a
2067
+ * [type`GIRepository`.Argument].
2068
+ *
2069
+ * GLib data structures, such as [type`GLib`.List], [type`GLib`.SList], and
2070
+ * [type`GLib`.HashTable], all store data pointers.
2071
+ *
2072
+ * In the case where the list or hash table is storing single types rather than
2073
+ * structs, these data pointers may have values stuffed into them via macros
2074
+ * such as `GPOINTER_TO_INT`.
2075
+ *
2076
+ * Use this function to ensure that all values are correctly extracted from
2077
+ * stuffed pointers, regardless of the machine’s architecture or endianness.
2078
+ *
2079
+ * This function fills in the appropriate field of `arg` with the value extracted
2080
+ * from `hash_pointer,` depending on the storage type of `info`.
2081
+ * @param hash_pointer a pointer, such as a [struct`GLib`.HashTable] data pointer
2082
+ */
2083
+ argument_from_hash_pointer(hash_pointer: any | null): /* arg */ Argument
2084
+ /**
2085
+ * Obtain the fixed array size of the type, in number of elements (not bytes).
2086
+ *
2087
+ * The type tag must be a `GI_TYPE_TAG_ARRAY` with a fixed size, or `FALSE` will
2088
+ * be returned.
2089
+ * @returns `TRUE` if the type is an array and has a fixed size
2090
+ */
2091
+ get_array_fixed_size(): [ /* returnType */ boolean, /* out_size */ number ]
2092
+ /**
2093
+ * Obtain the position of the argument which gives the array length of the type.
2094
+ *
2095
+ * The type tag must be a `GI_TYPE_TAG_ARRAY` with a length argument, or `FALSE`
2096
+ * will be returned.
2097
+ * @returns `TRUE` if the type is an array and has a length argument
2098
+ */
2099
+ get_array_length_index(): [ /* returnType */ boolean, /* out_length_index */ number ]
2100
+ /**
2101
+ * Obtain the array type for this type.
2102
+ *
2103
+ * See [enum`GIRepository`.ArrayType] for a list of possible values.
2104
+ *
2105
+ * It is an error to call this on an `info` which is not an array type. Use
2106
+ * [method`GIRepository`.TypeInfo.get_tag] to check.
2107
+ * @returns the array type
2108
+ */
2109
+ get_array_type(): ArrayType
2110
+ /**
2111
+ * For types which have `GI_TYPE_TAG_INTERFACE` such as [class`GObject`.Object]s
2112
+ * and boxed values, this function returns full information about the referenced
2113
+ * type.
2114
+ *
2115
+ * You can then inspect the type of the returned [class`GIRepository`.BaseInfo]
2116
+ * to further query whether it is a concrete [class`GObject`.Object], an
2117
+ * interface, a structure, etc., using the type checking macros like
2118
+ * [func`GIRepository`.IS_OBJECT_INFO], or raw [type`GObject`.Type]s with
2119
+ * [func`GObject`.TYPE_FROM_INSTANCE].
2120
+ * @returns The [class@GIRepository.BaseInfo], or `NULL`. Free it with gi_base_info_unref() when done.
2121
+ */
2122
+ get_interface(): BaseInfo | null
2123
+ /**
2124
+ * Obtain the parameter type `n,` or `NULL` if the type is not an array.
2125
+ * @param n index of the parameter
2126
+ * @returns the param type info, or `NULL` if the type is not an array
2127
+ */
2128
+ get_param_type(n: number): TypeInfo | null
2129
+ /**
2130
+ * Obtain the type tag corresponding to the underlying storage type in C for
2131
+ * the type.
2132
+ *
2133
+ * See [type`GIRepository`.TypeTag] for a list of type tags.
2134
+ * @returns the type tag
2135
+ */
2136
+ get_storage_type(): TypeTag
2137
+ /**
2138
+ * Obtain the type tag for the type.
2139
+ *
2140
+ * See [type`GIRepository`.TypeTag] for a list of type tags.
2141
+ * @returns the type tag
2142
+ */
2143
+ get_tag(): TypeTag
2144
+ /**
2145
+ * Convert a [type`GIRepository`.Argument] to data pointer for use in a GLib
2146
+ * data structure.
2147
+ *
2148
+ * GLib data structures, such as [type`GLib`.List], [type`GLib`.SList], and
2149
+ * [type`GLib`.HashTable], all store data pointers.
2150
+ *
2151
+ * In the case where the list or hash table is storing single types rather than
2152
+ * structs, these data pointers may have values stuffed into them via macros
2153
+ * such as `GPOINTER_TO_INT`.
2154
+ *
2155
+ * Use this function to ensure that all values are correctly stuffed into
2156
+ * pointers, regardless of the machine’s architecture or endianness.
2157
+ *
2158
+ * This function returns a pointer stuffed with the appropriate field of `arg,`
2159
+ * depending on the storage type of `info`.
2160
+ * @param arg a [struct`GIRepository`.Argument] with the value to stuff into a pointer
2161
+ * @returns A stuffed pointer, that can be stored in a [struct@GLib.HashTable], for example
2162
+ */
2163
+ hash_pointer_from_argument(arg: Argument): any | null
2164
+ /**
2165
+ * Obtain if the type is passed as a reference.
2166
+ *
2167
+ * Note that the types of `GI_DIRECTION_OUT` and `GI_DIRECTION_INOUT` parameters
2168
+ * will only be pointers if the underlying type being transferred is a pointer
2169
+ * (i.e. only if the type of the C function’s formal parameter is a pointer to a
2170
+ * pointer).
2171
+ * @returns `TRUE` if it is a pointer
2172
+ */
2173
+ is_pointer(): boolean
2174
+ /**
2175
+ * Obtain if the last element of the array is `NULL`.
2176
+ *
2177
+ * The type tag must be a `GI_TYPE_TAG_ARRAY` or `FALSE` will be returned.
2178
+ * @returns `TRUE` if zero terminated
2179
+ */
2180
+ is_zero_terminated(): boolean
2181
+ }
2182
+
2183
+ /**
2184
+ * `GITypeInfo` represents a type, including information about direction and
2185
+ * transfer.
2186
+ *
2187
+ * You can retrieve a type info from an argument (see
2188
+ * [class`GIRepository`.ArgInfo]), a function’s return value (see
2189
+ * [class`GIRepository`.FunctionInfo]), a field (see
2190
+ * [class`GIRepository`.FieldInfo]), a property (see
2191
+ * [class`GIRepository`.PropertyInfo]), a constant (see
2192
+ * [class`GIRepository`.ConstantInfo]) or for a union discriminator (see
2193
+ * [class`GIRepository`.UnionInfo]).
2194
+ *
2195
+ * A type can either be a of a basic type which is a standard C primitive
2196
+ * type or an interface type. For interface types you need to call
2197
+ * [method`GIRepository`.TypeInfo.get_interface] to get a reference to the base
2198
+ * info for that interface.
2199
+ * @class
2200
+ */
2201
+ class TypeInfo extends BaseInfo {
2202
+
2203
+ // Own properties of GIRepository-3.0.GIRepository.TypeInfo
2204
+
2205
+ static name: string
2206
+ }
2207
+
2208
+ interface UnionInfo {
2209
+
2210
+ // Owm methods of GIRepository-3.0.GIRepository.UnionInfo
2211
+
2212
+ /**
2213
+ * Obtain the type information for the method named `name`.
2214
+ * @param name a method name
2215
+ * @returns The [type@GIRepository.FunctionInfo], or `NULL` if none was found. Free it with [method@GIRepository.BaseInfo.unref] when done.
2216
+ */
2217
+ find_method(name: string): FunctionInfo | null
2218
+ /**
2219
+ * Obtain the required alignment of the union.
2220
+ * @returns required alignment, in bytes
2221
+ */
2222
+ get_alignment(): number
2223
+ /**
2224
+ * Retrieves the name of the copy function for `info,` if any is set.
2225
+ * @returns the name of the copy function, or `NULL` if none is set
2226
+ */
2227
+ get_copy_function_name(): string | null
2228
+ /**
2229
+ * Obtain the discriminator value assigned for n-th union field, i.e. the n-th
2230
+ * union field is the active one if the discriminator contains this
2231
+ * constant.
2232
+ *
2233
+ * If the union is not discriminated, `NULL` is returned.
2234
+ * @param n a union field index
2235
+ * @returns The [type@GIRepository.ConstantInfo], or `NULL` if the union is not discriminated. Free it with [method@GIRepository.BaseInfo.unref] when done.
2236
+ */
2237
+ get_discriminator(n: number): ConstantInfo | null
2238
+ /**
2239
+ * Obtain the offset of the discriminator field within the structure.
2240
+ *
2241
+ * The union must be discriminated, or `FALSE` will be returned.
2242
+ * @returns `TRUE` if the union is discriminated
2243
+ */
2244
+ get_discriminator_offset(): [ /* returnType */ boolean, /* out_offset */ number ]
2245
+ /**
2246
+ * Obtain the type information of the union discriminator.
2247
+ * @returns the [type@GIRepository.TypeInfo], or `NULL` if the union is not discriminated. Free it with [method@GIRepository.BaseInfo.unref] when done.
2248
+ */
2249
+ get_discriminator_type(): TypeInfo | null
2250
+ /**
2251
+ * Obtain the type information for the field with the specified index.
2252
+ * @param n a field index
2253
+ * @returns the [type@GIRepository.FieldInfo], free it with [method@GIRepository.BaseInfo.unref] when done.
2254
+ */
2255
+ get_field(n: number): FieldInfo
2256
+ /**
2257
+ * Retrieves the name of the free function for `info,` if any is set.
2258
+ * @returns the name of the free function, or `NULL` if none is set
2259
+ */
2260
+ get_free_function_name(): string | null
2261
+ /**
2262
+ * Obtain the type information for the method with the specified index.
2263
+ * @param n a method index
2264
+ * @returns the [type@GIRepository.FunctionInfo], free it with [method@GIRepository.BaseInfo.unref] when done.
2265
+ */
2266
+ get_method(n: number): FunctionInfo
2267
+ /**
2268
+ * Obtain the number of fields this union has.
2269
+ * @returns number of fields
2270
+ */
2271
+ get_n_fields(): number
2272
+ /**
2273
+ * Obtain the number of methods this union has.
2274
+ * @returns number of methods
2275
+ */
2276
+ get_n_methods(): number
2277
+ /**
2278
+ * Obtain the total size of the union.
2279
+ * @returns size of the union, in bytes
2280
+ */
2281
+ get_size(): number
2282
+ /**
2283
+ * Return `TRUE` if this union contains a discriminator field.
2284
+ * @returns `TRUE` if this is a discriminated union, `FALSE` otherwise
2285
+ */
2286
+ is_discriminated(): boolean
2287
+ }
2288
+
2289
+ /**
2290
+ * `GIUnionInfo` represents a union type.
2291
+ *
2292
+ * A union has methods and fields. Unions can optionally have a
2293
+ * discriminator, which is a field deciding what type of real union
2294
+ * fields is valid for specified instance.
2295
+ * @class
2296
+ */
2297
+ class UnionInfo extends RegisteredTypeInfo {
2298
+
2299
+ // Own properties of GIRepository-3.0.GIRepository.UnionInfo
2300
+
2301
+ static name: string
2302
+ }
2303
+
2304
+ interface UnresolvedInfo {
2305
+ }
2306
+
2307
+ /**
2308
+ * `GIUnresolvedInfo` represents an unresolved symbol.
2309
+ * @class
2310
+ */
2311
+ class UnresolvedInfo extends BaseInfo {
2312
+
2313
+ // Own properties of GIRepository-3.0.GIRepository.UnresolvedInfo
2314
+
2315
+ static name: string
2316
+ }
2317
+
2318
+ interface VFuncInfo {
2319
+
2320
+ // Owm methods of GIRepository-3.0.GIRepository.VFuncInfo
2321
+
2322
+ /**
2323
+ * Looks up where the implementation for `info` is inside the type struct of
2324
+ * `implementor_gtype`.
2325
+ * @param implementor_gtype [type`GObject`.Type] implementing this virtual function
2326
+ * @returns address to a function
2327
+ */
2328
+ get_address(implementor_gtype: GObject.GType): any | null
2329
+ /**
2330
+ * Obtain the flags for this virtual function info.
2331
+ *
2332
+ * See [flags`GIRepository`.VFuncInfoFlags] for more information about possible
2333
+ * flag values.
2334
+ * @returns the flags
2335
+ */
2336
+ get_flags(): VFuncInfoFlags
2337
+ /**
2338
+ * If this virtual function has an associated invoker method, this
2339
+ * method will return it. An invoker method is a C entry point.
2340
+ *
2341
+ * Not all virtuals will have invokers.
2342
+ * @returns The [type@GIRepository.FunctionInfo] or `NULL` if none is set. Free it with [method@GIRepository.BaseInfo.unref] when done.
2343
+ */
2344
+ get_invoker(): FunctionInfo | null
2345
+ /**
2346
+ * Obtain the offset of the function pointer in the class struct.
2347
+ *
2348
+ * The value `0xFFFF` indicates that the struct offset is unknown.
2349
+ * @returns the struct offset or `0xFFFF` if it’s unknown
2350
+ */
2351
+ get_offset(): number
2352
+ /**
2353
+ * Obtain the signal for the virtual function if one is set.
2354
+ *
2355
+ * The signal comes from the object or interface to which
2356
+ * this virtual function belongs.
2357
+ * @returns the signal, or `NULL` if none is set
2358
+ */
2359
+ get_signal(): SignalInfo | null
2360
+ }
2361
+
2362
+ /**
2363
+ * `GIVFuncInfo` represents a virtual function.
2364
+ *
2365
+ * A virtual function is a callable object that belongs to either a
2366
+ * [type`GIRepository`.ObjectInfo] or a [type`GIRepository`.InterfaceInfo].
2367
+ * @class
2368
+ */
2369
+ class VFuncInfo extends CallableInfo {
2370
+
2371
+ // Own properties of GIRepository-3.0.GIRepository.VFuncInfo
2372
+
2373
+ static name: string
2374
+ }
2375
+
2376
+ interface ValueInfo {
2377
+
2378
+ // Owm methods of GIRepository-3.0.GIRepository.ValueInfo
2379
+
2380
+ /**
2381
+ * Obtain the enumeration value of the `GIValueInfo`.
2382
+ * @returns the enumeration value. This will always be representable as a 32-bit signed or unsigned value. The use of `int64_t` as the return type is to allow both.
2383
+ */
2384
+ get_value(): number
2385
+ }
2386
+
2387
+ /**
2388
+ * A `GIValueInfo` represents a value in an enumeration.
2389
+ *
2390
+ * The `GIValueInfo` is fetched by calling
2391
+ * [method`GIRepository`.EnumInfo.get_value] on a [class`GIRepository`.EnumInfo].
2392
+ * @class
2393
+ */
2394
+ class ValueInfo extends BaseInfo {
2395
+
2396
+ // Own properties of GIRepository-3.0.GIRepository.ValueInfo
2397
+
2398
+ static name: string
2399
+ }
2400
+
2401
+ interface AttributeIter {
2402
+ }
2403
+
2404
+ /**
2405
+ * An opaque structure used to iterate over attributes
2406
+ * in a [class`GIRepository`.BaseInfo] struct.
2407
+ * @record
2408
+ */
2409
+ class AttributeIter {
2410
+
2411
+ // Own properties of GIRepository-3.0.GIRepository.AttributeIter
2412
+
2413
+ static name: string
2414
+ }
2415
+
2416
+ interface BaseInfoClass {
2417
+ }
2418
+
2419
+ abstract class BaseInfoClass {
2420
+
2421
+ // Own properties of GIRepository-3.0.GIRepository.BaseInfoClass
2422
+
2423
+ static name: string
2424
+ }
2425
+
2426
+ interface BaseInfoStack {
2427
+ }
2428
+
2429
+ class BaseInfoStack {
2430
+
2431
+ // Own properties of GIRepository-3.0.GIRepository.BaseInfoStack
2432
+
2433
+ static name: string
2434
+ }
2435
+
2436
+ interface RepositoryClass {
2437
+
2438
+ // Own fields of GIRepository-3.0.GIRepository.RepositoryClass
2439
+
2440
+ parent_class: GObject.ObjectClass
2441
+ }
2442
+
2443
+ abstract class RepositoryClass {
2444
+
2445
+ // Own properties of GIRepository-3.0.GIRepository.RepositoryClass
2446
+
2447
+ static name: string
2448
+ }
2449
+
2450
+ interface Typelib {
2451
+
2452
+ // Owm methods of GIRepository-3.0.GIRepository.Typelib
2453
+
2454
+ /**
2455
+ * Get the name of the namespace represented by `typelib`.
2456
+ * @returns name of the namespace represented by @typelib
2457
+ */
2458
+ get_namespace(): string
2459
+ /**
2460
+ * Increment the reference count of a [type`GIRepository`.Typelib].
2461
+ * @returns the same @typelib pointer
2462
+ */
2463
+ ref(): Typelib
2464
+ /**
2465
+ * Loads a symbol from a `GITypelib`.
2466
+ * @param symbol_name name of symbol to be loaded
2467
+ * @returns `TRUE` on success
2468
+ */
2469
+ symbol(symbol_name: string): [ /* returnType */ boolean, /* symbol */ any | null ]
2470
+ /**
2471
+ * Decrement the reference count of a [type`GIRepository`.Typelib].
2472
+ *
2473
+ * Once the reference count reaches zero, the typelib is freed.
2474
+ */
2475
+ unref(): void
2476
+ }
2477
+
2478
+ /**
2479
+ * `GITypelib` represents a loaded `.typelib` file, which contains a description
2480
+ * of a single module’s API.
2481
+ * @record
2482
+ */
2483
+ class Typelib {
2484
+
2485
+ // Own properties of GIRepository-3.0.GIRepository.Typelib
2486
+
2487
+ static name: string
2488
+
2489
+ // Constructors of GIRepository-3.0.GIRepository.Typelib
2490
+
2491
+ /**
2492
+ * Creates a new [type`GIRepository`.Typelib] from a [type`GLib`.Bytes].
2493
+ *
2494
+ * The [type`GLib`.Bytes] can point to a memory location or a mapped file, and
2495
+ * the typelib will hold a reference to it until the repository is destroyed.
2496
+ * @constructor
2497
+ * @param bytes memory chunk containing the typelib
2498
+ * @returns the new [type@GIRepository.Typelib]
2499
+ */
2500
+ static new_from_bytes(bytes: GLib.Bytes): Typelib
2501
+ }
2502
+
2503
+ interface Argument {
2504
+
2505
+ // Own fields of GIRepository-3.0.GIRepository.Argument
2506
+
2507
+ /**
2508
+ * boolean value
2509
+ * @field
2510
+ */
2511
+ v_boolean: boolean
2512
+ /**
2513
+ * 8-bit signed integer value
2514
+ * @field
2515
+ */
2516
+ v_int8: number
2517
+ /**
2518
+ * 8-bit unsigned integer value
2519
+ * @field
2520
+ */
2521
+ v_uint8: number
2522
+ /**
2523
+ * 16-bit signed integer value
2524
+ * @field
2525
+ */
2526
+ v_int16: number
2527
+ /**
2528
+ * 16-bit unsigned integer value
2529
+ * @field
2530
+ */
2531
+ v_uint16: number
2532
+ /**
2533
+ * 32-bit signed integer value
2534
+ * @field
2535
+ */
2536
+ v_int32: number
2537
+ /**
2538
+ * 32-bit unsigned integer value
2539
+ * @field
2540
+ */
2541
+ v_uint32: number
2542
+ /**
2543
+ * 64-bit signed integer value
2544
+ * @field
2545
+ */
2546
+ v_int64: number
2547
+ /**
2548
+ * 64-bit unsigned integer value
2549
+ * @field
2550
+ */
2551
+ v_uint64: number
2552
+ /**
2553
+ * single float value
2554
+ * @field
2555
+ */
2556
+ v_float: number
2557
+ /**
2558
+ * double float value
2559
+ * @field
2560
+ */
2561
+ v_double: number
2562
+ /**
2563
+ * signed short integer value
2564
+ * @field
2565
+ */
2566
+ v_short: number
2567
+ /**
2568
+ * unsigned short integer value
2569
+ * @field
2570
+ */
2571
+ v_ushort: number
2572
+ /**
2573
+ * signed integer value
2574
+ * @field
2575
+ */
2576
+ v_int: number
2577
+ /**
2578
+ * unsigned integer value
2579
+ * @field
2580
+ */
2581
+ v_uint: number
2582
+ /**
2583
+ * signed long integer value
2584
+ * @field
2585
+ */
2586
+ v_long: number
2587
+ /**
2588
+ * unsigned long integer value
2589
+ * @field
2590
+ */
2591
+ v_ulong: number
2592
+ /**
2593
+ * sized `size_t` value
2594
+ * @field
2595
+ */
2596
+ v_ssize: number
2597
+ /**
2598
+ * unsigned `size_t` value
2599
+ * @field
2600
+ */
2601
+ v_size: number
2602
+ /**
2603
+ * nul-terminated string value
2604
+ * @field
2605
+ */
2606
+ v_string: string | null
2607
+ /**
2608
+ * arbitrary pointer value
2609
+ * @field
2610
+ */
2611
+ v_pointer: any
2612
+ }
2613
+
2614
+ /**
2615
+ * Stores an argument of varying type.
2616
+ * @union
2617
+ */
2618
+ class Argument {
2619
+
2620
+ // Own properties of GIRepository-3.0.GIRepository.Argument
2621
+
2622
+ static name: string
2623
+ }
2624
+
2625
+ /**
2626
+ * Name of the imported GIR library
2627
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
2628
+ */
2629
+ const __name__: string
2630
+ /**
2631
+ * Version of the imported GIR library
2632
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
2633
+ */
2634
+ const __version__: string
2635
+ }
2636
+
2637
+ export default GIRepository;
2638
+ // END