@girs/builder-1.0 4.3.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-surface.d.ts +20 -0
- package/builder-1.0-surface.js +6 -0
- package/builder-1.0-vocabulary.d.ts +249 -0
- package/builder-1.0-vocabulary.js +61 -0
- package/builder-1.0.d.ts +68 -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
|
|
package/builder-1.0-surface.d.ts
CHANGED
|
@@ -154,6 +154,23 @@ export interface Widgets {
|
|
|
154
154
|
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
155
155
|
export type WidgetGType = keyof Widgets;
|
|
156
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
|
+
|
|
157
174
|
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
158
175
|
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
159
176
|
|
|
@@ -189,6 +206,9 @@ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
|
189
206
|
/** Widget GType -> every declaration its members come from, self first. */
|
|
190
207
|
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
191
208
|
|
|
209
|
+
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
210
|
+
export const CHILD_HOLDERS: readonly string[];
|
|
211
|
+
|
|
192
212
|
/** Enum GType -> the nicks this surface offers. */
|
|
193
213
|
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
194
214
|
|
package/builder-1.0-surface.js
CHANGED
|
@@ -30,6 +30,12 @@ export const DECLS = {
|
|
|
30
30
|
GbWorkbench: ['GbWorkbench', 'GtkApplicationWindow', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
// The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
|
|
34
|
+
// and descend from `GObject.Object`. A renderer places them like a container; a check
|
|
35
|
+
// asking "is this a widget" must not count them. Derived from the accessor pair, never
|
|
36
|
+
// from a list — the count is in the provenance line above.
|
|
37
|
+
export const CHILD_HOLDERS = [];
|
|
38
|
+
|
|
33
39
|
export const ENUM_NICKS = {
|
|
34
40
|
GbViewGridSplit: ['left', 'right', 'move-left', 'move-right'],
|
|
35
41
|
};
|
|
@@ -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;
|
|
@@ -705,36 +707,42 @@ export namespace Builder {
|
|
|
705
707
|
* display overlayed graphics, like the overshoot indication,
|
|
706
708
|
* at the right position.
|
|
707
709
|
* @returns `true` if `border` has been set
|
|
710
|
+
* @since 3.16
|
|
708
711
|
*/
|
|
709
712
|
get_border(): [boolean, Gtk.Border];
|
|
710
713
|
|
|
711
714
|
/**
|
|
712
715
|
* Retrieves the {@link Gtk.Adjustment} used for horizontal scrolling.
|
|
713
716
|
* @returns horizontal {@link Gtk.Adjustment}.
|
|
717
|
+
* @since 3.0
|
|
714
718
|
*/
|
|
715
719
|
get_hadjustment(): Gtk.Adjustment;
|
|
716
720
|
|
|
717
721
|
/**
|
|
718
722
|
* Gets the horizontal {@link Gtk.ScrollablePolicy}.
|
|
719
723
|
* @returns The horizontal {@link Gtk.ScrollablePolicy}.
|
|
724
|
+
* @since 3.0
|
|
720
725
|
*/
|
|
721
726
|
get_hscroll_policy(): Gtk.ScrollablePolicy;
|
|
722
727
|
|
|
723
728
|
/**
|
|
724
729
|
* Retrieves the {@link Gtk.Adjustment} used for vertical scrolling.
|
|
725
730
|
* @returns vertical {@link Gtk.Adjustment}.
|
|
731
|
+
* @since 3.0
|
|
726
732
|
*/
|
|
727
733
|
get_vadjustment(): Gtk.Adjustment;
|
|
728
734
|
|
|
729
735
|
/**
|
|
730
736
|
* Gets the vertical {@link Gtk.ScrollablePolicy}.
|
|
731
737
|
* @returns The vertical {@link Gtk.ScrollablePolicy}.
|
|
738
|
+
* @since 3.0
|
|
732
739
|
*/
|
|
733
740
|
get_vscroll_policy(): Gtk.ScrollablePolicy;
|
|
734
741
|
|
|
735
742
|
/**
|
|
736
743
|
* Sets the horizontal adjustment of the {@link Gtk.Scrollable}.
|
|
737
744
|
* @param hadjustment a {@link Gtk.Adjustment}
|
|
745
|
+
* @since 3.0
|
|
738
746
|
*/
|
|
739
747
|
set_hadjustment(hadjustment: Gtk.Adjustment | null): void;
|
|
740
748
|
|
|
@@ -743,12 +751,14 @@ export namespace Builder {
|
|
|
743
751
|
* horizontal scrolling should start below the minimum width or
|
|
744
752
|
* below the natural width.
|
|
745
753
|
* @param policy the horizontal {@link Gtk.ScrollablePolicy}
|
|
754
|
+
* @since 3.0
|
|
746
755
|
*/
|
|
747
756
|
set_hscroll_policy(policy: Gtk.ScrollablePolicy): void;
|
|
748
757
|
|
|
749
758
|
/**
|
|
750
759
|
* Sets the vertical adjustment of the {@link Gtk.Scrollable}.
|
|
751
760
|
* @param vadjustment a {@link Gtk.Adjustment}
|
|
761
|
+
* @since 3.0
|
|
752
762
|
*/
|
|
753
763
|
set_vadjustment(vadjustment: Gtk.Adjustment | null): void;
|
|
754
764
|
|
|
@@ -757,6 +767,7 @@ export namespace Builder {
|
|
|
757
767
|
* vertical scrolling should start below the minimum height or
|
|
758
768
|
* below the natural height.
|
|
759
769
|
* @param policy the vertical {@link Gtk.ScrollablePolicy}
|
|
770
|
+
* @since 3.0
|
|
760
771
|
*/
|
|
761
772
|
set_vscroll_policy(policy: Gtk.ScrollablePolicy): void;
|
|
762
773
|
|
|
@@ -766,6 +777,7 @@ export namespace Builder {
|
|
|
766
777
|
* be treeview headers. GTK+ can use this information to
|
|
767
778
|
* display overlayed graphics, like the overshoot indication,
|
|
768
779
|
* at the right position.
|
|
780
|
+
* @since 3.16
|
|
769
781
|
* @virtual
|
|
770
782
|
*/
|
|
771
783
|
vfunc_get_border(): [boolean, Gtk.Border];
|
|
@@ -779,37 +791,37 @@ export namespace Builder {
|
|
|
779
791
|
* @signal
|
|
780
792
|
* @run-last
|
|
781
793
|
*/
|
|
782
|
-
added: (
|
|
794
|
+
added: (object: Tree) => void;
|
|
783
795
|
/**
|
|
784
796
|
* @signal
|
|
785
797
|
* @run-last
|
|
786
798
|
*/
|
|
787
|
-
"build-node": (
|
|
799
|
+
"build-node": (object: TreeNode) => void;
|
|
788
800
|
/**
|
|
789
801
|
* @signal
|
|
790
802
|
* @run-last
|
|
791
803
|
*/
|
|
792
|
-
"node-activated": (
|
|
804
|
+
"node-activated": (object: TreeNode) => boolean | void;
|
|
793
805
|
/**
|
|
794
806
|
* @signal
|
|
795
807
|
* @run-last
|
|
796
808
|
*/
|
|
797
|
-
"node-popup": (
|
|
809
|
+
"node-popup": (object: TreeNode, p0: Gio.Menu) => void;
|
|
798
810
|
/**
|
|
799
811
|
* @signal
|
|
800
812
|
* @run-last
|
|
801
813
|
*/
|
|
802
|
-
"node-selected": (
|
|
814
|
+
"node-selected": (object: TreeNode) => void;
|
|
803
815
|
/**
|
|
804
816
|
* @signal
|
|
805
817
|
* @run-last
|
|
806
818
|
*/
|
|
807
|
-
"node-unselected": (
|
|
819
|
+
"node-unselected": (object: TreeNode) => void;
|
|
808
820
|
/**
|
|
809
821
|
* @signal
|
|
810
822
|
* @run-last
|
|
811
823
|
*/
|
|
812
|
-
removed: (
|
|
824
|
+
removed: (object: Tree) => void;
|
|
813
825
|
"notify::tree": (pspec: GObject.ParamSpec) => void;
|
|
814
826
|
}
|
|
815
827
|
|
|
@@ -1459,12 +1471,14 @@ export namespace Builder {
|
|
|
1459
1471
|
/**
|
|
1460
1472
|
* Retrieves the orientation of the `orientable`.
|
|
1461
1473
|
* @returns the orientation of the `orientable`.
|
|
1474
|
+
* @since 2.16
|
|
1462
1475
|
*/
|
|
1463
1476
|
get_orientation(): Gtk.Orientation;
|
|
1464
1477
|
|
|
1465
1478
|
/**
|
|
1466
1479
|
* Sets the orientation of the `orientable`.
|
|
1467
1480
|
* @param orientation the orientable’s new orientation.
|
|
1481
|
+
* @since 2.16
|
|
1468
1482
|
*/
|
|
1469
1483
|
set_orientation(orientation: Gtk.Orientation): void;
|
|
1470
1484
|
}
|
|
@@ -1628,7 +1642,7 @@ export namespace Builder {
|
|
|
1628
1642
|
* @signal
|
|
1629
1643
|
* @run-last
|
|
1630
1644
|
*/
|
|
1631
|
-
split: (
|
|
1645
|
+
split: (view: View, split_type: number) => void;
|
|
1632
1646
|
"notify::active-view": (pspec: GObject.ParamSpec) => void;
|
|
1633
1647
|
"notify::border-width": (pspec: GObject.ParamSpec) => void;
|
|
1634
1648
|
"notify::child": (pspec: GObject.ParamSpec) => void;
|
|
@@ -1782,7 +1796,7 @@ export namespace Builder {
|
|
|
1782
1796
|
* @signal
|
|
1783
1797
|
* @run-last
|
|
1784
1798
|
*/
|
|
1785
|
-
unload: (
|
|
1799
|
+
unload: (object: Ide.Context) => void;
|
|
1786
1800
|
"notify::active-view": (pspec: GObject.ParamSpec) => void;
|
|
1787
1801
|
"notify::building": (pspec: GObject.ParamSpec) => void;
|
|
1788
1802
|
"notify::context": (pspec: GObject.ParamSpec) => void;
|
|
@@ -1956,6 +1970,7 @@ export namespace Builder {
|
|
|
1956
1970
|
|
|
1957
1971
|
/**
|
|
1958
1972
|
* @param result
|
|
1973
|
+
* @throws GLib.Error
|
|
1959
1974
|
*/
|
|
1960
1975
|
build_finish(result: Gio.AsyncResult): boolean;
|
|
1961
1976
|
|
|
@@ -2020,6 +2035,7 @@ export namespace Builder {
|
|
|
2020
2035
|
*
|
|
2021
2036
|
* This function should only be called by {@link Gio.ActionGroup} implementations.
|
|
2022
2037
|
* @param action_name the name of an action in the group
|
|
2038
|
+
* @since 2.28
|
|
2023
2039
|
*/
|
|
2024
2040
|
action_added(action_name: string): void;
|
|
2025
2041
|
|
|
@@ -2029,6 +2045,7 @@ export namespace Builder {
|
|
|
2029
2045
|
* This function should only be called by {@link Gio.ActionGroup} implementations.
|
|
2030
2046
|
* @param action_name the name of an action in the group
|
|
2031
2047
|
* @param enabled whether the action is now enabled
|
|
2048
|
+
* @since 2.28
|
|
2032
2049
|
*/
|
|
2033
2050
|
action_enabled_changed(action_name: string, enabled: boolean): void;
|
|
2034
2051
|
|
|
@@ -2037,6 +2054,7 @@ export namespace Builder {
|
|
|
2037
2054
|
*
|
|
2038
2055
|
* This function should only be called by {@link Gio.ActionGroup} implementations.
|
|
2039
2056
|
* @param action_name the name of an action in the group
|
|
2057
|
+
* @since 2.28
|
|
2040
2058
|
*/
|
|
2041
2059
|
action_removed(action_name: string): void;
|
|
2042
2060
|
|
|
@@ -2046,6 +2064,7 @@ export namespace Builder {
|
|
|
2046
2064
|
* This function should only be called by {@link Gio.ActionGroup} implementations.
|
|
2047
2065
|
* @param action_name the name of an action in the group
|
|
2048
2066
|
* @param state the new state of the named action
|
|
2067
|
+
* @since 2.28
|
|
2049
2068
|
*/
|
|
2050
2069
|
action_state_changed(action_name: string, state: GLib.Variant): void;
|
|
2051
2070
|
|
|
@@ -2085,6 +2104,7 @@ export namespace Builder {
|
|
|
2085
2104
|
* ```
|
|
2086
2105
|
* @param action_name the name of the action to activate
|
|
2087
2106
|
* @param parameter parameters to the activation
|
|
2107
|
+
* @since 2.28
|
|
2088
2108
|
*/
|
|
2089
2109
|
activate_action(action_name: string, parameter: GLib.Variant | null): void;
|
|
2090
2110
|
|
|
@@ -2102,6 +2122,7 @@ export namespace Builder {
|
|
|
2102
2122
|
* If the `value` GVariant is floating, it is consumed.
|
|
2103
2123
|
* @param action_name the name of the action to request the change on
|
|
2104
2124
|
* @param value the new state
|
|
2125
|
+
* @since 2.28
|
|
2105
2126
|
*/
|
|
2106
2127
|
change_action_state(action_name: string, value: GLib.Variant): void;
|
|
2107
2128
|
|
|
@@ -2112,6 +2133,7 @@ export namespace Builder {
|
|
|
2112
2133
|
* have its state changed from outside callers.
|
|
2113
2134
|
* @param action_name the name of the action to query
|
|
2114
2135
|
* @returns whether the action is currently enabled
|
|
2136
|
+
* @since 2.28
|
|
2115
2137
|
*/
|
|
2116
2138
|
get_action_enabled(action_name: string): boolean;
|
|
2117
2139
|
|
|
@@ -2131,6 +2153,7 @@ export namespace Builder {
|
|
|
2131
2153
|
* with the same name but a different parameter type.
|
|
2132
2154
|
* @param action_name the name of the action to query
|
|
2133
2155
|
* @returns the parameter type
|
|
2156
|
+
* @since 2.28
|
|
2134
2157
|
*/
|
|
2135
2158
|
get_action_parameter_type(action_name: string): GLib.VariantType | null;
|
|
2136
2159
|
|
|
@@ -2145,6 +2168,7 @@ export namespace Builder {
|
|
|
2145
2168
|
* {@link GLib.Variant.unref} when it is no longer required.
|
|
2146
2169
|
* @param action_name the name of the action to query
|
|
2147
2170
|
* @returns the current state of the action
|
|
2171
|
+
* @since 2.28
|
|
2148
2172
|
*/
|
|
2149
2173
|
get_action_state(action_name: string): GLib.Variant | null;
|
|
2150
2174
|
|
|
@@ -2169,6 +2193,7 @@ export namespace Builder {
|
|
|
2169
2193
|
* {@link GLib.Variant.unref} when it is no longer required.
|
|
2170
2194
|
* @param action_name the name of the action to query
|
|
2171
2195
|
* @returns the state range hint
|
|
2196
|
+
* @since 2.28
|
|
2172
2197
|
*/
|
|
2173
2198
|
get_action_state_hint(action_name: string): GLib.Variant | null;
|
|
2174
2199
|
|
|
@@ -2191,6 +2216,7 @@ export namespace Builder {
|
|
|
2191
2216
|
* with the same name but a different state type.
|
|
2192
2217
|
* @param action_name the name of the action to query
|
|
2193
2218
|
* @returns the state type, if the action is stateful
|
|
2219
|
+
* @since 2.28
|
|
2194
2220
|
*/
|
|
2195
2221
|
get_action_state_type(action_name: string): GLib.VariantType | null;
|
|
2196
2222
|
|
|
@@ -2198,6 +2224,7 @@ export namespace Builder {
|
|
|
2198
2224
|
* Checks if the named action exists within `action_group`.
|
|
2199
2225
|
* @param action_name the name of the action to check for
|
|
2200
2226
|
* @returns whether the named action exists
|
|
2227
|
+
* @since 2.28
|
|
2201
2228
|
*/
|
|
2202
2229
|
has_action(action_name: string): boolean;
|
|
2203
2230
|
|
|
@@ -2207,6 +2234,7 @@ export namespace Builder {
|
|
|
2207
2234
|
* The caller is responsible for freeing the list with {@link GLib.strfreev} when
|
|
2208
2235
|
* it is no longer required.
|
|
2209
2236
|
* @returns a `NULL`-terminated array of the names of the actions in the group
|
|
2237
|
+
* @since 2.28
|
|
2210
2238
|
*/
|
|
2211
2239
|
list_actions(): string[];
|
|
2212
2240
|
|
|
@@ -2240,6 +2268,7 @@ export namespace Builder {
|
|
|
2240
2268
|
* fields may or may not have been modified.
|
|
2241
2269
|
* @param action_name the name of an action in the group
|
|
2242
2270
|
* @returns `TRUE` if the action exists, else `FALSE`
|
|
2271
|
+
* @since 2.32
|
|
2243
2272
|
*/
|
|
2244
2273
|
query_action(action_name: string): [boolean, boolean, GLib.VariantType | null, GLib.VariantType | null, GLib.Variant | null, GLib.Variant | null];
|
|
2245
2274
|
|
|
@@ -2248,6 +2277,7 @@ export namespace Builder {
|
|
|
2248
2277
|
*
|
|
2249
2278
|
* This function should only be called by {@link Gio.ActionGroup} implementations.
|
|
2250
2279
|
* @param action_name the name of an action in the group
|
|
2280
|
+
* @since 2.28
|
|
2251
2281
|
* @virtual
|
|
2252
2282
|
*/
|
|
2253
2283
|
vfunc_action_added(action_name: string): void;
|
|
@@ -2258,6 +2288,7 @@ export namespace Builder {
|
|
|
2258
2288
|
* This function should only be called by {@link Gio.ActionGroup} implementations.
|
|
2259
2289
|
* @param action_name the name of an action in the group
|
|
2260
2290
|
* @param enabled whether the action is now enabled
|
|
2291
|
+
* @since 2.28
|
|
2261
2292
|
* @virtual
|
|
2262
2293
|
*/
|
|
2263
2294
|
vfunc_action_enabled_changed(action_name: string, enabled: boolean): void;
|
|
@@ -2267,6 +2298,7 @@ export namespace Builder {
|
|
|
2267
2298
|
*
|
|
2268
2299
|
* This function should only be called by {@link Gio.ActionGroup} implementations.
|
|
2269
2300
|
* @param action_name the name of an action in the group
|
|
2301
|
+
* @since 2.28
|
|
2270
2302
|
* @virtual
|
|
2271
2303
|
*/
|
|
2272
2304
|
vfunc_action_removed(action_name: string): void;
|
|
@@ -2277,6 +2309,7 @@ export namespace Builder {
|
|
|
2277
2309
|
* This function should only be called by {@link Gio.ActionGroup} implementations.
|
|
2278
2310
|
* @param action_name the name of an action in the group
|
|
2279
2311
|
* @param state the new state of the named action
|
|
2312
|
+
* @since 2.28
|
|
2280
2313
|
* @virtual
|
|
2281
2314
|
*/
|
|
2282
2315
|
vfunc_action_state_changed(action_name: string, state: GLib.Variant): void;
|
|
@@ -2317,6 +2350,7 @@ export namespace Builder {
|
|
|
2317
2350
|
* ```
|
|
2318
2351
|
* @param action_name the name of the action to activate
|
|
2319
2352
|
* @param parameter parameters to the activation
|
|
2353
|
+
* @since 2.28
|
|
2320
2354
|
* @virtual
|
|
2321
2355
|
*/
|
|
2322
2356
|
vfunc_activate_action(action_name: string, parameter: GLib.Variant | null): void;
|
|
@@ -2335,6 +2369,7 @@ export namespace Builder {
|
|
|
2335
2369
|
* If the `value` GVariant is floating, it is consumed.
|
|
2336
2370
|
* @param action_name the name of the action to request the change on
|
|
2337
2371
|
* @param value the new state
|
|
2372
|
+
* @since 2.28
|
|
2338
2373
|
* @virtual
|
|
2339
2374
|
*/
|
|
2340
2375
|
vfunc_change_action_state(action_name: string, value: GLib.Variant): void;
|
|
@@ -2345,6 +2380,7 @@ export namespace Builder {
|
|
|
2345
2380
|
* An action must be enabled in order to be activated or in order to
|
|
2346
2381
|
* have its state changed from outside callers.
|
|
2347
2382
|
* @param action_name the name of the action to query
|
|
2383
|
+
* @since 2.28
|
|
2348
2384
|
* @virtual
|
|
2349
2385
|
*/
|
|
2350
2386
|
vfunc_get_action_enabled(action_name: string): boolean;
|
|
@@ -2364,6 +2400,7 @@ export namespace Builder {
|
|
|
2364
2400
|
* possible for an action to be removed and for a new action to be added
|
|
2365
2401
|
* with the same name but a different parameter type.
|
|
2366
2402
|
* @param action_name the name of the action to query
|
|
2403
|
+
* @since 2.28
|
|
2367
2404
|
* @virtual
|
|
2368
2405
|
*/
|
|
2369
2406
|
vfunc_get_action_parameter_type(action_name: string): GLib.VariantType | null;
|
|
@@ -2378,6 +2415,7 @@ export namespace Builder {
|
|
|
2378
2415
|
* The return value (if non-`NULL`) should be freed with
|
|
2379
2416
|
* {@link GLib.Variant.unref} when it is no longer required.
|
|
2380
2417
|
* @param action_name the name of the action to query
|
|
2418
|
+
* @since 2.28
|
|
2381
2419
|
* @virtual
|
|
2382
2420
|
*/
|
|
2383
2421
|
vfunc_get_action_state(action_name: string): GLib.Variant | null;
|
|
@@ -2402,6 +2440,7 @@ export namespace Builder {
|
|
|
2402
2440
|
* The return value (if non-`NULL`) should be freed with
|
|
2403
2441
|
* {@link GLib.Variant.unref} when it is no longer required.
|
|
2404
2442
|
* @param action_name the name of the action to query
|
|
2443
|
+
* @since 2.28
|
|
2405
2444
|
* @virtual
|
|
2406
2445
|
*/
|
|
2407
2446
|
vfunc_get_action_state_hint(action_name: string): GLib.Variant | null;
|
|
@@ -2424,6 +2463,7 @@ export namespace Builder {
|
|
|
2424
2463
|
* possible for an action to be removed and for a new action to be added
|
|
2425
2464
|
* with the same name but a different state type.
|
|
2426
2465
|
* @param action_name the name of the action to query
|
|
2466
|
+
* @since 2.28
|
|
2427
2467
|
* @virtual
|
|
2428
2468
|
*/
|
|
2429
2469
|
vfunc_get_action_state_type(action_name: string): GLib.VariantType | null;
|
|
@@ -2431,6 +2471,7 @@ export namespace Builder {
|
|
|
2431
2471
|
/**
|
|
2432
2472
|
* Checks if the named action exists within `action_group`.
|
|
2433
2473
|
* @param action_name the name of the action to check for
|
|
2474
|
+
* @since 2.28
|
|
2434
2475
|
* @virtual
|
|
2435
2476
|
*/
|
|
2436
2477
|
vfunc_has_action(action_name: string): boolean;
|
|
@@ -2440,6 +2481,7 @@ export namespace Builder {
|
|
|
2440
2481
|
*
|
|
2441
2482
|
* The caller is responsible for freeing the list with {@link GLib.strfreev} when
|
|
2442
2483
|
* it is no longer required.
|
|
2484
|
+
* @since 2.28
|
|
2443
2485
|
* @virtual
|
|
2444
2486
|
*/
|
|
2445
2487
|
vfunc_list_actions(): string[];
|
|
@@ -2473,6 +2515,7 @@ export namespace Builder {
|
|
|
2473
2515
|
* filled. If the action doesn’t exist, `FALSE` is returned and the
|
|
2474
2516
|
* fields may or may not have been modified.
|
|
2475
2517
|
* @param action_name the name of an action in the group
|
|
2518
|
+
* @since 2.32
|
|
2476
2519
|
* @virtual
|
|
2477
2520
|
*/
|
|
2478
2521
|
vfunc_query_action(action_name: string): [boolean, boolean, GLib.VariantType | null, GLib.VariantType | null, GLib.Variant | null, GLib.Variant | null];
|
|
@@ -2485,6 +2528,7 @@ export namespace Builder {
|
|
|
2485
2528
|
*
|
|
2486
2529
|
* The action map takes its own reference on `action`.
|
|
2487
2530
|
* @param action a {@link Gio.Action}
|
|
2531
|
+
* @since 2.32
|
|
2488
2532
|
*/
|
|
2489
2533
|
add_action(action: Gio.Action): void;
|
|
2490
2534
|
|
|
@@ -2501,6 +2545,7 @@ export namespace Builder {
|
|
|
2501
2545
|
* If no such action exists, returns `NULL`.
|
|
2502
2546
|
* @param action_name the name of an action
|
|
2503
2547
|
* @returns a {@link Gio.Action}
|
|
2548
|
+
* @since 2.32
|
|
2504
2549
|
*/
|
|
2505
2550
|
lookup_action(action_name: string): Gio.Action | null;
|
|
2506
2551
|
|
|
@@ -2509,6 +2554,7 @@ export namespace Builder {
|
|
|
2509
2554
|
*
|
|
2510
2555
|
* If no action of this name is in the map then nothing happens.
|
|
2511
2556
|
* @param action_name the name of the action
|
|
2557
|
+
* @since 2.32
|
|
2512
2558
|
*/
|
|
2513
2559
|
remove_action(action_name: string): void;
|
|
2514
2560
|
|
|
@@ -2536,6 +2582,7 @@ export namespace Builder {
|
|
|
2536
2582
|
* }
|
|
2537
2583
|
* ```
|
|
2538
2584
|
* @param entries a pointer to the first item in an array of {@link Gio.ActionEntry} structs
|
|
2585
|
+
* @since 2.78
|
|
2539
2586
|
*/
|
|
2540
2587
|
remove_action_entries(entries: Gio.ActionEntry[]): void;
|
|
2541
2588
|
|
|
@@ -2547,6 +2594,7 @@ export namespace Builder {
|
|
|
2547
2594
|
*
|
|
2548
2595
|
* The action map takes its own reference on `action`.
|
|
2549
2596
|
* @param action a {@link Gio.Action}
|
|
2597
|
+
* @since 2.32
|
|
2550
2598
|
* @virtual
|
|
2551
2599
|
*/
|
|
2552
2600
|
vfunc_add_action(action: Gio.Action): void;
|
|
@@ -2556,6 +2604,7 @@ export namespace Builder {
|
|
|
2556
2604
|
*
|
|
2557
2605
|
* If no such action exists, returns `NULL`.
|
|
2558
2606
|
* @param action_name the name of an action
|
|
2607
|
+
* @since 2.32
|
|
2559
2608
|
* @virtual
|
|
2560
2609
|
*/
|
|
2561
2610
|
vfunc_lookup_action(action_name: string): Gio.Action | null;
|
|
@@ -2565,6 +2614,7 @@ export namespace Builder {
|
|
|
2565
2614
|
*
|
|
2566
2615
|
* If no action of this name is in the map then nothing happens.
|
|
2567
2616
|
* @param action_name the name of the action
|
|
2617
|
+
* @since 2.32
|
|
2568
2618
|
* @virtual
|
|
2569
2619
|
*/
|
|
2570
2620
|
vfunc_remove_action(action_name: string): void;
|
|
@@ -2837,6 +2887,7 @@ export namespace Builder {
|
|
|
2837
2887
|
|
|
2838
2888
|
/**
|
|
2839
2889
|
* @param result
|
|
2890
|
+
* @throws GLib.Error
|
|
2840
2891
|
*/
|
|
2841
2892
|
save_as_finish(result: Gio.AsyncResult): boolean;
|
|
2842
2893
|
|
|
@@ -2862,6 +2913,7 @@ export namespace Builder {
|
|
|
2862
2913
|
|
|
2863
2914
|
/**
|
|
2864
2915
|
* @param result
|
|
2916
|
+
* @throws GLib.Error
|
|
2865
2917
|
*/
|
|
2866
2918
|
save_finish(result: Gio.AsyncResult): boolean;
|
|
2867
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
|
},
|