@girs/gspell-1 4.3.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,82 +4,96 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/gspell-1)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gspell-1)
6
6
 
7
+ GJS TypeScript type definitions for Gspell-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
7
8
 
8
- GJS TypeScript type definitions for Gspell-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.3.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/gspell-1
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/gspell-1` | the namespace as a default export, plus the ambient and global declarations |
26
+ | `@girs/gspell-1/ambient` | only the `gi://` module declarations |
27
+ | `@girs/gspell-1/import` | only the `imports.gi` declarations |
28
+ | `@girs/gspell-1/gspell-1` | the namespace, without the side-effecting declarations |
29
+ | `@girs/gspell-1/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 Gspell from '@girs/gspell-1';
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/gspell-1` or `@girs/gspell-1/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/gspell-1'
47
+ import '@girs/gspell-1';
32
48
  ```
33
49
 
34
- `tsconfig.json`:
35
50
  ```json
36
- {
37
- "compilerOptions": {
38
- ...
39
- },
40
- "include": ["@girs/gspell-1"],
41
- ...
42
- }
51
+ { "include": ["@girs/gspell-1"] }
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 Gspell from 'gi://Gspell?version=1';
49
58
  ```
50
59
 
51
- ### Global import
60
+ Referencing `@girs/gspell-1/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/gspell-1` or `@girs/gspell-1/import` in your `tsconfig` or entry point Typescript file:
65
+ GJS's global object works the same way, via `@girs/gspell-1/import`:
55
66
 
56
- `index.ts`:
57
67
  ```ts
58
- import '@girs/gspell-1'
68
+ const Gspell = imports.gi.Gspell;
59
69
  ```
60
70
 
61
- `tsconfig.json`:
62
- ```json
63
- {
64
- "compilerOptions": {
65
- ...
66
- },
67
- "include": ["@girs/gspell-1"],
68
- ...
69
- }
70
- ```
71
+ ## Widget vocabulary
71
72
 
72
- That form carries types as well:
73
+ `gspell-1` 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 Gspell = imports.gi.Gspell;
77
+ import type { Widgets, PropsOf } from '@girs/gspell-1/vocabulary';
78
+ import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/gspell-1/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
 
@@ -117,6 +117,23 @@ export interface Widgets {
117
117
  /** Every GType this namespace can create. A consumer derives its own tag map. */
118
118
  export type WidgetGType = keyof Widgets;
119
119
 
120
+ // ---------------------------------------------------------------------------
121
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
122
+ //
123
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
124
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
125
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
126
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
127
+ // more rows in `Widgets`: concatenate them when you mean both.
128
+ // ---------------------------------------------------------------------------
129
+
130
+ export interface ChildHolders {
131
+
132
+ }
133
+
134
+ /** Every GType this namespace holds a child in without it being a widget. */
135
+ export type ChildHolderGType = keyof ChildHolders;
136
+
120
137
  /** The writable, optional, GObject-keyed property surface of one GType. */
121
138
  export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
122
139
 
@@ -152,6 +169,9 @@ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
152
169
  /** Widget GType -> every declaration its members come from, self first. */
153
170
  export const DECLS: Readonly<Record<string, readonly string[]>>;
154
171
 
172
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
173
+ export const CHILD_HOLDERS: readonly string[];
174
+
155
175
  /** Enum GType -> the nicks this surface offers. */
156
176
  export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
157
177
 
@@ -21,6 +21,12 @@ export const DECLS = {
21
21
  GspellLanguageChooserDialog: ['GspellLanguageChooserDialog', 'GtkDialog', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GspellLanguageChooser', 'GtkBuildable'],
22
22
  };
23
23
 
24
+ // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
25
+ // and descend from `GObject.Object`. A renderer places them like a container; a check
26
+ // asking "is this a widget" must not count them. Derived from the accessor pair, never
27
+ // from a list — the count is in the provenance line above.
28
+ export const CHILD_HOLDERS = [];
29
+
24
30
  export const ENUM_NICKS = {};
25
31
 
26
32
  export const SLOT_CANDIDATES = {};
@@ -0,0 +1,212 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for Gspell-1.
3
+ *
4
+ * GENERATED — do not edit. Provenance: Gspell-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
5
+ *
6
+ * 3 concrete widgets, 4 declarations, 0 enum nick unions, 0 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 Gspell from './gspell-1.js';
28
+ import type { GtkActionableConstructOnly, GtkActionableProps, GtkActivatableConstructOnly, GtkActivatableProps, GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkButtonConstructOnly, GtkButtonProps, GtkContainerConstructOnly, GtkContainerProps, GtkDialogConstructOnly, GtkDialogProps, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-3.0/vocabulary';
29
+
30
+ // ---------------------------------------------------------------------------
31
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
32
+ //
33
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
34
+ // some nicks keep an underscore the substitution would have replaced, and only the
35
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
36
+ // how a derived nick passes review and breaks elsewhere.
37
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
38
+ // ---------------------------------------------------------------------------
39
+
40
+
41
+
42
+ // ---------------------------------------------------------------------------
43
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
44
+ // inheritance rather than flattening per widget.
45
+ //
46
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
47
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
48
+ // because GObject installs interface properties on the implementor at runtime while
49
+ // GIR keeps them once, on the interface.
50
+ // ---------------------------------------------------------------------------
51
+
52
+ export interface GspellCheckerDialogProps extends GtkDialogProps, GtkBuildableProps {
53
+ /** The #GspellNavigator to use. */
54
+ 'spell-navigator'?: Gspell.Navigator;
55
+ }
56
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
57
+ export type GspellCheckerDialogConstructOnly = GtkDialogConstructOnly | GtkBuildableConstructOnly | 'spell-navigator';
58
+
59
+ export interface GspellLanguageChooserProps {
60
+ /** The selected #GspellLanguage. */
61
+ language?: Gspell.Language | null;
62
+ /** The empty string if the default language was set and the selection hasn't changed. */
63
+ 'language-code'?: string;
64
+ }
65
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
66
+ export type GspellLanguageChooserConstructOnly = never;
67
+
68
+ export interface GspellLanguageChooserButtonProps extends GtkButtonProps, GspellLanguageChooserProps, GtkActionableProps, GtkActivatableProps, GtkBuildableProps {
69
+ }
70
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
71
+ export type GspellLanguageChooserButtonConstructOnly = GtkButtonConstructOnly | GspellLanguageChooserConstructOnly | GtkActionableConstructOnly | GtkActivatableConstructOnly | GtkBuildableConstructOnly;
72
+
73
+ export interface GspellLanguageChooserDialogProps extends GtkDialogProps, GspellLanguageChooserProps, GtkBuildableProps {
74
+ }
75
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
76
+ export type GspellLanguageChooserDialogConstructOnly = GtkDialogConstructOnly | GspellLanguageChooserConstructOnly | GtkBuildableConstructOnly;
77
+
78
+ // ---------------------------------------------------------------------------
79
+ // The GType-keyed widget map.
80
+ //
81
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
82
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
83
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
84
+ // is the class. None of those is baked in here.
85
+ //
86
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
87
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
88
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
89
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
90
+ // this is what notices when a release adds a candidate.
91
+ // ---------------------------------------------------------------------------
92
+
93
+ export interface Widgets {
94
+ GspellCheckerDialog: {
95
+ class: Gspell.CheckerDialog;
96
+ props: GspellCheckerDialogProps;
97
+ signals: Gspell.CheckerDialog.SignalSignatures;
98
+ constructOnly: GspellCheckerDialogConstructOnly;
99
+ slotCandidates: {};
100
+ };
101
+ GspellLanguageChooserButton: {
102
+ class: Gspell.LanguageChooserButton;
103
+ props: GspellLanguageChooserButtonProps;
104
+ signals: Gspell.LanguageChooserButton.SignalSignatures;
105
+ constructOnly: GspellLanguageChooserButtonConstructOnly;
106
+ slotCandidates: {};
107
+ };
108
+ GspellLanguageChooserDialog: {
109
+ class: Gspell.LanguageChooserDialog;
110
+ props: GspellLanguageChooserDialogProps;
111
+ signals: Gspell.LanguageChooserDialog.SignalSignatures;
112
+ constructOnly: GspellLanguageChooserDialogConstructOnly;
113
+ slotCandidates: {};
114
+ };
115
+ }
116
+
117
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
118
+ export type WidgetGType = keyof Widgets;
119
+
120
+ // ---------------------------------------------------------------------------
121
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
122
+ //
123
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
124
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
125
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
126
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
127
+ // more rows in `Widgets`: concatenate them when you mean both.
128
+ // ---------------------------------------------------------------------------
129
+
130
+ export interface ChildHolders {
131
+
132
+ }
133
+
134
+ /** Every GType this namespace holds a child in without it being a widget. */
135
+ export type ChildHolderGType = keyof ChildHolders;
136
+
137
+ /** The writable, optional, GObject-keyed property surface of one GType. */
138
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
139
+
140
+ /** The signal table this package already emits, reached by GType. */
141
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
142
+
143
+ /** The instance type — what a `ref`-shaped prop should infer. */
144
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
145
+
146
+ /** Property names that can only be set at construction. */
147
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
148
+
149
+ /** Candidate child slots — see the note above; curation decides. */
150
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
151
+
152
+ /**
153
+ * The same facts as runtime data, for a consumer that CHECKS them.
154
+ *
155
+ * Types are erased, so a spec that asks the installed GTK whether every property
156
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
157
+ * and every nick resolvable through an enum lookup cannot read the interfaces
158
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
159
+ * belongs to the consumer and the DATA belongs here.
160
+ */
161
+ export const PROVENANCE: {
162
+ readonly namespace: string;
163
+ readonly version: string;
164
+ /** The version the LIBRARY states, or null where it states none. Never the namespace's. */
165
+ readonly libraryVersion: string | null;
166
+ readonly childHolders: number;
167
+ readonly droppedBases: readonly string[];
168
+ readonly inlinedBases: readonly string[];
169
+ readonly unsettableProps: readonly string[];
170
+ };
171
+
172
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
173
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
174
+
175
+ /**
176
+ * Declaration GType -> the signals it registers itself, never its parents'.
177
+ *
178
+ * Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
179
+ * abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
180
+ */
181
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
182
+
183
+ /** Widget GType -> every declaration its members come from, self first. */
184
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
185
+
186
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
187
+ export const CHILD_HOLDERS: readonly string[];
188
+
189
+ /** Enum GType -> the nicks this surface offers. */
190
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
191
+
192
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
193
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
194
+
195
+ /**
196
+ * `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
197
+ *
198
+ * What keeps a runtime cross-check honest across a version gap without an
199
+ * allowlist: a name the installed library lacks is a defect UNLESS the version
200
+ * here is newer than the one running.
201
+ *
202
+ * ALL THREE key shapes, because that test only works for the names it covers. A
203
+ * property-only map leaves a consumer no way to explain a missing SIGNAL, which is
204
+ * a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
205
+ * explain a missing CLASS, and that one fails as a bare
206
+ * `TypeError: can't access property "$gtype", ctor() is undefined` that does not
207
+ * even name the GType.
208
+ *
209
+ * A key is present only where the GIR states a version — sparse by nature (`version`
210
+ * sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
211
+ */
212
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,42 @@
1
+ // The widget vocabulary of Gspell-1 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: Gspell-1 — 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: 'Gspell',
11
+ version: '1',
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
+ GspellCheckerDialog: ['spell-navigator'],
21
+ GspellLanguageChooser: ['language', 'language-code'],
22
+ };
23
+
24
+ export const OWN_SIGNALS = {};
25
+
26
+ export const DECLS = {
27
+ GspellCheckerDialog: ['GspellCheckerDialog', 'GtkDialog', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
28
+ GspellLanguageChooserButton: ['GspellLanguageChooserButton', 'GtkButton', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GspellLanguageChooser', 'GtkActionable', 'GtkActivatable', 'GtkBuildable'],
29
+ GspellLanguageChooserDialog: ['GspellLanguageChooserDialog', 'GtkDialog', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GspellLanguageChooser', 'GtkBuildable'],
30
+ };
31
+
32
+ // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
33
+ // and descend from `GObject.Object`. A renderer places them like a container; a check
34
+ // asking "is this a widget" must not count them. Derived from the accessor pair, never
35
+ // from a list — the count is in the provenance line above.
36
+ export const CHILD_HOLDERS = [];
37
+
38
+ export const ENUM_NICKS = {};
39
+
40
+ export const SLOT_CANDIDATES = {};
41
+
42
+ export const SINCE = {};
package/gspell-1.d.ts CHANGED
@@ -92,14 +92,14 @@ export namespace Gspell {
92
92
  * @signal
93
93
  * @run-last
94
94
  */
95
- "word-added-to-personal": (arg0: string) => void;
95
+ "word-added-to-personal": (word: string) => void;
96
96
  /**
97
97
  * Emitted when a word is added to the session dictionary. See
98
98
  * `gspell_checker_add_word_to_session()`.
99
99
  * @signal
100
100
  * @run-last
101
101
  */
102
- "word-added-to-session": (arg0: string) => void;
102
+ "word-added-to-session": (word: string) => void;
103
103
  "notify::language": (pspec: GObject.ParamSpec) => void;
104
104
  }
105
105
 
@@ -196,6 +196,7 @@ export namespace Gspell {
196
196
  * @param word the word to check.
197
197
  * @param word_length the byte length of `word`, or -1 if `word` is nul-terminated.
198
198
  * @returns `true` if `word` is correctly spelled, `false` otherwise.
199
+ * @throws GLib.Error
199
200
  */
200
201
  check_word(word: string, word_length: bigint | number): boolean;
201
202
 
@@ -469,6 +470,7 @@ export namespace Gspell {
469
470
  * Returns the {@link Gspell.Entry} of `gtk_entry`. The returned object is guaranteed
470
471
  * to be the same for the lifetime of `gtk_entry`.
471
472
  * @param gtk_entry a {@link Gtk.Entry}.
473
+ * @since 1.4
472
474
  */
473
475
  static get_from_gtk_entry(gtk_entry: Gtk.Entry): Entry;
474
476
 
@@ -509,22 +511,26 @@ export namespace Gspell {
509
511
  * gspell_entry_set_inline_spell_checking (gspell_entry, TRUE);
510
512
  * ```
511
513
  *
514
+ * @since 1.4
512
515
  */
513
516
  basic_setup(): void;
514
517
 
515
518
  /**
516
519
  * @returns the {@link Gtk.Entry} of `gspell_entry`.
520
+ * @since 1.4
517
521
  */
518
522
  get_entry(): Gtk.Entry;
519
523
 
520
524
  /**
521
525
  * @returns the value of the {@link Gspell.Entry.inline_spell_checking} property.
526
+ * @since 1.4
522
527
  */
523
528
  get_inline_spell_checking(): boolean;
524
529
 
525
530
  /**
526
531
  * Sets the {@link Gspell.Entry.inline_spell_checking} property.
527
532
  * @param enable the new state.
533
+ * @since 1.4
528
534
  */
529
535
  set_inline_spell_checking(enable: boolean): void;
530
536
  }
@@ -605,17 +611,20 @@ export namespace Gspell {
605
611
  * Returns the {@link Gspell.EntryBuffer} of `gtk_buffer`. The returned object is
606
612
  * guaranteed to be the same for the lifetime of `gtk_buffer`.
607
613
  * @param gtk_buffer a {@link Gtk.EntryBuffer}.
614
+ * @since 1.4
608
615
  */
609
616
  static get_from_gtk_entry_buffer(gtk_buffer: Gtk.EntryBuffer): EntryBuffer;
610
617
 
611
618
  // Methods
612
619
  /**
613
620
  * @returns the {@link Gtk.EntryBuffer} of `gspell_buffer`.
621
+ * @since 1.4
614
622
  */
615
623
  get_buffer(): Gtk.EntryBuffer;
616
624
 
617
625
  /**
618
626
  * @returns the {@link Gspell.Checker} if one has been set, or `null`.
627
+ * @since 1.4
619
628
  */
620
629
  get_spell_checker(): Checker | null;
621
630
 
@@ -624,6 +633,7 @@ export namespace Gspell {
624
633
  * reference to `spell_checker`, so you can release your reference to
625
634
  * `spell_checker` if you no longer need it.
626
635
  * @param spell_checker a {@link Gspell.Checker}, or `null` to unset the spell checker.
636
+ * @since 1.4
627
637
  */
628
638
  set_spell_checker(spell_checker: Checker | null): void;
629
639
  }
@@ -883,6 +893,7 @@ export namespace Gspell {
883
893
  *
884
894
  * See `gtk_actionable_set_action_name()` for more information.
885
895
  * @returns the action name, or `null` if none is set
896
+ * @since 3.4
886
897
  */
887
898
  get_action_name(): string | null;
888
899
 
@@ -891,6 +902,7 @@ export namespace Gspell {
891
902
  *
892
903
  * See `gtk_actionable_set_action_target_value()` for more information.
893
904
  * @returns the current target value
905
+ * @since 3.4
894
906
  */
895
907
  get_action_target_value(): GLib.Variant;
896
908
 
@@ -907,6 +919,7 @@ export namespace Gspell {
907
919
  * respectively. This is the same form used for actions in the {@link Gio.Menu}
908
920
  * associated with the window.
909
921
  * @param action_name an action name, or `null`
922
+ * @since 3.4
910
923
  */
911
924
  set_action_name(action_name: string | null): void;
912
925
 
@@ -931,6 +944,7 @@ export namespace Gspell {
931
944
  * be rendered as active (and the other buttons, with different targets,
932
945
  * rendered inactive).
933
946
  * @param target_value a {@link GLib.Variant} to set as the target value, or `null`
947
+ * @since 3.4
934
948
  */
935
949
  set_action_target_value(target_value: GLib.Variant | null): void;
936
950
 
@@ -947,6 +961,7 @@ export namespace Gspell {
947
961
  * `action` is the action name and `target` is the string to use
948
962
  * as the target.)
949
963
  * @param detailed_action_name the detailed action name
964
+ * @since 3.4
950
965
  */
951
966
  set_detailed_action_name(detailed_action_name: string): void;
952
967
 
@@ -954,6 +969,7 @@ export namespace Gspell {
954
969
  * Gets the action name for `actionable`.
955
970
  *
956
971
  * See `gtk_actionable_set_action_name()` for more information.
972
+ * @since 3.4
957
973
  * @virtual
958
974
  */
959
975
  vfunc_get_action_name(): string | null;
@@ -962,6 +978,7 @@ export namespace Gspell {
962
978
  * Gets the current target value of `actionable`.
963
979
  *
964
980
  * See `gtk_actionable_set_action_target_value()` for more information.
981
+ * @since 3.4
965
982
  * @virtual
966
983
  */
967
984
  vfunc_get_action_target_value(): GLib.Variant;
@@ -979,6 +996,7 @@ export namespace Gspell {
979
996
  * respectively. This is the same form used for actions in the {@link Gio.Menu}
980
997
  * associated with the window.
981
998
  * @param action_name an action name, or `null`
999
+ * @since 3.4
982
1000
  * @virtual
983
1001
  */
984
1002
  vfunc_set_action_name(action_name: string | null): void;
@@ -1004,6 +1022,7 @@ export namespace Gspell {
1004
1022
  * be rendered as active (and the other buttons, with different targets,
1005
1023
  * rendered inactive).
1006
1024
  * @param target_value a {@link GLib.Variant} to set as the target value, or `null`
1025
+ * @since 3.4
1007
1026
  * @virtual
1008
1027
  */
1009
1028
  vfunc_set_action_target_value(target_value: GLib.Variant | null): void;
@@ -1025,12 +1044,16 @@ export namespace Gspell {
1025
1044
  * > `gtk_activatable_get_related_action()` to retrieve the
1026
1045
  * > previous action.
1027
1046
  * @param action the {@link Gtk.Action} to set
1047
+ * @since 2.16
1048
+ * @deprecated since 3.10
1028
1049
  */
1029
1050
  do_set_related_action(action: Gtk.Action): void;
1030
1051
 
1031
1052
  /**
1032
1053
  * Gets the related {@link Gtk.Action} for `activatable`.
1033
1054
  * @returns the related {@link Gtk.Action} if one is set.
1055
+ * @since 2.16
1056
+ * @deprecated since 3.10
1034
1057
  */
1035
1058
  get_related_action(): Gtk.Action;
1036
1059
 
@@ -1039,6 +1062,8 @@ export namespace Gspell {
1039
1062
  * and appearance when setting the related action or when
1040
1063
  * the action changes appearance.
1041
1064
  * @returns whether `activatable` uses its actions appearance.
1065
+ * @since 2.16
1066
+ * @deprecated since 3.10
1042
1067
  */
1043
1068
  get_use_action_appearance(): boolean;
1044
1069
 
@@ -1048,6 +1073,8 @@ export namespace Gspell {
1048
1073
  * > {@link Gtk.Activatable} implementors need to handle the {@link Gtk.Activatable.related_action}
1049
1074
  * > property and call `gtk_activatable_do_set_related_action()` when it changes.
1050
1075
  * @param action the {@link Gtk.Action} to set
1076
+ * @since 2.16
1077
+ * @deprecated since 3.10
1051
1078
  */
1052
1079
  set_related_action(action: Gtk.Action): void;
1053
1080
 
@@ -1060,6 +1087,8 @@ export namespace Gspell {
1060
1087
  * > `gtk_activatable_sync_action_properties()` to update `activatable`
1061
1088
  * > if needed.
1062
1089
  * @param use_appearance whether to use the actions appearance
1090
+ * @since 2.16
1091
+ * @deprecated since 3.10
1063
1092
  */
1064
1093
  set_use_action_appearance(use_appearance: boolean): void;
1065
1094
 
@@ -1069,6 +1098,8 @@ export namespace Gspell {
1069
1098
  * or unset and by the implementing class when
1070
1099
  * {@link Gtk.Activatable.use_action_appearance} changes.
1071
1100
  * @param action the related {@link Gtk.Action} or `null`
1101
+ * @since 2.16
1102
+ * @deprecated since 3.10
1072
1103
  */
1073
1104
  sync_action_properties(action: Gtk.Action | null): void;
1074
1105
 
@@ -1078,6 +1109,8 @@ export namespace Gspell {
1078
1109
  * or unset and by the implementing class when
1079
1110
  * {@link Gtk.Activatable.use_action_appearance} changes.
1080
1111
  * @param action the related {@link Gtk.Action} or `null`
1112
+ * @since 2.16
1113
+ * @deprecated since 3.10
1081
1114
  * @virtual
1082
1115
  */
1083
1116
  vfunc_sync_action_properties(action: Gtk.Action | null): void;
@@ -1114,6 +1147,7 @@ export namespace Gspell {
1114
1147
  * Returns whether the widget should grab focus when it is clicked with the mouse.
1115
1148
  * See `gtk_widget_set_focus_on_click()`.
1116
1149
  * @returns `true` if the widget should grab focus when it is clicked with the mouse.
1150
+ * @since 3.20
1117
1151
  */
1118
1152
  get_focus_on_click(): boolean;
1119
1153
 
@@ -1123,6 +1157,7 @@ export namespace Gspell {
1123
1157
  * you don’t want the keyboard focus removed from the main area of the
1124
1158
  * application.
1125
1159
  * @param focus_on_click whether the widget should grab focus when clicked with the mouse
1160
+ * @since 3.20
1126
1161
  */
1127
1162
  set_focus_on_click(focus_on_click: boolean): void;
1128
1163
  }
@@ -1406,6 +1441,7 @@ export namespace Gspell {
1406
1441
  * Goes to the next misspelled word. When called the first time, goes to the
1407
1442
  * first misspelled word.
1408
1443
  * @returns `true` if a next misspelled word has been found, `false` if the spell checking is finished or if an error occurred.
1444
+ * @throws GLib.Error
1409
1445
  */
1410
1446
  goto_next(): [boolean, string, Checker | null];
1411
1447
 
@@ -1676,11 +1712,13 @@ export namespace Gspell {
1676
1712
  * gspell_text_view_set_enable_language_menu (gspell_view, TRUE);
1677
1713
  * ```
1678
1714
  *
1715
+ * @since 1.2
1679
1716
  */
1680
1717
  basic_setup(): void;
1681
1718
 
1682
1719
  /**
1683
1720
  * @returns whether the language context menu is enabled.
1721
+ * @since 1.2
1684
1722
  */
1685
1723
  get_enable_language_menu(): boolean;
1686
1724
 
@@ -1701,6 +1739,7 @@ export namespace Gspell {
1701
1739
  * {@link Gspell.Checker.language} property of the {@link Gspell.TextBuffer.spell_checker} of
1702
1740
  * the {@link Gtk.TextView.buffer} of the {@link Gspell.TextView.view}.
1703
1741
  * @param enable_language_menu whether to enable the language context menu.
1742
+ * @since 1.2
1704
1743
  */
1705
1744
  set_enable_language_menu(enable_language_menu: boolean): void;
1706
1745
 
@@ -1995,6 +2034,7 @@ export namespace Gspell {
1995
2034
  * Goes to the next misspelled word. When called the first time, goes to the
1996
2035
  * first misspelled word.
1997
2036
  * @returns `true` if a next misspelled word has been found, `false` if the spell checking is finished or if an error occurred.
2037
+ * @throws GLib.Error
1998
2038
  */
1999
2039
  goto_next(): [boolean, string, Checker | null];
2000
2040
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gspell-1",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
4
4
  "description": "GJS TypeScript type definitions for Gspell-1",
5
5
  "type": "module",
6
6
  "module": "gspell-1.js",
@@ -16,10 +16,10 @@
16
16
  "import": "./gspell-1-import.js",
17
17
  "default": "./gspell-1-import.js"
18
18
  },
19
- "./surface": {
20
- "types": "./gspell-1-surface.d.ts",
21
- "import": "./gspell-1-surface.js",
22
- "default": "./gspell-1-surface.js"
19
+ "./vocabulary": {
20
+ "types": "./gspell-1-vocabulary.d.ts",
21
+ "import": "./gspell-1-vocabulary.js",
22
+ "default": "./gspell-1-vocabulary.js"
23
23
  },
24
24
  "./gspell-1": {
25
25
  "types": "./gspell-1.d.ts",
@@ -36,20 +36,20 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
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" },
39
+ "@girs/gjs": "^4.5.0",
40
+ "@girs/gtk-3.0": "^4.5.0",
41
+ "@girs/xlib-2.0": "^4.5.0",
42
+ "@girs/gdk-3.0": "^4.5.0",
43
+ "@girs/cairo-1.0": "^4.5.0",
44
+ "@girs/gobject-2.0": "^4.5.0",
45
+ "@girs/glib-2.0": "^4.5.0",
46
+ "@girs/pango-1.0": "^4.5.0",
47
+ "@girs/harfbuzz-0.0": "^4.5.0",
48
+ "@girs/freetype2-2.0": "^4.5.0",
49
+ "@girs/gio-2.0": "^4.5.0",
50
+ "@girs/gmodule-2.0": "^4.5.0",
51
+ "@girs/gdkpixbuf-2.0": "^4.5.0",
52
+ "@girs/atk-1.0": "^4.5.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": ["./gspell-1.d.ts","./gspell-1-surface.d.ts"]
65
+ "include": ["./gspell-1.d.ts","./gspell-1-vocabulary.d.ts"]
66
66
  }
67
67
 
68
68