@girs/builder-1.0 4.4.0 → 4.5.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 +52 -38
- package/builder-1.0-vocabulary.d.ts +249 -0
- package/builder-1.0-vocabulary.js +61 -0
- package/builder-1.0.d.ts +21 -16
- package/package.json +26 -26
- package/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -4,82 +4,96 @@
|
|
|
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) v4.5.0.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
|
+
nothing to your program and works with any bundler or none at all.
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
|
-
Install the type definitions with npm:
|
|
13
14
|
```bash
|
|
14
15
|
npm install @girs/builder-1.0
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Any package manager works. The package has no dependencies beyond other `@girs/*`
|
|
19
|
+
type packages.
|
|
20
|
+
|
|
21
|
+
## What it exports
|
|
22
|
+
|
|
23
|
+
| Import | What you get |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `@girs/builder-1.0` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/builder-1.0/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/builder-1.0/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/builder-1.0/builder-1.0` | the namespace, without the side-effecting declarations |
|
|
29
|
+
| `@girs/builder-1.0/vocabulary` | GIR-derived widget data: settable properties, enum nicks, slot candidates |
|
|
30
|
+
|
|
31
|
+
## Three ways to import
|
|
32
|
+
|
|
33
|
+
Which one you use depends on how you write imports elsewhere, not on your toolchain.
|
|
34
|
+
|
|
35
|
+
### As a module
|
|
18
36
|
|
|
19
|
-
Import it like any other module:
|
|
20
37
|
```ts
|
|
21
38
|
import Builder from '@girs/builder-1.0';
|
|
22
39
|
```
|
|
23
40
|
|
|
24
|
-
###
|
|
41
|
+
### As `gi://`
|
|
25
42
|
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
GJS resolves `gi://` at runtime. To give it types, reference the package once, either
|
|
44
|
+
from your entry point or from `tsconfig.json`:
|
|
28
45
|
|
|
29
|
-
`index.ts`:
|
|
30
46
|
```ts
|
|
31
|
-
import '@girs/builder-1.0'
|
|
47
|
+
import '@girs/builder-1.0';
|
|
32
48
|
```
|
|
33
49
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
50
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/builder-1.0"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
51
|
+
{ "include": ["@girs/builder-1.0"] }
|
|
43
52
|
```
|
|
44
53
|
|
|
45
|
-
|
|
54
|
+
Then the runtime spelling type-checks:
|
|
46
55
|
|
|
47
56
|
```ts
|
|
48
57
|
import Builder from 'gi://Builder?version=1.0';
|
|
49
58
|
```
|
|
50
59
|
|
|
51
|
-
|
|
60
|
+
Referencing `@girs/builder-1.0/ambient` instead pulls in these declarations
|
|
61
|
+
alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
|
|
62
|
+
|
|
63
|
+
### As `imports.gi`
|
|
52
64
|
|
|
53
|
-
GJS's global
|
|
54
|
-
For this you need to include `@girs/builder-1.0` or `@girs/builder-1.0/import` in your `tsconfig` or entry point Typescript file:
|
|
65
|
+
GJS's global object works the same way, via `@girs/builder-1.0/import`:
|
|
55
66
|
|
|
56
|
-
`index.ts`:
|
|
57
67
|
```ts
|
|
58
|
-
|
|
68
|
+
const Builder = imports.gi.Builder;
|
|
59
69
|
```
|
|
60
70
|
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/builder-1.0"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
+
## Widget vocabulary
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
`builder-1.0` declares widgets, so it also carries what the GIR says about them, as
|
|
74
|
+
types and as values a test can read:
|
|
73
75
|
|
|
74
76
|
```ts
|
|
75
|
-
|
|
77
|
+
import type { Widgets, PropsOf } from '@girs/builder-1.0/vocabulary';
|
|
78
|
+
import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/builder-1.0/vocabulary';
|
|
76
79
|
```
|
|
77
80
|
|
|
78
|
-
|
|
81
|
+
Properties are keyed the way GObject registered them, writable-only and optional, so they
|
|
82
|
+
match `g_object_set`, GtkBuilder XML and Blueprint. `PROVENANCE.libraryVersion` names the
|
|
83
|
+
library release this was generated from, which lets a check tell "newer than what is
|
|
84
|
+
installed" from "wrong".
|
|
79
85
|
|
|
80
|
-
|
|
86
|
+
This subpath answers what the GIR says, not what the installed library has. For the
|
|
87
|
+
second question, ask the library.
|
|
88
|
+
|
|
89
|
+
## Building
|
|
90
|
+
|
|
91
|
+
The declarations need no build step. If you bundle, every bundler works, since there is
|
|
92
|
+
no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
|
|
93
|
+
show working setups for several.
|
|
81
94
|
|
|
82
95
|
## Other packages
|
|
83
96
|
|
|
84
|
-
|
|
97
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
98
|
+
|
|
85
99
|
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GIR-derived widget VOCABULARY for Builder-1.0.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED — do not edit. Provenance: Builder-1.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface Gio.ActionGroup Gio.ActionMap
|
|
5
|
+
*
|
|
6
|
+
* 6 concrete widgets, 6 declarations, 1 enum nick unions, 3 slot candidates.
|
|
7
|
+
*
|
|
8
|
+
* Module-scoped exports only. There is no `JSX` namespace here, no tag spelling and
|
|
9
|
+
* no `on<Signal>` prop name: those are DIALECT, and every framework answers them
|
|
10
|
+
* differently. The shape to avoid is the GLOBAL AUGMENT — a `declare global` on
|
|
11
|
+
* `React.JSX` collides with every other library on a shared tag — while a
|
|
12
|
+
* module-scoped `JSX` behind a `jsxImportSource` does not. This package is used by
|
|
13
|
+
* projects that want nothing to do with JSX, so it emits neither; a consumer declaring
|
|
14
|
+
* a module-scoped namespace over these names is doing it right.
|
|
15
|
+
*
|
|
16
|
+
* Three things this is and `ConstructorProps` is not: WRITABLE-only (measured on
|
|
17
|
+
* Gtk-4.0, `ConstructorProps` offers 150 read-only properties across 68 classes as
|
|
18
|
+
* settable, and GTK's failure mode for writing one is exit 0), OPTIONAL, and keyed
|
|
19
|
+
* by the name GObject actually REGISTERED — the dashed spelling `g_object_set`,
|
|
20
|
+
* GtkBuilder XML and Blueprint all use.
|
|
21
|
+
*
|
|
22
|
+
* Signal handler types are not re-derived: `X.SignalSignatures`, which this package
|
|
23
|
+
* already emits for every class with the parent chain, every implemented interface
|
|
24
|
+
* and the `notify::` keys folded in, is what `Widgets[G]['signals']` points at.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import type Builder from './builder-1.0.js';
|
|
28
|
+
import type Ide from '@girs/ide-1.0';
|
|
29
|
+
import type { GtkApplicationWindowConstructOnly, GtkApplicationWindowProps, GtkBinConstructOnly, GtkBinProps, GtkBoxConstructOnly, GtkBoxProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkTreeViewConstructOnly, GtkTreeViewProps, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-3.0/vocabulary';
|
|
30
|
+
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
// Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
|
|
33
|
+
//
|
|
34
|
+
// Not derived from the member name. Substituting underscores for dashes is not a law:
|
|
35
|
+
// some nicks keep an underscore the substitution would have replaced, and only the
|
|
36
|
+
// attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
|
|
37
|
+
// how a derived nick passes review and breaks elsewhere.
|
|
38
|
+
// Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
export type GbViewGridSplitNick = 'left' | 'right' | 'move-left' | 'move-right';
|
|
42
|
+
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
|
|
45
|
+
// inheritance rather than flattening per widget.
|
|
46
|
+
//
|
|
47
|
+
// The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
|
|
48
|
+
// of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
|
|
49
|
+
// because GObject installs interface properties on the implementor at runtime while
|
|
50
|
+
// GIR keeps them once, on the interface.
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
export interface GbEditorViewProps extends GbViewProps, GtkBuildableProps, GtkOrientableProps {
|
|
54
|
+
}
|
|
55
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
56
|
+
export type GbEditorViewConstructOnly = GbViewConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
|
|
57
|
+
|
|
58
|
+
export interface GbTreeProps extends GtkTreeViewProps, GtkBuildableProps, GtkScrollableProps {
|
|
59
|
+
root?: Builder.TreeNode | null;
|
|
60
|
+
selection?: Builder.TreeNode;
|
|
61
|
+
'show-icons'?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
64
|
+
export type GbTreeConstructOnly = GtkTreeViewConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly;
|
|
65
|
+
|
|
66
|
+
export interface GbViewProps extends GtkBoxProps, GtkBuildableProps, GtkOrientableProps {
|
|
67
|
+
}
|
|
68
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
69
|
+
export type GbViewConstructOnly = GtkBoxConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
|
|
70
|
+
|
|
71
|
+
export interface GbViewGridProps extends GtkBinProps, GtkBuildableProps {
|
|
72
|
+
}
|
|
73
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
74
|
+
export type GbViewGridConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
75
|
+
|
|
76
|
+
export interface GbViewStackProps extends GtkBinProps, GtkBuildableProps {
|
|
77
|
+
'active-view'?: Builder.View | null;
|
|
78
|
+
}
|
|
79
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
80
|
+
export type GbViewStackConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
81
|
+
|
|
82
|
+
export interface GbWorkbenchProps extends GtkApplicationWindowProps, GtkBuildableProps {
|
|
83
|
+
/** The "context" property is the #IdeContext that shall be worked upon in the #GbWorkbench. */
|
|
84
|
+
context?: Ide.Context;
|
|
85
|
+
}
|
|
86
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
87
|
+
export type GbWorkbenchConstructOnly = GtkApplicationWindowConstructOnly | GtkBuildableConstructOnly | 'context';
|
|
88
|
+
|
|
89
|
+
// ---------------------------------------------------------------------------
|
|
90
|
+
// The GType-keyed widget map.
|
|
91
|
+
//
|
|
92
|
+
// Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
|
|
93
|
+
// consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
|
|
94
|
+
// for a Vue `GlobalComponents`, the class itself for a renderer whose element type
|
|
95
|
+
// is the class. None of those is baked in here.
|
|
96
|
+
//
|
|
97
|
+
// `slotCandidates` is a candidate list and never an answer: derived from methods
|
|
98
|
+
// taking exactly one widget argument. The GIR cannot tell adoption from reference —
|
|
99
|
+
// `set_title_widget` parents its argument and `set_activatable_widget` does not, and
|
|
100
|
+
// both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
|
|
101
|
+
// this is what notices when a release adds a candidate.
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
|
|
104
|
+
export interface Widgets {
|
|
105
|
+
GbEditorView: {
|
|
106
|
+
class: Builder.EditorView;
|
|
107
|
+
props: GbEditorViewProps;
|
|
108
|
+
signals: Builder.EditorView.SignalSignatures;
|
|
109
|
+
constructOnly: GbEditorViewConstructOnly;
|
|
110
|
+
slotCandidates: {};
|
|
111
|
+
};
|
|
112
|
+
GbTree: {
|
|
113
|
+
class: Builder.Tree;
|
|
114
|
+
props: GbTreeProps;
|
|
115
|
+
signals: Builder.Tree.SignalSignatures;
|
|
116
|
+
constructOnly: GbTreeConstructOnly;
|
|
117
|
+
slotCandidates: {};
|
|
118
|
+
};
|
|
119
|
+
GbView: {
|
|
120
|
+
class: Builder.View;
|
|
121
|
+
props: GbViewProps;
|
|
122
|
+
signals: Builder.View.SignalSignatures;
|
|
123
|
+
constructOnly: GbViewConstructOnly;
|
|
124
|
+
slotCandidates: {};
|
|
125
|
+
};
|
|
126
|
+
GbViewGrid: {
|
|
127
|
+
class: Builder.ViewGrid;
|
|
128
|
+
props: GbViewGridProps;
|
|
129
|
+
signals: Builder.ViewGrid.SignalSignatures;
|
|
130
|
+
constructOnly: GbViewGridConstructOnly;
|
|
131
|
+
slotCandidates: {
|
|
132
|
+
'stack-after': 'add_stack_after';
|
|
133
|
+
'stack-before': 'add_stack_before';
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
GbViewStack: {
|
|
137
|
+
class: Builder.ViewStack;
|
|
138
|
+
props: GbViewStackProps;
|
|
139
|
+
signals: Builder.ViewStack.SignalSignatures;
|
|
140
|
+
constructOnly: GbViewStackConstructOnly;
|
|
141
|
+
slotCandidates: {
|
|
142
|
+
'active-view': 'set_active_view';
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
GbWorkbench: {
|
|
146
|
+
class: Builder.Workbench;
|
|
147
|
+
props: GbWorkbenchProps;
|
|
148
|
+
signals: Builder.Workbench.SignalSignatures;
|
|
149
|
+
constructOnly: GbWorkbenchConstructOnly;
|
|
150
|
+
slotCandidates: {};
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
155
|
+
export type WidgetGType = keyof Widgets;
|
|
156
|
+
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
// Child holders — the same shape, for objects that CARRY a widget without being one.
|
|
159
|
+
//
|
|
160
|
+
// `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
|
|
161
|
+
// `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
|
|
162
|
+
// them exactly like a container, so they belong in the vocabulary; a check asking "is
|
|
163
|
+
// this a widget" must still be able to say no. Hence a sibling table rather than four
|
|
164
|
+
// more rows in `Widgets`: concatenate them when you mean both.
|
|
165
|
+
// ---------------------------------------------------------------------------
|
|
166
|
+
|
|
167
|
+
export interface ChildHolders {
|
|
168
|
+
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** Every GType this namespace holds a child in without it being a widget. */
|
|
172
|
+
export type ChildHolderGType = keyof ChildHolders;
|
|
173
|
+
|
|
174
|
+
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
175
|
+
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
176
|
+
|
|
177
|
+
/** The signal table this package already emits, reached by GType. */
|
|
178
|
+
export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
|
|
179
|
+
|
|
180
|
+
/** The instance type — what a `ref`-shaped prop should infer. */
|
|
181
|
+
export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
|
|
182
|
+
|
|
183
|
+
/** Property names that can only be set at construction. */
|
|
184
|
+
export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
|
|
185
|
+
|
|
186
|
+
/** Candidate child slots — see the note above; curation decides. */
|
|
187
|
+
export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The same facts as runtime data, for a consumer that CHECKS them.
|
|
191
|
+
*
|
|
192
|
+
* Types are erased, so a spec that asks the installed GTK whether every property
|
|
193
|
+
* here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
|
|
194
|
+
* and every nick resolvable through an enum lookup cannot read the interfaces
|
|
195
|
+
* above. Emitted headlessly with no GTK present, which is exactly why the checking
|
|
196
|
+
* belongs to the consumer and the DATA belongs here.
|
|
197
|
+
*/
|
|
198
|
+
export const PROVENANCE: {
|
|
199
|
+
readonly namespace: string;
|
|
200
|
+
readonly version: string;
|
|
201
|
+
/** The version the LIBRARY states, or null where it states none. Never the namespace's. */
|
|
202
|
+
readonly libraryVersion: string | null;
|
|
203
|
+
readonly childHolders: number;
|
|
204
|
+
readonly droppedBases: readonly string[];
|
|
205
|
+
readonly inlinedBases: readonly string[];
|
|
206
|
+
readonly unsettableProps: readonly string[];
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
210
|
+
export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Declaration GType -> the signals it registers itself, never its parents'.
|
|
214
|
+
*
|
|
215
|
+
* Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
|
|
216
|
+
* abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
|
|
217
|
+
*/
|
|
218
|
+
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
219
|
+
|
|
220
|
+
/** Widget GType -> every declaration its members come from, self first. */
|
|
221
|
+
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
222
|
+
|
|
223
|
+
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
224
|
+
export const CHILD_HOLDERS: readonly string[];
|
|
225
|
+
|
|
226
|
+
/** Enum GType -> the nicks this surface offers. */
|
|
227
|
+
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
228
|
+
|
|
229
|
+
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
230
|
+
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
|
|
234
|
+
*
|
|
235
|
+
* What keeps a runtime cross-check honest across a version gap without an
|
|
236
|
+
* allowlist: a name the installed library lacks is a defect UNLESS the version
|
|
237
|
+
* here is newer than the one running.
|
|
238
|
+
*
|
|
239
|
+
* ALL THREE key shapes, because that test only works for the names it covers. A
|
|
240
|
+
* property-only map leaves a consumer no way to explain a missing SIGNAL, which is
|
|
241
|
+
* a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
|
|
242
|
+
* explain a missing CLASS, and that one fails as a bare
|
|
243
|
+
* `TypeError: can't access property "$gtype", ctor() is undefined` that does not
|
|
244
|
+
* even name the GType.
|
|
245
|
+
*
|
|
246
|
+
* A key is present only where the GIR states a version — sparse by nature (`version`
|
|
247
|
+
* sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
|
|
248
|
+
*/
|
|
249
|
+
export const SINCE: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// The widget vocabulary of Builder-1.0 as runtime data.
|
|
2
|
+
//
|
|
3
|
+
// GENERATED — do not edit. Provenance: Builder-1.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface Gio.ActionGroup Gio.ActionMap
|
|
4
|
+
//
|
|
5
|
+
// The type half of this subpath is the sibling `.d.ts`. This file exists because
|
|
6
|
+
// types are erased: a consumer that wants to ask the installed library whether every
|
|
7
|
+
// name here is real needs values, not declarations.
|
|
8
|
+
|
|
9
|
+
export const PROVENANCE = {
|
|
10
|
+
namespace: 'Builder',
|
|
11
|
+
version: '1.0',
|
|
12
|
+
libraryVersion: null,
|
|
13
|
+
childHolders: 0,
|
|
14
|
+
droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object', 'Atk.ImplementorIface', 'Gio.ActionGroup', 'Gio.ActionMap'],
|
|
15
|
+
inlinedBases: [],
|
|
16
|
+
unsettableProps: [],
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const OWN_PROPS = {
|
|
20
|
+
GbTree: ['root', 'selection', 'show-icons'],
|
|
21
|
+
GbViewStack: ['active-view'],
|
|
22
|
+
GbWorkbench: ['context'],
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const OWN_SIGNALS = {
|
|
26
|
+
GbEditorView: ['request-documentation'],
|
|
27
|
+
GbTree: ['action', 'populate-popup'],
|
|
28
|
+
GbViewStack: ['empty', 'split'],
|
|
29
|
+
GbWorkbench: ['unload'],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const DECLS = {
|
|
33
|
+
GbEditorView: ['GbEditorView', 'GbView', 'GtkBox', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkOrientable'],
|
|
34
|
+
GbTree: ['GbTree', 'GtkTreeView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
|
|
35
|
+
GbView: ['GbView', 'GtkBox', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkOrientable'],
|
|
36
|
+
GbViewGrid: ['GbViewGrid', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
37
|
+
GbViewStack: ['GbViewStack', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
38
|
+
GbWorkbench: ['GbWorkbench', 'GtkApplicationWindow', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
|
|
42
|
+
// and descend from `GObject.Object`. A renderer places them like a container; a check
|
|
43
|
+
// asking "is this a widget" must not count them. Derived from the accessor pair, never
|
|
44
|
+
// from a list — the count is in the provenance line above.
|
|
45
|
+
export const CHILD_HOLDERS = [];
|
|
46
|
+
|
|
47
|
+
export const ENUM_NICKS = {
|
|
48
|
+
GbViewGridSplit: ['left', 'right', 'move-left', 'move-right'],
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const SLOT_CANDIDATES = {
|
|
52
|
+
GbViewGrid: {
|
|
53
|
+
'stack-after': 'add_stack_after',
|
|
54
|
+
'stack-before': 'add_stack_before',
|
|
55
|
+
},
|
|
56
|
+
GbViewStack: {
|
|
57
|
+
'active-view': 'set_active_view',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const SINCE = {};
|
package/builder-1.0.d.ts
CHANGED
|
@@ -54,10 +54,10 @@ export namespace Builder {
|
|
|
54
54
|
* @gir-type Enum
|
|
55
55
|
*/
|
|
56
56
|
enum ViewGridSplit {
|
|
57
|
-
LEFT,
|
|
58
|
-
RIGHT,
|
|
59
|
-
MOVE_LEFT,
|
|
60
|
-
MOVE_RIGHT,
|
|
57
|
+
LEFT = 1,
|
|
58
|
+
RIGHT = 2,
|
|
59
|
+
MOVE_LEFT = 3,
|
|
60
|
+
MOVE_RIGHT = 4,
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
|
|
@@ -196,6 +196,7 @@ export namespace Builder {
|
|
|
196
196
|
* Completes an asynchronous request to get a proxy to a worker process.
|
|
197
197
|
* @param result A {@link Gio.AsyncResult}
|
|
198
198
|
* @returns A {@link Gio.DBusProxy} or `null`.
|
|
199
|
+
* @throws GLib.Error
|
|
199
200
|
*/
|
|
200
201
|
get_worker_finish(result: Gio.AsyncResult): Gio.DBusProxy;
|
|
201
202
|
|
|
@@ -224,6 +225,7 @@ export namespace Builder {
|
|
|
224
225
|
|
|
225
226
|
/**
|
|
226
227
|
* @param result
|
|
228
|
+
* @throws GLib.Error
|
|
227
229
|
*/
|
|
228
230
|
open_project_finish(result: Gio.AsyncResult): boolean;
|
|
229
231
|
|
|
@@ -238,7 +240,7 @@ export namespace Builder {
|
|
|
238
240
|
* @signal
|
|
239
241
|
* @run-last
|
|
240
242
|
*/
|
|
241
|
-
"request-documentation": (
|
|
243
|
+
"request-documentation": (object: string) => void;
|
|
242
244
|
"notify::can-split": (pspec: GObject.ParamSpec) => void;
|
|
243
245
|
"notify::document": (pspec: GObject.ParamSpec) => void;
|
|
244
246
|
"notify::modified": (pspec: GObject.ParamSpec) => void;
|
|
@@ -408,12 +410,12 @@ export namespace Builder {
|
|
|
408
410
|
* @action
|
|
409
411
|
* @run-last
|
|
410
412
|
*/
|
|
411
|
-
action: (
|
|
413
|
+
action: (object: string, p0: string, p1: string) => void;
|
|
412
414
|
/**
|
|
413
415
|
* @signal
|
|
414
416
|
* @run-last
|
|
415
417
|
*/
|
|
416
|
-
"populate-popup": (
|
|
418
|
+
"populate-popup": (object: Gtk.Widget) => void;
|
|
417
419
|
"notify::root": (pspec: GObject.ParamSpec) => void;
|
|
418
420
|
"notify::selection": (pspec: GObject.ParamSpec) => void;
|
|
419
421
|
"notify::show-icons": (pspec: GObject.ParamSpec) => void;
|
|
@@ -789,37 +791,37 @@ export namespace Builder {
|
|
|
789
791
|
* @signal
|
|
790
792
|
* @run-last
|
|
791
793
|
*/
|
|
792
|
-
added: (
|
|
794
|
+
added: (object: Tree) => void;
|
|
793
795
|
/**
|
|
794
796
|
* @signal
|
|
795
797
|
* @run-last
|
|
796
798
|
*/
|
|
797
|
-
"build-node": (
|
|
799
|
+
"build-node": (object: TreeNode) => void;
|
|
798
800
|
/**
|
|
799
801
|
* @signal
|
|
800
802
|
* @run-last
|
|
801
803
|
*/
|
|
802
|
-
"node-activated": (
|
|
804
|
+
"node-activated": (object: TreeNode) => boolean | void;
|
|
803
805
|
/**
|
|
804
806
|
* @signal
|
|
805
807
|
* @run-last
|
|
806
808
|
*/
|
|
807
|
-
"node-popup": (
|
|
809
|
+
"node-popup": (object: TreeNode, p0: Gio.Menu) => void;
|
|
808
810
|
/**
|
|
809
811
|
* @signal
|
|
810
812
|
* @run-last
|
|
811
813
|
*/
|
|
812
|
-
"node-selected": (
|
|
814
|
+
"node-selected": (object: TreeNode) => void;
|
|
813
815
|
/**
|
|
814
816
|
* @signal
|
|
815
817
|
* @run-last
|
|
816
818
|
*/
|
|
817
|
-
"node-unselected": (
|
|
819
|
+
"node-unselected": (object: TreeNode) => void;
|
|
818
820
|
/**
|
|
819
821
|
* @signal
|
|
820
822
|
* @run-last
|
|
821
823
|
*/
|
|
822
|
-
removed: (
|
|
824
|
+
removed: (object: Tree) => void;
|
|
823
825
|
"notify::tree": (pspec: GObject.ParamSpec) => void;
|
|
824
826
|
}
|
|
825
827
|
|
|
@@ -1640,7 +1642,7 @@ export namespace Builder {
|
|
|
1640
1642
|
* @signal
|
|
1641
1643
|
* @run-last
|
|
1642
1644
|
*/
|
|
1643
|
-
split: (
|
|
1645
|
+
split: (view: View, split_type: number) => void;
|
|
1644
1646
|
"notify::active-view": (pspec: GObject.ParamSpec) => void;
|
|
1645
1647
|
"notify::border-width": (pspec: GObject.ParamSpec) => void;
|
|
1646
1648
|
"notify::child": (pspec: GObject.ParamSpec) => void;
|
|
@@ -1794,7 +1796,7 @@ export namespace Builder {
|
|
|
1794
1796
|
* @signal
|
|
1795
1797
|
* @run-last
|
|
1796
1798
|
*/
|
|
1797
|
-
unload: (
|
|
1799
|
+
unload: (object: Ide.Context) => void;
|
|
1798
1800
|
"notify::active-view": (pspec: GObject.ParamSpec) => void;
|
|
1799
1801
|
"notify::building": (pspec: GObject.ParamSpec) => void;
|
|
1800
1802
|
"notify::context": (pspec: GObject.ParamSpec) => void;
|
|
@@ -1968,6 +1970,7 @@ export namespace Builder {
|
|
|
1968
1970
|
|
|
1969
1971
|
/**
|
|
1970
1972
|
* @param result
|
|
1973
|
+
* @throws GLib.Error
|
|
1971
1974
|
*/
|
|
1972
1975
|
build_finish(result: Gio.AsyncResult): boolean;
|
|
1973
1976
|
|
|
@@ -2884,6 +2887,7 @@ export namespace Builder {
|
|
|
2884
2887
|
|
|
2885
2888
|
/**
|
|
2886
2889
|
* @param result
|
|
2890
|
+
* @throws GLib.Error
|
|
2887
2891
|
*/
|
|
2888
2892
|
save_as_finish(result: Gio.AsyncResult): boolean;
|
|
2889
2893
|
|
|
@@ -2909,6 +2913,7 @@ export namespace Builder {
|
|
|
2909
2913
|
|
|
2910
2914
|
/**
|
|
2911
2915
|
* @param result
|
|
2916
|
+
* @throws GLib.Error
|
|
2912
2917
|
*/
|
|
2913
2918
|
save_finish(result: Gio.AsyncResult): boolean;
|
|
2914
2919
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/builder-1.0",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Builder-1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "builder-1.0.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"import": "./builder-1.0-import.js",
|
|
17
17
|
"default": "./builder-1.0-import.js"
|
|
18
18
|
},
|
|
19
|
-
"./
|
|
20
|
-
"types": "./builder-1.0-
|
|
21
|
-
"import": "./builder-1.0-
|
|
22
|
-
"default": "./builder-1.0-
|
|
19
|
+
"./vocabulary": {
|
|
20
|
+
"types": "./builder-1.0-vocabulary.d.ts",
|
|
21
|
+
"import": "./builder-1.0-vocabulary.js",
|
|
22
|
+
"default": "./builder-1.0-vocabulary.js"
|
|
23
23
|
},
|
|
24
24
|
"./builder-1.0": {
|
|
25
25
|
"types": "./builder-1.0.d.ts",
|
|
@@ -36,27 +36,27 @@
|
|
|
36
36
|
"test": "tsc --project tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@girs/gjs": "^4.
|
|
40
|
-
"@girs/peas-1.0": "^4.
|
|
41
|
-
"@girs/gio-2.0": "^4.
|
|
42
|
-
"@girs/gobject-2.0": "^4.
|
|
43
|
-
"@girs/glib-2.0": "^4.
|
|
44
|
-
"@girs/gmodule-2.0": "^4.
|
|
45
|
-
"@girs/girepository-3.0": "^4.
|
|
46
|
-
"@girs/ide-1.0": "^4.
|
|
47
|
-
"@girs/template-1.0": "^4.
|
|
48
|
-
"@girs/json-1.0": "^4.
|
|
49
|
-
"@girs/gtksource-3.0": "^4.
|
|
50
|
-
"@girs/gtk-3.0": "^4.
|
|
51
|
-
"@girs/xlib-2.0": "^4.
|
|
52
|
-
"@girs/gdk-3.0": "^4.
|
|
53
|
-
"@girs/cairo-1.0": "^4.
|
|
54
|
-
"@girs/pango-1.0": "^4.
|
|
55
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
56
|
-
"@girs/freetype2-2.0": "^4.
|
|
57
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
58
|
-
"@girs/atk-1.0": "^4.
|
|
59
|
-
"@girs/dazzle-1.0": "^4.
|
|
39
|
+
"@girs/gjs": "^4.5.0",
|
|
40
|
+
"@girs/peas-1.0": "^4.5.0",
|
|
41
|
+
"@girs/gio-2.0": "^4.5.0",
|
|
42
|
+
"@girs/gobject-2.0": "^4.5.0",
|
|
43
|
+
"@girs/glib-2.0": "^4.5.0",
|
|
44
|
+
"@girs/gmodule-2.0": "^4.5.0",
|
|
45
|
+
"@girs/girepository-3.0": "^4.5.0",
|
|
46
|
+
"@girs/ide-1.0": "^4.5.0",
|
|
47
|
+
"@girs/template-1.0": "^4.5.0",
|
|
48
|
+
"@girs/json-1.0": "^4.5.0",
|
|
49
|
+
"@girs/gtksource-3.0": "^4.5.0",
|
|
50
|
+
"@girs/gtk-3.0": "^4.5.0",
|
|
51
|
+
"@girs/xlib-2.0": "^4.5.0",
|
|
52
|
+
"@girs/gdk-3.0": "^4.5.0",
|
|
53
|
+
"@girs/cairo-1.0": "^4.5.0",
|
|
54
|
+
"@girs/pango-1.0": "^4.5.0",
|
|
55
|
+
"@girs/harfbuzz-0.0": "^4.5.0",
|
|
56
|
+
"@girs/freetype2-2.0": "^4.5.0",
|
|
57
|
+
"@girs/gdkpixbuf-2.0": "^4.5.0",
|
|
58
|
+
"@girs/atk-1.0": "^4.5.0",
|
|
59
|
+
"@girs/dazzle-1.0": "^4.5.0" },
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"typescript": "*"
|
|
62
62
|
},
|