@girs/gcrui-3 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/gcrui-3)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gcrui-3)
6
6
 
7
+ GJS TypeScript type definitions for GcrUi-3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
7
8
 
8
- GJS TypeScript type definitions for GcrUi-3 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/gcrui-3
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/gcrui-3` | the namespace as a default export, plus the ambient and global declarations |
26
+ | `@girs/gcrui-3/ambient` | only the `gi://` module declarations |
27
+ | `@girs/gcrui-3/import` | only the `imports.gi` declarations |
28
+ | `@girs/gcrui-3/gcrui-3` | the namespace, without the side-effecting declarations |
29
+ | `@girs/gcrui-3/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 GcrUi from '@girs/gcrui-3';
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/gcrui-3` or `@girs/gcrui-3/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/gcrui-3'
47
+ import '@girs/gcrui-3';
32
48
  ```
33
49
 
34
- `tsconfig.json`:
35
50
  ```json
36
- {
37
- "compilerOptions": {
38
- ...
39
- },
40
- "include": ["@girs/gcrui-3"],
41
- ...
42
- }
51
+ { "include": ["@girs/gcrui-3"] }
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 GcrUi from 'gi://GcrUi?version=3';
49
58
  ```
50
59
 
51
- ### Global import
60
+ Referencing `@girs/gcrui-3/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/gcrui-3` or `@girs/gcrui-3/import` in your `tsconfig` or entry point Typescript file:
65
+ GJS's global object works the same way, via `@girs/gcrui-3/import`:
55
66
 
56
- `index.ts`:
57
67
  ```ts
58
- import '@girs/gcrui-3'
68
+ const GcrUi = imports.gi.GcrUi;
59
69
  ```
60
70
 
61
- `tsconfig.json`:
62
- ```json
63
- {
64
- "compilerOptions": {
65
- ...
66
- },
67
- "include": ["@girs/gcrui-3"],
68
- ...
69
- }
70
- ```
71
+ ## Widget vocabulary
71
72
 
72
- That form carries types as well:
73
+ `gcrui-3` 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 GcrUi = imports.gi.GcrUi;
77
+ import type { Widgets, PropsOf } from '@girs/gcrui-3/vocabulary';
78
+ import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/gcrui-3/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
 
@@ -230,6 +230,23 @@ export interface Widgets {
230
230
  /** Every GType this namespace can create. A consumer derives its own tag map. */
231
231
  export type WidgetGType = keyof Widgets;
232
232
 
233
+ // ---------------------------------------------------------------------------
234
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
235
+ //
236
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
237
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
238
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
239
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
240
+ // more rows in `Widgets`: concatenate them when you mean both.
241
+ // ---------------------------------------------------------------------------
242
+
243
+ export interface ChildHolders {
244
+
245
+ }
246
+
247
+ /** Every GType this namespace holds a child in without it being a widget. */
248
+ export type ChildHolderGType = keyof ChildHolders;
249
+
233
250
  /** The writable, optional, GObject-keyed property surface of one GType. */
234
251
  export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
235
252
 
@@ -265,6 +282,9 @@ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
265
282
  /** Widget GType -> every declaration its members come from, self first. */
266
283
  export const DECLS: Readonly<Record<string, readonly string[]>>;
267
284
 
285
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
286
+ export const CHILD_HOLDERS: readonly string[];
287
+
268
288
  /** Enum GType -> the nicks this surface offers. */
269
289
  export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
270
290
 
@@ -36,6 +36,12 @@ export const DECLS = {
36
36
  GcrViewerWidget: ['GcrViewerWidget', 'GtkBox', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkOrientable'],
37
37
  };
38
38
 
39
+ // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
40
+ // and descend from `GObject.Object`. A renderer places them like a container; a check
41
+ // asking "is this a widget" must not count them. Derived from the accessor pair, never
42
+ // from a list — the count is in the provenance line above.
43
+ export const CHILD_HOLDERS = [];
44
+
39
45
  export const ENUM_NICKS = {};
40
46
 
41
47
  export const SLOT_CANDIDATES = {};
@@ -0,0 +1,360 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for GcrUi-3.
3
+ *
4
+ * GENERATED — do not edit. Provenance: GcrUi-3 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface — inlined base(s) from a namespace with no vocabulary: Gcr.Prompt — prop(s) no TypeScript value satisfies: GcrUi.TreeSelector.columns
5
+ *
6
+ * 9 concrete widgets, 10 declarations (1 inlined from a namespace with no surface), 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 Gck from '@girs/gck-1';
28
+ import type Gcr from '@girs/gcr-3';
29
+ import type GcrUi from './gcrui-3.js';
30
+ import type { GtkActionableConstructOnly, GtkActionableProps, GtkActivatableConstructOnly, GtkActivatableProps, GtkBinConstructOnly, GtkBinProps, GtkBoxConstructOnly, GtkBoxProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkButtonConstructOnly, GtkButtonProps, GtkCellEditableConstructOnly, GtkCellEditableProps, GtkCellLayoutConstructOnly, GtkCellLayoutProps, GtkComboBoxConstructOnly, GtkComboBoxProps, GtkContainerConstructOnly, GtkContainerProps, GtkDialogConstructOnly, GtkDialogProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkTreeViewConstructOnly, GtkTreeViewProps, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-3.0/vocabulary';
31
+
32
+ // ---------------------------------------------------------------------------
33
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
34
+ //
35
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
36
+ // some nicks keep an underscore the substitution would have replaced, and only the
37
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
38
+ // how a derived nick passes review and breaks elsewhere.
39
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
40
+ // ---------------------------------------------------------------------------
41
+
42
+
43
+
44
+ // ---------------------------------------------------------------------------
45
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
46
+ // inheritance rather than flattening per widget.
47
+ //
48
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
49
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
50
+ // because GObject installs interface properties on the implementor at runtime while
51
+ // GIR keeps them once, on the interface.
52
+ // ---------------------------------------------------------------------------
53
+
54
+ /** A widget that can be used to display a certificate. */
55
+ export interface GcrCertificateWidgetProps extends GtkBinProps, GtkBuildableProps {
56
+ attributes?: Gck.Attributes | null;
57
+ certificate?: Gcr.Certificate | null;
58
+ }
59
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
60
+ export type GcrCertificateWidgetConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
61
+
62
+ /** A widget that can be used to select a certificate or key. */
63
+ export interface GcrComboSelectorProps extends GtkComboBoxProps, GtkBuildableProps, GtkCellEditableProps, GtkCellLayoutProps {
64
+ /** The collection which contains the objects to display in the selector. */
65
+ collection?: Gcr.Collection;
66
+ }
67
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
68
+ export type GcrComboSelectorConstructOnly = GtkComboBoxConstructOnly | GtkBuildableConstructOnly | GtkCellEditableConstructOnly | GtkCellLayoutConstructOnly | 'collection';
69
+
70
+ /** A button which imports keys and certificates. */
71
+ export interface GcrImportButtonProps extends GtkButtonProps, GtkActionableProps, GtkActivatableProps, GtkBuildableProps {
72
+ }
73
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
74
+ export type GcrImportButtonConstructOnly = GtkButtonConstructOnly | GtkActionableConstructOnly | GtkActivatableConstructOnly | GtkBuildableConstructOnly;
75
+
76
+ /** A key widget and renderer A key widget can be used to display a RSA, DSA or EC key. */
77
+ export interface GcrKeyWidgetProps extends GtkBinProps, GtkBuildableProps {
78
+ attributes?: Gck.Attributes | null;
79
+ }
80
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
81
+ export type GcrKeyWidgetConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
82
+
83
+ /** A selector widget to select 1 or more certificates or keys from a list. */
84
+ export interface GcrListSelectorProps extends GtkTreeViewProps, GtkBuildableProps, GtkScrollableProps {
85
+ /** The collection which contains the objects to display in the selector. */
86
+ collection?: Gcr.Collection;
87
+ }
88
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
89
+ export type GcrListSelectorConstructOnly = GtkTreeViewConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly | 'collection';
90
+
91
+ /** A prompt displayed to the user. */
92
+ export interface GcrPromptProps {
93
+ /**
94
+ * The string handle of the caller's window.
95
+ * @default NULL
96
+ */
97
+ 'caller-window'?: string;
98
+ /**
99
+ * The label for the cancel button in the prompt.
100
+ * @default Cancel
101
+ */
102
+ 'cancel-label'?: string;
103
+ /**
104
+ * Whether the additional choice is chosen or not.
105
+ * @default FALSE
106
+ */
107
+ 'choice-chosen'?: boolean;
108
+ /**
109
+ * The label for the additional choice.
110
+ * @default NULL
111
+ */
112
+ 'choice-label'?: string;
113
+ /**
114
+ * The label for the continue button in the prompt.
115
+ * @default Continue
116
+ */
117
+ 'continue-label'?: string;
118
+ /**
119
+ * The detailed description of the prompt.
120
+ * @default NULL
121
+ */
122
+ description?: string;
123
+ /**
124
+ * The prompt message for the user.
125
+ * @default NULL
126
+ */
127
+ message?: string;
128
+ /**
129
+ * Whether the prompt will prompt for a new password.
130
+ * @default FALSE
131
+ */
132
+ 'password-new'?: boolean;
133
+ /**
134
+ * The title of the prompt.
135
+ * @default NULL
136
+ */
137
+ title?: string;
138
+ /**
139
+ * A prompt warning displayed on the prompt, or %NULL for no warning.
140
+ * @default NULL
141
+ */
142
+ warning?: string;
143
+ }
144
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
145
+ export type GcrPromptConstructOnly = never;
146
+
147
+ /** A [iface@Gcr.Prompt] implementation which shows a GTK dialog. */
148
+ export interface GcrPromptDialogProps extends GtkDialogProps, Omit<GcrPromptProps, 'title'>, GtkBuildableProps {
149
+ }
150
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
151
+ export type GcrPromptDialogConstructOnly = GtkDialogConstructOnly | GcrPromptConstructOnly | GtkBuildableConstructOnly;
152
+
153
+ /** A tree selector can be used to select certificates or keys. */
154
+ export interface GcrTreeSelectorProps extends GtkTreeViewProps, GtkBuildableProps, GtkScrollableProps {
155
+ /** The collection which contains the objects to display in the selector. */
156
+ collection?: Gcr.Collection;
157
+ /** The columns to use to display the objects. */
158
+ columns?: never;
159
+ }
160
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
161
+ export type GcrTreeSelectorConstructOnly = GtkTreeViewConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly | 'collection' | 'columns';
162
+
163
+ /** This widget displays a set of unlock options for the user to select. */
164
+ export interface GcrUnlockOptionsWidgetProps extends GtkBinProps, GtkBuildableProps {
165
+ /** @default NULL */
166
+ choice?: string;
167
+ /** @default 0 */
168
+ ttl?: number;
169
+ }
170
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
171
+ export type GcrUnlockOptionsWidgetConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
172
+
173
+ /** A viewer widget which can display certificates and keys that are located in files. */
174
+ export interface GcrViewerWidgetProps extends GtkBoxProps, GtkBuildableProps, GtkOrientableProps {
175
+ /**
176
+ * Display name for data being displayed.
177
+ * @default NULL
178
+ */
179
+ 'display-name'?: string;
180
+ }
181
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
182
+ export type GcrViewerWidgetConstructOnly = GtkBoxConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
183
+
184
+ // ---------------------------------------------------------------------------
185
+ // The GType-keyed widget map.
186
+ //
187
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
188
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
189
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
190
+ // is the class. None of those is baked in here.
191
+ //
192
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
193
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
194
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
195
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
196
+ // this is what notices when a release adds a candidate.
197
+ // ---------------------------------------------------------------------------
198
+
199
+ export interface Widgets {
200
+ GcrCertificateWidget: {
201
+ class: GcrUi.CertificateWidget;
202
+ props: GcrCertificateWidgetProps;
203
+ signals: GcrUi.CertificateWidget.SignalSignatures;
204
+ constructOnly: GcrCertificateWidgetConstructOnly;
205
+ slotCandidates: {};
206
+ };
207
+ GcrComboSelector: {
208
+ class: GcrUi.ComboSelector;
209
+ props: GcrComboSelectorProps;
210
+ signals: GcrUi.ComboSelector.SignalSignatures;
211
+ constructOnly: GcrComboSelectorConstructOnly;
212
+ slotCandidates: {};
213
+ };
214
+ GcrImportButton: {
215
+ class: GcrUi.ImportButton;
216
+ props: GcrImportButtonProps;
217
+ signals: GcrUi.ImportButton.SignalSignatures;
218
+ constructOnly: GcrImportButtonConstructOnly;
219
+ slotCandidates: {};
220
+ };
221
+ GcrKeyWidget: {
222
+ class: GcrUi.KeyWidget;
223
+ props: GcrKeyWidgetProps;
224
+ signals: GcrUi.KeyWidget.SignalSignatures;
225
+ constructOnly: GcrKeyWidgetConstructOnly;
226
+ slotCandidates: {};
227
+ };
228
+ GcrListSelector: {
229
+ class: GcrUi.ListSelector;
230
+ props: GcrListSelectorProps;
231
+ signals: GcrUi.ListSelector.SignalSignatures;
232
+ constructOnly: GcrListSelectorConstructOnly;
233
+ slotCandidates: {};
234
+ };
235
+ GcrPromptDialog: {
236
+ class: GcrUi.PromptDialog;
237
+ props: GcrPromptDialogProps;
238
+ signals: GcrUi.PromptDialog.SignalSignatures;
239
+ constructOnly: GcrPromptDialogConstructOnly;
240
+ slotCandidates: {};
241
+ };
242
+ GcrTreeSelector: {
243
+ class: GcrUi.TreeSelector;
244
+ props: GcrTreeSelectorProps;
245
+ signals: GcrUi.TreeSelector.SignalSignatures;
246
+ constructOnly: GcrTreeSelectorConstructOnly;
247
+ slotCandidates: {};
248
+ };
249
+ GcrUnlockOptionsWidget: {
250
+ class: GcrUi.UnlockOptionsWidget;
251
+ props: GcrUnlockOptionsWidgetProps;
252
+ signals: GcrUi.UnlockOptionsWidget.SignalSignatures;
253
+ constructOnly: GcrUnlockOptionsWidgetConstructOnly;
254
+ slotCandidates: {};
255
+ };
256
+ GcrViewerWidget: {
257
+ class: GcrUi.ViewerWidget;
258
+ props: GcrViewerWidgetProps;
259
+ signals: GcrUi.ViewerWidget.SignalSignatures;
260
+ constructOnly: GcrViewerWidgetConstructOnly;
261
+ slotCandidates: {};
262
+ };
263
+ }
264
+
265
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
266
+ export type WidgetGType = keyof Widgets;
267
+
268
+ // ---------------------------------------------------------------------------
269
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
270
+ //
271
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
272
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
273
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
274
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
275
+ // more rows in `Widgets`: concatenate them when you mean both.
276
+ // ---------------------------------------------------------------------------
277
+
278
+ export interface ChildHolders {
279
+
280
+ }
281
+
282
+ /** Every GType this namespace holds a child in without it being a widget. */
283
+ export type ChildHolderGType = keyof ChildHolders;
284
+
285
+ /** The writable, optional, GObject-keyed property surface of one GType. */
286
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
287
+
288
+ /** The signal table this package already emits, reached by GType. */
289
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
290
+
291
+ /** The instance type — what a `ref`-shaped prop should infer. */
292
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
293
+
294
+ /** Property names that can only be set at construction. */
295
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
296
+
297
+ /** Candidate child slots — see the note above; curation decides. */
298
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
299
+
300
+ /**
301
+ * The same facts as runtime data, for a consumer that CHECKS them.
302
+ *
303
+ * Types are erased, so a spec that asks the installed GTK whether every property
304
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
305
+ * and every nick resolvable through an enum lookup cannot read the interfaces
306
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
307
+ * belongs to the consumer and the DATA belongs here.
308
+ */
309
+ export const PROVENANCE: {
310
+ readonly namespace: string;
311
+ readonly version: string;
312
+ /** The version the LIBRARY states, or null where it states none. Never the namespace's. */
313
+ readonly libraryVersion: string | null;
314
+ readonly childHolders: number;
315
+ readonly droppedBases: readonly string[];
316
+ readonly inlinedBases: readonly string[];
317
+ readonly unsettableProps: readonly string[];
318
+ };
319
+
320
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
321
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
322
+
323
+ /**
324
+ * Declaration GType -> the signals it registers itself, never its parents'.
325
+ *
326
+ * Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
327
+ * abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
328
+ */
329
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
330
+
331
+ /** Widget GType -> every declaration its members come from, self first. */
332
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
333
+
334
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
335
+ export const CHILD_HOLDERS: readonly string[];
336
+
337
+ /** Enum GType -> the nicks this surface offers. */
338
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
339
+
340
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
341
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
342
+
343
+ /**
344
+ * `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
345
+ *
346
+ * What keeps a runtime cross-check honest across a version gap without an
347
+ * allowlist: a name the installed library lacks is a defect UNLESS the version
348
+ * here is newer than the one running.
349
+ *
350
+ * ALL THREE key shapes, because that test only works for the names it covers. A
351
+ * property-only map leaves a consumer no way to explain a missing SIGNAL, which is
352
+ * a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
353
+ * explain a missing CLASS, and that one fails as a bare
354
+ * `TypeError: can't access property "$gtype", ctor() is undefined` that does not
355
+ * even name the GType.
356
+ *
357
+ * A key is present only where the GIR states a version — sparse by nature (`version`
358
+ * sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
359
+ */
360
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,57 @@
1
+ // The widget vocabulary of GcrUi-3 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: GcrUi-3 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface — inlined base(s) from a namespace with no vocabulary: Gcr.Prompt — prop(s) no TypeScript value satisfies: GcrUi.TreeSelector.columns
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: 'GcrUi',
11
+ version: '3',
12
+ libraryVersion: null,
13
+ childHolders: 0,
14
+ droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object', 'Atk.ImplementorIface'],
15
+ inlinedBases: ['Gcr.Prompt'],
16
+ unsettableProps: ['GcrUi.TreeSelector.columns'],
17
+ };
18
+
19
+ export const OWN_PROPS = {
20
+ GcrCertificateWidget: ['attributes', 'certificate'],
21
+ GcrComboSelector: ['collection'],
22
+ GcrKeyWidget: ['attributes'],
23
+ GcrListSelector: ['collection'],
24
+ GcrPrompt: ['caller-window', 'cancel-label', 'choice-chosen', 'choice-label', 'continue-label', 'description', 'message', 'password-new', 'title', 'warning'],
25
+ GcrTreeSelector: ['collection', 'columns'],
26
+ GcrUnlockOptionsWidget: ['choice', 'ttl'],
27
+ GcrViewerWidget: ['display-name'],
28
+ };
29
+
30
+ export const OWN_SIGNALS = {
31
+ GcrImportButton: ['imported', 'importing'],
32
+ GcrViewerWidget: ['added'],
33
+ };
34
+
35
+ export const DECLS = {
36
+ GcrCertificateWidget: ['GcrCertificateWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
37
+ GcrComboSelector: ['GcrComboSelector', 'GtkComboBox', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkCellEditable', 'GtkCellLayout'],
38
+ GcrImportButton: ['GcrImportButton', 'GtkButton', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkActionable', 'GtkActivatable', 'GtkBuildable'],
39
+ GcrKeyWidget: ['GcrKeyWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
40
+ GcrListSelector: ['GcrListSelector', 'GtkTreeView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
41
+ GcrPromptDialog: ['GcrPromptDialog', 'GtkDialog', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GcrPrompt', 'GtkBuildable'],
42
+ GcrTreeSelector: ['GcrTreeSelector', 'GtkTreeView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
43
+ GcrUnlockOptionsWidget: ['GcrUnlockOptionsWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
44
+ GcrViewerWidget: ['GcrViewerWidget', 'GtkBox', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkOrientable'],
45
+ };
46
+
47
+ // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
48
+ // and descend from `GObject.Object`. A renderer places them like a container; a check
49
+ // asking "is this a widget" must not count them. Derived from the accessor pair, never
50
+ // from a list — the count is in the provenance line above.
51
+ export const CHILD_HOLDERS = [];
52
+
53
+ export const ENUM_NICKS = {};
54
+
55
+ export const SLOT_CANDIDATES = {};
56
+
57
+ export const SINCE = {};
package/gcrui-3.d.ts CHANGED
@@ -45,11 +45,11 @@ export namespace GcrUi {
45
45
  /**
46
46
  * only objects in the top collection, no child objects
47
47
  */
48
- LIST,
48
+ LIST = 0,
49
49
  /**
50
50
  * show objects in the collection, and child objects in a tree form
51
51
  */
52
- TREE,
52
+ TREE = 1,
53
53
  }
54
54
 
55
55
 
@@ -796,6 +796,7 @@ export namespace GcrUi {
796
796
  * and `root` as the virtual root.
797
797
  * @param root A {@link Gtk.TreePath} or `null`.
798
798
  * @returns A new {@link Gtk.TreeModel}.
799
+ * @since 2.4
799
800
  */
800
801
  filter_new(root: Gtk.TreePath | null): Gtk.TreeModel;
801
802
 
@@ -872,6 +873,7 @@ export namespace GcrUi {
872
873
  * return value for this string.
873
874
  * @param iter a {@link Gtk.TreeIter}-struct
874
875
  * @returns a newly-allocated string. Must be freed with `g_free()`.
876
+ * @since 2.2
875
877
  */
876
878
  get_string_from_iter(iter: Gtk.TreeIter): string;
877
879
 
@@ -962,6 +964,7 @@ export namespace GcrUi {
962
964
  * set to be invalid.
963
965
  * @param iter the {@link Gtk.TreeIter}-struct
964
966
  * @returns `true` if `iter` has been changed to the previous node
967
+ * @since 3.0
965
968
  */
966
969
  iter_previous(iter: Gtk.TreeIter): boolean;
967
970
 
@@ -1031,6 +1034,7 @@ export namespace GcrUi {
1031
1034
  * @param path a {@link Gtk.TreePath}-struct pointing to the tree node whose children have been reordered
1032
1035
  * @param iter a valid {@link Gtk.TreeIter}-struct pointing to the node whose children have been reordered, or `null` if the depth of `path` is 0
1033
1036
  * @param new_order an array of integers mapping the current position of each child to its old position before the re-ordering, i.e. `new_order``[newpos] = oldpos`
1037
+ * @since 3.10
1034
1038
  */
1035
1039
  rows_reordered(path: Gtk.TreePath, iter: Gtk.TreeIter | null, new_order: number[]): void;
1036
1040
 
@@ -1174,6 +1178,7 @@ export namespace GcrUi {
1174
1178
  * If there is no previous `iter`, `false` is returned and `iter` is
1175
1179
  * set to be invalid.
1176
1180
  * @param iter the {@link Gtk.TreeIter}-struct
1181
+ * @since 3.0
1177
1182
  * @virtual
1178
1183
  */
1179
1184
  vfunc_iter_previous(iter: Gtk.TreeIter): boolean;
@@ -1600,12 +1605,14 @@ export namespace GcrUi {
1600
1605
  * @param cell a {@link Gtk.CellRenderer}
1601
1606
  * @param attribute an attribute on the renderer
1602
1607
  * @param column the column position on the model to get the attribute from
1608
+ * @since 2.4
1603
1609
  */
1604
1610
  add_attribute(cell: Gtk.CellRenderer, attribute: string, column: number): void;
1605
1611
 
1606
1612
  /**
1607
1613
  * Unsets all the mappings on all renderers on `cell_layout` and
1608
1614
  * removes all renderers from `cell_layout`.
1615
+ * @since 2.4
1609
1616
  */
1610
1617
  clear(): void;
1611
1618
 
@@ -1613,6 +1620,7 @@ export namespace GcrUi {
1613
1620
  * Clears all existing attributes previously set with
1614
1621
  * `gtk_cell_layout_set_attributes()`.
1615
1622
  * @param cell a {@link Gtk.CellRenderer} to clear the attribute mapping on
1623
+ * @since 2.4
1616
1624
  */
1617
1625
  clear_attributes(cell: Gtk.CellRenderer): void;
1618
1626
 
@@ -1621,12 +1629,14 @@ export namespace GcrUi {
1621
1629
  * if called on a {@link Gtk.CellArea} or might be `null` if no {@link Gtk.CellArea}
1622
1630
  * is used by `cell_layout`.
1623
1631
  * @returns the cell area used by `cell_layout`, or `null` in case no cell area is used.
1632
+ * @since 3.0
1624
1633
  */
1625
1634
  get_area(): Gtk.CellArea | null;
1626
1635
 
1627
1636
  /**
1628
1637
  * Returns the cell renderers which have been added to `cell_layout`.
1629
1638
  * @returns a list of cell renderers. The list, but not the renderers has been newly allocated and should be freed with `g_list_free()` when no longer needed.
1639
+ * @since 2.12
1630
1640
  */
1631
1641
  get_cells(): Gtk.CellRenderer[];
1632
1642
 
@@ -1638,6 +1648,7 @@ export namespace GcrUi {
1638
1648
  * Note that reusing the same cell renderer is not supported.
1639
1649
  * @param cell a {@link Gtk.CellRenderer}
1640
1650
  * @param expand `true` if `cell` is to be given extra space allocated to `cell_layout`
1651
+ * @since 2.4
1641
1652
  */
1642
1653
  pack_end(cell: Gtk.CellRenderer, expand: boolean): void;
1643
1654
 
@@ -1649,6 +1660,7 @@ export namespace GcrUi {
1649
1660
  * Note that reusing the same cell renderer is not supported.
1650
1661
  * @param cell a {@link Gtk.CellRenderer}
1651
1662
  * @param expand `true` if `cell` is to be given extra space allocated to `cell_layout`
1663
+ * @since 2.4
1652
1664
  */
1653
1665
  pack_start(cell: Gtk.CellRenderer, expand: boolean): void;
1654
1666
 
@@ -1659,6 +1671,7 @@ export namespace GcrUi {
1659
1671
  * for this to function properly.
1660
1672
  * @param cell a {@link Gtk.CellRenderer} to reorder
1661
1673
  * @param position new position to insert `cell` at
1674
+ * @since 2.4
1662
1675
  */
1663
1676
  reorder(cell: Gtk.CellRenderer, position: number): void;
1664
1677
 
@@ -1672,6 +1685,7 @@ export namespace GcrUi {
1672
1685
  * `func` may be `null` to remove a previously set function.
1673
1686
  * @param cell a {@link Gtk.CellRenderer}
1674
1687
  * @param func the {@link Gtk.CellLayoutDataFunc} to use, or `null`
1688
+ * @since 2.4
1675
1689
  */
1676
1690
  set_cell_data_func(cell: Gtk.CellRenderer, func: Gtk.CellLayoutDataFunc | null): void;
1677
1691
 
@@ -1685,6 +1699,7 @@ export namespace GcrUi {
1685
1699
  * @param cell a {@link Gtk.CellRenderer}
1686
1700
  * @param attribute an attribute on the renderer
1687
1701
  * @param column the column position on the model to get the attribute from
1702
+ * @since 2.4
1688
1703
  * @virtual
1689
1704
  */
1690
1705
  vfunc_add_attribute(cell: Gtk.CellRenderer, attribute: string, column: number): void;
@@ -1692,6 +1707,7 @@ export namespace GcrUi {
1692
1707
  /**
1693
1708
  * Unsets all the mappings on all renderers on `cell_layout` and
1694
1709
  * removes all renderers from `cell_layout`.
1710
+ * @since 2.4
1695
1711
  * @virtual
1696
1712
  */
1697
1713
  vfunc_clear(): void;
@@ -1700,6 +1716,7 @@ export namespace GcrUi {
1700
1716
  * Clears all existing attributes previously set with
1701
1717
  * `gtk_cell_layout_set_attributes()`.
1702
1718
  * @param cell a {@link Gtk.CellRenderer} to clear the attribute mapping on
1719
+ * @since 2.4
1703
1720
  * @virtual
1704
1721
  */
1705
1722
  vfunc_clear_attributes(cell: Gtk.CellRenderer): void;
@@ -1708,12 +1725,14 @@ export namespace GcrUi {
1708
1725
  * Returns the underlying {@link Gtk.CellArea} which might be `cell_layout`
1709
1726
  * if called on a {@link Gtk.CellArea} or might be `null` if no {@link Gtk.CellArea}
1710
1727
  * is used by `cell_layout`.
1728
+ * @since 3.0
1711
1729
  * @virtual
1712
1730
  */
1713
1731
  vfunc_get_area(): Gtk.CellArea | null;
1714
1732
 
1715
1733
  /**
1716
1734
  * Returns the cell renderers which have been added to `cell_layout`.
1735
+ * @since 2.12
1717
1736
  * @virtual
1718
1737
  */
1719
1738
  vfunc_get_cells(): Gtk.CellRenderer[];
@@ -1726,6 +1745,7 @@ export namespace GcrUi {
1726
1745
  * Note that reusing the same cell renderer is not supported.
1727
1746
  * @param cell a {@link Gtk.CellRenderer}
1728
1747
  * @param expand `true` if `cell` is to be given extra space allocated to `cell_layout`
1748
+ * @since 2.4
1729
1749
  * @virtual
1730
1750
  */
1731
1751
  vfunc_pack_end(cell: Gtk.CellRenderer, expand: boolean): void;
@@ -1738,6 +1758,7 @@ export namespace GcrUi {
1738
1758
  * Note that reusing the same cell renderer is not supported.
1739
1759
  * @param cell a {@link Gtk.CellRenderer}
1740
1760
  * @param expand `true` if `cell` is to be given extra space allocated to `cell_layout`
1761
+ * @since 2.4
1741
1762
  * @virtual
1742
1763
  */
1743
1764
  vfunc_pack_start(cell: Gtk.CellRenderer, expand: boolean): void;
@@ -1749,6 +1770,7 @@ export namespace GcrUi {
1749
1770
  * for this to function properly.
1750
1771
  * @param cell a {@link Gtk.CellRenderer} to reorder
1751
1772
  * @param position new position to insert `cell` at
1773
+ * @since 2.4
1752
1774
  * @virtual
1753
1775
  */
1754
1776
  vfunc_reorder(cell: Gtk.CellRenderer, position: number): void;
@@ -1763,6 +1785,7 @@ export namespace GcrUi {
1763
1785
  * `func` may be `null` to remove a previously set function.
1764
1786
  * @param cell a {@link Gtk.CellRenderer}
1765
1787
  * @param func the {@link Gtk.CellLayoutDataFunc} to use, or `null`
1788
+ * @since 2.4
1766
1789
  * @virtual
1767
1790
  */
1768
1791
  vfunc_set_cell_data_func(cell: Gtk.CellRenderer, func: Gtk.CellLayoutDataFunc | null): void;
@@ -1789,6 +1812,7 @@ export namespace GcrUi {
1789
1812
  * Returns whether the widget should grab focus when it is clicked with the mouse.
1790
1813
  * See `gtk_widget_set_focus_on_click()`.
1791
1814
  * @returns `true` if the widget should grab focus when it is clicked with the mouse.
1815
+ * @since 3.20
1792
1816
  */
1793
1817
  get_focus_on_click(): boolean;
1794
1818
 
@@ -1798,6 +1822,7 @@ export namespace GcrUi {
1798
1822
  * you don’t want the keyboard focus removed from the main area of the
1799
1823
  * application.
1800
1824
  * @param focus_on_click whether the widget should grab focus when clicked with the mouse
1825
+ * @since 3.20
1801
1826
  */
1802
1827
  set_focus_on_click(focus_on_click: boolean): void;
1803
1828
  }
@@ -1933,13 +1958,13 @@ export namespace GcrUi {
1933
1958
  * @signal
1934
1959
  * @run-last
1935
1960
  */
1936
- imported: (arg0: GObject.Object, arg1: GLib.Error) => void;
1961
+ imported: (importer: GObject.Object, error: GLib.Error) => void;
1937
1962
  /**
1938
1963
  * Signal emitted when an import begins.
1939
1964
  * @signal
1940
1965
  * @run-last
1941
1966
  */
1942
- importing: (arg0: GObject.Object) => void;
1967
+ importing: (importer: GObject.Object) => void;
1943
1968
  "notify::always-show-image": (pspec: GObject.ParamSpec) => void;
1944
1969
  "notify::image": (pspec: GObject.ParamSpec) => void;
1945
1970
  "notify::image-position": (pspec: GObject.ParamSpec) => void;
@@ -2158,6 +2183,7 @@ export namespace GcrUi {
2158
2183
  *
2159
2184
  * See `gtk_actionable_set_action_name()` for more information.
2160
2185
  * @returns the action name, or `null` if none is set
2186
+ * @since 3.4
2161
2187
  */
2162
2188
  get_action_name(): string | null;
2163
2189
 
@@ -2166,6 +2192,7 @@ export namespace GcrUi {
2166
2192
  *
2167
2193
  * See `gtk_actionable_set_action_target_value()` for more information.
2168
2194
  * @returns the current target value
2195
+ * @since 3.4
2169
2196
  */
2170
2197
  get_action_target_value(): GLib.Variant;
2171
2198
 
@@ -2182,6 +2209,7 @@ export namespace GcrUi {
2182
2209
  * respectively. This is the same form used for actions in the {@link Gio.Menu}
2183
2210
  * associated with the window.
2184
2211
  * @param action_name an action name, or `null`
2212
+ * @since 3.4
2185
2213
  */
2186
2214
  set_action_name(action_name: string | null): void;
2187
2215
 
@@ -2206,6 +2234,7 @@ export namespace GcrUi {
2206
2234
  * be rendered as active (and the other buttons, with different targets,
2207
2235
  * rendered inactive).
2208
2236
  * @param target_value a {@link GLib.Variant} to set as the target value, or `null`
2237
+ * @since 3.4
2209
2238
  */
2210
2239
  set_action_target_value(target_value: GLib.Variant | null): void;
2211
2240
 
@@ -2222,6 +2251,7 @@ export namespace GcrUi {
2222
2251
  * `action` is the action name and `target` is the string to use
2223
2252
  * as the target.)
2224
2253
  * @param detailed_action_name the detailed action name
2254
+ * @since 3.4
2225
2255
  */
2226
2256
  set_detailed_action_name(detailed_action_name: string): void;
2227
2257
 
@@ -2229,6 +2259,7 @@ export namespace GcrUi {
2229
2259
  * Gets the action name for `actionable`.
2230
2260
  *
2231
2261
  * See `gtk_actionable_set_action_name()` for more information.
2262
+ * @since 3.4
2232
2263
  * @virtual
2233
2264
  */
2234
2265
  vfunc_get_action_name(): string | null;
@@ -2237,6 +2268,7 @@ export namespace GcrUi {
2237
2268
  * Gets the current target value of `actionable`.
2238
2269
  *
2239
2270
  * See `gtk_actionable_set_action_target_value()` for more information.
2271
+ * @since 3.4
2240
2272
  * @virtual
2241
2273
  */
2242
2274
  vfunc_get_action_target_value(): GLib.Variant;
@@ -2254,6 +2286,7 @@ export namespace GcrUi {
2254
2286
  * respectively. This is the same form used for actions in the {@link Gio.Menu}
2255
2287
  * associated with the window.
2256
2288
  * @param action_name an action name, or `null`
2289
+ * @since 3.4
2257
2290
  * @virtual
2258
2291
  */
2259
2292
  vfunc_set_action_name(action_name: string | null): void;
@@ -2279,6 +2312,7 @@ export namespace GcrUi {
2279
2312
  * be rendered as active (and the other buttons, with different targets,
2280
2313
  * rendered inactive).
2281
2314
  * @param target_value a {@link GLib.Variant} to set as the target value, or `null`
2315
+ * @since 3.4
2282
2316
  * @virtual
2283
2317
  */
2284
2318
  vfunc_set_action_target_value(target_value: GLib.Variant | null): void;
@@ -2300,12 +2334,16 @@ export namespace GcrUi {
2300
2334
  * > `gtk_activatable_get_related_action()` to retrieve the
2301
2335
  * > previous action.
2302
2336
  * @param action the {@link Gtk.Action} to set
2337
+ * @since 2.16
2338
+ * @deprecated since 3.10
2303
2339
  */
2304
2340
  do_set_related_action(action: Gtk.Action): void;
2305
2341
 
2306
2342
  /**
2307
2343
  * Gets the related {@link Gtk.Action} for `activatable`.
2308
2344
  * @returns the related {@link Gtk.Action} if one is set.
2345
+ * @since 2.16
2346
+ * @deprecated since 3.10
2309
2347
  */
2310
2348
  get_related_action(): Gtk.Action;
2311
2349
 
@@ -2314,6 +2352,8 @@ export namespace GcrUi {
2314
2352
  * and appearance when setting the related action or when
2315
2353
  * the action changes appearance.
2316
2354
  * @returns whether `activatable` uses its actions appearance.
2355
+ * @since 2.16
2356
+ * @deprecated since 3.10
2317
2357
  */
2318
2358
  get_use_action_appearance(): boolean;
2319
2359
 
@@ -2323,6 +2363,8 @@ export namespace GcrUi {
2323
2363
  * > {@link Gtk.Activatable} implementors need to handle the {@link Gtk.Activatable.related_action}
2324
2364
  * > property and call `gtk_activatable_do_set_related_action()` when it changes.
2325
2365
  * @param action the {@link Gtk.Action} to set
2366
+ * @since 2.16
2367
+ * @deprecated since 3.10
2326
2368
  */
2327
2369
  set_related_action(action: Gtk.Action): void;
2328
2370
 
@@ -2335,6 +2377,8 @@ export namespace GcrUi {
2335
2377
  * > `gtk_activatable_sync_action_properties()` to update `activatable`
2336
2378
  * > if needed.
2337
2379
  * @param use_appearance whether to use the actions appearance
2380
+ * @since 2.16
2381
+ * @deprecated since 3.10
2338
2382
  */
2339
2383
  set_use_action_appearance(use_appearance: boolean): void;
2340
2384
 
@@ -2344,6 +2388,8 @@ export namespace GcrUi {
2344
2388
  * or unset and by the implementing class when
2345
2389
  * {@link Gtk.Activatable.use_action_appearance} changes.
2346
2390
  * @param action the related {@link Gtk.Action} or `null`
2391
+ * @since 2.16
2392
+ * @deprecated since 3.10
2347
2393
  */
2348
2394
  sync_action_properties(action: Gtk.Action | null): void;
2349
2395
 
@@ -2353,6 +2399,8 @@ export namespace GcrUi {
2353
2399
  * or unset and by the implementing class when
2354
2400
  * {@link Gtk.Activatable.use_action_appearance} changes.
2355
2401
  * @param action the related {@link Gtk.Action} or `null`
2402
+ * @since 2.16
2403
+ * @deprecated since 3.10
2356
2404
  * @virtual
2357
2405
  */
2358
2406
  vfunc_sync_action_properties(action: Gtk.Action | null): void;
@@ -2389,6 +2437,7 @@ export namespace GcrUi {
2389
2437
  * Returns whether the widget should grab focus when it is clicked with the mouse.
2390
2438
  * See `gtk_widget_set_focus_on_click()`.
2391
2439
  * @returns `true` if the widget should grab focus when it is clicked with the mouse.
2440
+ * @since 3.20
2392
2441
  */
2393
2442
  get_focus_on_click(): boolean;
2394
2443
 
@@ -2398,6 +2447,7 @@ export namespace GcrUi {
2398
2447
  * you don’t want the keyboard focus removed from the main area of the
2399
2448
  * application.
2400
2449
  * @param focus_on_click whether the widget should grab focus when clicked with the mouse
2450
+ * @since 3.20
2401
2451
  */
2402
2452
  set_focus_on_click(focus_on_click: boolean): void;
2403
2453
  }
@@ -2856,36 +2906,42 @@ export namespace GcrUi {
2856
2906
  * display overlayed graphics, like the overshoot indication,
2857
2907
  * at the right position.
2858
2908
  * @returns `true` if `border` has been set
2909
+ * @since 3.16
2859
2910
  */
2860
2911
  get_border(): [boolean, Gtk.Border];
2861
2912
 
2862
2913
  /**
2863
2914
  * Retrieves the {@link Gtk.Adjustment} used for horizontal scrolling.
2864
2915
  * @returns horizontal {@link Gtk.Adjustment}.
2916
+ * @since 3.0
2865
2917
  */
2866
2918
  get_hadjustment(): Gtk.Adjustment;
2867
2919
 
2868
2920
  /**
2869
2921
  * Gets the horizontal {@link Gtk.ScrollablePolicy}.
2870
2922
  * @returns The horizontal {@link Gtk.ScrollablePolicy}.
2923
+ * @since 3.0
2871
2924
  */
2872
2925
  get_hscroll_policy(): Gtk.ScrollablePolicy;
2873
2926
 
2874
2927
  /**
2875
2928
  * Retrieves the {@link Gtk.Adjustment} used for vertical scrolling.
2876
2929
  * @returns vertical {@link Gtk.Adjustment}.
2930
+ * @since 3.0
2877
2931
  */
2878
2932
  get_vadjustment(): Gtk.Adjustment;
2879
2933
 
2880
2934
  /**
2881
2935
  * Gets the vertical {@link Gtk.ScrollablePolicy}.
2882
2936
  * @returns The vertical {@link Gtk.ScrollablePolicy}.
2937
+ * @since 3.0
2883
2938
  */
2884
2939
  get_vscroll_policy(): Gtk.ScrollablePolicy;
2885
2940
 
2886
2941
  /**
2887
2942
  * Sets the horizontal adjustment of the {@link Gtk.Scrollable}.
2888
2943
  * @param hadjustment a {@link Gtk.Adjustment}
2944
+ * @since 3.0
2889
2945
  */
2890
2946
  set_hadjustment(hadjustment: Gtk.Adjustment | null): void;
2891
2947
 
@@ -2894,12 +2950,14 @@ export namespace GcrUi {
2894
2950
  * horizontal scrolling should start below the minimum width or
2895
2951
  * below the natural width.
2896
2952
  * @param policy the horizontal {@link Gtk.ScrollablePolicy}
2953
+ * @since 3.0
2897
2954
  */
2898
2955
  set_hscroll_policy(policy: Gtk.ScrollablePolicy): void;
2899
2956
 
2900
2957
  /**
2901
2958
  * Sets the vertical adjustment of the {@link Gtk.Scrollable}.
2902
2959
  * @param vadjustment a {@link Gtk.Adjustment}
2960
+ * @since 3.0
2903
2961
  */
2904
2962
  set_vadjustment(vadjustment: Gtk.Adjustment | null): void;
2905
2963
 
@@ -2908,6 +2966,7 @@ export namespace GcrUi {
2908
2966
  * vertical scrolling should start below the minimum height or
2909
2967
  * below the natural height.
2910
2968
  * @param policy the vertical {@link Gtk.ScrollablePolicy}
2969
+ * @since 3.0
2911
2970
  */
2912
2971
  set_vscroll_policy(policy: Gtk.ScrollablePolicy): void;
2913
2972
 
@@ -2917,6 +2976,7 @@ export namespace GcrUi {
2917
2976
  * be treeview headers. GTK+ can use this information to
2918
2977
  * display overlayed graphics, like the overshoot indication,
2919
2978
  * at the right position.
2979
+ * @since 3.16
2920
2980
  * @virtual
2921
2981
  */
2922
2982
  vfunc_get_border(): [boolean, Gtk.Border];
@@ -3355,6 +3415,7 @@ export namespace GcrUi {
3355
3415
  * an error occurs. Check the `error` argument to tell the difference.
3356
3416
  * @param cancellable optional cancellation object
3357
3417
  * @returns the reply from the prompt
3418
+ * @throws GLib.Error
3358
3419
  */
3359
3420
  confirm(cancellable: Gio.Cancellable | null): Gcr.PromptReply;
3360
3421
 
@@ -3398,6 +3459,7 @@ export namespace GcrUi {
3398
3459
  * an error occurs. Check the `error` argument to tell the difference.
3399
3460
  * @param result asynchronous result passed to callback
3400
3461
  * @returns the reply from the prompt
3462
+ * @throws GLib.Error
3401
3463
  */
3402
3464
  confirm_finish(result: Gio.AsyncResult): Gcr.PromptReply;
3403
3465
 
@@ -3415,6 +3477,7 @@ export namespace GcrUi {
3415
3477
  * an error occurs. Check the `error` argument to tell the difference.
3416
3478
  * @param cancellable optional cancellation object
3417
3479
  * @returns the reply from the prompt
3480
+ * @throws GLib.Error
3418
3481
  */
3419
3482
  confirm_run(cancellable: Gio.Cancellable | null): Gcr.PromptReply;
3420
3483
 
@@ -3541,6 +3604,7 @@ export namespace GcrUi {
3541
3604
  * `error` argument to tell the difference.
3542
3605
  * @param cancellable optional cancellation object
3543
3606
  * @returns the password owned by the prompt, or `null`
3607
+ * @throws GLib.Error
3544
3608
  */
3545
3609
  password(cancellable: Gio.Cancellable | null): string;
3546
3610
 
@@ -3584,6 +3648,7 @@ export namespace GcrUi {
3584
3648
  * `error` argument to tell the difference.
3585
3649
  * @param result asynchronous result passed to callback
3586
3650
  * @returns the password owned by the prompt, or `null`
3651
+ * @throws GLib.Error
3587
3652
  */
3588
3653
  password_finish(result: Gio.AsyncResult): string;
3589
3654
 
@@ -3603,6 +3668,7 @@ export namespace GcrUi {
3603
3668
  * `error` argument to tell the difference.
3604
3669
  * @param cancellable optional cancellation object
3605
3670
  * @returns the password owned by the prompt, or `null`
3671
+ * @throws GLib.Error
3606
3672
  */
3607
3673
  password_run(cancellable: Gio.Cancellable | null): string;
3608
3674
 
@@ -4037,36 +4103,42 @@ export namespace GcrUi {
4037
4103
  * display overlayed graphics, like the overshoot indication,
4038
4104
  * at the right position.
4039
4105
  * @returns `true` if `border` has been set
4106
+ * @since 3.16
4040
4107
  */
4041
4108
  get_border(): [boolean, Gtk.Border];
4042
4109
 
4043
4110
  /**
4044
4111
  * Retrieves the {@link Gtk.Adjustment} used for horizontal scrolling.
4045
4112
  * @returns horizontal {@link Gtk.Adjustment}.
4113
+ * @since 3.0
4046
4114
  */
4047
4115
  get_hadjustment(): Gtk.Adjustment;
4048
4116
 
4049
4117
  /**
4050
4118
  * Gets the horizontal {@link Gtk.ScrollablePolicy}.
4051
4119
  * @returns The horizontal {@link Gtk.ScrollablePolicy}.
4120
+ * @since 3.0
4052
4121
  */
4053
4122
  get_hscroll_policy(): Gtk.ScrollablePolicy;
4054
4123
 
4055
4124
  /**
4056
4125
  * Retrieves the {@link Gtk.Adjustment} used for vertical scrolling.
4057
4126
  * @returns vertical {@link Gtk.Adjustment}.
4127
+ * @since 3.0
4058
4128
  */
4059
4129
  get_vadjustment(): Gtk.Adjustment;
4060
4130
 
4061
4131
  /**
4062
4132
  * Gets the vertical {@link Gtk.ScrollablePolicy}.
4063
4133
  * @returns The vertical {@link Gtk.ScrollablePolicy}.
4134
+ * @since 3.0
4064
4135
  */
4065
4136
  get_vscroll_policy(): Gtk.ScrollablePolicy;
4066
4137
 
4067
4138
  /**
4068
4139
  * Sets the horizontal adjustment of the {@link Gtk.Scrollable}.
4069
4140
  * @param hadjustment a {@link Gtk.Adjustment}
4141
+ * @since 3.0
4070
4142
  */
4071
4143
  set_hadjustment(hadjustment: Gtk.Adjustment | null): void;
4072
4144
 
@@ -4075,12 +4147,14 @@ export namespace GcrUi {
4075
4147
  * horizontal scrolling should start below the minimum width or
4076
4148
  * below the natural width.
4077
4149
  * @param policy the horizontal {@link Gtk.ScrollablePolicy}
4150
+ * @since 3.0
4078
4151
  */
4079
4152
  set_hscroll_policy(policy: Gtk.ScrollablePolicy): void;
4080
4153
 
4081
4154
  /**
4082
4155
  * Sets the vertical adjustment of the {@link Gtk.Scrollable}.
4083
4156
  * @param vadjustment a {@link Gtk.Adjustment}
4157
+ * @since 3.0
4084
4158
  */
4085
4159
  set_vadjustment(vadjustment: Gtk.Adjustment | null): void;
4086
4160
 
@@ -4089,6 +4163,7 @@ export namespace GcrUi {
4089
4163
  * vertical scrolling should start below the minimum height or
4090
4164
  * below the natural height.
4091
4165
  * @param policy the vertical {@link Gtk.ScrollablePolicy}
4166
+ * @since 3.0
4092
4167
  */
4093
4168
  set_vscroll_policy(policy: Gtk.ScrollablePolicy): void;
4094
4169
 
@@ -4098,6 +4173,7 @@ export namespace GcrUi {
4098
4173
  * be treeview headers. GTK+ can use this information to
4099
4174
  * display overlayed graphics, like the overshoot indication,
4100
4175
  * at the right position.
4176
+ * @since 3.16
4101
4177
  * @virtual
4102
4178
  */
4103
4179
  vfunc_get_border(): [boolean, Gtk.Border];
@@ -4300,7 +4376,7 @@ export namespace GcrUi {
4300
4376
  * @signal
4301
4377
  * @run-last
4302
4378
  */
4303
- added: (arg0: Renderer, arg1: Gcr.Parsed) => void;
4379
+ added: (renderer: Renderer, parsed: Gcr.Parsed) => void;
4304
4380
  "notify::display-name": (pspec: GObject.ParamSpec) => void;
4305
4381
  "notify::parser": (pspec: GObject.ParamSpec) => void;
4306
4382
  "notify::baseline-position": (pspec: GObject.ParamSpec) => void;
@@ -4511,12 +4587,14 @@ export namespace GcrUi {
4511
4587
  /**
4512
4588
  * Retrieves the orientation of the `orientable`.
4513
4589
  * @returns the orientation of the `orientable`.
4590
+ * @since 2.16
4514
4591
  */
4515
4592
  get_orientation(): Gtk.Orientation;
4516
4593
 
4517
4594
  /**
4518
4595
  * Sets the orientation of the `orientable`.
4519
4596
  * @param orientation the orientable’s new orientation.
4597
+ * @since 2.16
4520
4598
  */
4521
4599
  set_orientation(orientation: Gtk.Orientation): void;
4522
4600
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gcrui-3",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
4
4
  "description": "GJS TypeScript type definitions for GcrUi-3",
5
5
  "type": "module",
6
6
  "module": "gcrui-3.js",
@@ -16,10 +16,10 @@
16
16
  "import": "./gcrui-3-import.js",
17
17
  "default": "./gcrui-3-import.js"
18
18
  },
19
- "./surface": {
20
- "types": "./gcrui-3-surface.d.ts",
21
- "import": "./gcrui-3-surface.js",
22
- "default": "./gcrui-3-surface.js"
19
+ "./vocabulary": {
20
+ "types": "./gcrui-3-vocabulary.d.ts",
21
+ "import": "./gcrui-3-vocabulary.js",
22
+ "default": "./gcrui-3-vocabulary.js"
23
23
  },
24
24
  "./gcrui-3": {
25
25
  "types": "./gcrui-3.d.ts",
@@ -36,22 +36,22 @@
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",
53
- "@girs/gcr-3": "^4.3.0",
54
- "@girs/gck-1": "^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
+ "@girs/gcr-3": "^4.5.0",
54
+ "@girs/gck-1": "^4.5.0" },
55
55
  "devDependencies": {
56
56
  "typescript": "*"
57
57
  },
package/tsconfig.json CHANGED
@@ -68,7 +68,7 @@
68
68
  ]
69
69
  }
70
70
  },
71
- "include": ["./gcrui-3.d.ts","./gcrui-3-surface.d.ts"]
71
+ "include": ["./gcrui-3.d.ts","./gcrui-3-vocabulary.d.ts"]
72
72
  }
73
73
 
74
74