-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGIRepository-2.0.d.ts
2490 lines (2435 loc) · 83.4 KB
/
GIRepository-2.0.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */
declare namespace imports.gi.GIRepository {
/** This construct is only for enabling class multi-inheritance,
* use {@link Repository} instead.
*/
interface IRepository {
/**
* Obtain an unordered list of versions (either currently loaded or
* available) for #namespace_ in this #repository.
* @param namespace_ GI namespace, e.g. "Gtk"
* @returns the array of versions.
*/
enumerate_versions(namespace_: string): string[];
/**
* Searches for the enum type corresponding to the given #GError
* domain. Before calling this function for a particular namespace,
* you must call {@link G.irepository_require} once to load the namespace, or
* otherwise ensure the namespace has already been loaded.
* @param domain a #GError domain
* @returns #GIEnumInfo representing metadata about #domain's
* enum type, or %NULL
*/
find_by_error_domain(domain: GLib.Quark): EnumInfo;
/**
* Searches all loaded namespaces for a particular #GType. Note that
* in order to locate the metadata, the namespace corresponding to
* the type must first have been loaded. There is currently no
* mechanism for determining the namespace which corresponds to an
* arbitrary GType - thus, this function will operate most reliably
* when you know the GType to originate from be from a loaded namespace.
* @param gtype GType to search for
* @returns #GIBaseInfo representing metadata about #type, or %NULL
*/
find_by_gtype(gtype: GObject.Type): BaseInfo;
/**
* Searches for a particular entry in a namespace. Before calling
* this function for a particular namespace, you must call
* {@link G.irepository_require} once to load the namespace, or otherwise
* ensure the namespace has already been loaded.
* @param namespace_ Namespace which will be searched
* @param name Entry name to find
* @returns #GIBaseInfo representing metadata about #name, or %NULL
*/
find_by_name(namespace_: string, name: string): BaseInfo;
/**
* This function returns the "C prefix", or the C level namespace
* associated with the given introspection namespace. Each C symbol
* starts with this prefix, as well each #GType in the library.
*
* Note: The namespace must have already been loaded using a function
* such as {@link G.irepository_require} before calling this function.
* @param namespace_ Namespace to inspect
* @returns C namespace prefix, or %NULL if none associated
*/
get_c_prefix(namespace_: string): string;
/**
* Retrieves all (transitive) versioned dependencies for
* #namespace_.
*
* The strings are of the form `namespace-version`.
*
* Note: #namespace_ must have already been loaded using a function
* such as {@link G.irepository_require} before calling this function.
*
* To get only the immediate dependencies for #namespace_, use
* g_irepository_get_immediate_dependencies().
* @param namespace_ Namespace of interest
* @returns all versioned
* dependencies
*/
get_dependencies(namespace_: string): string[];
/**
* Return an array of the immediate versioned dependencies for #namespace_.
* Returned strings are of the form `namespace-version`.
*
* Note: #namespace_ must have already been loaded using a function
* such as {@link G.irepository_require} before calling this function.
*
* To get the transitive closure of dependencies for #namespace_, use
* g_irepository_get_dependencies().
* @param namespace_ Namespace of interest
* @returns Zero-terminated string array of immediate versioned
* dependencies
*/
get_immediate_dependencies(namespace_: string): string[];
/**
* This function returns a particular metadata entry in the
* given namespace #namespace_. The namespace must have
* already been loaded before calling this function.
* See {@link G.irepository_get_n_infos} to find the maximum number of
* entries.
* @param namespace_ Namespace to inspect
* @param index 0-based offset into namespace metadata for entry
* @returns #GIBaseInfo containing metadata
*/
get_info(namespace_: string, index: number): BaseInfo;
/**
* Return the list of currently loaded namespaces.
* @returns List of namespaces
*/
get_loaded_namespaces(): string[];
/**
* This function returns the number of metadata entries in
* given namespace #namespace_. The namespace must have
* already been loaded before calling this function.
* @param namespace_ Namespace to inspect
* @returns number of metadata entries
*/
get_n_infos(namespace_: string): number;
/**
* Look up the implemented interfaces for #gtype. This function
* cannot fail per se; but for a totally "unknown" #GType, it may
* return 0 implemented interfaces.
*
* The semantics of this function are designed for a dynamic binding,
* where in certain cases (such as a function which returns an
* interface which may have "hidden" implementation classes), not all
* data may be statically known, and will have to be determined from
* the #GType of the object. An example is {@link G.file_new_for_path}
* returning a concrete class of #GLocalFile, which is a #GType we
* see at runtime, but not statically.
* @param gtype a #GType whose fundamental type is G_TYPE_OBJECT
* @returns Interfaces for #gtype
*/
get_object_gtype_interfaces(gtype: GObject.Type): InterfaceInfo[];
/**
* This function returns a comma-separated list of paths to the
* shared C libraries associated with the given namespace #namespace_.
* There may be no shared library path associated, in which case this
* function will return %NULL.
*
* Note: The namespace must have already been loaded using a function
* such as {@link G.irepository_require} before calling this function.
* @param namespace_ Namespace to inspect
* @returns Comma-separated list of paths to shared libraries,
* or %NULL if none are associated
*/
get_shared_library(namespace_: string): string | null;
/**
* If namespace #namespace_ is loaded, return the full path to the
* .typelib file it was loaded from. If the typelib for
* namespace #namespace_ was included in a shared library, return
* the special string "<builtin>".
* @param namespace_ GI namespace to use, e.g. "Gtk"
* @returns Filesystem path (or $lt;builtin$gt;) if successful, %NULL if namespace is not loaded
*/
get_typelib_path(namespace_: string): string;
/**
* This function returns the loaded version associated with the given
* namespace #namespace_.
*
* Note: The namespace must have already been loaded using a function
* such as {@link G.irepository_require} before calling this function.
* @param namespace_ Namespace to inspect
* @returns Loaded version
*/
get_version(namespace_: string): string;
/**
* Check whether a particular namespace (and optionally, a specific
* version thereof) is currently loaded. This function is likely to
* only be useful in unusual circumstances; in order to act upon
* metadata in the namespace, you should call {@link G.irepository_require}
* instead which will ensure the namespace is loaded, and return as
* quickly as this function will if it has already been loaded.
* @param namespace_ Namespace of interest
* @param version Required version, may be %NULL for latest
* @returns %TRUE if namespace-version is loaded, %FALSE otherwise
*/
is_registered(namespace_: string, version?: string | null): boolean;
/**
* TODO
* @param typelib TODO
* @param flags TODO
* @returns
*/
load_typelib(typelib: Typelib, flags: RepositoryLoadFlags): string;
/**
* Force the namespace #namespace_ to be loaded if it isn't already.
* If #namespace_ is not loaded, this function will search for a
* ".typelib" file using the repository search path. In addition, a
* version #version of namespace may be specified. If #version is
* not specified, the latest will be used.
* @param namespace_ GI namespace to use, e.g. "Gtk"
* @param version Version of namespace, may be %NULL for latest
* @param flags Set of %GIRepositoryLoadFlags, may be 0
* @returns a pointer to the #GITypelib if successful, %NULL otherwise
*/
require(namespace_: string, version: string | null, flags: RepositoryLoadFlags): Typelib;
/**
* Force the namespace #namespace_ to be loaded if it isn't already.
* If #namespace_ is not loaded, this function will search for a
* ".typelib" file within the private directory only. In addition, a
* version #version of namespace should be specified. If #version is
* not specified, the latest will be used.
* @param typelib_dir Private directory where to find the requested typelib
* @param namespace_ GI namespace to use, e.g. "Gtk"
* @param version Version of namespace, may be %NULL for latest
* @param flags Set of %GIRepositoryLoadFlags, may be 0
* @returns a pointer to the #GITypelib if successful, %NULL otherwise
*/
require_private(typelib_dir: string, namespace_: string, version: string | null, flags: RepositoryLoadFlags): Typelib;
}
type RepositoryInitOptionsMixin = GObject.ObjectInitOptions
export interface RepositoryInitOptions extends RepositoryInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Repository} instead.
*/
type RepositoryMixin = IRepository & GObject.Object;
/**
* #GIRepository is used to manage repositories of namespaces. Namespaces
* are represented on disk by type libraries (.typelib files).
*
* ### Discovery of type libraries
*
* #GIRepository will typically look for a `girepository-1.0` directory
* under the library directory used when compiling gobject-introspection.
*
* It is possible to control the search paths programmatically, using
* {@link G.irepository_prepend_search_path}. It is also possible to modify
* the search paths by using the `GI_TYPELIB_PATH` environment variable.
* The environment variable takes precedence over the default search path
* and the g_irepository_prepend_search_path() calls.
*/
interface Repository extends RepositoryMixin {}
class Repository {
public constructor(options?: Partial<RepositoryInitOptions>);
public static dump(arg: string): boolean;
public static error_quark(): GLib.Quark;
/**
* Returns the singleton process-global default #GIRepository. It is
* not currently supported to have multiple repositories in a
* particular process, but this function is provided in the unlikely
* eventuality that it would become possible, and as a convenience for
* higher level language bindings to conform to the GObject method
* call conventions.
*
* All methods on #GIRepository also accept %NULL as an instance
* parameter to mean this default repository, which is usually more
* convenient for C.
* @returns The global singleton #GIRepository
*/
public static get_default(): Repository;
/**
* Obtain the option group for girepository, it's used
* by the dumper and for programs that wants to provide
* introspection information
* @returns the option group
*/
public static get_option_group(): GLib.OptionGroup;
/**
* Returns the current search path #GIRepository will use when loading
* typelib files. The list is internal to #GIRepository and should not
* be freed, nor should its string elements.
* @returns #GSList of strings
*/
public static get_search_path(): string[];
public static prepend_library_path(directory: string): void;
/**
* Prepends #directory to the typelib search path.
*
* See also: {@link G.irepository_get_search_path}.
* @param directory directory name to prepend to the typelib
* search path
*/
public static prepend_search_path(directory: string): void;
}
export interface AttributeIterInitOptions {}
/**
* An opaque structure used to iterate over attributes
* in a #GIBaseInfo struct.
*/
interface AttributeIter {}
class AttributeIter {
public constructor(options?: Partial<AttributeIterInitOptions>);
public readonly data: any;
public readonly data2: any;
public readonly data3: any;
public readonly data4: any;
}
export interface BaseInfoInitOptions {}
/**
* GIBaseInfo is the common base struct of all other Info structs
* accessible through the #GIRepository API.
*
* All info structures can be cast to a #GIBaseInfo, for instance:
*
* |[<!-- language="C" -->
* GIFunctionInfo *function_info = ...;
* GIBaseInfo *info = (GIBaseInfo *) function_info;
* ]|
*
* Most #GIRepository APIs returning a #GIBaseInfo is actually
* creating a new struct; in other words, {@link G.base_info_unref} has to
* be called when done accessing the data.
*
* #GIBaseInfo structuress are normally accessed by calling either
* g_irepository_find_by_name(), g_irepository_find_by_gtype() or
* g_irepository_get_info().
*
* |[<!-- language="C" -->
* GIBaseInfo *button_info =
* g_irepository_find_by_name (NULL, "Gtk", "Button");
*
* // ... use button_info ...
*
* g_base_info_unref (button_info);
* ]|
*
* ## Hierarchy
*
* |[<!-- language="plain" -->
* GIBaseInfo
* +---- GIArgInfo
* +---- GICallableInfo
* +---- GIConstantInfo
* +---- GIFieldInfo
* +---- GIPropertyInfo
* +---- GIRegisteredTypeInfo
* +---- GITypeInfo
* ]|
*/
interface BaseInfo {}
class BaseInfo {
public constructor(options?: Partial<BaseInfoInitOptions>);
public readonly dummy1: number;
public readonly dummy2: number;
public readonly dummy3: any;
public readonly dummy4: any;
public readonly dummy5: any;
public readonly dummy6: number;
public readonly dummy7: number;
public readonly padding: any[];
/**
* Compare two #GIBaseInfo.
*
* Using pointer comparison is not practical since many functions return
* different instances of #GIBaseInfo that refers to the same part of the
* TypeLib; use this function instead to do #GIBaseInfo comparisons.
* @param info2 a #GIBaseInfo
* @returns %TRUE if and only if #info1 equals #info2.
*/
public equal(info2: BaseInfo): boolean;
/**
* Retrieve an arbitrary attribute associated with this node.
* @param name a freeform string naming an attribute
* @returns The value of the attribute, or %NULL if no such attribute exists
*/
public get_attribute(name: string): string;
/**
* Obtain the container of the #info. The container is the parent
* GIBaseInfo. For instance, the parent of a #GIFunctionInfo is an
* #GIObjectInfo or #GIInterfaceInfo.
* @returns the container
*/
public get_container(): BaseInfo;
/**
* Obtain the name of the #info. What the name represents depends on
* the #GIInfoType of the #info. For instance for #GIFunctionInfo it is
* the name of the function.
* @returns the name of #info or %NULL if it lacks a name.
*/
public get_name(): string;
/**
* Obtain the namespace of #info.
* @returns the namespace
*/
public get_namespace(): string;
/**
* Obtain the info type of the GIBaseInfo.
* @returns the info type of #info
*/
public get_type(): InfoType;
/**
* Obtain the typelib this #info belongs to
* @returns the typelib.
*/
public get_typelib(): Typelib;
/**
* Obtain whether the #info is represents a metadata which is
* deprecated or not.
* @returns %TRUE if deprecated
*/
public is_deprecated(): boolean;
/**
* Iterate over all attributes associated with this node. The iterator
* structure is typically stack allocated, and must have its first
* member initialized to %NULL. Attributes are arbitrary namespaced key–value
* pairs which can be attached to almost any item. They are intended for use
* by software higher in the toolchain than bindings, and are distinct from
* normal GIR annotations.
*
* Both the #name and #value should be treated as constants
* and must not be freed.
*
* |[<!-- language="C" -->
* void
* print_attributes (GIBaseInfo *info)
* {
* GIAttributeIter iter = { 0, };
* char *name;
* char *value;
* while (g_base_info_iterate_attributes (info, &iter, &name, &value))
* {
* g_print ("attribute name: %s value: %s", name, value);
* }
* }
* ]|
* @returns %TRUE if there are more attributes
*
* Returned name, must not be freed
*
* Returned name, must not be freed
*/
public iterate_attributes(): [ boolean, string, string ];
/**
* Increases the reference count of #info.
* @returns the same #info.
*/
public ref(): BaseInfo;
/**
* Decreases the reference count of #info. When its reference count
* drops to 0, the info is freed.
*/
public unref(): void;
}
export interface TypelibInitOptions {}
/**
* TODO
*/
interface Typelib {}
class Typelib {
public constructor(options?: Partial<TypelibInitOptions>);
public static new_from_const_memory(memory: number, len: number): Typelib;
public static new_from_mapped_file(mfile: GLib.MappedFile): Typelib;
public static new_from_memory(memory: number, len: number): Typelib;
public free(): void;
public get_namespace(): string;
public symbol(symbol_name: string, symbol?: any | null): boolean;
}
export interface UnresolvedInfoInitOptions {}
/**
* Represents a unresolved type in a typelib.
*/
interface UnresolvedInfo {}
class UnresolvedInfo {
public constructor(options?: Partial<UnresolvedInfoInitOptions>);
}
/**
* The type of array in a #GITypeInfo.
*/
enum ArrayType {
/**
* a C array, char[] for instance
*/
C = 0,
/**
* a #GArray array
*/
ARRAY = 1,
/**
* a #GPtrArray array
*/
PTR_ARRAY = 2,
/**
* a #GByteArray array
*/
BYTE_ARRAY = 3
}
/**
* The direction of a #GIArgInfo.
*/
enum Direction {
/**
* in argument.
*/
IN = 0,
/**
* out argument.
*/
OUT = 1,
/**
* in and out argument.
*/
INOUT = 2
}
/**
* The type of a GIBaseInfo struct.
*/
enum InfoType {
/**
* invalid type
*/
INVALID = 0,
/**
* function, see #GIFunctionInfo
*/
FUNCTION = 1,
/**
* callback, see #GIFunctionInfo
*/
CALLBACK = 2,
/**
* struct, see #GIStructInfo
*/
STRUCT = 3,
/**
* boxed, see #GIStructInfo or #GIUnionInfo
*/
BOXED = 4,
/**
* enum, see #GIEnumInfo
*/
ENUM = 5,
/**
* flags, see #GIEnumInfo
*/
FLAGS = 6,
/**
* object, see #GIObjectInfo
*/
OBJECT = 7,
/**
* interface, see #GIInterfaceInfo
*/
INTERFACE = 8,
/**
* contant, see #GIConstantInfo
*/
CONSTANT = 9,
/**
* deleted, used to be GI_INFO_TYPE_ERROR_DOMAIN.
*/
INVALID_0 = 10,
/**
* union, see #GIUnionInfo
*/
UNION = 11,
/**
* enum value, see #GIValueInfo
*/
VALUE = 12,
/**
* signal, see #GISignalInfo
*/
SIGNAL = 13,
/**
* virtual function, see #GIVFuncInfo
*/
VFUNC = 14,
/**
* GObject property, see #GIPropertyInfo
*/
PROPERTY = 15,
/**
* struct or union field, see #GIFieldInfo
*/
FIELD = 16,
/**
* argument of a function or callback, see #GIArgInfo
*/
ARG = 17,
/**
* type information, see #GITypeInfo
*/
TYPE = 18,
/**
* unresolved type, a type which is not present in
* the typelib, or any of its dependencies.
*/
UNRESOLVED = 19
}
/**
* An error code used with #G_IREPOSITORY_ERROR in a #GError returned
* from a #GIRepository routine.
*/
enum RepositoryError {
/**
* the typelib could not be found.
*/
TYPELIB_NOT_FOUND = 0,
/**
* the namespace does not match the
* requested namespace.
*/
NAMESPACE_MISMATCH = 1,
/**
* the version of the
* typelib does not match the requested version.
*/
NAMESPACE_VERSION_CONFLICT = 2,
/**
* the library used by the typelib
* could not be found.
*/
LIBRARY_NOT_FOUND = 3
}
/**
* Scope type of a #GIArgInfo representing callback, determines how the
* callback is invoked and is used to decided when the invoke structs
* can be freed.
*/
enum ScopeType {
/**
* The argument is not of callback type.
*/
INVALID = 0,
/**
* The callback and associated user_data is only
* used during the call to this function.
*/
CALL = 1,
/**
* The callback and associated user_data is
* only used until the callback is invoked, and the callback.
* is invoked always exactly once.
*/
ASYNC = 2,
/**
* The callback and associated
* user_data is used until the caller is notfied via the destroy_notify.
*/
NOTIFIED = 3,
/**
* The callback and associated user_data is
* used until the process terminates
*/
FOREVER = 4
}
/**
* The transfer is the exchange of data between two parts, from the callee to
* the caller. The callee is either a function/method/signal or an
* object/interface where a property is defined. The caller is the side
* accessing a property or calling a function.
* #GITransfer specifies who's responsible for freeing the resources after the
* ownership transfer is complete. In case of a containing type such as a list,
* an array or a hash table the container itself is specified differently from
* the items within the container itself. Each container is freed differently,
* check the documentation for the types themselves for information on how to
* free them.
*/
enum Transfer {
/**
* transfer nothing from the callee (function or the type
* instance the property belongs to) to the caller. The callee retains the
* ownership of the transfer and the caller doesn't need to do anything to free
* up the resources of this transfer.
*/
NOTHING = 0,
/**
* transfer the container (list, array, hash table) from
* the callee to the caller. The callee retains the ownership of the individual
* items in the container and the caller has to free up the container resources
* {@link (g.list_free/g_hash_table_destroy()} etc) of this transfer.
*/
CONTAINER = 1,
/**
* transfer everything, eg the container and its
* contents from the callee to the caller. This is the case when the callee
* creates a copy of all the data it returns. The caller is responsible for
* cleaning up the container and item resources of this transfer.
*/
EVERYTHING = 2
}
/**
* The type tag of a #GITypeInfo.
*/
enum TypeTag {
/**
* void
*/
VOID = 0,
/**
* boolean
*/
BOOLEAN = 1,
/**
* 8-bit signed integer
*/
INT8 = 2,
/**
* 8-bit unsigned integer
*/
UINT8 = 3,
/**
* 16-bit signed integer
*/
INT16 = 4,
/**
* 16-bit unsigned integer
*/
UINT16 = 5,
/**
* 32-bit signed integer
*/
INT32 = 6,
/**
* 32-bit unsigned integer
*/
UINT32 = 7,
/**
* 64-bit signed integer
*/
INT64 = 8,
/**
* 64-bit unsigned integer
*/
UINT64 = 9,
/**
* float
*/
FLOAT = 10,
/**
* double floating point
*/
DOUBLE = 11,
/**
* a #GType
*/
GTYPE = 12,
/**
* a UTF-8 encoded string
*/
UTF8 = 13,
/**
* a filename, encoded in the same encoding
* as the native filesystem is using.
*/
FILENAME = 14,
/**
* an array
*/
ARRAY = 15,
/**
* an extended interface object
*/
INTERFACE = 16,
/**
* a #GList
*/
GLIST = 17,
/**
* a #GSList
*/
GSLIST = 18,
/**
* a #GHashTable
*/
GHASH = 19,
/**
* a #GError
*/
ERROR = 20,
/**
* Unicode character
*/
UNICHAR = 21
}
/**
* An error occuring while invoking a function via
* {@link G.function_info_invoke}.
*/
enum nvokeError {
/**
* invokation failed, unknown error.
*/
FAILED = 0,
/**
* symbol couldn't be found in any of the
* libraries associated with the typelib of the function.
*/
SYMBOL_NOT_FOUND = 1,
/**
* the arguments provided didn't match
* the expected arguments for the functions type signature.
*/
ARGUMENT_MISMATCH = 2
}
/**
* Flags for a #GIFieldInfo.
*/
enum FieldInfoFlags {
/**
* field is readable.
*/
READABLE = 1,
/**
* field is writable.
*/
WRITABLE = 2
}
/**
* Flags for a #GIFunctionInfo struct.
*/
enum FunctionInfoFlags {
/**
* is a method.
*/
IS_METHOD = 1,
/**
* is a constructor.
*/
IS_CONSTRUCTOR = 2,
/**
* is a getter of a #GIPropertyInfo.
*/
IS_GETTER = 4,
/**
* is a setter of a #GIPropertyInfo.
*/
IS_SETTER = 8,
/**
* represents a virtual function.
*/
WRAPS_VFUNC = 16,
/**
* the function may throw an error.
*/
THROWS = 32
}
/**
* Flags that control how a typelib is loaded.
*/
enum RepositoryLoadFlags {
/**
* Lazily load the typelib.
*/
IREPOSITORY_LOAD_FLAG_LAZY = 1
}
/**
* Flags of a #GIVFuncInfo struct.
*/
enum VFuncInfoFlags {
/**
* chains up to the parent type
*/
MUST_CHAIN_UP = 1,
/**
* overrides
*/
MUST_OVERRIDE = 2,
/**
* does not override
*/
MUST_NOT_OVERRIDE = 4,
/**
* Includes a #GError
*/
THROWS = 8
}
/**
* Extract an object instance out of #value
*/
interface ObjectInfoGetValueFunction {
/**
* Extract an object instance out of #value
* @param value a #GValue
* @returns the object instance
*/
(value: GObject.Value): any | null;
}
/**
* Increases the reference count of an object instance.
*/
interface ObjectInfoRefFunction {
/**
* Increases the reference count of an object instance.
* @param object object instance pointer
* @returns the object instance
*/
(object?: any | null): any | null;
}
/**
* Update #value and attach the object instance pointer #object to it.
*/
interface ObjectInfoSetValueFunction {
/**
* Update #value and attach the object instance pointer #object to it.
* @param value a #GValue
* @param object object instance pointer
*/
(value: GObject.Value, object?: any | null): void;
}
/**
* Decreases the reference count of an object instance.
*/
interface ObjectInfoUnrefFunction {
/**
* Decreases the reference count of an object instance.
* @param object object instance pointer
*/
(object?: any | null): void;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Argument} instead.
*/
interface IArgument {
/**
* TODO
*/
v_boolean: boolean;
/**
* TODO
*/
v_int8: number;
/**
* TODO
*/
v_uint8: number;
/**
* TODO
*/
v_int16: number;
/**
* TODO
*/
v_uint16: number;
/**
* TODO
*/
v_int32: number;
/**
* TODO
*/
v_uint32: number;
/**
* TODO
*/
v_int64: number;
/**
* TODO
*/
v_uint64: number;
/**
* TODO
*/
v_float: number;
/**
* TODO
*/
v_double: number;
/**
* TODO
*/
v_short: number;
/**
* TODO
*/
v_ushort: number;
/**
* TODO
*/
v_int: number;
/**
* TODO
*/
v_uint: number;
/**
* TODO
*/
v_long: number;
/**
* TODO
*/
v_ulong: number;
/**
* TODO
*/
v_ssize: number;
/**
* TODO
*/
v_size: number;
/**
* TODO
*/