@gi.ts/parser 4.0.0-beta.25 → 4.0.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -23
- package/src/gir-types.ts +900 -0
- package/src/index.ts +2 -0
- package/src/parser.ts +118 -0
- package/dist/lib.d.ts +0 -2
- package/dist/lib.js +0 -2
- package/dist/parser.d.ts +0 -2
- package/dist/parser.js +0 -66
- package/dist/xml.d.ts +0 -442
- package/dist/xml.js +0 -13
package/src/gir-types.ts
ADDED
|
@@ -0,0 +1,900 @@
|
|
|
1
|
+
// GIR Types - Complete definitions for GObject Introspection repository types
|
|
2
|
+
// Written based on https://gitlab.gnome.org/GNOME/gobject-introspection/-/blob/0c414e34113fca089a67eb1beadfcdce722a89db/docs/gir-1.2.rnc
|
|
3
|
+
|
|
4
|
+
// Most grammar has been modified to *prefer* potentially being undefined
|
|
5
|
+
// as we're parsing from XML files which may or may not contain all parts
|
|
6
|
+
// of this grammar
|
|
7
|
+
|
|
8
|
+
// Many keys are prefixed with `glib:` in XML, this grammar preserves that syntax.
|
|
9
|
+
|
|
10
|
+
// ========================================
|
|
11
|
+
// ENUMS AND BASIC TYPES
|
|
12
|
+
// ========================================
|
|
13
|
+
|
|
14
|
+
export enum ResolveType {
|
|
15
|
+
DEPENDENCE,
|
|
16
|
+
BY_HAND,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export enum GirDirection {
|
|
20
|
+
In = "in",
|
|
21
|
+
Inout = "inout",
|
|
22
|
+
Out = "out",
|
|
23
|
+
/** @deprecated */
|
|
24
|
+
InOut = "in-out",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum GirTransferOwnershipType {
|
|
28
|
+
Container = "container",
|
|
29
|
+
Full = "full",
|
|
30
|
+
None = "none",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** A type alias for 'binary' (boolean) fields */
|
|
34
|
+
export type GirBoolean = "0" | "1";
|
|
35
|
+
|
|
36
|
+
// ========================================
|
|
37
|
+
// BASE INTERFACES AND MIXINS
|
|
38
|
+
// ========================================
|
|
39
|
+
|
|
40
|
+
export interface GirXML {
|
|
41
|
+
repository: GirRepository[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface GirInfoAttrs {
|
|
45
|
+
/** Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code */
|
|
46
|
+
introspectable?: GirBoolean;
|
|
47
|
+
/** Binary attribute which is "1" (true) if the element has been deprecated */
|
|
48
|
+
deprecated?: GirBoolean;
|
|
49
|
+
/** Version number from which this element is deprecated */
|
|
50
|
+
"deprecated-version"?: string;
|
|
51
|
+
/** version number of an element */
|
|
52
|
+
version?: string;
|
|
53
|
+
/** give the stability status of the element. Can take the values "Stable", "Unstable" or "Private" */
|
|
54
|
+
stability?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface GirDocElement {
|
|
58
|
+
/** Version of the documentation */
|
|
59
|
+
"doc-version"?: [
|
|
60
|
+
{
|
|
61
|
+
$: {
|
|
62
|
+
/** Preserve the original formatting of the documentation from the source code */
|
|
63
|
+
"xml:space"?: "preserve";
|
|
64
|
+
/** Preserve the original formatting of the documentation from the source code. Recommended to use this instead of xml:space */
|
|
65
|
+
"xml:whitespace"?: "preserve";
|
|
66
|
+
};
|
|
67
|
+
/** the text of the version of the documentation */
|
|
68
|
+
_: string;
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
/** give the stability of the documentation */
|
|
72
|
+
"doc-stability"?: [
|
|
73
|
+
{
|
|
74
|
+
$: {
|
|
75
|
+
/** Preserve the original formatting of the documentation from the source code */
|
|
76
|
+
"xml:space"?: "preserve";
|
|
77
|
+
/** Preserve the original formatting of the documentation from the source code. Recommended to use this instead of xml:space */
|
|
78
|
+
"xml:whitespace"?: "preserve";
|
|
79
|
+
};
|
|
80
|
+
/** a text value about the stability of the documentation. Usually a simple description like stable or unstable */
|
|
81
|
+
_: string;
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
/** documentation of an element */
|
|
85
|
+
doc?: [
|
|
86
|
+
{
|
|
87
|
+
$: {
|
|
88
|
+
/** Preserve the original formatting of the documentation from the source code */
|
|
89
|
+
"xml:space"?: "preserve";
|
|
90
|
+
/** Keep the whitespace as they were in the source code */
|
|
91
|
+
"xml:whitespace"?: "preserve";
|
|
92
|
+
/** The file containing this documentation */
|
|
93
|
+
filename: string;
|
|
94
|
+
/** The first line of the documentation in the source code */
|
|
95
|
+
line: string;
|
|
96
|
+
/** The first column of the documentation in the source code */
|
|
97
|
+
column?: string;
|
|
98
|
+
};
|
|
99
|
+
/** the text of the documentation */
|
|
100
|
+
_: string;
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
/** Deprecated documentation of an element. Kept for historical reasons in general */
|
|
104
|
+
"doc-deprecated"?: [
|
|
105
|
+
{
|
|
106
|
+
$: {
|
|
107
|
+
/** Preserve the original formatting of the documentation from the source code */
|
|
108
|
+
"xml:space"?: "preserve";
|
|
109
|
+
/** Keep the whitespace as they were in the source code */
|
|
110
|
+
"xml:whitespace"?: "preserve";
|
|
111
|
+
};
|
|
112
|
+
/** the text of the deprecated documentation */
|
|
113
|
+
_: string;
|
|
114
|
+
},
|
|
115
|
+
];
|
|
116
|
+
/** Position of the documentation in the original source code */
|
|
117
|
+
"source-position"?: [
|
|
118
|
+
{
|
|
119
|
+
$: {
|
|
120
|
+
/** File name of the source of the documentation */
|
|
121
|
+
filename: string;
|
|
122
|
+
/** The first line of the documentation in the source code */
|
|
123
|
+
line: string;
|
|
124
|
+
/** The first column of the documentation in the source code */
|
|
125
|
+
column?: string;
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface GirInfoElements extends GirDocElement {
|
|
132
|
+
/** Annotations from the source code (note: XML element name is 'attribute', not 'annotation') */
|
|
133
|
+
attribute?: GirAnnotation[];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface GirTransferOwnership {
|
|
137
|
+
/** attributes used by many elements for the transfer of ownership, with for example, a returned value.
|
|
138
|
+
* - "none" if the recipient does not own the value,
|
|
139
|
+
* - "container" if the recipient owns the container but not the value (for arrays or lists for example),
|
|
140
|
+
* - "full" the recipient owns the entire value.
|
|
141
|
+
* For details, see https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations#Memory_and_lifecycle_management */
|
|
142
|
+
"transfer-ownership": GirTransferOwnershipType;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface GirCallableAttrs {
|
|
146
|
+
/** name of the Callable */
|
|
147
|
+
name: string;
|
|
148
|
+
/** C identifier in the source code of the Callable */
|
|
149
|
+
"c:identifier"?: string;
|
|
150
|
+
/** Callable it is shadowed by. For example, in C++, only one version of an overloaded callable will appear */
|
|
151
|
+
"shadowed-by"?: string;
|
|
152
|
+
/** Callable it shadows. For example, in C++, only one version of an overloaded callable will appear */
|
|
153
|
+
shadows?: string;
|
|
154
|
+
/** Binary attribute, true if the callable can throw an error */
|
|
155
|
+
throws?: GirBoolean;
|
|
156
|
+
/** if for backward compatibility reason the callable has a name in the source code but should be known by another one, this attribute contains the new name */
|
|
157
|
+
"moved-to"?: string;
|
|
158
|
+
/** The name of the asynchronous version of this callable */
|
|
159
|
+
"glib:async-func"?: string;
|
|
160
|
+
/** The name of the synchronous version of this callable */
|
|
161
|
+
"glib:sync-func"?: string;
|
|
162
|
+
/** The name of the callable which finishes the asynchronous operation of this function */
|
|
163
|
+
"glib:finish-func"?: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface GirAnyType {
|
|
167
|
+
type?: GirType[];
|
|
168
|
+
array?: GirArrayType[];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ========================================
|
|
172
|
+
// RUNTIME CONTEXT MIXINS
|
|
173
|
+
// ========================================
|
|
174
|
+
|
|
175
|
+
export interface GirModule {
|
|
176
|
+
// Forward declaration - matches the lib GirModule class structure
|
|
177
|
+
namespace: string;
|
|
178
|
+
version: string;
|
|
179
|
+
packageName: string;
|
|
180
|
+
importNamespace: string;
|
|
181
|
+
importName: string;
|
|
182
|
+
importPath: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Runtime context for elements that belong to a module.
|
|
187
|
+
* Added during processing to track module relationships.
|
|
188
|
+
*/
|
|
189
|
+
export interface PartOfModule {
|
|
190
|
+
/** Reference to the module containing this element */
|
|
191
|
+
_module?: GirModule;
|
|
192
|
+
/** Full symbol name including namespace, e.g. 'GObject.Object' */
|
|
193
|
+
_fullSymName?: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Runtime context for elements that belong to a class.
|
|
198
|
+
* Extends PartOfModule with class-specific context.
|
|
199
|
+
*/
|
|
200
|
+
export interface PartOfClass extends PartOfModule {
|
|
201
|
+
/** The class/union/interface/record this element is defined in */
|
|
202
|
+
_class?: GirClassElement | GirUnionElement | GirInterfaceElement | GirRecordElement;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// ========================================
|
|
206
|
+
// BASIC STRUCTURAL ELEMENTS
|
|
207
|
+
// ========================================
|
|
208
|
+
|
|
209
|
+
export interface GirCInclude {
|
|
210
|
+
/** Dependant C header file which should be included in C programs */
|
|
211
|
+
$: {
|
|
212
|
+
/** File name of the C header file. The path can be relative. */
|
|
213
|
+
name: string;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface GirInclude {
|
|
218
|
+
/** Dependant namespace to include with the current namespace. For example, Gtk will need the namespace GLib */
|
|
219
|
+
$: {
|
|
220
|
+
/** name of the dependant namespace to include */
|
|
221
|
+
name: string;
|
|
222
|
+
/** version of the dependant namespace to use */
|
|
223
|
+
version?: string;
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface GirPackage {
|
|
228
|
+
/** The pkg-config file provided by the library */
|
|
229
|
+
$: {
|
|
230
|
+
/** name of the pkg-config file, minus the extension */
|
|
231
|
+
name: string;
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface GirDocFormat {
|
|
236
|
+
/** Format used for the included documentation */
|
|
237
|
+
$: {
|
|
238
|
+
/** Name of the documentation format. Valid values are: gi-docgen, gtk-doc-docbook, gtk-doc-markdown, hotdoc, unknown */
|
|
239
|
+
name: string;
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface GirAnnotation {
|
|
244
|
+
/** element defining an annotation from the source code, usually a user-defined annotation associated to a parameter or a return value */
|
|
245
|
+
$: {
|
|
246
|
+
/** name of the attribute */
|
|
247
|
+
name: string;
|
|
248
|
+
/** value of the attribute */
|
|
249
|
+
value: string;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface GirImplements {
|
|
254
|
+
/** Give the name of the interface it implements. This element is generally used within a class element */
|
|
255
|
+
$: GirInfoAttrs & {
|
|
256
|
+
/** name of the interface implemented by a class */
|
|
257
|
+
name: string;
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface GirPrerequisite {
|
|
262
|
+
/** Interface which is pre-required to implement another interface */
|
|
263
|
+
$: {
|
|
264
|
+
/** name of the required interface */
|
|
265
|
+
name: string;
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export interface GirVarArgs {
|
|
270
|
+
/** an element, usually found in a parameter element for variadic parameter in a function or callable */
|
|
271
|
+
$: GirInfoAttrs;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// ========================================
|
|
275
|
+
// TYPE SYSTEM
|
|
276
|
+
// ========================================
|
|
277
|
+
|
|
278
|
+
export interface GirType extends GirDocElement {
|
|
279
|
+
/** A simple type of data (as opposed to an array) */
|
|
280
|
+
$: GirInfoAttrs & {
|
|
281
|
+
/** name of the type */
|
|
282
|
+
name?: string;
|
|
283
|
+
/** the C representation of the type */
|
|
284
|
+
"c:type"?: string;
|
|
285
|
+
/** Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code */
|
|
286
|
+
introspectable?: GirBoolean;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
array?: GirArrayType[];
|
|
290
|
+
type?: GirType[];
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface GirArrayType {
|
|
294
|
+
/** An array type of data where each element is of the same type */
|
|
295
|
+
$: GirInfoAttrs & {
|
|
296
|
+
/** name of the array type */
|
|
297
|
+
name?: string;
|
|
298
|
+
/** Binary attribute, true if the last element of the array is zero. For example, in an array of pointers, the last pointer would be NULL */
|
|
299
|
+
"zero-terminated"?: GirBoolean;
|
|
300
|
+
/** size of an array of predetermined fixed size. For example a C array declared as char arr[5]. */
|
|
301
|
+
"fixed-size"?: number;
|
|
302
|
+
/** Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code */
|
|
303
|
+
introspectable?: GirBoolean;
|
|
304
|
+
/** 0-based index of parameter element that specifies the length of the array */
|
|
305
|
+
length?: number;
|
|
306
|
+
/** the C representation of the array type */
|
|
307
|
+
"c:type"?: string;
|
|
308
|
+
};
|
|
309
|
+
array?: GirArrayType[];
|
|
310
|
+
type?: GirType[];
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// ========================================
|
|
314
|
+
// CALLABLE ELEMENTS
|
|
315
|
+
// ========================================
|
|
316
|
+
|
|
317
|
+
export interface GirCallableParamElement extends PartOfClass, GirDocElement, GirAnyType {
|
|
318
|
+
/** parameter element of a list of parameters */
|
|
319
|
+
$: GirInfoAttrs &
|
|
320
|
+
Partial<GirTransferOwnership> & {
|
|
321
|
+
/** name of the parameter */
|
|
322
|
+
name?: string;
|
|
323
|
+
/** Binary attribute, `true` if the parameter can have a null value */
|
|
324
|
+
nullable?: GirBoolean;
|
|
325
|
+
/** @deprecated Replaced by nullable and optional */
|
|
326
|
+
"allow-none"?: GirBoolean;
|
|
327
|
+
/** Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code */
|
|
328
|
+
introspectable?: GirBoolean;
|
|
329
|
+
/** the parameter is a user_data for callbacks. The value points to a different parameter that is the actual callback */
|
|
330
|
+
closure?: number;
|
|
331
|
+
/** the parameter is a destroy_data for callbacks. The value points to a different parameter that is the actual callback */
|
|
332
|
+
destroy?: number;
|
|
333
|
+
/** the parameter is a callback, the value indicates the lifetime of the call. For language bindings which want to know when the resources required to do the call can be freed. "notified" valid until a GDestroyNotify argument is called, "async" only valid for the duration of the first callback invocation (can only be called once), "call" only valid for the duration of the call, can be called multiple times during the call, "forever" valid until the process terminates. */
|
|
334
|
+
scope?: "notified" | "async" | "call" | "forever";
|
|
335
|
+
/** direction of the parameter. "in" goes into the callable, "out" for output parameters from the callable (reference in C++, var in Pascal, etc...), "inout" for both (like a pre-allocated structure which will be filled-in by the callable) */
|
|
336
|
+
direction?: GirDirection;
|
|
337
|
+
/** Binary attribute, `true` if the caller should allocate the parameter before calling the callable */
|
|
338
|
+
"caller-allocates"?: GirBoolean;
|
|
339
|
+
/** Binary attribute, `true` if the parameter is optional */
|
|
340
|
+
optional?: GirBoolean;
|
|
341
|
+
/** Binary attribute, `true` if the parameter can be omitted from the introspected output */
|
|
342
|
+
skip?: GirBoolean;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
varargs?: GirVarArgs[];
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export interface GirCallableParams {
|
|
349
|
+
/** parameters element of a callable, that is in general parameters of a function or similar */
|
|
350
|
+
parameter?: GirCallableParamElement[];
|
|
351
|
+
/** instance-parameter is a parameter of a C function which is an instance of an existing object. So the callable is surely a method of a class, and this parameter points to the instance of the object. In C++, this would be equivalent to the pointer this which is not passed to the method, in Python it's equivalent to self. */
|
|
352
|
+
"instance-parameter"?: GirInstanceParameter[];
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* instance-parameter is a parameter of a C function which is an instance of an existing object.
|
|
357
|
+
* So the callable is surely a method of a class, and this parameter points to the instance of the object.
|
|
358
|
+
* In C++, this would be equivalent to the pointer this which is not passed to the method, in Python it's equivalent to self.
|
|
359
|
+
**/
|
|
360
|
+
export interface GirInstanceParameter extends GirAnyType, GirDocElement {
|
|
361
|
+
$: {
|
|
362
|
+
/** name of the instance-parameter */
|
|
363
|
+
name: string;
|
|
364
|
+
/** Binary attribute, true if the parameter can have a null value */
|
|
365
|
+
nullable?: GirBoolean;
|
|
366
|
+
/** @deprecated Replaced by nullable and optional */
|
|
367
|
+
"allow-none"?: GirBoolean;
|
|
368
|
+
/** direction of the parameter. "in" goes into the callable, "out" for output parameters from the callable (reference in C++, var in Pascal, etc...), "inout" for both (like a pre-allocated structure which will be filled-in by the callable) */
|
|
369
|
+
direction?: GirDirection;
|
|
370
|
+
/** Binary attribute, true if the caller should allocate the parameter before calling the callable */
|
|
371
|
+
"caller-allocates"?: GirBoolean;
|
|
372
|
+
} & Partial<GirTransferOwnership>;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface GirCallableReturn extends PartOfClass, GirAnyType, GirDocElement {
|
|
376
|
+
/** return value of a callable */
|
|
377
|
+
$: {
|
|
378
|
+
/** Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code */
|
|
379
|
+
introspectable?: GirBoolean;
|
|
380
|
+
/** Binary attribute, true if the parameter can have a null value */
|
|
381
|
+
nullable?: GirBoolean;
|
|
382
|
+
/** the parameter is a user_data for callbacks. The value points to a different parameter that is the actual callback */
|
|
383
|
+
closure?: number;
|
|
384
|
+
/** the parameter is a callback, the value indicates the lifetime of the call. For language bindings which want to know when the resources required to do the call can be freed. "notified" valid until a GDestroyNotify argument is called, "async" only valid for the duration of the first callback invocation (can only be called once), "call" only valid for the duration of the call, can be called multiple times during the call, "forever" valid until the process terminates. */
|
|
385
|
+
scope?: "notified" | "async" | "call" | "forever";
|
|
386
|
+
/** the parameter is a destroy_data for callbacks. The value points to a different parameter that is the actual callback */
|
|
387
|
+
destroy?: number;
|
|
388
|
+
/** Binary attribute, true if the parameter can be omitted from the introspected output */
|
|
389
|
+
skip?: GirBoolean;
|
|
390
|
+
/** @deprecated Replaced by nullable and optional */
|
|
391
|
+
"allow-none"?: GirBoolean;
|
|
392
|
+
} & Partial<GirTransferOwnership>;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// ========================================
|
|
396
|
+
// REPOSITORY AND NAMESPACE
|
|
397
|
+
// ========================================
|
|
398
|
+
|
|
399
|
+
/** Root node of a GIR repository. It contains namespaces, which can in turn be implemented in several libraries */
|
|
400
|
+
export interface GirRepository {
|
|
401
|
+
$: {
|
|
402
|
+
/** version number of the repository */
|
|
403
|
+
version?: string;
|
|
404
|
+
/** prefixes to filter out from C identifiers for data structures and types. For example, GtkWindow will be Window. If c:symbol-prefixes is not used, then this element is used for both */
|
|
405
|
+
"c:identifier-prefixes"?: string;
|
|
406
|
+
/** prefixes to filter out from C functions. For example, gtk_window_new will lose gtk_ */
|
|
407
|
+
"c:symbol-prefixes"?: string;
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
/* Other elements a repository can contain */
|
|
411
|
+
include?: GirInclude[];
|
|
412
|
+
"c:include"?: GirCInclude[];
|
|
413
|
+
package?: GirPackage[];
|
|
414
|
+
namespace?: GirNamespace[];
|
|
415
|
+
"doc:format"?: GirDocFormat[];
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/** Namespace which maps metadata entries to C functionality. This a similar concept to namespace in C++, but for GObject-based C libraries */
|
|
419
|
+
export interface GirNamespace {
|
|
420
|
+
$: GirInfoAttrs & {
|
|
421
|
+
/** name of the namespace. For example, 'Gtk' */
|
|
422
|
+
name: string;
|
|
423
|
+
/** version number of the namespace */
|
|
424
|
+
version: string;
|
|
425
|
+
/** prefixes to filter out from C identifiers for data structures and types. For example, GtkWindow will be Window. If c:symbol-prefixes is not used, then this element is used for both */
|
|
426
|
+
"c:identifier-prefixes"?: string;
|
|
427
|
+
/** prefixes to filter out from C functions. For example, gtk_window_new will lose gtk_ */
|
|
428
|
+
"c:symbol-prefixes"?: string;
|
|
429
|
+
/** @deprecated the same as c:identifier-prefixes. Only used for backward compatibility */
|
|
430
|
+
"c:prefix"?: string;
|
|
431
|
+
/** Path to the shared library implementing the namespace. It can be a comma-separated list, with relative path only */
|
|
432
|
+
"shared-library"?: string;
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
/* Other elements a namespace can contain */
|
|
436
|
+
alias?: GirAliasElement[];
|
|
437
|
+
class?: GirClassElement[];
|
|
438
|
+
interface?: GirInterfaceElement[];
|
|
439
|
+
record?: GirRecordElement[];
|
|
440
|
+
enumeration?: GirEnumElement[];
|
|
441
|
+
function?: GirFunctionElement[];
|
|
442
|
+
"function-inline"?: GirFunctionInlineElement[];
|
|
443
|
+
"function-macro"?: GirFunctionMacroElement[];
|
|
444
|
+
union?: GirUnionElement[];
|
|
445
|
+
bitfield?: GirBitfieldElement[];
|
|
446
|
+
callback?: GirCallbackElement[];
|
|
447
|
+
constant?: GirConstantElement[];
|
|
448
|
+
annotation?: GirAnnotation[];
|
|
449
|
+
"glib:boxed"?: GirBoxedElement[];
|
|
450
|
+
docsection?: GirDocSectionElement[];
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// ========================================
|
|
454
|
+
// CLASS AND INTERFACE ELEMENTS
|
|
455
|
+
// ========================================
|
|
456
|
+
|
|
457
|
+
/** GObject inherited class definition */
|
|
458
|
+
export interface GirClassElement extends PartOfModule, GirInfoElements {
|
|
459
|
+
$: GirInfoAttrs & {
|
|
460
|
+
/** Name of the class */
|
|
461
|
+
name: string;
|
|
462
|
+
/** GObject compatible type name of the class */
|
|
463
|
+
"glib:type-name": string;
|
|
464
|
+
/** Function to get the GObject compatible type of the class */
|
|
465
|
+
"glib:get-type": string;
|
|
466
|
+
/** Name of the parent class if any */
|
|
467
|
+
parent?: string;
|
|
468
|
+
/** GObject compatible C structure defining the class */
|
|
469
|
+
"glib:type-struct"?: string;
|
|
470
|
+
/** GObject compatible function to reference or increase the reference count of the class */
|
|
471
|
+
"glib:ref-func"?: string;
|
|
472
|
+
/** GObject compatible function to unreference or decrease the reference count of the class */
|
|
473
|
+
"glib:unref-func"?: string;
|
|
474
|
+
/** GObject compatible function to set a value of a property of the class */
|
|
475
|
+
"glib:set-value-func"?: string;
|
|
476
|
+
/** GObject compatible function to get a value of a property of the class */
|
|
477
|
+
"glib:get-value-func"?: string;
|
|
478
|
+
/** C type of the class */
|
|
479
|
+
"c:type"?: string;
|
|
480
|
+
/** prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ */
|
|
481
|
+
"c:symbol-prefix"?: string;
|
|
482
|
+
/** Binary attribute to declare the class abstract or not */
|
|
483
|
+
abstract?: GirBoolean;
|
|
484
|
+
/** Binary attribute to declare the class fundamental or not (top-level class which do not derives from any other type) */
|
|
485
|
+
"glib:fundamental"?: GirBoolean;
|
|
486
|
+
/** Binary attribute to declare the class final or not (non-derivable class in a derivable hierarchy) */
|
|
487
|
+
final?: GirBoolean;
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
/* Other elements a class can contain */
|
|
491
|
+
implements?: GirImplements[];
|
|
492
|
+
constructor?: GirConstructorElement[];
|
|
493
|
+
method?: GirMethodElement[];
|
|
494
|
+
"method-inline"?: GirMethodInlineElement[];
|
|
495
|
+
function?: GirFunctionElement[];
|
|
496
|
+
"function-inline"?: GirFunctionInlineElement[];
|
|
497
|
+
"virtual-method"?: GirVirtualMethodElement[];
|
|
498
|
+
field?: GirFieldElement[];
|
|
499
|
+
property?: GirPropertyElement[];
|
|
500
|
+
signal?: GirSignalElement[];
|
|
501
|
+
"glib:signal"?: GirSignalElement[];
|
|
502
|
+
union?: GirUnionElement[];
|
|
503
|
+
constant?: GirConstantElement[];
|
|
504
|
+
record?: GirRecordElement[];
|
|
505
|
+
callback?: GirCallbackElement[];
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/** Abstract interface to other classes */
|
|
509
|
+
export interface GirInterfaceElement extends PartOfModule, GirInfoElements {
|
|
510
|
+
$: GirInfoAttrs & {
|
|
511
|
+
/** name of the interface */
|
|
512
|
+
name: string;
|
|
513
|
+
/** Type name compatible with the GObject type system */
|
|
514
|
+
"glib:type-name": string;
|
|
515
|
+
/** Function to get the GObject compatible type of the interface */
|
|
516
|
+
"glib:get-type": string;
|
|
517
|
+
/** prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ */
|
|
518
|
+
"c:symbol-prefix"?: string;
|
|
519
|
+
/** Corresponding C type */
|
|
520
|
+
"c:type"?: string;
|
|
521
|
+
/** GObject compatible C structure defining the Interface */
|
|
522
|
+
"glib:type-struct"?: string;
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
//Other elements an interface can contain
|
|
526
|
+
prerequisite?: GirPrerequisite[];
|
|
527
|
+
implements?: GirImplements[];
|
|
528
|
+
function?: GirFunctionElement[];
|
|
529
|
+
"function-inline"?: GirFunctionInlineElement[];
|
|
530
|
+
constructor?: GirConstructorElement[];
|
|
531
|
+
method?: GirMethodElement[];
|
|
532
|
+
"method-inline"?: GirMethodInlineElement[];
|
|
533
|
+
"virtual-method"?: GirVirtualMethodElement[];
|
|
534
|
+
field?: GirFieldElement[];
|
|
535
|
+
property?: GirPropertyElement[];
|
|
536
|
+
signal?: GirSignalElement[];
|
|
537
|
+
"glib:signal"?: GirSignalElement[];
|
|
538
|
+
callback?: GirCallbackElement[];
|
|
539
|
+
constant?: GirConstantElement[];
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// ========================================
|
|
543
|
+
// STRUCTURAL ELEMENTS
|
|
544
|
+
// ========================================
|
|
545
|
+
|
|
546
|
+
/** Record definition, equivalent to a C struct, that is a simple structure, not a class */
|
|
547
|
+
export interface GirRecordElement extends PartOfModule, GirInfoElements {
|
|
548
|
+
$: GirInfoAttrs & {
|
|
549
|
+
/** name of the record */
|
|
550
|
+
name: string;
|
|
551
|
+
/** Corresponding C type of the record */
|
|
552
|
+
"c:type"?: string;
|
|
553
|
+
/**
|
|
554
|
+
* @deprecated
|
|
555
|
+
*
|
|
556
|
+
* Binary attribute to tell if the record is disguised, i.e. whether the c:type
|
|
557
|
+
* is a typedef that doesn't look like a pointer, but is one internally. Its second meaning
|
|
558
|
+
* is "private" and is set when any typedef struct is parsed which doesn't also include a
|
|
559
|
+
* full struct with fields (https://gitlab.gnome.org/GNOME/gobject-introspection/issues/101)
|
|
560
|
+
* Replaced by "opaque" and "pointer".
|
|
561
|
+
*/
|
|
562
|
+
disguised?: GirBoolean;
|
|
563
|
+
/** Binary attribute for a typedef struct that does not have a corresponding public structure definition */
|
|
564
|
+
opaque?: GirBoolean;
|
|
565
|
+
/** Binary attribute for a typedef struct pointer, e.g. typedef struct Foo* FooPtr */
|
|
566
|
+
pointer?: GirBoolean;
|
|
567
|
+
/** GObject compatible C type of the record */
|
|
568
|
+
"glib:type-name"?: string;
|
|
569
|
+
/** Function to get the GObject compatible type of the record */
|
|
570
|
+
"glib:get-type"?: string;
|
|
571
|
+
/** prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ */
|
|
572
|
+
"c:symbol-prefix"?: string;
|
|
573
|
+
/** Binary attribute to tell if the record is foreign, that is it is not available in a g-i supported library */
|
|
574
|
+
foreign?: GirBoolean;
|
|
575
|
+
/** Name of the GObject compatible gtype this record represents. If empty, this record will be hidden from generated public APIs. */
|
|
576
|
+
"glib:is-gtype-struct-for"?: string;
|
|
577
|
+
/** Name of the function used to copy the record */
|
|
578
|
+
"copy-function"?: string;
|
|
579
|
+
/** Name of the function used to free the record */
|
|
580
|
+
"free-function"?: string;
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
/* Other elements a record can contain */
|
|
584
|
+
field?: GirFieldElement[];
|
|
585
|
+
function?: GirFunctionElement[];
|
|
586
|
+
"function-inline"?: GirFunctionInlineElement[];
|
|
587
|
+
union?: GirUnionElement[];
|
|
588
|
+
method?: GirMethodElement[];
|
|
589
|
+
"method-inline"?: GirMethodInlineElement[];
|
|
590
|
+
constructor?: GirConstructorElement[];
|
|
591
|
+
property?: GirPropertyElement[];
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/** element defining a type of data being a union of type, similar to union in C/C++ but extended with fields and methods */
|
|
595
|
+
export interface GirUnionElement extends PartOfModule, GirInfoElements {
|
|
596
|
+
$: GirInfoAttrs & {
|
|
597
|
+
/** name of the union */
|
|
598
|
+
name?: string;
|
|
599
|
+
/** C type defining the union */
|
|
600
|
+
"c:type"?: string;
|
|
601
|
+
/** prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ */
|
|
602
|
+
"c:symbol-prefix"?: string;
|
|
603
|
+
/** GObject compatible type name */
|
|
604
|
+
"glib:type-name"?: string;
|
|
605
|
+
/** function to retrieve the GObject compatible type of the element */
|
|
606
|
+
"glib:get-type"?: string;
|
|
607
|
+
/** Name of the function used to copy the union */
|
|
608
|
+
"copy-function"?: string;
|
|
609
|
+
/** Name of the function used to free the union */
|
|
610
|
+
"free-function"?: string;
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
field?: GirFieldElement[];
|
|
614
|
+
constructor?: GirConstructorElement[];
|
|
615
|
+
method?: GirMethodElement[];
|
|
616
|
+
"method-inline"?: GirMethodInlineElement[];
|
|
617
|
+
function?: GirFunctionElement[];
|
|
618
|
+
"function-inline"?: GirFunctionInlineElement[];
|
|
619
|
+
record?: GirRecordElement[];
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/** Boxed type (wrapper to opaque C structures registered by the type system) */
|
|
623
|
+
export interface GirBoxedElement {
|
|
624
|
+
$: GirInfoAttrs & {
|
|
625
|
+
/** GObject compatible type name of the boxed type */
|
|
626
|
+
"glib:name": string;
|
|
627
|
+
/** prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ */
|
|
628
|
+
"c:symbol-prefix"?: string;
|
|
629
|
+
/** GObject compatible type name of the boxed type */
|
|
630
|
+
"glib:type-name"?: string;
|
|
631
|
+
/** Function to get the GObject compatible type of the boxed type */
|
|
632
|
+
"glib:get-type"?: string;
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
/* Other elements a Boxed type can contain */
|
|
636
|
+
function?: GirFunctionElement[];
|
|
637
|
+
"function-inline"?: GirFunctionInlineElement[];
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// ========================================
|
|
641
|
+
// DATA ELEMENTS
|
|
642
|
+
// ========================================
|
|
643
|
+
|
|
644
|
+
/** Type's name substitution, representing a typedef in C */
|
|
645
|
+
export interface GirAliasElement extends PartOfClass, GirInfoElements {
|
|
646
|
+
$: GirInfoAttrs & {
|
|
647
|
+
/** the new name or typedef'd name */
|
|
648
|
+
name: string;
|
|
649
|
+
/** the corresponding C type's name */
|
|
650
|
+
"c:type"?: string;
|
|
651
|
+
};
|
|
652
|
+
/** Other elements an alias can contain */
|
|
653
|
+
type?: GirType[];
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/** A constant entity, similar to const variable in C */
|
|
657
|
+
export interface GirConstantElement extends PartOfModule, GirInfoElements, GirAnyType {
|
|
658
|
+
$: GirInfoAttrs & {
|
|
659
|
+
/** name of the constant */
|
|
660
|
+
name: string;
|
|
661
|
+
/** value of the constant */
|
|
662
|
+
value: string;
|
|
663
|
+
/** corresponding C type of the constant in C */
|
|
664
|
+
"c:type"?: string;
|
|
665
|
+
/** corresponding C identifier in the source code */
|
|
666
|
+
"c:identifier"?: string;
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/** Property, that is a variable or members with getter and setter functions */
|
|
671
|
+
export interface GirPropertyElement extends PartOfClass, GirInfoElements, GirAnyType {
|
|
672
|
+
$: GirInfoAttrs & {
|
|
673
|
+
/** name of the property */
|
|
674
|
+
name: string;
|
|
675
|
+
/** Binary attribute, true if the property is writeable, that is it has a setter function */
|
|
676
|
+
writable?: GirBoolean;
|
|
677
|
+
/** Binary attribute, true if the property is readable, that is it has a getter function */
|
|
678
|
+
readable?: GirBoolean;
|
|
679
|
+
/** Binary attribute, true if the property will be set upon construction */
|
|
680
|
+
construct?: GirBoolean;
|
|
681
|
+
/** Binary attribute, true if the property can only be set upon construction */
|
|
682
|
+
"construct-only"?: GirBoolean;
|
|
683
|
+
/** The setter function for this property */
|
|
684
|
+
setter?: string;
|
|
685
|
+
/** The getter function for this property */
|
|
686
|
+
getter?: string;
|
|
687
|
+
/** The default value of the property, as a string; if missing, the default value is zero for integer types, and null for pointer types */
|
|
688
|
+
"default-value"?: string;
|
|
689
|
+
} & Partial<GirTransferOwnership>;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/** A field of struct of union structure, that is a C bit field, that is a fixed length in bits variable */
|
|
693
|
+
export interface GirFieldElement extends PartOfClass, GirInfoElements, GirAnyType {
|
|
694
|
+
$: GirInfoAttrs & {
|
|
695
|
+
/** name of the field */
|
|
696
|
+
name: string;
|
|
697
|
+
/** Binary attribute, true if the field is writeable */
|
|
698
|
+
writable?: GirBoolean;
|
|
699
|
+
/** Binary attribute, true if the field is readable */
|
|
700
|
+
readable?: GirBoolean;
|
|
701
|
+
/** Binary attribute, true if the field is private to the structure or has public ("0") visibility */
|
|
702
|
+
private?: GirBoolean;
|
|
703
|
+
/** number of bits of the field */
|
|
704
|
+
bits?: number;
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
/* Other elements a property can contain */
|
|
708
|
+
callback?: GirCallbackElement[];
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
// ========================================
|
|
712
|
+
// ENUM AND BITFIELD ELEMENTS
|
|
713
|
+
// ========================================
|
|
714
|
+
|
|
715
|
+
/** element defining a enumeration type similar to enum in C/C++ */
|
|
716
|
+
export interface GirEnumElement extends PartOfModule, GirInfoElements {
|
|
717
|
+
$: GirInfoAttrs & {
|
|
718
|
+
/** name of the enumeration */
|
|
719
|
+
name: string;
|
|
720
|
+
/** corresponding C type of the enumeration type */
|
|
721
|
+
"c:type": string;
|
|
722
|
+
/** GObject compatible type name */
|
|
723
|
+
"glib:type-name"?: string;
|
|
724
|
+
/** function to retrieve the GObject compatible type of the element */
|
|
725
|
+
"glib:get-type"?: string;
|
|
726
|
+
/** Error domain of this enumeration in a stringified form */
|
|
727
|
+
"glib:error-domain"?: string;
|
|
728
|
+
};
|
|
729
|
+
member?: GirMemberElement[];
|
|
730
|
+
function?: GirFunctionElement[];
|
|
731
|
+
"function-inline"?: GirFunctionInlineElement[];
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/** element defining a bit field (as in C) */
|
|
735
|
+
export interface GirBitfieldElement extends PartOfModule, GirInfoElements {
|
|
736
|
+
$: GirInfoAttrs & {
|
|
737
|
+
/** name of the bit field */
|
|
738
|
+
name: string;
|
|
739
|
+
/** corresponding C type of the bit field type */
|
|
740
|
+
"c:type": string;
|
|
741
|
+
/** GObject compatible type name */
|
|
742
|
+
"glib:type-name"?: string;
|
|
743
|
+
/** function to retrieve the GObject compatible type of the element */
|
|
744
|
+
"glib:get-type"?: string;
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
member?: GirMemberElement[];
|
|
748
|
+
function?: GirFunctionElement[];
|
|
749
|
+
"function-inline"?: GirFunctionInlineElement[];
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/** element defining a member of a bit field or an enumeration */
|
|
753
|
+
export interface GirMemberElement extends GirInfoElements {
|
|
754
|
+
$: GirInfoAttrs & {
|
|
755
|
+
/** name of the member */
|
|
756
|
+
name: string;
|
|
757
|
+
/** value of the member */
|
|
758
|
+
value: string;
|
|
759
|
+
/** corresponding C type of the member */
|
|
760
|
+
"c:identifier": string;
|
|
761
|
+
/** short nickname of the member (from GEnumValue/GFlagsValue) */
|
|
762
|
+
"glib:nick"?: string;
|
|
763
|
+
/** name of the member (from GEnumValue/GFlagsValue) */
|
|
764
|
+
"glib:name"?: string;
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
// ========================================
|
|
769
|
+
// FUNCTION AND METHOD ELEMENTS
|
|
770
|
+
// ========================================
|
|
771
|
+
|
|
772
|
+
/** element defining a standalone function (as usual in most programming languages) */
|
|
773
|
+
export interface GirFunctionElement extends PartOfClass, GirDocElement {
|
|
774
|
+
$: GirInfoAttrs & GirCallableAttrs;
|
|
775
|
+
|
|
776
|
+
parameters?: [GirCallableParams];
|
|
777
|
+
"return-value"?: GirCallableReturn[];
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/** element defining an inline function */
|
|
781
|
+
export interface GirFunctionInlineElement extends PartOfClass, GirDocElement {
|
|
782
|
+
$: GirInfoAttrs & GirCallableAttrs;
|
|
783
|
+
|
|
784
|
+
parameters?: [GirCallableParams];
|
|
785
|
+
"return-value"?: GirCallableReturn[];
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/** element defining a pre-processor macro that behaves like a function. Unlike functions, function macros do not have a return value. */
|
|
789
|
+
export interface GirFunctionMacroElement extends PartOfClass, GirInfoElements {
|
|
790
|
+
$: GirInfoAttrs & GirCallableAttrs;
|
|
791
|
+
|
|
792
|
+
parameters?: [GirCallableParams];
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
/** element defining a method from a class */
|
|
796
|
+
export interface GirMethodElement extends PartOfClass, GirDocElement {
|
|
797
|
+
$: GirInfoAttrs &
|
|
798
|
+
GirCallableAttrs & {
|
|
799
|
+
/** The GObject property that is set by this method */
|
|
800
|
+
"glib:set-property"?: string;
|
|
801
|
+
/** The GObject property that is retrieved by this method */
|
|
802
|
+
"glib:get-property"?: string;
|
|
803
|
+
};
|
|
804
|
+
|
|
805
|
+
parameters?: [GirCallableParams];
|
|
806
|
+
"return-value"?: GirCallableReturn[];
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/** element defining an inline method from a type */
|
|
810
|
+
export interface GirMethodInlineElement extends PartOfClass, GirInfoElements {
|
|
811
|
+
$: GirInfoAttrs & GirCallableAttrs;
|
|
812
|
+
|
|
813
|
+
parameters?: [GirCallableParams];
|
|
814
|
+
"return-value"?: GirCallableReturn[];
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export interface GirVirtualMethodElement extends PartOfClass, GirDocElement {
|
|
818
|
+
$: GirInfoAttrs &
|
|
819
|
+
GirCallableAttrs & {
|
|
820
|
+
/** name of the callable called when invoking this virtual method */
|
|
821
|
+
invoker?: string;
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
parameters?: [GirCallableParams];
|
|
825
|
+
"return-value"?: GirCallableReturn[];
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/** A constructor of a class */
|
|
829
|
+
export interface GirConstructorElement extends PartOfClass {
|
|
830
|
+
$: GirInfoAttrs & GirCallableAttrs;
|
|
831
|
+
|
|
832
|
+
parameters?: [GirCallableParams];
|
|
833
|
+
"return-value"?: GirCallableReturn[];
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/** A callback closure, that is a function called when a signal is emitted (as an answer to that signal) */
|
|
837
|
+
export interface GirCallbackElement extends PartOfModule, GirInfoElements {
|
|
838
|
+
$: GirInfoAttrs & {
|
|
839
|
+
/** name of the callback */
|
|
840
|
+
name: string;
|
|
841
|
+
/** the C type returned by the callback closure (i.e. function) */
|
|
842
|
+
"c:type"?: string;
|
|
843
|
+
/** Binary attribute, true if the callback can throw an error */
|
|
844
|
+
throws?: GirBoolean;
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
/* Other elements a property can contain */
|
|
848
|
+
parameters?: [GirCallableParams];
|
|
849
|
+
"return-value"?: GirCallableReturn[];
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
// ========================================
|
|
853
|
+
// SIGNAL ELEMENTS
|
|
854
|
+
// ========================================
|
|
855
|
+
|
|
856
|
+
/** A signal as defined in the GObject system (https://docs.gtk.org/gobject/concepts.html#signals) */
|
|
857
|
+
export interface GirSignalElement extends PartOfModule, GirInfoElements {
|
|
858
|
+
$: GirInfoAttrs & {
|
|
859
|
+
/** name of the signal */
|
|
860
|
+
name: string;
|
|
861
|
+
/** Binary attribute, true if the signal has a detailed parameter (https://docs.gtk.org/gobject/concepts.html#the-detail-argument and https://docs.gtk.org/gobject/flags.SignalFlags.html) */
|
|
862
|
+
detailed?: GirBoolean;
|
|
863
|
+
/** When to run the signal during the 5 steps of signal emission (https://docs.gtk.org/gobject/concepts.html#signal-emission and https://docs.gtk.org/gobject/flags.SignalFlags.html) */
|
|
864
|
+
when?: "first" | "last" | "cleanup";
|
|
865
|
+
/** Binary attribute, true if the signal can be freely emitted on alive objects from user code (https://docs.gtk.org/gobject/flags.SignalFlags.html) */
|
|
866
|
+
action?: GirBoolean;
|
|
867
|
+
/** Binary attribute, true if no emission hooks are supported for this signal (https://docs.gtk.org/gobject/flags.SignalFlags.html) */
|
|
868
|
+
"no-hooks"?: GirBoolean;
|
|
869
|
+
/** Binary attribute, true if signals emitted for an object while currently being in emission for this very object will not be emitted recursively, but instead cause the first emission to be restarted (https://docs.gtk.org/gobject/flags.SignalFlags.html) */
|
|
870
|
+
"no-recurse"?: GirBoolean;
|
|
871
|
+
/** The emitter method for the signal */
|
|
872
|
+
emitter?: string;
|
|
873
|
+
};
|
|
874
|
+
/* Other elements a property can contain */
|
|
875
|
+
|
|
876
|
+
parameters?: [GirCallableParams];
|
|
877
|
+
"return-value"?: GirCallableReturn[];
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
// ========================================
|
|
881
|
+
// DOCUMENTATION ELEMENTS
|
|
882
|
+
// ========================================
|
|
883
|
+
|
|
884
|
+
/** element defining a gtk-doc documentation section */
|
|
885
|
+
export interface GirDocSectionElement {
|
|
886
|
+
$: {
|
|
887
|
+
name: string;
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
doc?: GirDocElement["doc"];
|
|
891
|
+
"doc-version"?: GirDocElement["doc-version"];
|
|
892
|
+
"doc-stability"?: GirDocElement["doc-stability"];
|
|
893
|
+
"doc-deprecated"?: GirDocElement["doc-deprecated"];
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
// ========================================
|
|
897
|
+
// MODULE GROUPING TYPES
|
|
898
|
+
// ========================================
|
|
899
|
+
// Note: GirModuleResolvedBy, GirModulesGrouped, and GirModulesGroupedMap
|
|
900
|
+
// have been moved to @ts-for-gir/lib as they are operational types, not parse types
|