@girs/builder-1.0 4.9.0 → 5.1.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.
- package/README.md +1 -1
- package/builder-1.0-vocabulary.d.ts +39 -0
- package/builder-1.0-vocabulary.js +25 -0
- package/builder-1.0.d.ts +10 -40
- package/package.json +22 -22
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
GJS TypeScript type definitions for Builder-1.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir)
|
|
7
|
+
GJS TypeScript type definitions for Builder-1.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.1.0.
|
|
8
8
|
|
|
9
9
|
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
10
|
nothing to your program and works with any bundler or none at all.
|
|
@@ -302,6 +302,45 @@ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
|
|
|
302
302
|
*/
|
|
303
303
|
export const PROP_ENUMS: Readonly<Record<string, string>>;
|
|
304
304
|
|
|
305
|
+
/**
|
|
306
|
+
* The kinds of value a GTK accessible property, relation or state takes.
|
|
307
|
+
*
|
|
308
|
+
* `enum` is the one that needs a second lookup: `ARIA_VALUE_ENUMS` names the enum GType,
|
|
309
|
+
* and `ENUM_NICKS` and `ENUM_VALUES` answer from there.
|
|
310
|
+
*/
|
|
311
|
+
export type AriaValueType = 'string' | 'integer' | 'double' | 'boolean' | 'reference' | 'enum';
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
|
|
315
|
+
*
|
|
316
|
+
* The one table in this file that is not a fact about a ParamSpec. A GtkBuilder or
|
|
317
|
+
* Blueprint `accessibility { … }` block is typed by GTK's ARIA table, not by the widget,
|
|
318
|
+
* and the two disagree where it costs most: `orientation` is settable on a `GtkLabel`
|
|
319
|
+
* that implements no `GtkOrientable`, and `checked` is a `GtkAccessibleTristate`, so
|
|
320
|
+
* `checked: true` is the number 1 rather than a boolean. Typing those slots from the
|
|
321
|
+
* widget's properties gets both wrong and raises nothing.
|
|
322
|
+
*
|
|
323
|
+
* Keyed like `ENUM_VALUES` because the ARIA names ARE enum members — of
|
|
324
|
+
* `GtkAccessibleProperty`, `GtkAccessibleRelation` and `GtkAccessibleState` — so
|
|
325
|
+
* `ENUM_NICKS` already lists them and one key parser reads both.
|
|
326
|
+
*
|
|
327
|
+
* Read from each member's own GIR documentation. `gtk_accessible_property_init_value()`
|
|
328
|
+
* is the C half of this table and is not introspectable; the doc sentence is, and states
|
|
329
|
+
* the type for 52 of the 53 members in gtk4 4.23.3. Complete or absent, never partial: a
|
|
330
|
+
* member the generator cannot answer for fails the build and names itself.
|
|
331
|
+
*/
|
|
332
|
+
export const ARIA_VALUE_TYPES: Readonly<Record<string, AriaValueType>>;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* The same keys, for the `'enum'` rows only -> the GType of that enum.
|
|
336
|
+
*
|
|
337
|
+
* A table of its own for the reason `PROP_ENUMS` is one: folded in, the values of
|
|
338
|
+
* `ARIA_VALUE_TYPES` would be six reserved words mixed with arbitrary GTypes and telling
|
|
339
|
+
* them apart would be the consumer's problem. Apart, `ARIA_VALUE_TYPES[k] === 'enum'` is
|
|
340
|
+
* the whole test and `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
|
|
341
|
+
*/
|
|
342
|
+
export const ARIA_VALUE_ENUMS: Readonly<Record<string, string>>;
|
|
343
|
+
|
|
305
344
|
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
306
345
|
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
307
346
|
|
|
@@ -126,6 +126,31 @@ export const FLAG_VALUES_UNREADABLE = {};
|
|
|
126
126
|
// vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
|
|
127
127
|
export const PROP_ENUMS = {};
|
|
128
128
|
|
|
129
|
+
// `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
|
|
130
|
+
//
|
|
131
|
+
// The one table here that is not about a ParamSpec. A GtkBuilder or Blueprint
|
|
132
|
+
// `accessibility { … }` block is typed by GTK's ARIA table instead, and the two disagree
|
|
133
|
+
// where it matters: `orientation` is settable on a `GtkLabel` that implements no
|
|
134
|
+
// `GtkOrientable` and has no such property, and `checked` is a `GtkAccessibleTristate`, so
|
|
135
|
+
// `checked: true` means the number 1 and not the boolean. A consumer typing those slots
|
|
136
|
+
// from the widget gets both wrong, silently.
|
|
137
|
+
//
|
|
138
|
+
// Read from each member's own documentation, which is where GTK keeps the table --
|
|
139
|
+
// `gtk_accessible_property_init_value()` is the C half and is not introspectable, the
|
|
140
|
+
// sentence is. Complete or absent, never partial: a member whose documentation states no
|
|
141
|
+
// value type fails generation and names itself, because a missing row is indistinguishable
|
|
142
|
+
// from "GTK has no such name" and the plausible fallback emits `true` where GTK means 1.
|
|
143
|
+
export const ARIA_VALUE_TYPES = {};
|
|
144
|
+
|
|
145
|
+
// The same keys, for the `'enum'` rows only -> the GType of the enum.
|
|
146
|
+
//
|
|
147
|
+
// The join on from a kind to a number, and a table of its own for the reason `PROP_ENUMS`
|
|
148
|
+
// is one: folding the GType into `ARIA_VALUE_TYPES` would make its values a mix of six
|
|
149
|
+
// reserved words and arbitrary GTypes, and telling them apart would be the consumer's
|
|
150
|
+
// problem. With this, `ARIA_VALUE_TYPES[k] === 'enum'` is the whole test, and
|
|
151
|
+
// `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
|
|
152
|
+
export const ARIA_VALUE_ENUMS = {};
|
|
153
|
+
|
|
129
154
|
export const SLOT_CANDIDATES = {
|
|
130
155
|
GbViewGrid: {
|
|
131
156
|
'stack-after': 'add_stack_after',
|
package/builder-1.0.d.ts
CHANGED
|
@@ -128,15 +128,12 @@ export namespace Builder {
|
|
|
128
128
|
// Signals
|
|
129
129
|
/** @signal */
|
|
130
130
|
connect<K extends keyof Application.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Application.SignalSignatures[K]>): number;
|
|
131
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
132
131
|
|
|
133
132
|
/** @signal */
|
|
134
133
|
connect_after<K extends keyof Application.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Application.SignalSignatures[K]>): number;
|
|
135
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
136
134
|
|
|
137
135
|
/** @signal */
|
|
138
|
-
emit<K extends keyof Application.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Application.SignalSignatures[K]>
|
|
139
|
-
emit(signal: string, ...args: any[]): void;
|
|
136
|
+
emit<K extends keyof Application.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Application.SignalSignatures[K]>): void;
|
|
140
137
|
|
|
141
138
|
// Methods
|
|
142
139
|
get_argv0(): string;
|
|
@@ -320,15 +317,12 @@ export namespace Builder {
|
|
|
320
317
|
// Signals
|
|
321
318
|
/** @signal */
|
|
322
319
|
connect<K extends keyof EditorView.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, EditorView.SignalSignatures[K]>): number;
|
|
323
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
324
320
|
|
|
325
321
|
/** @signal */
|
|
326
322
|
connect_after<K extends keyof EditorView.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, EditorView.SignalSignatures[K]>): number;
|
|
327
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
328
323
|
|
|
329
324
|
/** @signal */
|
|
330
|
-
emit<K extends keyof EditorView.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<EditorView.SignalSignatures[K]>
|
|
331
|
-
emit(signal: string, ...args: any[]): void;
|
|
325
|
+
emit<K extends keyof EditorView.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<EditorView.SignalSignatures[K]>): void;
|
|
332
326
|
}
|
|
333
327
|
|
|
334
328
|
|
|
@@ -377,15 +371,12 @@ export namespace Builder {
|
|
|
377
371
|
// Signals
|
|
378
372
|
/** @signal */
|
|
379
373
|
connect<K extends keyof MenuExtension.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuExtension.SignalSignatures[K]>): number;
|
|
380
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
381
374
|
|
|
382
375
|
/** @signal */
|
|
383
376
|
connect_after<K extends keyof MenuExtension.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuExtension.SignalSignatures[K]>): number;
|
|
384
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
385
377
|
|
|
386
378
|
/** @signal */
|
|
387
|
-
emit<K extends keyof MenuExtension.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuExtension.SignalSignatures[K]>
|
|
388
|
-
emit(signal: string, ...args: any[]): void;
|
|
379
|
+
emit<K extends keyof MenuExtension.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuExtension.SignalSignatures[K]>): void;
|
|
389
380
|
|
|
390
381
|
// Methods
|
|
391
382
|
/**
|
|
@@ -530,15 +521,12 @@ export namespace Builder {
|
|
|
530
521
|
// Signals
|
|
531
522
|
/** @signal */
|
|
532
523
|
connect<K extends keyof Tree.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Tree.SignalSignatures[K]>): number;
|
|
533
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
534
524
|
|
|
535
525
|
/** @signal */
|
|
536
526
|
connect_after<K extends keyof Tree.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Tree.SignalSignatures[K]>): number;
|
|
537
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
538
527
|
|
|
539
528
|
/** @signal */
|
|
540
|
-
emit<K extends keyof Tree.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Tree.SignalSignatures[K]>
|
|
541
|
-
emit(signal: string, ...args: any[]): void;
|
|
529
|
+
emit<K extends keyof Tree.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Tree.SignalSignatures[K]>): void;
|
|
542
530
|
|
|
543
531
|
// Virtual methods
|
|
544
532
|
/**
|
|
@@ -860,15 +848,12 @@ export namespace Builder {
|
|
|
860
848
|
// Signals
|
|
861
849
|
/** @signal */
|
|
862
850
|
connect<K extends keyof TreeBuilder.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, TreeBuilder.SignalSignatures[K]>): number;
|
|
863
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
864
851
|
|
|
865
852
|
/** @signal */
|
|
866
853
|
connect_after<K extends keyof TreeBuilder.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, TreeBuilder.SignalSignatures[K]>): number;
|
|
867
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
868
854
|
|
|
869
855
|
/** @signal */
|
|
870
|
-
emit<K extends keyof TreeBuilder.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<TreeBuilder.SignalSignatures[K]>
|
|
871
|
-
emit(signal: string, ...args: any[]): void;
|
|
856
|
+
emit<K extends keyof TreeBuilder.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<TreeBuilder.SignalSignatures[K]>): void;
|
|
872
857
|
|
|
873
858
|
// Virtual methods
|
|
874
859
|
/**
|
|
@@ -1061,15 +1046,12 @@ export namespace Builder {
|
|
|
1061
1046
|
// Signals
|
|
1062
1047
|
/** @signal */
|
|
1063
1048
|
connect<K extends keyof TreeNode.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, TreeNode.SignalSignatures[K]>): number;
|
|
1064
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
1065
1049
|
|
|
1066
1050
|
/** @signal */
|
|
1067
1051
|
connect_after<K extends keyof TreeNode.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, TreeNode.SignalSignatures[K]>): number;
|
|
1068
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
1069
1052
|
|
|
1070
1053
|
/** @signal */
|
|
1071
|
-
emit<K extends keyof TreeNode.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<TreeNode.SignalSignatures[K]>
|
|
1072
|
-
emit(signal: string, ...args: any[]): void;
|
|
1054
|
+
emit<K extends keyof TreeNode.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<TreeNode.SignalSignatures[K]>): void;
|
|
1073
1055
|
|
|
1074
1056
|
// Methods
|
|
1075
1057
|
/**
|
|
@@ -1330,15 +1312,12 @@ export namespace Builder {
|
|
|
1330
1312
|
// Signals
|
|
1331
1313
|
/** @signal */
|
|
1332
1314
|
connect<K extends keyof View.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, View.SignalSignatures[K]>): number;
|
|
1333
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
1334
1315
|
|
|
1335
1316
|
/** @signal */
|
|
1336
1317
|
connect_after<K extends keyof View.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, View.SignalSignatures[K]>): number;
|
|
1337
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
1338
1318
|
|
|
1339
1319
|
/** @signal */
|
|
1340
|
-
emit<K extends keyof View.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<View.SignalSignatures[K]>
|
|
1341
|
-
emit(signal: string, ...args: any[]): void;
|
|
1320
|
+
emit<K extends keyof View.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<View.SignalSignatures[K]>): void;
|
|
1342
1321
|
|
|
1343
1322
|
// Virtual methods
|
|
1344
1323
|
/**
|
|
@@ -1560,15 +1539,12 @@ export namespace Builder {
|
|
|
1560
1539
|
// Signals
|
|
1561
1540
|
/** @signal */
|
|
1562
1541
|
connect<K extends keyof ViewGrid.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, ViewGrid.SignalSignatures[K]>): number;
|
|
1563
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
1564
1542
|
|
|
1565
1543
|
/** @signal */
|
|
1566
1544
|
connect_after<K extends keyof ViewGrid.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, ViewGrid.SignalSignatures[K]>): number;
|
|
1567
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
1568
1545
|
|
|
1569
1546
|
/** @signal */
|
|
1570
|
-
emit<K extends keyof ViewGrid.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<ViewGrid.SignalSignatures[K]>
|
|
1571
|
-
emit(signal: string, ...args: any[]): void;
|
|
1547
|
+
emit<K extends keyof ViewGrid.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<ViewGrid.SignalSignatures[K]>): void;
|
|
1572
1548
|
|
|
1573
1549
|
// Methods
|
|
1574
1550
|
/**
|
|
@@ -1727,15 +1703,12 @@ export namespace Builder {
|
|
|
1727
1703
|
// Signals
|
|
1728
1704
|
/** @signal */
|
|
1729
1705
|
connect<K extends keyof ViewStack.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, ViewStack.SignalSignatures[K]>): number;
|
|
1730
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
1731
1706
|
|
|
1732
1707
|
/** @signal */
|
|
1733
1708
|
connect_after<K extends keyof ViewStack.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, ViewStack.SignalSignatures[K]>): number;
|
|
1734
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
1735
1709
|
|
|
1736
1710
|
/** @signal */
|
|
1737
|
-
emit<K extends keyof ViewStack.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<ViewStack.SignalSignatures[K]>
|
|
1738
|
-
emit(signal: string, ...args: any[]): void;
|
|
1711
|
+
emit<K extends keyof ViewStack.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<ViewStack.SignalSignatures[K]>): void;
|
|
1739
1712
|
|
|
1740
1713
|
// Methods
|
|
1741
1714
|
/**
|
|
@@ -1935,15 +1908,12 @@ export namespace Builder {
|
|
|
1935
1908
|
// Signals
|
|
1936
1909
|
/** @signal */
|
|
1937
1910
|
connect<K extends keyof Workbench.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Workbench.SignalSignatures[K]>): number;
|
|
1938
|
-
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
1939
1911
|
|
|
1940
1912
|
/** @signal */
|
|
1941
1913
|
connect_after<K extends keyof Workbench.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Workbench.SignalSignatures[K]>): number;
|
|
1942
|
-
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
1943
1914
|
|
|
1944
1915
|
/** @signal */
|
|
1945
|
-
emit<K extends keyof Workbench.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Workbench.SignalSignatures[K]>
|
|
1946
|
-
emit(signal: string, ...args: any[]): void;
|
|
1916
|
+
emit<K extends keyof Workbench.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Workbench.SignalSignatures[K]>): void;
|
|
1947
1917
|
|
|
1948
1918
|
// Methods
|
|
1949
1919
|
add_temporary_buffer(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/builder-1.0",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Builder-1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "builder-1.0.js",
|
|
@@ -36,27 +36,27 @@
|
|
|
36
36
|
"test": "tsc --project tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@girs/gjs": "^
|
|
40
|
-
"@girs/peas-1.0": "^
|
|
41
|
-
"@girs/gio-2.0": "^
|
|
42
|
-
"@girs/gobject-2.0": "^
|
|
43
|
-
"@girs/glib-2.0": "^
|
|
44
|
-
"@girs/gmodule-2.0": "^
|
|
45
|
-
"@girs/girepository-3.0": "^
|
|
46
|
-
"@girs/ide-1.0": "^
|
|
47
|
-
"@girs/template-1.0": "^
|
|
48
|
-
"@girs/json-1.0": "^
|
|
49
|
-
"@girs/gtksource-3.0": "^
|
|
50
|
-
"@girs/gtk-3.0": "^
|
|
51
|
-
"@girs/xlib-2.0": "^
|
|
52
|
-
"@girs/gdk-3.0": "^
|
|
53
|
-
"@girs/cairo-1.0": "^
|
|
54
|
-
"@girs/pango-1.0": "^
|
|
55
|
-
"@girs/harfbuzz-0.0": "^
|
|
56
|
-
"@girs/freetype2-2.0": "^
|
|
57
|
-
"@girs/gdkpixbuf-2.0": "^
|
|
58
|
-
"@girs/atk-1.0": "^
|
|
59
|
-
"@girs/dazzle-1.0": "^
|
|
39
|
+
"@girs/gjs": "^5.1.0",
|
|
40
|
+
"@girs/peas-1.0": "^5.1.0",
|
|
41
|
+
"@girs/gio-2.0": "^5.1.0",
|
|
42
|
+
"@girs/gobject-2.0": "^5.1.0",
|
|
43
|
+
"@girs/glib-2.0": "^5.1.0",
|
|
44
|
+
"@girs/gmodule-2.0": "^5.1.0",
|
|
45
|
+
"@girs/girepository-3.0": "^5.1.0",
|
|
46
|
+
"@girs/ide-1.0": "^5.1.0",
|
|
47
|
+
"@girs/template-1.0": "^5.1.0",
|
|
48
|
+
"@girs/json-1.0": "^5.1.0",
|
|
49
|
+
"@girs/gtksource-3.0": "^5.1.0",
|
|
50
|
+
"@girs/gtk-3.0": "^5.1.0",
|
|
51
|
+
"@girs/xlib-2.0": "^5.1.0",
|
|
52
|
+
"@girs/gdk-3.0": "^5.1.0",
|
|
53
|
+
"@girs/cairo-1.0": "^5.1.0",
|
|
54
|
+
"@girs/pango-1.0": "^5.1.0",
|
|
55
|
+
"@girs/harfbuzz-0.0": "^5.1.0",
|
|
56
|
+
"@girs/freetype2-2.0": "^5.1.0",
|
|
57
|
+
"@girs/gdkpixbuf-2.0": "^5.1.0",
|
|
58
|
+
"@girs/atk-1.0": "^5.1.0",
|
|
59
|
+
"@girs/dazzle-1.0": "^5.1.0" },
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"typescript": "*"
|
|
62
62
|
},
|