@girs/gtksource-4 4.4.0 → 4.6.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-4)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gtksource-4)
6
6
 
7
+ GJS TypeScript type definitions for GtkSource-4 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.6.0.
7
8
 
8
- GJS TypeScript type definitions for GtkSource-4 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-4
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-4` | the namespace as a default export, plus the ambient and global declarations |
26
+ | `@girs/gtksource-4/ambient` | only the `gi://` module declarations |
27
+ | `@girs/gtksource-4/import` | only the `imports.gi` declarations |
28
+ | `@girs/gtksource-4/gtksource-4` | the namespace, without the side-effecting declarations |
29
+ | `@girs/gtksource-4/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-4';
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-4` or `@girs/gtksource-4/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-4'
47
+ import '@girs/gtksource-4';
32
48
  ```
33
49
 
34
- `tsconfig.json`:
35
50
  ```json
36
- {
37
- "compilerOptions": {
38
- ...
39
- },
40
- "include": ["@girs/gtksource-4"],
41
- ...
42
- }
51
+ { "include": ["@girs/gtksource-4"] }
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=4';
49
58
  ```
50
59
 
51
- ### Global import
60
+ Referencing `@girs/gtksource-4/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-4` or `@girs/gtksource-4/import` in your `tsconfig` or entry point Typescript file:
65
+ GJS's global object works the same way, via `@girs/gtksource-4/import`:
55
66
 
56
- `index.ts`:
57
67
  ```ts
58
- import '@girs/gtksource-4'
68
+ const GtkSource = imports.gi.GtkSource;
59
69
  ```
60
70
 
61
- `tsconfig.json`:
62
- ```json
63
- {
64
- "compilerOptions": {
65
- ...
66
- },
67
- "include": ["@girs/gtksource-4"],
68
- ...
69
- }
70
- ```
71
+ ## Widget vocabulary
71
72
 
72
- That form carries types as well:
73
+ `gtksource-4` 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-4/vocabulary';
78
+ import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/gtksource-4/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,303 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for GtkSource-4.
3
+ *
4
+ * GENERATED — do not edit. Provenance: GtkSource-4 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
5
+ *
6
+ * 5 concrete widgets, 6 declarations, 8 enum nick unions, 1 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 GtkSource from './gtksource-4.js';
28
+ import type Pango from '@girs/pango-1.0';
29
+ import type { GtkActionableConstructOnly, GtkActionableProps, GtkActivatableConstructOnly, GtkActivatableProps, GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkButtonConstructOnly, GtkButtonProps, GtkContainerConstructOnly, GtkContainerProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkTextViewConstructOnly, GtkTextViewProps, 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 GtkSourceBackgroundPatternTypeNick = 'none' | 'grid';
42
+ export type GtkSourceBracketMatchTypeNick = 'none' | 'out-of-range' | 'not-found' | 'found';
43
+ export type GtkSourceChangeCaseTypeNick = 'lower' | 'upper' | 'toggle' | 'title';
44
+ export type GtkSourceCompressionTypeNick = 'none' | 'gzip';
45
+ export type GtkSourceGutterRendererAlignmentModeNick = 'cell' | 'first' | 'last';
46
+ export type GtkSourceNewlineTypeNick = 'lf' | 'cr' | 'cr-lf';
47
+ export type GtkSourceSmartHomeEndTypeNick = 'disabled' | 'before' | 'after' | 'always';
48
+ export type GtkSourceViewGutterPositionNick = 'lines' | 'marks';
49
+
50
+ // ---------------------------------------------------------------------------
51
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
52
+ // inheritance rather than flattening per widget.
53
+ //
54
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
55
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
56
+ // because GObject installs interface properties on the implementor at runtime while
57
+ // GIR keeps them once, on the interface.
58
+ // ---------------------------------------------------------------------------
59
+
60
+ export interface GtkSourceCompletionInfoProps extends GtkWindowProps, GtkBuildableProps {
61
+ }
62
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
63
+ export type GtkSourceCompletionInfoConstructOnly = GtkWindowConstructOnly | GtkBuildableConstructOnly;
64
+
65
+ export interface GtkSourceMapProps extends GtkSourceViewProps, GtkBuildableProps, GtkScrollableProps {
66
+ 'font-desc'?: Pango.FontDescription;
67
+ view?: GtkSource.View | null;
68
+ }
69
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
70
+ export type GtkSourceMapConstructOnly = GtkSourceViewConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly;
71
+
72
+ export interface GtkSourceStyleSchemeChooserProps {
73
+ /**
74
+ * The :style-scheme property contains the currently selected style scheme.
75
+ * @since 3.16
76
+ */
77
+ 'style-scheme'?: GtkSource.StyleScheme;
78
+ }
79
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
80
+ export type GtkSourceStyleSchemeChooserConstructOnly = never;
81
+
82
+ export interface GtkSourceStyleSchemeChooserButtonProps extends GtkButtonProps, GtkActionableProps, GtkActivatableProps, GtkBuildableProps, GtkSourceStyleSchemeChooserProps {
83
+ }
84
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
85
+ export type GtkSourceStyleSchemeChooserButtonConstructOnly = GtkButtonConstructOnly | GtkActionableConstructOnly | GtkActivatableConstructOnly | GtkBuildableConstructOnly | GtkSourceStyleSchemeChooserConstructOnly;
86
+
87
+ export interface GtkSourceStyleSchemeChooserWidgetProps extends GtkBinProps, GtkBuildableProps, GtkSourceStyleSchemeChooserProps {
88
+ }
89
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
90
+ export type GtkSourceStyleSchemeChooserWidgetConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly | GtkSourceStyleSchemeChooserConstructOnly;
91
+
92
+ export interface GtkSourceViewProps extends GtkTextViewProps, GtkBuildableProps, GtkScrollableProps {
93
+ /** @default FALSE */
94
+ 'auto-indent'?: boolean;
95
+ /**
96
+ * Draw a specific background pattern on the view.
97
+ * @since 3.16
98
+ * @default GTK_SOURCE_BACKGROUND_PATTERN_TYPE_NONE
99
+ */
100
+ 'background-pattern'?: GtkSourceBackgroundPatternTypeNick | GtkSource.BackgroundPatternType;
101
+ /** @default FALSE */
102
+ 'highlight-current-line'?: boolean;
103
+ /** @default TRUE */
104
+ 'indent-on-tab'?: boolean;
105
+ /**
106
+ * Width of an indentation step expressed in number of spaces.
107
+ * @default -1
108
+ */
109
+ 'indent-width'?: number;
110
+ /** @default FALSE */
111
+ 'insert-spaces-instead-of-tabs'?: boolean;
112
+ /**
113
+ * Position of the right margin.
114
+ * @default 80
115
+ */
116
+ 'right-margin-position'?: number;
117
+ /**
118
+ * Whether to display line mark pixbufs
119
+ * @default FALSE
120
+ */
121
+ 'show-line-marks'?: boolean;
122
+ /**
123
+ * Whether to display line numbers
124
+ * @default FALSE
125
+ */
126
+ 'show-line-numbers'?: boolean;
127
+ /**
128
+ * Whether to display the right margin.
129
+ * @default FALSE
130
+ */
131
+ 'show-right-margin'?: boolean;
132
+ /**
133
+ * Whether smart Backspace should be used.
134
+ * @since 3.18
135
+ * @default FALSE
136
+ */
137
+ 'smart-backspace'?: boolean;
138
+ /**
139
+ * Set the behavior of the HOME and END keys.
140
+ * @since 2.0
141
+ * @default GTK_SOURCE_SMART_HOME_END_DISABLED
142
+ */
143
+ 'smart-home-end'?: GtkSourceSmartHomeEndTypeNick | GtkSource.SmartHomeEndType;
144
+ /**
145
+ * Width of a tab character expressed in number of spaces.
146
+ * @default 8
147
+ */
148
+ 'tab-width'?: number;
149
+ }
150
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
151
+ export type GtkSourceViewConstructOnly = GtkTextViewConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly;
152
+
153
+ // ---------------------------------------------------------------------------
154
+ // The GType-keyed widget map.
155
+ //
156
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
157
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
158
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
159
+ // is the class. None of those is baked in here.
160
+ //
161
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
162
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
163
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
164
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
165
+ // this is what notices when a release adds a candidate.
166
+ // ---------------------------------------------------------------------------
167
+
168
+ export interface Widgets {
169
+ GtkSourceCompletionInfo: {
170
+ class: GtkSource.CompletionInfo;
171
+ props: GtkSourceCompletionInfoProps;
172
+ signals: GtkSource.CompletionInfo.SignalSignatures;
173
+ constructOnly: GtkSourceCompletionInfoConstructOnly;
174
+ slotCandidates: {};
175
+ };
176
+ GtkSourceMap: {
177
+ class: GtkSource.Map;
178
+ props: GtkSourceMapProps;
179
+ signals: GtkSource.Map.SignalSignatures;
180
+ constructOnly: GtkSourceMapConstructOnly;
181
+ slotCandidates: {
182
+ 'view': 'set_view';
183
+ };
184
+ };
185
+ GtkSourceStyleSchemeChooserButton: {
186
+ class: GtkSource.StyleSchemeChooserButton;
187
+ props: GtkSourceStyleSchemeChooserButtonProps;
188
+ signals: GtkSource.StyleSchemeChooserButton.SignalSignatures;
189
+ constructOnly: GtkSourceStyleSchemeChooserButtonConstructOnly;
190
+ slotCandidates: {};
191
+ };
192
+ GtkSourceStyleSchemeChooserWidget: {
193
+ class: GtkSource.StyleSchemeChooserWidget;
194
+ props: GtkSourceStyleSchemeChooserWidgetProps;
195
+ signals: GtkSource.StyleSchemeChooserWidget.SignalSignatures;
196
+ constructOnly: GtkSourceStyleSchemeChooserWidgetConstructOnly;
197
+ slotCandidates: {};
198
+ };
199
+ GtkSourceView: {
200
+ class: GtkSource.View;
201
+ props: GtkSourceViewProps;
202
+ signals: GtkSource.View.SignalSignatures;
203
+ constructOnly: GtkSourceViewConstructOnly;
204
+ slotCandidates: {};
205
+ };
206
+ }
207
+
208
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
209
+ export type WidgetGType = keyof Widgets;
210
+
211
+ // ---------------------------------------------------------------------------
212
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
213
+ //
214
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
215
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
216
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
217
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
218
+ // more rows in `Widgets`: concatenate them when you mean both.
219
+ // ---------------------------------------------------------------------------
220
+
221
+ export interface ChildHolders {
222
+
223
+ }
224
+
225
+ /** Every GType this namespace holds a child in without it being a widget. */
226
+ export type ChildHolderGType = keyof ChildHolders;
227
+
228
+ /** The writable, optional, GObject-keyed property surface of one GType. */
229
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
230
+
231
+ /** The signal table this package already emits, reached by GType. */
232
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
233
+
234
+ /** The instance type — what a `ref`-shaped prop should infer. */
235
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
236
+
237
+ /** Property names that can only be set at construction. */
238
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
239
+
240
+ /** Candidate child slots — see the note above; curation decides. */
241
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
242
+
243
+ /**
244
+ * The same facts as runtime data, for a consumer that CHECKS them.
245
+ *
246
+ * Types are erased, so a spec that asks the installed GTK whether every property
247
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
248
+ * and every nick resolvable through an enum lookup cannot read the interfaces
249
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
250
+ * belongs to the consumer and the DATA belongs here.
251
+ */
252
+ export const PROVENANCE: {
253
+ readonly namespace: string;
254
+ readonly version: string;
255
+ /** The version the LIBRARY states, or null where it states none. Never the namespace's. */
256
+ readonly libraryVersion: string | null;
257
+ readonly childHolders: number;
258
+ readonly droppedBases: readonly string[];
259
+ readonly inlinedBases: readonly string[];
260
+ readonly unsettableProps: readonly string[];
261
+ };
262
+
263
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
264
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
265
+
266
+ /**
267
+ * Declaration GType -> the signals it registers itself, never its parents'.
268
+ *
269
+ * Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
270
+ * abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
271
+ */
272
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
273
+
274
+ /** Widget GType -> every declaration its members come from, self first. */
275
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
276
+
277
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
278
+ export const CHILD_HOLDERS: readonly string[];
279
+
280
+ /** Enum GType -> the nicks this surface offers. */
281
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
282
+
283
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
284
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
285
+
286
+ /**
287
+ * `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
288
+ *
289
+ * What keeps a runtime cross-check honest across a version gap without an
290
+ * allowlist: a name the installed library lacks is a defect UNLESS the version
291
+ * here is newer than the one running.
292
+ *
293
+ * ALL THREE key shapes, because that test only works for the names it covers. A
294
+ * property-only map leaves a consumer no way to explain a missing SIGNAL, which is
295
+ * a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
296
+ * explain a missing CLASS, and that one fails as a bare
297
+ * `TypeError: can't access property "$gtype", ctor() is undefined` that does not
298
+ * even name the GType.
299
+ *
300
+ * A key is present only where the GIR states a version — sparse by nature (`version`
301
+ * sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
302
+ */
303
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,71 @@
1
+ // The widget vocabulary of GtkSource-4 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: GtkSource-4 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
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: '4',
12
+ libraryVersion: null,
13
+ childHolders: 0,
14
+ droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object', 'Atk.ImplementorIface'],
15
+ inlinedBases: [],
16
+ unsettableProps: [],
17
+ };
18
+
19
+ export const OWN_PROPS = {
20
+ GtkSourceMap: ['font-desc', 'view'],
21
+ GtkSourceStyleSchemeChooser: ['style-scheme'],
22
+ GtkSourceView: ['auto-indent', 'background-pattern', 'highlight-current-line', 'indent-on-tab', 'indent-width', 'insert-spaces-instead-of-tabs', 'right-margin-position', 'show-line-marks', 'show-line-numbers', 'show-right-margin', 'smart-backspace', 'smart-home-end', 'tab-width'],
23
+ };
24
+
25
+ export const OWN_SIGNALS = {
26
+ GtkSourceView: ['change-case', 'change-number', 'join-lines', 'line-mark-activated', 'move-lines', 'move-to-matching-bracket', 'move-words', 'redo', 'show-completion', 'smart-home-end', 'undo'],
27
+ };
28
+
29
+ export const DECLS = {
30
+ GtkSourceCompletionInfo: ['GtkSourceCompletionInfo', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
31
+ GtkSourceMap: ['GtkSourceMap', 'GtkSourceView', 'GtkTextView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
32
+ GtkSourceStyleSchemeChooserButton: ['GtkSourceStyleSchemeChooserButton', 'GtkButton', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkActionable', 'GtkActivatable', 'GtkBuildable', 'GtkSourceStyleSchemeChooser'],
33
+ GtkSourceStyleSchemeChooserWidget: ['GtkSourceStyleSchemeChooserWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkSourceStyleSchemeChooser'],
34
+ GtkSourceView: ['GtkSourceView', 'GtkTextView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
35
+ };
36
+
37
+ // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
38
+ // and descend from `GObject.Object`. A renderer places them like a container; a check
39
+ // asking "is this a widget" must not count them. Derived from the accessor pair, never
40
+ // from a list — the count is in the provenance line above.
41
+ export const CHILD_HOLDERS = [];
42
+
43
+ export const ENUM_NICKS = {
44
+ GtkSourceBackgroundPatternType: ['none', 'grid'],
45
+ GtkSourceBracketMatchType: ['none', 'out-of-range', 'not-found', 'found'],
46
+ GtkSourceChangeCaseType: ['lower', 'upper', 'toggle', 'title'],
47
+ GtkSourceCompressionType: ['none', 'gzip'],
48
+ GtkSourceGutterRendererAlignmentMode: ['cell', 'first', 'last'],
49
+ GtkSourceNewlineType: ['lf', 'cr', 'cr-lf'],
50
+ GtkSourceSmartHomeEndType: ['disabled', 'before', 'after', 'always'],
51
+ GtkSourceViewGutterPosition: ['lines', 'marks'],
52
+ };
53
+
54
+ export const SLOT_CANDIDATES = {
55
+ GtkSourceMap: {
56
+ 'view': 'set_view',
57
+ },
58
+ };
59
+
60
+ export const SINCE = {
61
+ 'GtkSourceStyleSchemeChooser.style-scheme': '3.16',
62
+ 'GtkSourceView.background-pattern': '3.16',
63
+ 'GtkSourceView.smart-backspace': '3.18',
64
+ 'GtkSourceView.smart-home-end': '2.0',
65
+ 'GtkSourceView::change-case': '3.16',
66
+ 'GtkSourceView::change-number': '3.16',
67
+ 'GtkSourceView::join-lines': '3.16',
68
+ 'GtkSourceView::move-to-matching-bracket': '3.16',
69
+ 'GtkSourceView::move-words': '3.0',
70
+ 'GtkSourceView::smart-home-end': '3.0',
71
+ };
package/gtksource-4.d.ts CHANGED
@@ -47,11 +47,11 @@ export namespace GtkSource {
47
47
  /**
48
48
  * no pattern
49
49
  */
50
- NONE,
50
+ NONE = 0,
51
51
  /**
52
52
  * grid pattern
53
53
  */
54
- GRID,
54
+ GRID = 1,
55
55
  }
56
56
 
57
57
 
@@ -69,20 +69,20 @@ export namespace GtkSource {
69
69
  /**
70
70
  * there is no bracket to match.
71
71
  */
72
- NONE,
72
+ NONE = 0,
73
73
  /**
74
74
  * matching a bracket
75
75
  * failed because the maximum range was reached.
76
76
  */
77
- OUT_OF_RANGE,
77
+ OUT_OF_RANGE = 1,
78
78
  /**
79
79
  * a matching bracket was not found.
80
80
  */
81
- NOT_FOUND,
81
+ NOT_FOUND = 2,
82
82
  /**
83
83
  * a matching bracket was found.
84
84
  */
85
- FOUND,
85
+ FOUND = 3,
86
86
  }
87
87
 
88
88
 
@@ -101,19 +101,19 @@ export namespace GtkSource {
101
101
  /**
102
102
  * change case to lowercase.
103
103
  */
104
- LOWER,
104
+ LOWER = 0,
105
105
  /**
106
106
  * change case to uppercase.
107
107
  */
108
- UPPER,
108
+ UPPER = 1,
109
109
  /**
110
110
  * toggle case of each character.
111
111
  */
112
- TOGGLE,
112
+ TOGGLE = 2,
113
113
  /**
114
114
  * capitalize each word.
115
115
  */
116
- TITLE,
116
+ TITLE = 3,
117
117
  }
118
118
 
119
119
 
@@ -161,11 +161,11 @@ export namespace GtkSource {
161
161
  /**
162
162
  * plain text.
163
163
  */
164
- NONE,
164
+ NONE = 0,
165
165
  /**
166
166
  * gzip compression.
167
167
  */
168
- GZIP,
168
+ GZIP = 1,
169
169
  }
170
170
 
171
171
 
@@ -246,15 +246,15 @@ export namespace GtkSource {
246
246
  /**
247
247
  * The full cell.
248
248
  */
249
- CELL,
249
+ CELL = 0,
250
250
  /**
251
251
  * The first line.
252
252
  */
253
- FIRST,
253
+ FIRST = 1,
254
254
  /**
255
255
  * The last line.
256
256
  */
257
- LAST,
257
+ LAST = 2,
258
258
  }
259
259
 
260
260
 
@@ -273,16 +273,16 @@ export namespace GtkSource {
273
273
  /**
274
274
  * line feed, used on UNIX.
275
275
  */
276
- LF,
276
+ LF = 0,
277
277
  /**
278
278
  * carriage return, used on Mac.
279
279
  */
280
- CR,
280
+ CR = 1,
281
281
  /**
282
282
  * carriage return followed by a line feed, used
283
283
  * on Windows.
284
284
  */
285
- CR_LF,
285
+ CR_LF = 2,
286
286
  }
287
287
 
288
288
 
@@ -300,24 +300,24 @@ export namespace GtkSource {
300
300
  /**
301
301
  * smart-home-end disabled.
302
302
  */
303
- DISABLED,
303
+ DISABLED = 0,
304
304
  /**
305
305
  * move to the first/last
306
306
  * non-whitespace character on the first press of the HOME/END keys and
307
307
  * to the beginning/end of the line on the second press.
308
308
  */
309
- BEFORE,
309
+ BEFORE = 1,
310
310
  /**
311
311
  * move to the beginning/end of the
312
312
  * line on the first press of the HOME/END keys and to the first/last
313
313
  * non-whitespace character on the second press.
314
314
  */
315
- AFTER,
315
+ AFTER = 2,
316
316
  /**
317
317
  * always move to the first/last
318
318
  * non-whitespace character when the HOME/END keys are pressed.
319
319
  */
320
- ALWAYS,
320
+ ALWAYS = 3,
321
321
  }
322
322
 
323
323
 
@@ -336,12 +336,12 @@ export namespace GtkSource {
336
336
  * the gutter position of the lines
337
337
  * renderer
338
338
  */
339
- LINES,
339
+ LINES = -30,
340
340
  /**
341
341
  * the gutter position of the marks
342
342
  * renderer
343
343
  */
344
- MARKS,
344
+ MARKS = -20,
345
345
  }
346
346
 
347
347
 
@@ -464,19 +464,19 @@ export namespace GtkSource {
464
464
  /**
465
465
  * None.
466
466
  */
467
- NONE,
467
+ NONE = 0,
468
468
  /**
469
469
  * Interactive activation. By
470
470
  * default, it occurs on each insertion in the {@link Gtk.TextBuffer}. This can be
471
471
  * blocked temporarily with `gtk_source_completion_block_interactive()`.
472
472
  */
473
- INTERACTIVE,
473
+ INTERACTIVE = 1,
474
474
  /**
475
475
  * User requested activation.
476
476
  * By default, it occurs when the user presses
477
477
  * <keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.
478
478
  */
479
- USER_REQUESTED,
479
+ USER_REQUESTED = 2,
480
480
  }
481
481
 
482
482
 
@@ -496,19 +496,19 @@ export namespace GtkSource {
496
496
  /**
497
497
  * No flags.
498
498
  */
499
- NONE,
499
+ NONE = 0,
500
500
  /**
501
501
  * Ignore invalid characters.
502
502
  */
503
- IGNORE_INVALID_CHARS,
503
+ IGNORE_INVALID_CHARS = 1,
504
504
  /**
505
505
  * Save file despite external modifications.
506
506
  */
507
- IGNORE_MODIFICATION_TIME,
507
+ IGNORE_MODIFICATION_TIME = 2,
508
508
  /**
509
509
  * Create a backup before saving the file.
510
510
  */
511
- CREATE_BACKUP,
511
+ CREATE_BACKUP = 4,
512
512
  }
513
513
 
514
514
 
@@ -526,22 +526,22 @@ export namespace GtkSource {
526
526
  /**
527
527
  * normal state
528
528
  */
529
- NORMAL,
529
+ NORMAL = 0,
530
530
  /**
531
531
  * area in the renderer represents the
532
532
  * line on which the insert cursor is currently positioned
533
533
  */
534
- CURSOR,
534
+ CURSOR = 1,
535
535
  /**
536
536
  * the mouse pointer is currently
537
537
  * over the activatable area of the renderer
538
538
  */
539
- PRELIT,
539
+ PRELIT = 2,
540
540
  /**
541
541
  * area in the renderer represents
542
542
  * a line in the buffer which contains part of the selection
543
543
  */
544
- SELECTED,
544
+ SELECTED = 4,
545
545
  }
546
546
 
547
547
 
@@ -560,19 +560,19 @@ export namespace GtkSource {
560
560
  /**
561
561
  * no flags specified
562
562
  */
563
- NONE,
563
+ NONE = 0,
564
564
  /**
565
565
  * case sensitive sort
566
566
  */
567
- CASE_SENSITIVE,
567
+ CASE_SENSITIVE = 1,
568
568
  /**
569
569
  * sort in reverse order
570
570
  */
571
- REVERSE_ORDER,
571
+ REVERSE_ORDER = 2,
572
572
  /**
573
573
  * remove duplicates
574
574
  */
575
- REMOVE_DUPLICATES,
575
+ REMOVE_DUPLICATES = 4,
576
576
  }
577
577
 
578
578
 
@@ -595,24 +595,24 @@ export namespace GtkSource {
595
595
  /**
596
596
  * No flags.
597
597
  */
598
- NONE,
598
+ NONE = 0,
599
599
  /**
600
600
  * Leading white spaces on a line, i.e. the
601
601
  * indentation.
602
602
  */
603
- LEADING,
603
+ LEADING = 1,
604
604
  /**
605
605
  * White spaces inside a line of text.
606
606
  */
607
- INSIDE_TEXT,
607
+ INSIDE_TEXT = 2,
608
608
  /**
609
609
  * Trailing white spaces on a line.
610
610
  */
611
- TRAILING,
611
+ TRAILING = 4,
612
612
  /**
613
613
  * White spaces anywhere.
614
614
  */
615
- ALL,
615
+ ALL = 7,
616
616
  }
617
617
 
618
618
 
@@ -632,29 +632,29 @@ export namespace GtkSource {
632
632
  /**
633
633
  * No flags.
634
634
  */
635
- NONE,
635
+ NONE = 0,
636
636
  /**
637
637
  * Space character.
638
638
  */
639
- SPACE,
639
+ SPACE = 1,
640
640
  /**
641
641
  * Tab character.
642
642
  */
643
- TAB,
643
+ TAB = 2,
644
644
  /**
645
645
  * Line break character. If the
646
646
  * {@link GtkSource.Buffer.implicit_trailing_newline} property is `true`,
647
647
  * {@link GtkSource.SpaceDrawer} also draws a line break at the end of the buffer.
648
648
  */
649
- NEWLINE,
649
+ NEWLINE = 4,
650
650
  /**
651
651
  * Non-breaking space character.
652
652
  */
653
- NBSP,
653
+ NBSP = 8,
654
654
  /**
655
655
  * All white spaces.
656
656
  */
657
- ALL,
657
+ ALL = 15,
658
658
  }
659
659
 
660
660
 
@@ -674,7 +674,7 @@ export namespace GtkSource {
674
674
  * @since 2.12
675
675
  * @run-last
676
676
  */
677
- "bracket-matched": (arg0: Gtk.TextIter | null, arg1: BracketMatchType) => void;
677
+ "bracket-matched": (iter: Gtk.TextIter | null, state: BracketMatchType) => void;
678
678
  /**
679
679
  * The ::highlight-updated signal is emitted when the syntax
680
680
  * highlighting and [context classes][context-classes] are updated in a
@@ -682,7 +682,7 @@ export namespace GtkSource {
682
682
  * @signal
683
683
  * @run-last
684
684
  */
685
- "highlight-updated": (arg0: Gtk.TextIter, arg1: Gtk.TextIter) => void;
685
+ "highlight-updated": (start: Gtk.TextIter, end: Gtk.TextIter) => void;
686
686
  /**
687
687
  * The ::redo signal is emitted to redo the last undo operation.
688
688
  * @signal
@@ -695,7 +695,7 @@ export namespace GtkSource {
695
695
  * @signal
696
696
  * @run-last
697
697
  */
698
- "source-mark-updated": (arg0: Gtk.TextMark) => void;
698
+ "source-mark-updated": (mark: Gtk.TextMark) => void;
699
699
  /**
700
700
  * The ::undo signal is emitted to undo the last user action which
701
701
  * modified the buffer.
@@ -1312,7 +1312,7 @@ export namespace GtkSource {
1312
1312
  * @action
1313
1313
  * @run-last
1314
1314
  */
1315
- "move-cursor": (arg0: Gtk.ScrollStep, arg1: number) => void;
1315
+ "move-cursor": (step: Gtk.ScrollStep, num: number) => void;
1316
1316
  /**
1317
1317
  * The {@link GtkSource.Completion.SignalSignatures.move_page | GtkSource.Completion::move-page} signal is a keybinding
1318
1318
  * signal which gets emitted when the user initiates a page
@@ -1337,7 +1337,7 @@ export namespace GtkSource {
1337
1337
  * @action
1338
1338
  * @run-last
1339
1339
  */
1340
- "move-page": (arg0: Gtk.ScrollStep, arg1: number) => void;
1340
+ "move-page": (step: Gtk.ScrollStep, num: number) => void;
1341
1341
  /**
1342
1342
  * Emitted just before starting to populate the completion with providers.
1343
1343
  * You can use this signal to add additional attributes in the context.
@@ -1345,7 +1345,7 @@ export namespace GtkSource {
1345
1345
  * @action
1346
1346
  * @run-last
1347
1347
  */
1348
- "populate-context": (arg0: CompletionContext) => void;
1348
+ "populate-context": (context: CompletionContext) => void;
1349
1349
  /**
1350
1350
  * Emitted when the completion window is shown. The default handler
1351
1351
  * will actually show the window.
@@ -1612,6 +1612,7 @@ export namespace GtkSource {
1612
1612
  * no longer need it.
1613
1613
  * @param provider a {@link GtkSource.CompletionProvider}.
1614
1614
  * @returns `true` if `provider` was successfully added, otherwise if `error` is provided, it will be set with the error and `false` is returned.
1615
+ * @throws GLib.Error
1615
1616
  */
1616
1617
  add_provider(provider: CompletionProvider): boolean;
1617
1618
 
@@ -1666,6 +1667,7 @@ export namespace GtkSource {
1666
1667
  * Remove `provider` from the completion.
1667
1668
  * @param provider a {@link GtkSource.CompletionProvider}.
1668
1669
  * @returns `true` if `provider` was successfully removed, otherwise if `error` is provided, it will be set with the error and `false` is returned.
1670
+ * @throws GLib.Error
1669
1671
  */
1670
1672
  remove_provider(provider: CompletionProvider): boolean;
1671
1673
 
@@ -2149,7 +2151,7 @@ export namespace GtkSource {
2149
2151
 
2150
2152
  namespace CompletionItem {
2151
2153
  // Signal signatures
2152
- interface SignalSignatures extends GObject.Object.SignalSignatures {
2154
+ interface SignalSignatures extends GObject.Object.SignalSignatures, CompletionProposal.SignalSignatures {
2153
2155
  "notify::gicon": (pspec: GObject.ParamSpec) => void;
2154
2156
  "notify::icon": (pspec: GObject.ParamSpec) => void;
2155
2157
  "notify::icon-name": (pspec: GObject.ParamSpec) => void;
@@ -3299,6 +3301,7 @@ export namespace GtkSource {
3299
3301
  * @param result a {@link Gio.AsyncResult}.
3300
3302
  * @returns whether the contents has been loaded successfully.
3301
3303
  * @since 3.14
3304
+ * @throws GLib.Error
3302
3305
  */
3303
3306
  load_finish(result: Gio.AsyncResult): boolean;
3304
3307
 
@@ -3546,6 +3549,7 @@ export namespace GtkSource {
3546
3549
  * @param result a {@link Gio.AsyncResult}.
3547
3550
  * @returns whether the file was saved successfully.
3548
3551
  * @since 3.14
3552
+ * @throws GLib.Error
3549
3553
  */
3550
3554
  save_finish(result: Gio.AsyncResult): boolean;
3551
3555
 
@@ -3715,14 +3719,14 @@ export namespace GtkSource {
3715
3719
  * @signal
3716
3720
  * @run-last
3717
3721
  */
3718
- activate: (arg0: Gtk.TextIter, arg1: Gdk.Rectangle, arg2: Gdk.Event) => void;
3722
+ activate: (iter: Gtk.TextIter, area: Gdk.Rectangle, event: Gdk.Event) => void;
3719
3723
  /**
3720
3724
  * The ::query-activatable signal is emitted when the renderer
3721
3725
  * can possibly be activated.
3722
3726
  * @signal
3723
3727
  * @run-last
3724
3728
  */
3725
- "query-activatable": (arg0: Gtk.TextIter, arg1: Gdk.Rectangle, arg2: Gdk.Event) => boolean | void;
3729
+ "query-activatable": (iter: Gtk.TextIter, area: Gdk.Rectangle, event: Gdk.Event) => boolean | void;
3726
3730
  /**
3727
3731
  * The ::query-data signal is emitted when the renderer needs
3728
3732
  * to be filled with data just before a cell is drawn. This can
@@ -3731,14 +3735,14 @@ export namespace GtkSource {
3731
3735
  * @signal
3732
3736
  * @run-last
3733
3737
  */
3734
- "query-data": (arg0: Gtk.TextIter, arg1: Gtk.TextIter, arg2: GutterRendererState) => void;
3738
+ "query-data": (start: Gtk.TextIter, end: Gtk.TextIter, state: GutterRendererState) => void;
3735
3739
  /**
3736
3740
  * The ::query-tooltip signal is emitted when the renderer can
3737
3741
  * show a tooltip.
3738
3742
  * @signal
3739
3743
  * @run-last
3740
3744
  */
3741
- "query-tooltip": (arg0: Gtk.TextIter, arg1: Gdk.Rectangle, arg2: number, arg3: number, arg4: Gtk.Tooltip) => boolean | void;
3745
+ "query-tooltip": (iter: Gtk.TextIter, area: Gdk.Rectangle, x: number, y: number, tooltip: Gtk.Tooltip) => boolean | void;
3742
3746
  /**
3743
3747
  * The ::queue-draw signal is emitted when the renderer needs
3744
3748
  * to be redrawn. Use `gtk_source_gutter_renderer_queue_draw()`
@@ -5009,14 +5013,14 @@ export namespace GtkSource {
5009
5013
  * @signal
5010
5014
  * @run-last
5011
5015
  */
5012
- "query-tooltip-markup": (arg0: Mark) => string;
5016
+ "query-tooltip-markup": (mark: Mark) => string;
5013
5017
  /**
5014
5018
  * The code should connect to this signal to provide a tooltip for given
5015
5019
  * `mark`. The tooltip should be just a plain text.
5016
5020
  * @signal
5017
5021
  * @run-last
5018
5022
  */
5019
- "query-tooltip-text": (arg0: Mark) => string;
5023
+ "query-tooltip-text": (mark: Mark) => string;
5020
5024
  "notify::background": (pspec: GObject.ParamSpec) => void;
5021
5025
  "notify::gicon": (pspec: GObject.ParamSpec) => void;
5022
5026
  "notify::icon-name": (pspec: GObject.ParamSpec) => void;
@@ -6392,6 +6396,7 @@ export namespace GtkSource {
6392
6396
  * @param result a {@link Gio.AsyncResult}.
6393
6397
  * @returns whether a match was found.
6394
6398
  * @since 4.0
6399
+ * @throws GLib.Error
6395
6400
  */
6396
6401
  backward_finish(result: Gio.AsyncResult): [boolean, Gtk.TextIter | null, Gtk.TextIter | null, boolean];
6397
6402
 
@@ -6474,6 +6479,7 @@ export namespace GtkSource {
6474
6479
  * @param result a {@link Gio.AsyncResult}.
6475
6480
  * @returns whether a match was found.
6476
6481
  * @since 4.0
6482
+ * @throws GLib.Error
6477
6483
  */
6478
6484
  forward_finish(result: Gio.AsyncResult): [boolean, Gtk.TextIter | null, Gtk.TextIter | null, boolean];
6479
6485
 
@@ -6549,6 +6555,7 @@ export namespace GtkSource {
6549
6555
  * @param replace_length the length of `replace` in bytes, or -1.
6550
6556
  * @returns whether the match has been replaced.
6551
6557
  * @since 4.0
6558
+ * @throws GLib.Error
6552
6559
  */
6553
6560
  replace(match_start: Gtk.TextIter, match_end: Gtk.TextIter, replace: string, replace_length: number): boolean;
6554
6561
 
@@ -6563,6 +6570,7 @@ export namespace GtkSource {
6563
6570
  * @param replace_length the length of `replace` in bytes, or -1.
6564
6571
  * @returns the number of replaced matches.
6565
6572
  * @since 3.10
6573
+ * @throws GLib.Error
6566
6574
  */
6567
6575
  replace_all(replace: string, replace_length: number): number;
6568
6576
 
@@ -8372,7 +8380,7 @@ export namespace GtkSource {
8372
8380
  * @action
8373
8381
  * @run-last
8374
8382
  */
8375
- "change-case": (arg0: ChangeCaseType) => void;
8383
+ "change-case": (case_type: ChangeCaseType) => void;
8376
8384
  /**
8377
8385
  * Keybinding signal to edit a number at the current cursor position.
8378
8386
  * @signal
@@ -8380,7 +8388,7 @@ export namespace GtkSource {
8380
8388
  * @action
8381
8389
  * @run-last
8382
8390
  */
8383
- "change-number": (arg0: number) => void;
8391
+ "change-number": (count: number) => void;
8384
8392
  /**
8385
8393
  * Keybinding signal to join the lines currently selected.
8386
8394
  * @signal
@@ -8396,7 +8404,7 @@ export namespace GtkSource {
8396
8404
  * @signal
8397
8405
  * @run-last
8398
8406
  */
8399
- "line-mark-activated": (arg0: Gtk.TextIter, arg1: Gdk.Event) => void;
8407
+ "line-mark-activated": (iter: Gtk.TextIter, event: Gdk.Event) => void;
8400
8408
  /**
8401
8409
  * The ::move-lines signal is a keybinding which gets emitted
8402
8410
  * when the user initiates moving a line. The default binding key
@@ -8406,7 +8414,7 @@ export namespace GtkSource {
8406
8414
  * @action
8407
8415
  * @run-last
8408
8416
  */
8409
- "move-lines": (arg0: boolean) => void;
8417
+ "move-lines": (down: boolean) => void;
8410
8418
  /**
8411
8419
  * Keybinding signal to move the cursor to the matching bracket.
8412
8420
  * @signal
@@ -8414,7 +8422,7 @@ export namespace GtkSource {
8414
8422
  * @action
8415
8423
  * @run-last
8416
8424
  */
8417
- "move-to-matching-bracket": (arg0: boolean) => void;
8425
+ "move-to-matching-bracket": (extend_selection: boolean) => void;
8418
8426
  /**
8419
8427
  * The ::move-words signal is a keybinding which gets emitted
8420
8428
  * when the user initiates moving a word. The default binding key
@@ -8425,7 +8433,7 @@ export namespace GtkSource {
8425
8433
  * @action
8426
8434
  * @run-last
8427
8435
  */
8428
- "move-words": (arg0: number) => void;
8436
+ "move-words": (count: number) => void;
8429
8437
  /**
8430
8438
  * @signal
8431
8439
  * @action
@@ -8458,7 +8466,7 @@ export namespace GtkSource {
8458
8466
  * @since 3.0
8459
8467
  * @run-last
8460
8468
  */
8461
- "smart-home-end": (arg0: Gtk.TextIter, arg1: number) => void;
8469
+ "smart-home-end": (iter: Gtk.TextIter, count: number) => void;
8462
8470
  /**
8463
8471
  * @signal
8464
8472
  * @action
@@ -9753,6 +9761,17 @@ export namespace GtkSource {
9753
9761
 
9754
9762
 
9755
9763
  namespace CompletionProposal {
9764
+ // Signal signatures
9765
+ interface SignalSignatures {
9766
+ /**
9767
+ * Emitted when the proposal has changed. The completion popup
9768
+ * will react to this by updating the shown information.
9769
+ * @signal
9770
+ * @action
9771
+ * @run-last
9772
+ */
9773
+ changed: () => void;
9774
+ }
9756
9775
  /**
9757
9776
  * Interface for implementing CompletionProposal.
9758
9777
  * Contains only the virtual methods that need to be implemented.
@@ -10331,6 +10350,25 @@ export namespace GtkSource {
10331
10350
  };
10332
10351
 
10333
10352
  namespace UndoManager {
10353
+ // Signal signatures
10354
+ interface SignalSignatures {
10355
+ /**
10356
+ * Emitted when the ability to redo has changed.
10357
+ * @signal
10358
+ * @since 2.10
10359
+ * @action
10360
+ * @run-last
10361
+ */
10362
+ "can-redo-changed": () => void;
10363
+ /**
10364
+ * Emitted when the ability to undo has changed.
10365
+ * @signal
10366
+ * @since 2.10
10367
+ * @action
10368
+ * @run-last
10369
+ */
10370
+ "can-undo-changed": () => void;
10371
+ }
10334
10372
  /**
10335
10373
  * Interface for implementing UndoManager.
10336
10374
  * Contains only the virtual methods that need to be implemented.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gtksource-4",
3
- "version": "4.4.0",
3
+ "version": "4.6.0",
4
4
  "description": "GJS TypeScript type definitions for GtkSource-4",
5
5
  "type": "module",
6
6
  "module": "gtksource-4.js",
@@ -16,10 +16,10 @@
16
16
  "import": "./gtksource-4-import.js",
17
17
  "default": "./gtksource-4-import.js"
18
18
  },
19
- "./surface": {
20
- "types": "./gtksource-4-surface.d.ts",
21
- "import": "./gtksource-4-surface.js",
22
- "default": "./gtksource-4-surface.js"
19
+ "./vocabulary": {
20
+ "types": "./gtksource-4-vocabulary.d.ts",
21
+ "import": "./gtksource-4-vocabulary.js",
22
+ "default": "./gtksource-4-vocabulary.js"
23
23
  },
24
24
  "./gtksource-4": {
25
25
  "types": "./gtksource-4.d.ts",
@@ -36,20 +36,20 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
39
- "@girs/gjs": "^4.4.0",
40
- "@girs/gtk-3.0": "^4.4.0",
41
- "@girs/xlib-2.0": "^4.4.0",
42
- "@girs/gdk-3.0": "^4.4.0",
43
- "@girs/cairo-1.0": "^4.4.0",
44
- "@girs/gobject-2.0": "^4.4.0",
45
- "@girs/glib-2.0": "^4.4.0",
46
- "@girs/pango-1.0": "^4.4.0",
47
- "@girs/harfbuzz-0.0": "^4.4.0",
48
- "@girs/freetype2-2.0": "^4.4.0",
49
- "@girs/gio-2.0": "^4.4.0",
50
- "@girs/gmodule-2.0": "^4.4.0",
51
- "@girs/gdkpixbuf-2.0": "^4.4.0",
52
- "@girs/atk-1.0": "^4.4.0" },
39
+ "@girs/gjs": "^4.6.0",
40
+ "@girs/gtk-3.0": "^4.6.0",
41
+ "@girs/xlib-2.0": "^4.6.0",
42
+ "@girs/gdk-3.0": "^4.6.0",
43
+ "@girs/cairo-1.0": "^4.6.0",
44
+ "@girs/gobject-2.0": "^4.6.0",
45
+ "@girs/glib-2.0": "^4.6.0",
46
+ "@girs/pango-1.0": "^4.6.0",
47
+ "@girs/harfbuzz-0.0": "^4.6.0",
48
+ "@girs/freetype2-2.0": "^4.6.0",
49
+ "@girs/gio-2.0": "^4.6.0",
50
+ "@girs/gmodule-2.0": "^4.6.0",
51
+ "@girs/gdkpixbuf-2.0": "^4.6.0",
52
+ "@girs/atk-1.0": "^4.6.0" },
53
53
  "devDependencies": {
54
54
  "typescript": "*"
55
55
  },
package/tsconfig.json CHANGED
@@ -62,7 +62,7 @@
62
62
  ]
63
63
  }
64
64
  },
65
- "include": ["./gtksource-4.d.ts","./gtksource-4-surface.d.ts"]
65
+ "include": ["./gtksource-4.d.ts","./gtksource-4-vocabulary.d.ts"]
66
66
  }
67
67
 
68
68