@girs/gtksource-5 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 CHANGED
@@ -4,82 +4,96 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/gtksource-5)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gtksource-5)
6
6
 
7
+ GJS TypeScript type definitions for GtkSource-5, generated from library version 5.21.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
7
8
 
8
- GJS TypeScript type definitions for GtkSource-5, generated from library version 5.21.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
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/gtksource-5
15
16
  ```
16
17
 
17
- ## Usage
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/gtksource-5` | the namespace as a default export, plus the ambient and global declarations |
26
+ | `@girs/gtksource-5/ambient` | only the `gi://` module declarations |
27
+ | `@girs/gtksource-5/import` | only the `imports.gi` declarations |
28
+ | `@girs/gtksource-5/gtksource-5` | the namespace, without the side-effecting declarations |
29
+ | `@girs/gtksource-5/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 GtkSource from '@girs/gtksource-5';
22
39
  ```
23
40
 
24
- ### Ambient Modules
41
+ ### As `gi://`
25
42
 
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
- For this you need to include `@girs/gtksource-5` or `@girs/gtksource-5/ambient` in your `tsconfig` or entry point Typescript file:
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/gtksource-5'
47
+ import '@girs/gtksource-5';
32
48
  ```
33
49
 
34
- `tsconfig.json`:
35
50
  ```json
36
- {
37
- "compilerOptions": {
38
- ...
39
- },
40
- "include": ["@girs/gtksource-5"],
41
- ...
42
- }
51
+ { "include": ["@girs/gtksource-5"] }
43
52
  ```
44
53
 
45
- The ambient module now resolves with types:
54
+ Then the runtime spelling type-checks:
46
55
 
47
56
  ```ts
48
57
  import GtkSource from 'gi://GtkSource?version=5';
49
58
  ```
50
59
 
51
- ### Global import
60
+ Referencing `@girs/gtksource-5/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 `imports.gi` works too, with types.
54
- For this you need to include `@girs/gtksource-5` or `@girs/gtksource-5/import` in your `tsconfig` or entry point Typescript file:
65
+ GJS's global object works the same way, via `@girs/gtksource-5/import`:
55
66
 
56
- `index.ts`:
57
67
  ```ts
58
- import '@girs/gtksource-5'
68
+ const GtkSource = imports.gi.GtkSource;
59
69
  ```
60
70
 
61
- `tsconfig.json`:
62
- ```json
63
- {
64
- "compilerOptions": {
65
- ...
66
- },
67
- "include": ["@girs/gtksource-5"],
68
- ...
69
- }
70
- ```
71
+ ## Widget vocabulary
71
72
 
72
- That form carries types as well:
73
+ `gtksource-5` 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
- const GtkSource = imports.gi.GtkSource;
77
+ import type { Widgets, PropsOf } from '@girs/gtksource-5/vocabulary';
78
+ import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/gtksource-5/vocabulary';
76
79
  ```
77
80
 
78
- ### Bundle
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
- 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.
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
- All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
97
+ Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
98
+
85
99
 
@@ -0,0 +1,442 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for GtkSource-5.
3
+ *
4
+ * GENERATED — do not edit. Provenance: GtkSource-5 — library 5.21.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
5
+ *
6
+ * 10 concrete widgets, 12 declarations, 11 enum nick unions, 2 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 Gdk from '@girs/gdk-4.0';
28
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
29
+ import type Gio from '@girs/gio-2.0';
30
+ import type Gtk from '@girs/gtk-4.0';
31
+ import type GtkSource from './gtksource-5.js';
32
+ import type Pango from '@girs/pango-1.0';
33
+ import type { GtkAccessibleConstructOnly, GtkAccessibleProps, GtkAccessibleTextConstructOnly, GtkAccessibleTextProps, GtkActionableConstructOnly, GtkActionableProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkButtonConstructOnly, GtkButtonProps, GtkConstraintTargetConstructOnly, GtkConstraintTargetProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkTextViewConstructOnly, GtkTextViewProps, GtkTextWindowTypeNick, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-4.0/vocabulary';
34
+
35
+ // ---------------------------------------------------------------------------
36
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
37
+ //
38
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
39
+ // some nicks keep an underscore the substitution would have replaced, and only the
40
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
41
+ // how a derived nick passes review and breaks elsewhere.
42
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
43
+ // ---------------------------------------------------------------------------
44
+
45
+ export type GtkSourceAnnotationStyleNick = 'none' | 'warning' | 'error' | 'accent';
46
+ export type GtkSourceBackgroundPatternTypeNick = 'none' | 'grid';
47
+ export type GtkSourceBracketMatchTypeNick = 'none' | 'out-of-range' | 'not-found' | 'found';
48
+ export type GtkSourceChangeCaseTypeNick = 'lower' | 'upper' | 'toggle' | 'title';
49
+ export type GtkSourceCompletionActivationNick = 'none' | 'interactive' | 'user-requested';
50
+ export type GtkSourceCompletionColumnNick = 'icon' | 'before' | 'typed-text' | 'after' | 'comment' | 'details';
51
+ export type GtkSourceCompressionTypeNick = 'none' | 'gzip';
52
+ export type GtkSourceGutterRendererAlignmentModeNick = 'cell' | 'first' | 'last';
53
+ export type GtkSourceNewlineTypeNick = 'lf' | 'cr' | 'cr-lf';
54
+ export type GtkSourceSmartHomeEndTypeNick = 'disabled' | 'before' | 'after' | 'always';
55
+ export type GtkSourceViewGutterPositionNick = 'lines' | 'marks';
56
+
57
+ // ---------------------------------------------------------------------------
58
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
59
+ // inheritance rather than flattening per widget.
60
+ //
61
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
62
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
63
+ // because GObject installs interface properties on the implementor at runtime while
64
+ // GIR keeps them once, on the interface.
65
+ // ---------------------------------------------------------------------------
66
+
67
+ /** Widget for single cell of completion proposal. */
68
+ export interface GtkSourceCompletionCellProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
69
+ /** @default GTK_SOURCE_COMPLETION_COLUMN_TYPED_TEXT */
70
+ column?: GtkSourceCompletionColumnNick | GtkSource.CompletionColumn;
71
+ /** @default NULL */
72
+ markup?: string;
73
+ paintable?: Gdk.Paintable;
74
+ /** @default NULL */
75
+ text?: string;
76
+ widget?: Gtk.Widget | null;
77
+ }
78
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
79
+ export type GtkSourceCompletionCellConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | 'column';
80
+
81
+ /** Gutter object for [class@View]. */
82
+ export interface GtkSourceGutterProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
83
+ /** The #GtkSourceView of the gutter. */
84
+ view?: GtkSource.View;
85
+ /**
86
+ * The text window type on which the window is placed.
87
+ * @default GTK_TEXT_WINDOW_LEFT
88
+ */
89
+ 'window-type'?: GtkTextWindowTypeNick | Gtk.TextWindowType;
90
+ }
91
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
92
+ export type GtkSourceGutterConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | 'view' | 'window-type';
93
+
94
+ /** Gutter cell renderer. */
95
+ export interface GtkSourceGutterRendererProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
96
+ /**
97
+ * The alignment mode of the renderer.
98
+ * @default GTK_SOURCE_GUTTER_RENDERER_ALIGNMENT_MODE_CELL
99
+ */
100
+ 'alignment-mode'?: GtkSourceGutterRendererAlignmentModeNick | GtkSource.GutterRendererAlignmentMode;
101
+ /**
102
+ * The horizontal alignment of the renderer.
103
+ * @default 0.000000
104
+ */
105
+ xalign?: number;
106
+ /**
107
+ * The left and right padding of the renderer.
108
+ * @default 0
109
+ */
110
+ xpad?: number;
111
+ /**
112
+ * The vertical alignment of the renderer.
113
+ * @default 0.000000
114
+ */
115
+ yalign?: number;
116
+ /**
117
+ * The top and bottom padding of the renderer.
118
+ * @default 0
119
+ */
120
+ ypad?: number;
121
+ }
122
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
123
+ export type GtkSourceGutterRendererConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
124
+
125
+ /** Renders a pixbuf in the gutter. */
126
+ export interface GtkSourceGutterRendererPixbufProps extends GtkSourceGutterRendererProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
127
+ gicon?: Gio.Icon;
128
+ /** @default NULL */
129
+ 'icon-name'?: string;
130
+ paintable?: Gdk.Paintable | null;
131
+ pixbuf?: GdkPixbuf.Pixbuf;
132
+ }
133
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
134
+ export type GtkSourceGutterRendererPixbufConstructOnly = GtkSourceGutterRendererConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
135
+
136
+ /** Renders text in the gutter. */
137
+ export interface GtkSourceGutterRendererTextProps extends GtkSourceGutterRendererProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
138
+ /** @default NULL */
139
+ markup?: string;
140
+ /** @default NULL */
141
+ text?: string;
142
+ }
143
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
144
+ export type GtkSourceGutterRendererTextConstructOnly = GtkSourceGutterRendererConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
145
+
146
+ /** Display for interactive tooltips. */
147
+ export interface GtkSourceHoverDisplayProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
148
+ }
149
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
150
+ export type GtkSourceHoverDisplayConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
151
+
152
+ /** Widget that displays a map for a specific [class@View]. */
153
+ export interface GtkSourceMapProps extends GtkSourceViewProps, GtkAccessibleProps, GtkAccessibleTextProps, GtkBuildableProps, GtkConstraintTargetProps, GtkScrollableProps {
154
+ 'font-desc'?: Pango.FontDescription;
155
+ view?: GtkSource.View | null;
156
+ }
157
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
158
+ export type GtkSourceMapConstructOnly = GtkSourceViewConstructOnly | GtkAccessibleConstructOnly | GtkAccessibleTextConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkScrollableConstructOnly;
159
+
160
+ /** Interface implemented by widgets for choosing style schemes. */
161
+ export interface GtkSourceStyleSchemeChooserProps {
162
+ /** Contains the currently selected style scheme. */
163
+ 'style-scheme'?: GtkSource.StyleScheme;
164
+ }
165
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
166
+ export type GtkSourceStyleSchemeChooserConstructOnly = never;
167
+
168
+ /** A button to launch a style scheme selection dialog. */
169
+ export interface GtkSourceStyleSchemeChooserButtonProps extends GtkButtonProps, GtkAccessibleProps, GtkActionableProps, GtkBuildableProps, GtkConstraintTargetProps, GtkSourceStyleSchemeChooserProps {
170
+ }
171
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
172
+ export type GtkSourceStyleSchemeChooserButtonConstructOnly = GtkButtonConstructOnly | GtkAccessibleConstructOnly | GtkActionableConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkSourceStyleSchemeChooserConstructOnly;
173
+
174
+ /** A widget for choosing style schemes. */
175
+ export interface GtkSourceStyleSchemeChooserWidgetProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkSourceStyleSchemeChooserProps {
176
+ }
177
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
178
+ export type GtkSourceStyleSchemeChooserWidgetConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkSourceStyleSchemeChooserConstructOnly;
179
+
180
+ /** A preview widget for [class@StyleScheme]. */
181
+ export interface GtkSourceStyleSchemePreviewProps extends GtkWidgetProps, GtkAccessibleProps, GtkActionableProps, GtkBuildableProps, GtkConstraintTargetProps {
182
+ scheme?: GtkSource.StyleScheme;
183
+ /** @default FALSE */
184
+ selected?: boolean;
185
+ }
186
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
187
+ export type GtkSourceStyleSchemePreviewConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkActionableConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | 'scheme';
188
+
189
+ /** Subclass of [class@Gtk.TextView]. */
190
+ export interface GtkSourceViewProps extends GtkTextViewProps, GtkAccessibleProps, GtkAccessibleTextProps, GtkBuildableProps, GtkConstraintTargetProps, GtkScrollableProps {
191
+ /** @default FALSE */
192
+ 'auto-indent'?: boolean;
193
+ /**
194
+ * Draw a specific background pattern on the view.
195
+ * @default GTK_SOURCE_BACKGROUND_PATTERN_TYPE_NONE
196
+ */
197
+ 'background-pattern'?: GtkSourceBackgroundPatternTypeNick | GtkSource.BackgroundPatternType;
198
+ /**
199
+ * The property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found in [class@SnippetManager].
200
+ * @default FALSE
201
+ */
202
+ 'enable-snippets'?: boolean;
203
+ /** @default FALSE */
204
+ 'highlight-current-line'?: boolean;
205
+ /** @default TRUE */
206
+ 'indent-on-tab'?: boolean;
207
+ /**
208
+ * Width of an indentation step expressed in number of spaces.
209
+ * @default -1
210
+ */
211
+ 'indent-width'?: number;
212
+ /** The property is a [iface@Indenter] to use to indent as the user types into the [class@View]. */
213
+ indenter?: GtkSource.Indenter | null;
214
+ /** @default FALSE */
215
+ 'insert-spaces-instead-of-tabs'?: boolean;
216
+ /**
217
+ * Position of the right margin.
218
+ * @default 80
219
+ */
220
+ 'right-margin-position'?: number;
221
+ /**
222
+ * Whether to display line mark pixbufs
223
+ * @default FALSE
224
+ */
225
+ 'show-line-marks'?: boolean;
226
+ /**
227
+ * Whether to display line numbers
228
+ * @default FALSE
229
+ */
230
+ 'show-line-numbers'?: boolean;
231
+ /**
232
+ * Whether to display the right margin.
233
+ * @default FALSE
234
+ */
235
+ 'show-right-margin'?: boolean;
236
+ /**
237
+ * Whether smart Backspace should be used.
238
+ * @default FALSE
239
+ */
240
+ 'smart-backspace'?: boolean;
241
+ /**
242
+ * Set the behavior of the HOME and END keys.
243
+ * @default GTK_SOURCE_SMART_HOME_END_DISABLED
244
+ */
245
+ 'smart-home-end'?: GtkSourceSmartHomeEndTypeNick | GtkSource.SmartHomeEndType;
246
+ /**
247
+ * Width of a tab character expressed in number of spaces.
248
+ * @default 8
249
+ */
250
+ 'tab-width'?: number;
251
+ }
252
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
253
+ export type GtkSourceViewConstructOnly = GtkTextViewConstructOnly | GtkAccessibleConstructOnly | GtkAccessibleTextConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkScrollableConstructOnly;
254
+
255
+ // ---------------------------------------------------------------------------
256
+ // The GType-keyed widget map.
257
+ //
258
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
259
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
260
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
261
+ // is the class. None of those is baked in here.
262
+ //
263
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
264
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
265
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
266
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
267
+ // this is what notices when a release adds a candidate.
268
+ // ---------------------------------------------------------------------------
269
+
270
+ export interface Widgets {
271
+ GtkSourceCompletionCell: {
272
+ class: GtkSource.CompletionCell;
273
+ props: GtkSourceCompletionCellProps;
274
+ signals: GtkSource.CompletionCell.SignalSignatures;
275
+ constructOnly: GtkSourceCompletionCellConstructOnly;
276
+ slotCandidates: {
277
+ 'widget': 'set_widget';
278
+ };
279
+ };
280
+ GtkSourceGutter: {
281
+ class: GtkSource.Gutter;
282
+ props: GtkSourceGutterProps;
283
+ signals: GtkSource.Gutter.SignalSignatures;
284
+ constructOnly: GtkSourceGutterConstructOnly;
285
+ slotCandidates: {};
286
+ };
287
+ GtkSourceGutterRendererPixbuf: {
288
+ class: GtkSource.GutterRendererPixbuf;
289
+ props: GtkSourceGutterRendererPixbufProps;
290
+ signals: GtkSource.GutterRendererPixbuf.SignalSignatures;
291
+ constructOnly: GtkSourceGutterRendererPixbufConstructOnly;
292
+ slotCandidates: {};
293
+ };
294
+ GtkSourceGutterRendererText: {
295
+ class: GtkSource.GutterRendererText;
296
+ props: GtkSourceGutterRendererTextProps;
297
+ signals: GtkSource.GutterRendererText.SignalSignatures;
298
+ constructOnly: GtkSourceGutterRendererTextConstructOnly;
299
+ slotCandidates: {};
300
+ };
301
+ GtkSourceHoverDisplay: {
302
+ class: GtkSource.HoverDisplay;
303
+ props: GtkSourceHoverDisplayProps;
304
+ signals: GtkSource.HoverDisplay.SignalSignatures;
305
+ constructOnly: GtkSourceHoverDisplayConstructOnly;
306
+ slotCandidates: {};
307
+ };
308
+ GtkSourceMap: {
309
+ class: GtkSource.Map;
310
+ props: GtkSourceMapProps;
311
+ signals: GtkSource.Map.SignalSignatures;
312
+ constructOnly: GtkSourceMapConstructOnly;
313
+ slotCandidates: {
314
+ 'view': 'set_view';
315
+ };
316
+ };
317
+ GtkSourceStyleSchemeChooserButton: {
318
+ class: GtkSource.StyleSchemeChooserButton;
319
+ props: GtkSourceStyleSchemeChooserButtonProps;
320
+ signals: GtkSource.StyleSchemeChooserButton.SignalSignatures;
321
+ constructOnly: GtkSourceStyleSchemeChooserButtonConstructOnly;
322
+ slotCandidates: {};
323
+ };
324
+ GtkSourceStyleSchemeChooserWidget: {
325
+ class: GtkSource.StyleSchemeChooserWidget;
326
+ props: GtkSourceStyleSchemeChooserWidgetProps;
327
+ signals: GtkSource.StyleSchemeChooserWidget.SignalSignatures;
328
+ constructOnly: GtkSourceStyleSchemeChooserWidgetConstructOnly;
329
+ slotCandidates: {};
330
+ };
331
+ GtkSourceStyleSchemePreview: {
332
+ class: GtkSource.StyleSchemePreview;
333
+ props: GtkSourceStyleSchemePreviewProps;
334
+ signals: GtkSource.StyleSchemePreview.SignalSignatures;
335
+ constructOnly: GtkSourceStyleSchemePreviewConstructOnly;
336
+ slotCandidates: {};
337
+ };
338
+ GtkSourceView: {
339
+ class: GtkSource.View;
340
+ props: GtkSourceViewProps;
341
+ signals: GtkSource.View.SignalSignatures;
342
+ constructOnly: GtkSourceViewConstructOnly;
343
+ slotCandidates: {};
344
+ };
345
+ }
346
+
347
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
348
+ export type WidgetGType = keyof Widgets;
349
+
350
+ // ---------------------------------------------------------------------------
351
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
352
+ //
353
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
354
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
355
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
356
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
357
+ // more rows in `Widgets`: concatenate them when you mean both.
358
+ // ---------------------------------------------------------------------------
359
+
360
+ export interface ChildHolders {
361
+
362
+ }
363
+
364
+ /** Every GType this namespace holds a child in without it being a widget. */
365
+ export type ChildHolderGType = keyof ChildHolders;
366
+
367
+ /** The writable, optional, GObject-keyed property surface of one GType. */
368
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
369
+
370
+ /** The signal table this package already emits, reached by GType. */
371
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
372
+
373
+ /** The instance type — what a `ref`-shaped prop should infer. */
374
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
375
+
376
+ /** Property names that can only be set at construction. */
377
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
378
+
379
+ /** Candidate child slots — see the note above; curation decides. */
380
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
381
+
382
+ /**
383
+ * The same facts as runtime data, for a consumer that CHECKS them.
384
+ *
385
+ * Types are erased, so a spec that asks the installed GTK whether every property
386
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
387
+ * and every nick resolvable through an enum lookup cannot read the interfaces
388
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
389
+ * belongs to the consumer and the DATA belongs here.
390
+ */
391
+ export const PROVENANCE: {
392
+ readonly namespace: string;
393
+ readonly version: string;
394
+ /** The version the LIBRARY states, or null where it states none. Never the namespace's. */
395
+ readonly libraryVersion: string | null;
396
+ readonly childHolders: number;
397
+ readonly droppedBases: readonly string[];
398
+ readonly inlinedBases: readonly string[];
399
+ readonly unsettableProps: readonly string[];
400
+ };
401
+
402
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
403
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
404
+
405
+ /**
406
+ * Declaration GType -> the signals it registers itself, never its parents'.
407
+ *
408
+ * Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
409
+ * abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
410
+ */
411
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
412
+
413
+ /** Widget GType -> every declaration its members come from, self first. */
414
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
415
+
416
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
417
+ export const CHILD_HOLDERS: readonly string[];
418
+
419
+ /** Enum GType -> the nicks this surface offers. */
420
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
421
+
422
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
423
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
424
+
425
+ /**
426
+ * `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
427
+ *
428
+ * What keeps a runtime cross-check honest across a version gap without an
429
+ * allowlist: a name the installed library lacks is a defect UNLESS the version
430
+ * here is newer than the one running.
431
+ *
432
+ * ALL THREE key shapes, because that test only works for the names it covers. A
433
+ * property-only map leaves a consumer no way to explain a missing SIGNAL, which is
434
+ * a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
435
+ * explain a missing CLASS, and that one fails as a bare
436
+ * `TypeError: can't access property "$gtype", ctor() is undefined` that does not
437
+ * even name the GType.
438
+ *
439
+ * A key is present only where the GIR states a version — sparse by nature (`version`
440
+ * sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
441
+ */
442
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,81 @@
1
+ // The widget vocabulary of GtkSource-5 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: GtkSource-5 — library 5.21.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
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: 'GtkSource',
11
+ version: '5',
12
+ libraryVersion: '5.21.0',
13
+ childHolders: 0,
14
+ droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object'],
15
+ inlinedBases: [],
16
+ unsettableProps: [],
17
+ };
18
+
19
+ export const OWN_PROPS = {
20
+ GtkSourceCompletionCell: ['column', 'markup', 'paintable', 'text', 'widget'],
21
+ GtkSourceGutter: ['view', 'window-type'],
22
+ GtkSourceGutterRenderer: ['alignment-mode', 'xalign', 'xpad', 'yalign', 'ypad'],
23
+ GtkSourceGutterRendererPixbuf: ['gicon', 'icon-name', 'paintable', 'pixbuf'],
24
+ GtkSourceGutterRendererText: ['markup', 'text'],
25
+ GtkSourceMap: ['font-desc', 'view'],
26
+ GtkSourceStyleSchemeChooser: ['style-scheme'],
27
+ GtkSourceStyleSchemePreview: ['scheme', 'selected'],
28
+ GtkSourceView: ['auto-indent', 'background-pattern', 'enable-snippets', 'highlight-current-line', 'indent-on-tab', 'indent-width', 'indenter', 'insert-spaces-instead-of-tabs', 'right-margin-position', 'show-line-marks', 'show-line-numbers', 'show-right-margin', 'smart-backspace', 'smart-home-end', 'tab-width'],
29
+ };
30
+
31
+ export const OWN_SIGNALS = {
32
+ GtkSourceGutterRenderer: ['activate', 'query-activatable', 'query-data'],
33
+ GtkSourceStyleSchemePreview: ['activate'],
34
+ GtkSourceView: ['change-case', 'change-number', 'join-lines', 'line-mark-activated', 'move-lines', 'move-to-matching-bracket', 'move-words', 'push-snippet', 'show-completion', 'smart-home-end'],
35
+ };
36
+
37
+ export const DECLS = {
38
+ GtkSourceCompletionCell: ['GtkSourceCompletionCell', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
39
+ GtkSourceGutter: ['GtkSourceGutter', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
40
+ GtkSourceGutterRendererPixbuf: ['GtkSourceGutterRendererPixbuf', 'GtkSourceGutterRenderer', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
41
+ GtkSourceGutterRendererText: ['GtkSourceGutterRendererText', 'GtkSourceGutterRenderer', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
42
+ GtkSourceHoverDisplay: ['GtkSourceHoverDisplay', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
43
+ GtkSourceMap: ['GtkSourceMap', 'GtkSourceView', 'GtkTextView', 'GtkWidget', 'GtkAccessible', 'GtkAccessibleText', 'GtkBuildable', 'GtkConstraintTarget', 'GtkScrollable'],
44
+ GtkSourceStyleSchemeChooserButton: ['GtkSourceStyleSchemeChooserButton', 'GtkButton', 'GtkWidget', 'GtkAccessible', 'GtkActionable', 'GtkBuildable', 'GtkConstraintTarget', 'GtkSourceStyleSchemeChooser'],
45
+ GtkSourceStyleSchemeChooserWidget: ['GtkSourceStyleSchemeChooserWidget', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget', 'GtkSourceStyleSchemeChooser'],
46
+ GtkSourceStyleSchemePreview: ['GtkSourceStyleSchemePreview', 'GtkWidget', 'GtkAccessible', 'GtkActionable', 'GtkBuildable', 'GtkConstraintTarget'],
47
+ GtkSourceView: ['GtkSourceView', 'GtkTextView', 'GtkWidget', 'GtkAccessible', 'GtkAccessibleText', 'GtkBuildable', 'GtkConstraintTarget', 'GtkScrollable'],
48
+ };
49
+
50
+ // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
51
+ // and descend from `GObject.Object`. A renderer places them like a container; a check
52
+ // asking "is this a widget" must not count them. Derived from the accessor pair, never
53
+ // from a list — the count is in the provenance line above.
54
+ export const CHILD_HOLDERS = [];
55
+
56
+ export const ENUM_NICKS = {
57
+ GtkSourceAnnotationStyle: ['none', 'warning', 'error', 'accent'],
58
+ GtkSourceBackgroundPatternType: ['none', 'grid'],
59
+ GtkSourceBracketMatchType: ['none', 'out-of-range', 'not-found', 'found'],
60
+ GtkSourceChangeCaseType: ['lower', 'upper', 'toggle', 'title'],
61
+ GtkSourceCompletionActivation: ['none', 'interactive', 'user-requested'],
62
+ GtkSourceCompletionColumn: ['icon', 'before', 'typed-text', 'after', 'comment', 'details'],
63
+ GtkSourceCompressionType: ['none', 'gzip'],
64
+ GtkSourceGutterRendererAlignmentMode: ['cell', 'first', 'last'],
65
+ GtkSourceNewlineType: ['lf', 'cr', 'cr-lf'],
66
+ GtkSourceSmartHomeEndType: ['disabled', 'before', 'after', 'always'],
67
+ GtkSourceViewGutterPosition: ['lines', 'marks'],
68
+ };
69
+
70
+ export const SLOT_CANDIDATES = {
71
+ GtkSourceCompletionCell: {
72
+ 'widget': 'set_widget',
73
+ },
74
+ GtkSourceMap: {
75
+ 'view': 'set_view',
76
+ },
77
+ };
78
+
79
+ export const SINCE = {
80
+ 'GtkSourceStyleSchemePreview': '5.4',
81
+ };