@girs/gcrui-3 5.0.0 → 5.2.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 +1 -1
- package/gcrui-3-vocabulary.d.ts +124 -12
- package/gcrui-3-vocabulary.js +60 -14
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
GJS TypeScript type definitions for GcrUi-3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.
|
|
7
|
+
GJS TypeScript type definitions for GcrUi-3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.2.0.
|
|
8
8
|
|
|
9
9
|
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
10
|
nothing to your program and works with any bundler or none at all.
|
package/gcrui-3-vocabulary.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The GIR-derived widget VOCABULARY for GcrUi-3.
|
|
3
3
|
*
|
|
4
|
-
* GENERATED — do not edit. Provenance: GcrUi-3 — dropped empty base(s): GObject.
|
|
4
|
+
* GENERATED — do not edit. Provenance: GcrUi-3 — dropped empty base(s): GObject.Object Gcr.Certificate Gcr.Comparable GObject.InitiallyUnowned Atk.ImplementorIface — inlined base(s) their owner's vocabulary does not emit: Gcr.Prompt — prop(s) no TypeScript value satisfies: GcrUi.CollectionModel.columns GcrUi.TreeSelector.columns
|
|
5
5
|
*
|
|
6
|
-
* 9 concrete widgets,
|
|
6
|
+
* 14 instantiable GTypes (of which 9 concrete widgets), 16 declarations (1 inlined from a namespace whose vocabulary does not emit them), 0 enum nick unions, 0 slot candidates.
|
|
7
7
|
*
|
|
8
8
|
* Module-scoped exports only. There is no `JSX` namespace here, no tag spelling and
|
|
9
9
|
* no `on<Signal>` prop name: those are DIALECT, and every framework answers them
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import type Gck from '@girs/gck-1';
|
|
28
28
|
import type Gcr from '@girs/gcr-3';
|
|
29
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';
|
|
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, GtkEntryBufferConstructOnly, GtkEntryBufferProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkTreeModelConstructOnly, GtkTreeModelProps, GtkTreeSortableConstructOnly, GtkTreeSortableProps, GtkTreeViewConstructOnly, GtkTreeViewProps, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-3.0/vocabulary';
|
|
31
31
|
|
|
32
32
|
// ---------------------------------------------------------------------------
|
|
33
33
|
// Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
|
|
@@ -51,6 +51,18 @@ import type { GtkActionableConstructOnly, GtkActionableProps, GtkActivatableCons
|
|
|
51
51
|
// GIR keeps them once, on the interface.
|
|
52
52
|
// ---------------------------------------------------------------------------
|
|
53
53
|
|
|
54
|
+
/** An implementation of #GcrRenderer which renders certificates. */
|
|
55
|
+
export interface GcrCertificateRendererProps extends Omit<GcrRendererProps, 'attributes'> {
|
|
56
|
+
/** The certificate attributes to display. */
|
|
57
|
+
attributes?: Gck.Attributes;
|
|
58
|
+
/** The certificate to display. */
|
|
59
|
+
certificate?: Gcr.Certificate;
|
|
60
|
+
/** The label to display. */
|
|
61
|
+
label?: string;
|
|
62
|
+
}
|
|
63
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
64
|
+
export type GcrCertificateRendererConstructOnly = GcrRendererConstructOnly;
|
|
65
|
+
|
|
54
66
|
/** A widget that can be used to display a certificate. */
|
|
55
67
|
export interface GcrCertificateWidgetProps extends GtkBinProps, GtkBuildableProps {
|
|
56
68
|
attributes?: Gck.Attributes | null;
|
|
@@ -59,6 +71,14 @@ export interface GcrCertificateWidgetProps extends GtkBinProps, GtkBuildableProp
|
|
|
59
71
|
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
60
72
|
export type GcrCertificateWidgetConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
61
73
|
|
|
74
|
+
/** Ain implementation of a [iface@Gtk.TreeModel] which contains a row for each object in a [iface@Gcr.Collection]. */
|
|
75
|
+
export interface GcrCollectionModelProps extends GtkTreeModelProps, GtkTreeSortableProps {
|
|
76
|
+
collection?: Gcr.Collection;
|
|
77
|
+
columns?: never;
|
|
78
|
+
}
|
|
79
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
80
|
+
export type GcrCollectionModelConstructOnly = GtkTreeModelConstructOnly | GtkTreeSortableConstructOnly | 'columns';
|
|
81
|
+
|
|
62
82
|
/** A widget that can be used to select a certificate or key. */
|
|
63
83
|
export interface GcrComboSelectorProps extends GtkComboBoxProps, GtkBuildableProps, GtkCellEditableProps, GtkCellLayoutProps {
|
|
64
84
|
/** The collection which contains the objects to display in the selector. */
|
|
@@ -67,12 +87,27 @@ export interface GcrComboSelectorProps extends GtkComboBoxProps, GtkBuildablePro
|
|
|
67
87
|
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
68
88
|
export type GcrComboSelectorConstructOnly = GtkComboBoxConstructOnly | GtkBuildableConstructOnly | GtkCellEditableConstructOnly | GtkCellLayoutConstructOnly | 'collection';
|
|
69
89
|
|
|
90
|
+
/** A renderer that can be used for unsupported data. */
|
|
91
|
+
export interface GcrFailureRendererProps extends Omit<GcrRendererProps, 'attributes'> {
|
|
92
|
+
attributes?: Gck.Attributes;
|
|
93
|
+
label?: string;
|
|
94
|
+
}
|
|
95
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
96
|
+
export type GcrFailureRendererConstructOnly = GcrRendererConstructOnly;
|
|
97
|
+
|
|
70
98
|
/** A button which imports keys and certificates. */
|
|
71
99
|
export interface GcrImportButtonProps extends GtkButtonProps, GtkActionableProps, GtkActivatableProps, GtkBuildableProps {
|
|
72
100
|
}
|
|
73
101
|
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
74
102
|
export type GcrImportButtonConstructOnly = GtkButtonConstructOnly | GtkActionableConstructOnly | GtkActivatableConstructOnly | GtkBuildableConstructOnly;
|
|
75
103
|
|
|
104
|
+
/** An implementation of #GcrRenderer which renders keys. */
|
|
105
|
+
export interface GcrKeyRendererProps extends GcrRendererProps {
|
|
106
|
+
object?: Gck.Object;
|
|
107
|
+
}
|
|
108
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
109
|
+
export type GcrKeyRendererConstructOnly = GcrRendererConstructOnly;
|
|
110
|
+
|
|
76
111
|
/** A key widget and renderer A key widget can be used to display a RSA, DSA or EC key. */
|
|
77
112
|
export interface GcrKeyWidgetProps extends GtkBinProps, GtkBuildableProps {
|
|
78
113
|
attributes?: Gck.Attributes | null;
|
|
@@ -150,6 +185,22 @@ export interface GcrPromptDialogProps extends GtkDialogProps, Omit<GcrPromptProp
|
|
|
150
185
|
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
151
186
|
export type GcrPromptDialogConstructOnly = GtkDialogConstructOnly | GcrPromptConstructOnly | GtkBuildableConstructOnly;
|
|
152
187
|
|
|
188
|
+
/** An interface that's implemented by renderers which wish to render data to a [iface@Viewer]. */
|
|
189
|
+
export interface GcrRendererProps {
|
|
190
|
+
/** The attributes to display. */
|
|
191
|
+
attributes?: Gck.Attributes | null;
|
|
192
|
+
/** The label to display. */
|
|
193
|
+
label?: string;
|
|
194
|
+
}
|
|
195
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
196
|
+
export type GcrRendererConstructOnly = never;
|
|
197
|
+
|
|
198
|
+
/** A [class@Gtk.EntryBuffer] that uses non-pageable memory. */
|
|
199
|
+
export interface GcrSecureEntryBufferProps extends GtkEntryBufferProps {
|
|
200
|
+
}
|
|
201
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
202
|
+
export type GcrSecureEntryBufferConstructOnly = GtkEntryBufferConstructOnly;
|
|
203
|
+
|
|
153
204
|
/** A tree selector can be used to select certificates or keys. */
|
|
154
205
|
export interface GcrTreeSelectorProps extends GtkTreeViewProps, GtkBuildableProps, GtkScrollableProps {
|
|
155
206
|
/** The collection which contains the objects to display in the selector. */
|
|
@@ -262,7 +313,11 @@ export interface Widgets {
|
|
|
262
313
|
};
|
|
263
314
|
}
|
|
264
315
|
|
|
265
|
-
/**
|
|
316
|
+
/**
|
|
317
|
+
* Every GType this namespace can create AND put on screen. A consumer derives its own
|
|
318
|
+
* tag map. For everything a UI file can instantiate — layout managers, event
|
|
319
|
+
* controllers, cell renderers, `GtkSizeGroup` — read `DECLS` below.
|
|
320
|
+
*/
|
|
266
321
|
export type WidgetGType = keyof Widgets;
|
|
267
322
|
|
|
268
323
|
// ---------------------------------------------------------------------------
|
|
@@ -314,7 +369,14 @@ export const PROVENANCE: {
|
|
|
314
369
|
readonly childHolders: number;
|
|
315
370
|
readonly droppedBases: readonly string[];
|
|
316
371
|
readonly inlinedBases: readonly string[];
|
|
372
|
+
/** `<decl>.<prop>` for every property printed `never` because TypeScript has no value for it. */
|
|
317
373
|
readonly unsettableProps: readonly string[];
|
|
374
|
+
/**
|
|
375
|
+
* `<decl>.<prop>: <Ns>.<Name>` for every property printed `never` because the model
|
|
376
|
+
* could not resolve its type across a namespace boundary — two independently released
|
|
377
|
+
* GIRs disagreeing, which is what the main emitter answers `never` for as well.
|
|
378
|
+
*/
|
|
379
|
+
readonly unresolvedProps: readonly string[];
|
|
318
380
|
};
|
|
319
381
|
|
|
320
382
|
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
@@ -328,7 +390,17 @@ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
|
328
390
|
*/
|
|
329
391
|
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
330
392
|
|
|
331
|
-
/**
|
|
393
|
+
/**
|
|
394
|
+
* Instantiable GType -> every declaration its members come from, self first.
|
|
395
|
+
*
|
|
396
|
+
* The key set is what a UI description file can NAME: every registered, non-abstract
|
|
397
|
+
* class this namespace declares. GtkBuilder resolves a `<object class="…">` through
|
|
398
|
+
* `g_type_from_name`, which knows nothing about widgets, so this is wider than
|
|
399
|
+
* `Widgets` by design — `GtkSizeGroup`, `GtkTextTag`, every `GtkEventController`
|
|
400
|
+
* and every `GtkCellRenderer` are here and are not widgets.
|
|
401
|
+
*
|
|
402
|
+
* `Widgets` and `CHILD_HOLDERS` are the narrower questions and answer them unchanged.
|
|
403
|
+
*/
|
|
332
404
|
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
333
405
|
|
|
334
406
|
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
@@ -340,8 +412,8 @@ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
|
340
412
|
/**
|
|
341
413
|
* `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
|
|
342
414
|
*
|
|
343
|
-
* Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the
|
|
344
|
-
* GTK 4 vocabulary carries --
|
|
415
|
+
* Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 137 enums a
|
|
416
|
+
* GTK 4 vocabulary carries -- 112 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
|
|
345
417
|
* at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
|
|
346
418
|
* on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
|
|
347
419
|
*
|
|
@@ -379,10 +451,11 @@ export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
|
|
|
379
451
|
*
|
|
380
452
|
* `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
|
|
381
453
|
* nothing about a single member's number, and the number is what a host without GI needs.
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
* among them. Counting is worst here:
|
|
385
|
-
*
|
|
454
|
+
* 23 settable properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared bare
|
|
455
|
+
* `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`,
|
|
456
|
+
* `GtkDropTarget:actions` among them. Counting is worst here: 119 of the 156 Gtk-4.0
|
|
457
|
+
* bitfield members this vocabulary carries disagree with their declaration position,
|
|
458
|
+
* against 29 of 672 enumeration members.
|
|
386
459
|
*
|
|
387
460
|
* Combine with `|` as GObject does. There is no nick table to pair this with, so a name
|
|
388
461
|
* here is resolvable and a SET still is not.
|
|
@@ -406,13 +479,52 @@ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
|
|
|
406
479
|
*
|
|
407
480
|
* The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
|
|
408
481
|
* emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
|
|
409
|
-
* `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` —
|
|
482
|
+
* `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 83 of the 909
|
|
410
483
|
* entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
|
|
411
484
|
* owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
|
|
412
485
|
* resolves against SOME module.
|
|
413
486
|
*/
|
|
414
487
|
export const PROP_ENUMS: Readonly<Record<string, string>>;
|
|
415
488
|
|
|
489
|
+
/**
|
|
490
|
+
* The kinds of value a GTK accessible property, relation or state takes.
|
|
491
|
+
*
|
|
492
|
+
* `enum` is the one that needs a second lookup: `ARIA_VALUE_ENUMS` names the enum GType,
|
|
493
|
+
* and `ENUM_NICKS` and `ENUM_VALUES` answer from there.
|
|
494
|
+
*/
|
|
495
|
+
export type AriaValueType = 'string' | 'integer' | 'double' | 'boolean' | 'reference' | 'enum';
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
|
|
499
|
+
*
|
|
500
|
+
* The one table in this file that is not a fact about a ParamSpec. A GtkBuilder or
|
|
501
|
+
* Blueprint `accessibility { … }` block is typed by GTK's ARIA table, not by the widget,
|
|
502
|
+
* and the two disagree where it costs most: `orientation` is settable on a `GtkLabel`
|
|
503
|
+
* that implements no `GtkOrientable`, and `checked` is a `GtkAccessibleTristate`, so
|
|
504
|
+
* `checked: true` is the number 1 rather than a boolean. Typing those slots from the
|
|
505
|
+
* widget's properties gets both wrong and raises nothing.
|
|
506
|
+
*
|
|
507
|
+
* Keyed like `ENUM_VALUES` because the ARIA names ARE enum members — of
|
|
508
|
+
* `GtkAccessibleProperty`, `GtkAccessibleRelation` and `GtkAccessibleState` — so
|
|
509
|
+
* `ENUM_NICKS` already lists them and one key parser reads both.
|
|
510
|
+
*
|
|
511
|
+
* Read from each member's own GIR documentation. `gtk_accessible_property_init_value()`
|
|
512
|
+
* is the C half of this table and is not introspectable; the doc sentence is, and states
|
|
513
|
+
* the type for 52 of the 53 members in gtk4 4.23.3. Complete or absent, never partial: a
|
|
514
|
+
* member the generator cannot answer for fails the build and names itself.
|
|
515
|
+
*/
|
|
516
|
+
export const ARIA_VALUE_TYPES: Readonly<Record<string, AriaValueType>>;
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* The same keys, for the `'enum'` rows only -> the GType of that enum.
|
|
520
|
+
*
|
|
521
|
+
* A table of its own for the reason `PROP_ENUMS` is one: folded in, the values of
|
|
522
|
+
* `ARIA_VALUE_TYPES` would be six reserved words mixed with arbitrary GTypes and telling
|
|
523
|
+
* them apart would be the consumer's problem. Apart, `ARIA_VALUE_TYPES[k] === 'enum'` is
|
|
524
|
+
* the whole test and `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
|
|
525
|
+
*/
|
|
526
|
+
export const ARIA_VALUE_ENUMS: Readonly<Record<string, string>>;
|
|
527
|
+
|
|
416
528
|
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
417
529
|
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
418
530
|
|
package/gcrui-3-vocabulary.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The widget vocabulary of GcrUi-3 as runtime data.
|
|
2
2
|
//
|
|
3
|
-
// GENERATED — do not edit. Provenance: GcrUi-3 — dropped empty base(s): GObject.
|
|
3
|
+
// GENERATED — do not edit. Provenance: GcrUi-3 — dropped empty base(s): GObject.Object Gcr.Certificate Gcr.Comparable GObject.InitiallyUnowned Atk.ImplementorIface — inlined base(s) their owner's vocabulary does not emit: Gcr.Prompt — prop(s) no TypeScript value satisfies: GcrUi.CollectionModel.columns GcrUi.TreeSelector.columns
|
|
4
4
|
//
|
|
5
5
|
// The type half of this subpath is the sibling `.d.ts`. This file exists because
|
|
6
6
|
// types are erased: a consumer that wants to ask the installed library whether every
|
|
@@ -11,17 +11,23 @@ export const PROVENANCE = {
|
|
|
11
11
|
version: '3',
|
|
12
12
|
libraryVersion: null,
|
|
13
13
|
childHolders: 0,
|
|
14
|
-
droppedBases: ['GObject.
|
|
14
|
+
droppedBases: ['GObject.Object', 'Gcr.Certificate', 'Gcr.Comparable', 'GObject.InitiallyUnowned', 'Atk.ImplementorIface'],
|
|
15
15
|
inlinedBases: ['Gcr.Prompt'],
|
|
16
|
-
unsettableProps: ['GcrUi.TreeSelector.columns'],
|
|
16
|
+
unsettableProps: ['GcrUi.CollectionModel.columns', 'GcrUi.TreeSelector.columns'],
|
|
17
|
+
unresolvedProps: [],
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export const OWN_PROPS = {
|
|
21
|
+
GcrCertificateRenderer: ['attributes', 'certificate', 'label'],
|
|
20
22
|
GcrCertificateWidget: ['attributes', 'certificate'],
|
|
23
|
+
GcrCollectionModel: ['collection', 'columns'],
|
|
21
24
|
GcrComboSelector: ['collection'],
|
|
25
|
+
GcrFailureRenderer: ['attributes', 'label'],
|
|
26
|
+
GcrKeyRenderer: ['object'],
|
|
22
27
|
GcrKeyWidget: ['attributes'],
|
|
23
28
|
GcrListSelector: ['collection'],
|
|
24
29
|
GcrPrompt: ['caller-window', 'cancel-label', 'choice-chosen', 'choice-label', 'continue-label', 'description', 'message', 'password-new', 'title', 'warning'],
|
|
30
|
+
GcrRenderer: ['attributes', 'label'],
|
|
25
31
|
GcrTreeSelector: ['collection', 'columns'],
|
|
26
32
|
GcrUnlockOptionsWidget: ['choice', 'ttl'],
|
|
27
33
|
GcrViewerWidget: ['display-name'],
|
|
@@ -30,25 +36,39 @@ export const OWN_PROPS = {
|
|
|
30
36
|
export const OWN_SIGNALS = {
|
|
31
37
|
GcrImportButton: ['imported', 'importing'],
|
|
32
38
|
GcrPrompt: ['prompt-close'],
|
|
39
|
+
GcrRenderer: ['data-changed'],
|
|
33
40
|
GcrViewerWidget: ['added'],
|
|
34
41
|
};
|
|
35
42
|
|
|
43
|
+
// Every GType this namespace can INSTANTIATE -> the declarations its members come from.
|
|
44
|
+
//
|
|
45
|
+
// The key set is what a UI description file can name: a registered, non-abstract class.
|
|
46
|
+
// Not "every widget" — GtkBuilder resolves a name through `g_type_from_name`, which knows
|
|
47
|
+
// nothing about widgets, and a `.ui` file is full of `GtkSizeGroup`, `GtkTextTag`,
|
|
48
|
+
// `GtkEventController*` and `GtkCellRenderer*`. Use `Widgets` and `CHILD_HOLDERS`
|
|
49
|
+
// below for the narrower questions; they did not move.
|
|
36
50
|
export const DECLS = {
|
|
51
|
+
GcrCertificateRenderer: ['GcrCertificateRenderer', 'GcrRenderer'],
|
|
37
52
|
GcrCertificateWidget: ['GcrCertificateWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
53
|
+
GcrCollectionModel: ['GcrCollectionModel', 'GtkTreeModel', 'GtkTreeSortable'],
|
|
38
54
|
GcrComboSelector: ['GcrComboSelector', 'GtkComboBox', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkCellEditable', 'GtkCellLayout'],
|
|
55
|
+
GcrFailureRenderer: ['GcrFailureRenderer', 'GcrRenderer'],
|
|
39
56
|
GcrImportButton: ['GcrImportButton', 'GtkButton', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkActionable', 'GtkActivatable', 'GtkBuildable'],
|
|
57
|
+
GcrKeyRenderer: ['GcrKeyRenderer', 'GcrRenderer'],
|
|
40
58
|
GcrKeyWidget: ['GcrKeyWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
41
59
|
GcrListSelector: ['GcrListSelector', 'GtkTreeView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
|
|
42
60
|
GcrPromptDialog: ['GcrPromptDialog', 'GtkDialog', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GcrPrompt', 'GtkBuildable'],
|
|
61
|
+
GcrSecureEntryBuffer: ['GcrSecureEntryBuffer', 'GtkEntryBuffer'],
|
|
43
62
|
GcrTreeSelector: ['GcrTreeSelector', 'GtkTreeView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
|
|
44
63
|
GcrUnlockOptionsWidget: ['GcrUnlockOptionsWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
|
|
45
64
|
GcrViewerWidget: ['GcrViewerWidget', 'GtkBox', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkOrientable'],
|
|
46
65
|
};
|
|
47
66
|
|
|
48
|
-
// The GTypes above that are
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
67
|
+
// The GTypes above that ARE widgets are the `Widgets` map in the sibling `.d.ts`; these
|
|
68
|
+
// are the ones that merely HOLD one, through `set_child`/`get_child`, descending from
|
|
69
|
+
// `GObject.Object`. A renderer places them like a container; a check asking "is this a
|
|
70
|
+
// widget" must not count them. Derived from the accessor pair, never from a list — the
|
|
71
|
+
// count is in the provenance line above.
|
|
52
72
|
export const CHILD_HOLDERS = [];
|
|
53
73
|
|
|
54
74
|
export const ENUM_NICKS = {};
|
|
@@ -58,7 +78,7 @@ export const ENUM_NICKS = {};
|
|
|
58
78
|
// It ships because position in `ENUM_NICKS` is not the value and a consumer with no
|
|
59
79
|
// typelib has no other way to learn it: a surface without GI still has to hand GObject an
|
|
60
80
|
// integer. The alternative a consumer reaches for first is counting, and counting is wrong
|
|
61
|
-
// on 6 of the
|
|
81
|
+
// on 6 of the 137 enums a GTK 4 vocabulary carries (112 in Gtk-4.0, 25 in Adw-1) --
|
|
62
82
|
// `GtkResponseType` runs -1 down to
|
|
63
83
|
// -11, `GtkTextWindowType` starts at 1, and `GtkConstraintStrength.required` is
|
|
64
84
|
// 1001001000 where counting answers 0.
|
|
@@ -95,11 +115,12 @@ export const ENUM_VALUES_UNREADABLE = {};
|
|
|
95
115
|
// The number behind each member of a registered BITFIELD, keyed the same way.
|
|
96
116
|
//
|
|
97
117
|
// `ENUM_NICKS` refuses a bitfield because GObject cannot resolve a nick SET, and that
|
|
98
|
-
// reason says nothing about one member's number.
|
|
99
|
-
//
|
|
100
|
-
// `AdwTabView:shortcuts`, ... -- and they are typed bare
|
|
101
|
-
// has nothing to compute one from. Counting is worst
|
|
102
|
-
//
|
|
118
|
+
// reason says nothing about one member's number. 23 settable properties in Gtk-4.0 and
|
|
119
|
+
// Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
|
|
120
|
+
// `AdwTabView:shortcuts`, `GtkDropTarget:actions`, ... -- and they are typed bare
|
|
121
|
+
// `number`, so a host without GI has nothing to compute one from. Counting is worst
|
|
122
|
+
// exactly here: 119 of the 156 Gtk-4.0 bitfield members this vocabulary carries disagree
|
|
123
|
+
// with their declaration position, against 29 of 672 enumeration members.
|
|
103
124
|
//
|
|
104
125
|
// A table of its own rather than more rows in `ENUM_VALUES`, so that "every nick in
|
|
105
126
|
// `ENUM_NICKS` has a number or a declared reason" stays a claim about one set.
|
|
@@ -122,10 +143,35 @@ export const FLAG_VALUES_UNREADABLE = {};
|
|
|
122
143
|
// one are both entries a consumer would resolve wrongly, so neither is written.
|
|
123
144
|
//
|
|
124
145
|
// A GType named here has numbers in SOME vocabulary, not necessarily this one: the namespace
|
|
125
|
-
// that OWNS an enum publishes it, so
|
|
146
|
+
// that OWNS an enum publishes it, so 83 of the 909 entries a full run emits want the owner's
|
|
126
147
|
// vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
|
|
127
148
|
export const PROP_ENUMS = {};
|
|
128
149
|
|
|
150
|
+
// `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
|
|
151
|
+
//
|
|
152
|
+
// The one table here that is not about a ParamSpec. A GtkBuilder or Blueprint
|
|
153
|
+
// `accessibility { … }` block is typed by GTK's ARIA table instead, and the two disagree
|
|
154
|
+
// where it matters: `orientation` is settable on a `GtkLabel` that implements no
|
|
155
|
+
// `GtkOrientable` and has no such property, and `checked` is a `GtkAccessibleTristate`, so
|
|
156
|
+
// `checked: true` means the number 1 and not the boolean. A consumer typing those slots
|
|
157
|
+
// from the widget gets both wrong, silently.
|
|
158
|
+
//
|
|
159
|
+
// Read from each member's own documentation, which is where GTK keeps the table --
|
|
160
|
+
// `gtk_accessible_property_init_value()` is the C half and is not introspectable, the
|
|
161
|
+
// sentence is. Complete or absent, never partial: a member whose documentation states no
|
|
162
|
+
// value type fails generation and names itself, because a missing row is indistinguishable
|
|
163
|
+
// from "GTK has no such name" and the plausible fallback emits `true` where GTK means 1.
|
|
164
|
+
export const ARIA_VALUE_TYPES = {};
|
|
165
|
+
|
|
166
|
+
// The same keys, for the `'enum'` rows only -> the GType of the enum.
|
|
167
|
+
//
|
|
168
|
+
// The join on from a kind to a number, and a table of its own for the reason `PROP_ENUMS`
|
|
169
|
+
// is one: folding the GType into `ARIA_VALUE_TYPES` would make its values a mix of six
|
|
170
|
+
// reserved words and arbitrary GTypes, and telling them apart would be the consumer's
|
|
171
|
+
// problem. With this, `ARIA_VALUE_TYPES[k] === 'enum'` is the whole test, and
|
|
172
|
+
// `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
|
|
173
|
+
export const ARIA_VALUE_ENUMS = {};
|
|
174
|
+
|
|
129
175
|
export const SLOT_CANDIDATES = {};
|
|
130
176
|
|
|
131
177
|
export const SINCE = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gcrui-3",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for GcrUi-3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gcrui-3.js",
|
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
"test": "tsc --project tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@girs/gjs": "^5.
|
|
40
|
-
"@girs/gtk-3.0": "^5.
|
|
41
|
-
"@girs/xlib-2.0": "^5.
|
|
42
|
-
"@girs/gdk-3.0": "^5.
|
|
43
|
-
"@girs/cairo-1.0": "^5.
|
|
44
|
-
"@girs/gobject-2.0": "^5.
|
|
45
|
-
"@girs/glib-2.0": "^5.
|
|
46
|
-
"@girs/pango-1.0": "^5.
|
|
47
|
-
"@girs/harfbuzz-0.0": "^5.
|
|
48
|
-
"@girs/freetype2-2.0": "^5.
|
|
49
|
-
"@girs/gio-2.0": "^5.
|
|
50
|
-
"@girs/gmodule-2.0": "^5.
|
|
51
|
-
"@girs/gdkpixbuf-2.0": "^5.
|
|
52
|
-
"@girs/atk-1.0": "^5.
|
|
53
|
-
"@girs/gcr-3": "^5.
|
|
54
|
-
"@girs/gck-1": "^5.
|
|
39
|
+
"@girs/gjs": "^5.2.0",
|
|
40
|
+
"@girs/gtk-3.0": "^5.2.0",
|
|
41
|
+
"@girs/xlib-2.0": "^5.2.0",
|
|
42
|
+
"@girs/gdk-3.0": "^5.2.0",
|
|
43
|
+
"@girs/cairo-1.0": "^5.2.0",
|
|
44
|
+
"@girs/gobject-2.0": "^5.2.0",
|
|
45
|
+
"@girs/glib-2.0": "^5.2.0",
|
|
46
|
+
"@girs/pango-1.0": "^5.2.0",
|
|
47
|
+
"@girs/harfbuzz-0.0": "^5.2.0",
|
|
48
|
+
"@girs/freetype2-2.0": "^5.2.0",
|
|
49
|
+
"@girs/gio-2.0": "^5.2.0",
|
|
50
|
+
"@girs/gmodule-2.0": "^5.2.0",
|
|
51
|
+
"@girs/gdkpixbuf-2.0": "^5.2.0",
|
|
52
|
+
"@girs/atk-1.0": "^5.2.0",
|
|
53
|
+
"@girs/gcr-3": "^5.2.0",
|
|
54
|
+
"@girs/gck-1": "^5.2.0" },
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"typescript": "*"
|
|
57
57
|
},
|