@girs/gdl-3 4.1.0 → 4.3.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 +8 -8
- package/gdl-3-surface.d.ts +335 -0
- package/gdl-3-surface.js +68 -0
- package/package.json +21 -17
- package/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Gdl-3
|
|
8
|
+
GJS TypeScript type definitions for Gdl-3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.3.0.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Install the type definitions with npm:
|
|
13
13
|
```bash
|
|
14
14
|
npm install @girs/gdl-3
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Import it like any other module:
|
|
20
20
|
```ts
|
|
21
21
|
import Gdl from '@girs/gdl-3';
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### Ambient Modules
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
[Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
|
|
27
27
|
For this you need to include `@girs/gdl-3` or `@girs/gdl-3/ambient` in your `tsconfig` or entry point Typescript file:
|
|
28
28
|
|
|
29
29
|
`index.ts`:
|
|
@@ -42,7 +42,7 @@ import '@girs/gdl-3'
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The ambient module now resolves with types:
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
48
|
import Gdl from 'gi://Gdl?version=3';
|
|
@@ -50,7 +50,7 @@ import Gdl from 'gi://Gdl?version=3';
|
|
|
50
50
|
|
|
51
51
|
### Global import
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
GJS's global `imports.gi` works too, with types.
|
|
54
54
|
For this you need to include `@girs/gdl-3` or `@girs/gdl-3/import` in your `tsconfig` or entry point Typescript file:
|
|
55
55
|
|
|
56
56
|
`index.ts`:
|
|
@@ -69,7 +69,7 @@ import '@girs/gdl-3'
|
|
|
69
69
|
}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
That form carries types as well:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
const Gdl = imports.gi.Gdl;
|
|
@@ -77,7 +77,7 @@ const Gdl = imports.gi.Gdl;
|
|
|
77
77
|
|
|
78
78
|
### Bundle
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
|
|
81
81
|
|
|
82
82
|
## Other packages
|
|
83
83
|
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GIR-derived widget VOCABULARY for Gdl-3.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED — do not edit. Provenance: Gdl-3 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface — prop(s) no TypeScript value satisfies: Gdl.DockObject.pixbuf-icon
|
|
5
|
+
*
|
|
6
|
+
* 12 concrete widgets, 12 declarations, 3 enum nick unions, 4 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 GObject from '@girs/gobject-2.0';
|
|
28
|
+
import type Gdl from './gdl-3.js';
|
|
29
|
+
import type Gtk from '@girs/gtk-3.0';
|
|
30
|
+
import type { GtkBinConstructOnly, GtkBinProps, GtkBoxConstructOnly, GtkBoxProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkNotebookConstructOnly, GtkNotebookProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkOrientationNick, GtkPositionTypeNick, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-3.0/surface';
|
|
31
|
+
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
// Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
|
|
34
|
+
//
|
|
35
|
+
// Not derived from the member name. Substituting underscores for dashes is not a law:
|
|
36
|
+
// some nicks keep an underscore the substitution would have replaced, and only the
|
|
37
|
+
// attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
|
|
38
|
+
// how a derived nick passes review and breaks elsewhere.
|
|
39
|
+
// Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
|
|
42
|
+
export type GdlDockBarStyleNick = 'icons' | 'text' | 'both' | 'auto';
|
|
43
|
+
export type GdlDockPlacementNick = 'none' | 'top' | 'bottom' | 'right' | 'left' | 'center' | 'floating';
|
|
44
|
+
export type GdlSwitcherStyleNick = 'text' | 'icon' | 'both' | 'toolbar' | 'tabs' | 'none';
|
|
45
|
+
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
// Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
|
|
48
|
+
// inheritance rather than flattening per widget.
|
|
49
|
+
//
|
|
50
|
+
// The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
|
|
51
|
+
// of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
|
|
52
|
+
// because GObject installs interface properties on the implementor at runtime while
|
|
53
|
+
// GIR keeps them once, on the interface.
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
export interface GdlDockProps extends GdlDockObjectProps, GtkBuildableProps {
|
|
57
|
+
'default-title'?: string;
|
|
58
|
+
floating?: boolean;
|
|
59
|
+
floatx?: number;
|
|
60
|
+
floaty?: number;
|
|
61
|
+
height?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether or not to prevent a floating dock window from appearing in the taskbar.
|
|
64
|
+
* @since 3.6
|
|
65
|
+
*/
|
|
66
|
+
'skip-taskbar'?: boolean;
|
|
67
|
+
width?: number;
|
|
68
|
+
}
|
|
69
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
70
|
+
export type GdlDockConstructOnly = GdlDockObjectConstructOnly | GtkBuildableConstructOnly | 'floating';
|
|
71
|
+
|
|
72
|
+
export interface GdlDockBarProps extends GtkBoxProps, GtkBuildableProps, GtkOrientableProps {
|
|
73
|
+
'dockbar-style'?: GdlDockBarStyleNick | Gdl.DockBarStyle;
|
|
74
|
+
/** The #GdlDockMaster object attached to the dockbar. */
|
|
75
|
+
master?: GObject.Object;
|
|
76
|
+
}
|
|
77
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
78
|
+
export type GdlDockBarConstructOnly = GtkBoxConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
|
|
79
|
+
|
|
80
|
+
export interface GdlDockItemProps extends GdlDockObjectProps, GtkBuildableProps {
|
|
81
|
+
behavior?: number;
|
|
82
|
+
/**
|
|
83
|
+
* If set, the dock item is closed.
|
|
84
|
+
* @since 3.6
|
|
85
|
+
*/
|
|
86
|
+
closed?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* If set, the dock item is hidden but it has a corresponding icon in the dock bar allowing to show it again.
|
|
89
|
+
* @since 3.6
|
|
90
|
+
*/
|
|
91
|
+
iconified?: boolean;
|
|
92
|
+
locked?: boolean;
|
|
93
|
+
/** The orientation of the docking item. */
|
|
94
|
+
orientation?: GtkOrientationNick | Gtk.Orientation;
|
|
95
|
+
'preferred-height'?: number;
|
|
96
|
+
'preferred-width'?: number;
|
|
97
|
+
resize?: boolean;
|
|
98
|
+
}
|
|
99
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
100
|
+
export type GdlDockItemConstructOnly = GdlDockObjectConstructOnly | GtkBuildableConstructOnly;
|
|
101
|
+
|
|
102
|
+
export interface GdlDockItemButtonImageProps extends GtkWidgetProps, GtkBuildableProps {
|
|
103
|
+
}
|
|
104
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
105
|
+
export type GdlDockItemButtonImageConstructOnly = GtkWidgetConstructOnly | GtkBuildableConstructOnly;
|
|
106
|
+
|
|
107
|
+
export interface GdlDockItemGripProps extends GtkContainerProps, GtkBuildableProps {
|
|
108
|
+
item?: Gdl.DockItem;
|
|
109
|
+
}
|
|
110
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
111
|
+
export type GdlDockItemGripConstructOnly = GtkContainerConstructOnly | GtkBuildableConstructOnly | 'item';
|
|
112
|
+
|
|
113
|
+
export interface GdlDockNotebookProps extends GdlDockItemProps, GtkBuildableProps {
|
|
114
|
+
page?: number;
|
|
115
|
+
}
|
|
116
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
117
|
+
export type GdlDockNotebookConstructOnly = GdlDockItemConstructOnly | GtkBuildableConstructOnly;
|
|
118
|
+
|
|
119
|
+
export interface GdlDockObjectProps extends GtkContainerProps, GtkBuildableProps {
|
|
120
|
+
/** A long descriptive name. */
|
|
121
|
+
'long-name'?: string;
|
|
122
|
+
/** The master which manages all the objects in a dock ring */
|
|
123
|
+
master?: Gdl.DockMaster;
|
|
124
|
+
/** The object name. */
|
|
125
|
+
name?: string;
|
|
126
|
+
/**
|
|
127
|
+
* A GdkPixbuf to use for the icon of the dock object.
|
|
128
|
+
* @since 3.3.2
|
|
129
|
+
*/
|
|
130
|
+
'pixbuf-icon'?: never;
|
|
131
|
+
/** A stock id to use for the icon of the dock object. */
|
|
132
|
+
'stock-id'?: string;
|
|
133
|
+
}
|
|
134
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
135
|
+
export type GdlDockObjectConstructOnly = GtkContainerConstructOnly | GtkBuildableConstructOnly | 'name';
|
|
136
|
+
|
|
137
|
+
export interface GdlDockPanedProps extends GdlDockItemProps, GtkBuildableProps {
|
|
138
|
+
position?: number;
|
|
139
|
+
}
|
|
140
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
141
|
+
export type GdlDockPanedConstructOnly = GdlDockItemConstructOnly | GtkBuildableConstructOnly;
|
|
142
|
+
|
|
143
|
+
export interface GdlDockPlaceholderProps extends GdlDockObjectProps, GtkBuildableProps {
|
|
144
|
+
floating?: boolean;
|
|
145
|
+
floatx?: number;
|
|
146
|
+
floaty?: number;
|
|
147
|
+
height?: number;
|
|
148
|
+
host?: Gdl.DockObject;
|
|
149
|
+
'next-placement'?: GdlDockPlacementNick | Gdl.DockPlacement;
|
|
150
|
+
sticky?: boolean;
|
|
151
|
+
width?: number;
|
|
152
|
+
}
|
|
153
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
154
|
+
export type GdlDockPlaceholderConstructOnly = GdlDockObjectConstructOnly | GtkBuildableConstructOnly | 'floating' | 'floatx' | 'floaty' | 'sticky';
|
|
155
|
+
|
|
156
|
+
export interface GdlDockTablabelProps extends GtkBinProps, GtkBuildableProps {
|
|
157
|
+
item?: Gdl.DockItem;
|
|
158
|
+
}
|
|
159
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
160
|
+
export type GdlDockTablabelConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
161
|
+
|
|
162
|
+
/** The GdlDockLayout struct contains only private fields and should not be directly accessed. */
|
|
163
|
+
export interface GdlPreviewWindowProps extends GtkWindowProps, GtkBuildableProps {
|
|
164
|
+
}
|
|
165
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
166
|
+
export type GdlPreviewWindowConstructOnly = GtkWindowConstructOnly | GtkBuildableConstructOnly;
|
|
167
|
+
|
|
168
|
+
export interface GdlSwitcherProps extends GtkNotebookProps, GtkBuildableProps {
|
|
169
|
+
'switcher-style'?: GdlSwitcherStyleNick | Gdl.SwitcherStyle;
|
|
170
|
+
'tab-pos'?: GtkPositionTypeNick | Gtk.PositionType;
|
|
171
|
+
'tab-reorderable'?: boolean;
|
|
172
|
+
}
|
|
173
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
174
|
+
export type GdlSwitcherConstructOnly = GtkNotebookConstructOnly | GtkBuildableConstructOnly;
|
|
175
|
+
|
|
176
|
+
// ---------------------------------------------------------------------------
|
|
177
|
+
// The GType-keyed widget map.
|
|
178
|
+
//
|
|
179
|
+
// Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
|
|
180
|
+
// consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
|
|
181
|
+
// for a Vue `GlobalComponents`, the class itself for a renderer whose element type
|
|
182
|
+
// is the class. None of those is baked in here.
|
|
183
|
+
//
|
|
184
|
+
// `slotCandidates` is a candidate list and never an answer: derived from methods
|
|
185
|
+
// taking exactly one widget argument. The GIR cannot tell adoption from reference —
|
|
186
|
+
// `set_title_widget` parents its argument and `set_activatable_widget` does not, and
|
|
187
|
+
// both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
|
|
188
|
+
// this is what notices when a release adds a candidate.
|
|
189
|
+
// ---------------------------------------------------------------------------
|
|
190
|
+
|
|
191
|
+
export interface Widgets {
|
|
192
|
+
GdlDock: {
|
|
193
|
+
class: Gdl.Dock;
|
|
194
|
+
props: GdlDockProps;
|
|
195
|
+
signals: Gdl.Dock.SignalSignatures;
|
|
196
|
+
constructOnly: GdlDockConstructOnly;
|
|
197
|
+
slotCandidates: {};
|
|
198
|
+
};
|
|
199
|
+
GdlDockBar: {
|
|
200
|
+
class: Gdl.DockBar;
|
|
201
|
+
props: GdlDockBarProps;
|
|
202
|
+
signals: Gdl.DockBar.SignalSignatures;
|
|
203
|
+
constructOnly: GdlDockBarConstructOnly;
|
|
204
|
+
slotCandidates: {};
|
|
205
|
+
};
|
|
206
|
+
GdlDockItem: {
|
|
207
|
+
class: Gdl.DockItem;
|
|
208
|
+
props: GdlDockItemProps;
|
|
209
|
+
signals: Gdl.DockItem.SignalSignatures;
|
|
210
|
+
constructOnly: GdlDockItemConstructOnly;
|
|
211
|
+
slotCandidates: {
|
|
212
|
+
'child': 'set_child';
|
|
213
|
+
'default-position': 'set_default_position';
|
|
214
|
+
'tablabel': 'set_tablabel';
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
GdlDockItemButtonImage: {
|
|
218
|
+
class: Gdl.DockItemButtonImage;
|
|
219
|
+
props: GdlDockItemButtonImageProps;
|
|
220
|
+
signals: Gdl.DockItemButtonImage.SignalSignatures;
|
|
221
|
+
constructOnly: GdlDockItemButtonImageConstructOnly;
|
|
222
|
+
slotCandidates: {};
|
|
223
|
+
};
|
|
224
|
+
GdlDockItemGrip: {
|
|
225
|
+
class: Gdl.DockItemGrip;
|
|
226
|
+
props: GdlDockItemGripProps;
|
|
227
|
+
signals: Gdl.DockItemGrip.SignalSignatures;
|
|
228
|
+
constructOnly: GdlDockItemGripConstructOnly;
|
|
229
|
+
slotCandidates: {
|
|
230
|
+
'label': 'set_label';
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
GdlDockNotebook: {
|
|
234
|
+
class: Gdl.DockNotebook;
|
|
235
|
+
props: GdlDockNotebookProps;
|
|
236
|
+
signals: Gdl.DockNotebook.SignalSignatures;
|
|
237
|
+
constructOnly: GdlDockNotebookConstructOnly;
|
|
238
|
+
slotCandidates: {};
|
|
239
|
+
};
|
|
240
|
+
GdlDockObject: {
|
|
241
|
+
class: Gdl.DockObject;
|
|
242
|
+
props: GdlDockObjectProps;
|
|
243
|
+
signals: Gdl.DockObject.SignalSignatures;
|
|
244
|
+
constructOnly: GdlDockObjectConstructOnly;
|
|
245
|
+
slotCandidates: {};
|
|
246
|
+
};
|
|
247
|
+
GdlDockPaned: {
|
|
248
|
+
class: Gdl.DockPaned;
|
|
249
|
+
props: GdlDockPanedProps;
|
|
250
|
+
signals: Gdl.DockPaned.SignalSignatures;
|
|
251
|
+
constructOnly: GdlDockPanedConstructOnly;
|
|
252
|
+
slotCandidates: {};
|
|
253
|
+
};
|
|
254
|
+
GdlDockPlaceholder: {
|
|
255
|
+
class: Gdl.DockPlaceholder;
|
|
256
|
+
props: GdlDockPlaceholderProps;
|
|
257
|
+
signals: Gdl.DockPlaceholder.SignalSignatures;
|
|
258
|
+
constructOnly: GdlDockPlaceholderConstructOnly;
|
|
259
|
+
slotCandidates: {};
|
|
260
|
+
};
|
|
261
|
+
GdlDockTablabel: {
|
|
262
|
+
class: Gdl.DockTablabel;
|
|
263
|
+
props: GdlDockTablabelProps;
|
|
264
|
+
signals: Gdl.DockTablabel.SignalSignatures;
|
|
265
|
+
constructOnly: GdlDockTablabelConstructOnly;
|
|
266
|
+
slotCandidates: {};
|
|
267
|
+
};
|
|
268
|
+
GdlPreviewWindow: {
|
|
269
|
+
class: Gdl.PreviewWindow;
|
|
270
|
+
props: GdlPreviewWindowProps;
|
|
271
|
+
signals: Gdl.PreviewWindow.SignalSignatures;
|
|
272
|
+
constructOnly: GdlPreviewWindowConstructOnly;
|
|
273
|
+
slotCandidates: {};
|
|
274
|
+
};
|
|
275
|
+
GdlSwitcher: {
|
|
276
|
+
class: Gdl.Switcher;
|
|
277
|
+
props: GdlSwitcherProps;
|
|
278
|
+
signals: Gdl.Switcher.SignalSignatures;
|
|
279
|
+
constructOnly: GdlSwitcherConstructOnly;
|
|
280
|
+
slotCandidates: {};
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
285
|
+
export type WidgetGType = keyof Widgets;
|
|
286
|
+
|
|
287
|
+
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
288
|
+
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
289
|
+
|
|
290
|
+
/** The signal table this package already emits, reached by GType. */
|
|
291
|
+
export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
|
|
292
|
+
|
|
293
|
+
/** The instance type — what a `ref`-shaped prop should infer. */
|
|
294
|
+
export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
|
|
295
|
+
|
|
296
|
+
/** Property names that can only be set at construction. */
|
|
297
|
+
export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
|
|
298
|
+
|
|
299
|
+
/** Candidate child slots — see the note above; curation decides. */
|
|
300
|
+
export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The same facts as runtime data, for a consumer that CHECKS them.
|
|
304
|
+
*
|
|
305
|
+
* Types are erased, so a spec that asks the installed GTK whether every property
|
|
306
|
+
* here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
|
|
307
|
+
* and every nick resolvable through an enum lookup cannot read the interfaces
|
|
308
|
+
* above. Emitted headlessly with no GTK present, which is exactly why the checking
|
|
309
|
+
* belongs to the consumer and the DATA belongs here.
|
|
310
|
+
*/
|
|
311
|
+
export const SURFACE_PROVENANCE: string;
|
|
312
|
+
|
|
313
|
+
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
314
|
+
export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
315
|
+
|
|
316
|
+
/** Widget GType -> its own signals. */
|
|
317
|
+
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
318
|
+
|
|
319
|
+
/** Widget GType -> every declaration its members come from, self first. */
|
|
320
|
+
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
321
|
+
|
|
322
|
+
/** Enum GType -> the nicks this surface offers. */
|
|
323
|
+
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
324
|
+
|
|
325
|
+
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
326
|
+
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* `Type.property` -> the release that introduced it.
|
|
330
|
+
*
|
|
331
|
+
* What keeps a runtime cross-check honest across a version gap without an
|
|
332
|
+
* allowlist: a member the installed library lacks is a defect UNLESS the version
|
|
333
|
+
* here is newer than the one running.
|
|
334
|
+
*/
|
|
335
|
+
export const SINCE: Readonly<Record<string, string>>;
|
package/gdl-3-surface.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// The widget vocabulary of Gdl-3 as runtime data.
|
|
2
|
+
//
|
|
3
|
+
// GENERATED — do not edit. Provenance: Gdl-3 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface — prop(s) no TypeScript value satisfies: Gdl.DockObject.pixbuf-icon
|
|
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 SURFACE_PROVENANCE = 'Gdl-3 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface — prop(s) no TypeScript value satisfies: Gdl.DockObject.pixbuf-icon';
|
|
10
|
+
|
|
11
|
+
export const OWN_PROPS = {
|
|
12
|
+
GdlDock: ['default-title', 'floating', 'floatx', 'floaty', 'height', 'skip-taskbar', 'width'],
|
|
13
|
+
GdlDockBar: ['dockbar-style', 'master'],
|
|
14
|
+
GdlDockItem: ['behavior', 'closed', 'iconified', 'locked', 'orientation', 'preferred-height', 'preferred-width', 'resize'],
|
|
15
|
+
GdlDockItemGrip: ['item'],
|
|
16
|
+
GdlDockNotebook: ['page'],
|
|
17
|
+
GdlDockObject: ['long-name', 'master', 'name', 'pixbuf-icon', 'stock-id'],
|
|
18
|
+
GdlDockPaned: ['position'],
|
|
19
|
+
GdlDockPlaceholder: ['floating', 'floatx', 'floaty', 'height', 'host', 'next-placement', 'sticky', 'width'],
|
|
20
|
+
GdlDockTablabel: ['item'],
|
|
21
|
+
GdlSwitcher: ['switcher-style', 'tab-pos', 'tab-reorderable'],
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const OWN_SIGNALS = {
|
|
25
|
+
GdlDock: ['layout-changed'],
|
|
26
|
+
GdlDockItem: ['deselected', 'dock-drag-begin', 'dock-drag-end', 'dock-drag-motion', 'move-focus-child', 'selected'],
|
|
27
|
+
GdlDockObject: ['detach', 'dock'],
|
|
28
|
+
GdlDockTablabel: ['button-pressed-handle'],
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const DECLS = {
|
|
32
|
+
GdlDock: ['GdlDock', 'GdlDockObject', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
33
|
+
GdlDockBar: ['GdlDockBar', 'GtkBox', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkOrientable'],
|
|
34
|
+
GdlDockItem: ['GdlDockItem', 'GdlDockObject', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
35
|
+
GdlDockItemButtonImage: ['GdlDockItemButtonImage', 'GtkWidget', 'GtkBuildable'],
|
|
36
|
+
GdlDockItemGrip: ['GdlDockItemGrip', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
37
|
+
GdlDockNotebook: ['GdlDockNotebook', 'GdlDockItem', 'GdlDockObject', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
38
|
+
GdlDockObject: ['GdlDockObject', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
39
|
+
GdlDockPaned: ['GdlDockPaned', 'GdlDockItem', 'GdlDockObject', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
40
|
+
GdlDockPlaceholder: ['GdlDockPlaceholder', 'GdlDockObject', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
41
|
+
GdlDockTablabel: ['GdlDockTablabel', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
42
|
+
GdlPreviewWindow: ['GdlPreviewWindow', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
43
|
+
GdlSwitcher: ['GdlSwitcher', 'GtkNotebook', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const ENUM_NICKS = {
|
|
47
|
+
GdlDockBarStyle: ['icons', 'text', 'both', 'auto'],
|
|
48
|
+
GdlDockPlacement: ['none', 'top', 'bottom', 'right', 'left', 'center', 'floating'],
|
|
49
|
+
GdlSwitcherStyle: ['text', 'icon', 'both', 'toolbar', 'tabs', 'none'],
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const SLOT_CANDIDATES = {
|
|
53
|
+
GdlDockItem: {
|
|
54
|
+
'child': 'set_child',
|
|
55
|
+
'default-position': 'set_default_position',
|
|
56
|
+
'tablabel': 'set_tablabel',
|
|
57
|
+
},
|
|
58
|
+
GdlDockItemGrip: {
|
|
59
|
+
'label': 'set_label',
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const SINCE = {
|
|
64
|
+
'GdlDock.skip-taskbar': '3.6',
|
|
65
|
+
'GdlDockItem.closed': '3.6',
|
|
66
|
+
'GdlDockItem.iconified': '3.6',
|
|
67
|
+
'GdlDockObject.pixbuf-icon': '3.3.2',
|
|
68
|
+
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gdl-3",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"
|
|
5
|
-
"description": "GJS TypeScript type definitions for Gdl-3, generated from library version 3.0.0",
|
|
3
|
+
"version": "4.3.0",
|
|
4
|
+
"description": "GJS TypeScript type definitions for Gdl-3",
|
|
6
5
|
"type": "module",
|
|
7
6
|
"module": "gdl-3.js",
|
|
8
7
|
"main": "gdl-3.js",
|
|
@@ -17,6 +16,11 @@
|
|
|
17
16
|
"import": "./gdl-3-import.js",
|
|
18
17
|
"default": "./gdl-3-import.js"
|
|
19
18
|
},
|
|
19
|
+
"./surface": {
|
|
20
|
+
"types": "./gdl-3-surface.d.ts",
|
|
21
|
+
"import": "./gdl-3-surface.js",
|
|
22
|
+
"default": "./gdl-3-surface.js"
|
|
23
|
+
},
|
|
20
24
|
"./gdl-3": {
|
|
21
25
|
"types": "./gdl-3.d.ts",
|
|
22
26
|
"import": "./gdl-3.js",
|
|
@@ -32,20 +36,20 @@
|
|
|
32
36
|
"test": "tsc --project tsconfig.json"
|
|
33
37
|
},
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"@girs/gjs": "^4.
|
|
36
|
-
"@girs/gtk-3.0": "^4.
|
|
37
|
-
"@girs/xlib-2.0": "^4.
|
|
38
|
-
"@girs/gdk-3.0": "^4.
|
|
39
|
-
"@girs/cairo-1.0": "^4.
|
|
40
|
-
"@girs/gobject-2.0": "^4.
|
|
41
|
-
"@girs/glib-2.0": "^4.
|
|
42
|
-
"@girs/pango-1.0": "^4.
|
|
43
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
44
|
-
"@girs/freetype2-2.0": "^4.
|
|
45
|
-
"@girs/gio-2.0": "^4.
|
|
46
|
-
"@girs/gmodule-2.0": "^4.
|
|
47
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
48
|
-
"@girs/atk-1.0": "^4.
|
|
39
|
+
"@girs/gjs": "^4.3.0",
|
|
40
|
+
"@girs/gtk-3.0": "^4.3.0",
|
|
41
|
+
"@girs/xlib-2.0": "^4.3.0",
|
|
42
|
+
"@girs/gdk-3.0": "^4.3.0",
|
|
43
|
+
"@girs/cairo-1.0": "^4.3.0",
|
|
44
|
+
"@girs/gobject-2.0": "^4.3.0",
|
|
45
|
+
"@girs/glib-2.0": "^4.3.0",
|
|
46
|
+
"@girs/pango-1.0": "^4.3.0",
|
|
47
|
+
"@girs/harfbuzz-0.0": "^4.3.0",
|
|
48
|
+
"@girs/freetype2-2.0": "^4.3.0",
|
|
49
|
+
"@girs/gio-2.0": "^4.3.0",
|
|
50
|
+
"@girs/gmodule-2.0": "^4.3.0",
|
|
51
|
+
"@girs/gdkpixbuf-2.0": "^4.3.0",
|
|
52
|
+
"@girs/atk-1.0": "^4.3.0" },
|
|
49
53
|
"devDependencies": {
|
|
50
54
|
"typescript": "*"
|
|
51
55
|
},
|