@girs/gcr-4 5.2.0 → 5.3.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 +20 -1
- package/gcr-4-vocabulary.d.ts +598 -0
- package/gcr-4-vocabulary.js +207 -0
- package/package.json +12 -7
- package/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
GJS TypeScript type definitions for Gcr-4, generated from library version 4.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.
|
|
7
|
+
GJS TypeScript type definitions for Gcr-4, generated from library version 4.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.3.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.
|
|
@@ -26,6 +26,7 @@ type packages.
|
|
|
26
26
|
| `@girs/gcr-4/ambient` | only the `gi://` module declarations |
|
|
27
27
|
| `@girs/gcr-4/import` | only the `imports.gi` declarations |
|
|
28
28
|
| `@girs/gcr-4/gcr-4` | the namespace, without the side-effecting declarations |
|
|
29
|
+
| `@girs/gcr-4/vocabulary` | GIR-derived widget data: settable properties, enum nicks, slot candidates |
|
|
29
30
|
|
|
30
31
|
## Three ways to import
|
|
31
32
|
|
|
@@ -67,6 +68,24 @@ GJS's global object works the same way, via `@girs/gcr-4/import`:
|
|
|
67
68
|
const Gcr = imports.gi.Gcr;
|
|
68
69
|
```
|
|
69
70
|
|
|
71
|
+
## Widget vocabulary
|
|
72
|
+
|
|
73
|
+
`gcr-4` declares widgets, so it also carries what the GIR says about them, as
|
|
74
|
+
types and as values a test can read:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import type { Widgets, PropsOf } from '@girs/gcr-4/vocabulary';
|
|
78
|
+
import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/gcr-4/vocabulary';
|
|
79
|
+
```
|
|
80
|
+
|
|
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".
|
|
85
|
+
|
|
86
|
+
This subpath answers what the GIR says, not what the installed library has. For the
|
|
87
|
+
second question, ask the library.
|
|
88
|
+
|
|
70
89
|
## Building
|
|
71
90
|
|
|
72
91
|
The declarations need no build step. If you bundle, every bundler works, since there is
|
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GIR-derived widget VOCABULARY for Gcr-4.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED — do not edit. Provenance: Gcr-4 — library 4.4.0
|
|
5
|
+
*
|
|
6
|
+
* 28 instantiable GTypes (of which 0 concrete widgets), 30 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 GLib from '@girs/glib-2.0';
|
|
28
|
+
import type GObject from '@girs/gobject-2.0';
|
|
29
|
+
import type Gck from '@girs/gck-2';
|
|
30
|
+
import type Gcr from './gcr-4.js';
|
|
31
|
+
import type Gio from '@girs/gio-2.0';
|
|
32
|
+
import type { GckObjectConstructOnly, GckObjectProps } from '@girs/gck-2/vocabulary';
|
|
33
|
+
import type { GAsyncInitableConstructOnly, GAsyncInitableProps, GInitableConstructOnly, GInitableProps, GListModelConstructOnly, GListModelProps } from '@girs/gio-2.0/vocabulary';
|
|
34
|
+
import type { GObjectConstructOnly, GObjectProps } from '@girs/gobject-2.0/vocabulary';
|
|
35
|
+
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
// Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
|
|
38
|
+
//
|
|
39
|
+
// Not derived from the member name. Substituting underscores for dashes is not a law:
|
|
40
|
+
// some nicks keep an underscore the substitution would have replaced, and only the
|
|
41
|
+
// attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
|
|
42
|
+
// how a derived nick passes review and breaks elsewhere.
|
|
43
|
+
// Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
// Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
|
|
50
|
+
// inheritance rather than flattening per widget.
|
|
51
|
+
//
|
|
52
|
+
// The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
|
|
53
|
+
// of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
|
|
54
|
+
// because GObject installs interface properties on the implementor at runtime while
|
|
55
|
+
// GIR keeps them once, on the interface.
|
|
56
|
+
// ---------------------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
/** Describes a location for fetching extra information from the Certificate Authority. */
|
|
59
|
+
export interface GcrAccessDescriptionProps extends GObjectProps {
|
|
60
|
+
}
|
|
61
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
62
|
+
export type GcrAccessDescriptionConstructOnly = GObjectConstructOnly;
|
|
63
|
+
|
|
64
|
+
/** An interface that represents an X.509 certificate. */
|
|
65
|
+
export interface GcrCertificateProps extends GObjectProps {
|
|
66
|
+
}
|
|
67
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
68
|
+
export type GcrCertificateConstructOnly = GObjectConstructOnly;
|
|
69
|
+
|
|
70
|
+
/** Represents a chain of certificates, normally used to validate the trust in a certificate. */
|
|
71
|
+
export interface GcrCertificateChainProps extends GObjectProps {
|
|
72
|
+
}
|
|
73
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
74
|
+
export type GcrCertificateChainConstructOnly = GObjectConstructOnly;
|
|
75
|
+
|
|
76
|
+
/** An object that describes a certificate extension. */
|
|
77
|
+
export interface GcrCertificateExtensionProps extends GObjectProps {
|
|
78
|
+
/**
|
|
79
|
+
* Whether this certificate is critical.
|
|
80
|
+
* @default FALSE
|
|
81
|
+
*/
|
|
82
|
+
critical?: boolean;
|
|
83
|
+
/** The raw value in bytes of the extension. */
|
|
84
|
+
value?: GLib.Bytes;
|
|
85
|
+
}
|
|
86
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
87
|
+
export type GcrCertificateExtensionConstructOnly = GObjectConstructOnly | 'critical' | 'value';
|
|
88
|
+
|
|
89
|
+
/** A certificate extension describing the Authority Information Access (AIA). */
|
|
90
|
+
export interface GcrCertificateExtensionAuthorityInfoAccessProps extends GcrCertificateExtensionProps, GListModelProps {
|
|
91
|
+
}
|
|
92
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
93
|
+
export type GcrCertificateExtensionAuthorityInfoAccessConstructOnly = GcrCertificateExtensionConstructOnly | GListModelConstructOnly;
|
|
94
|
+
|
|
95
|
+
/** A certificate extension that contains the authority key identifier (SKI). */
|
|
96
|
+
export interface GcrCertificateExtensionAuthorityKeyIdentifierProps extends GcrCertificateExtensionProps {
|
|
97
|
+
}
|
|
98
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
99
|
+
export type GcrCertificateExtensionAuthorityKeyIdentifierConstructOnly = GcrCertificateExtensionConstructOnly;
|
|
100
|
+
|
|
101
|
+
/** A certificate extension that can be used to identify the type of the certificate subject (whether it is a certificate authority or not). */
|
|
102
|
+
export interface GcrCertificateExtensionBasicConstraintsProps extends GcrCertificateExtensionProps {
|
|
103
|
+
}
|
|
104
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
105
|
+
export type GcrCertificateExtensionBasicConstraintsConstructOnly = GcrCertificateExtensionConstructOnly;
|
|
106
|
+
|
|
107
|
+
/** A certificate extension that lists certificate policies. */
|
|
108
|
+
export interface GcrCertificateExtensionCertificatePoliciesProps extends GcrCertificateExtensionProps, GListModelProps {
|
|
109
|
+
}
|
|
110
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
111
|
+
export type GcrCertificateExtensionCertificatePoliciesConstructOnly = GcrCertificateExtensionConstructOnly | GListModelConstructOnly;
|
|
112
|
+
|
|
113
|
+
/** A certificate extension that lists CRL distribution points. */
|
|
114
|
+
export interface GcrCertificateExtensionCrlDistributionPointsProps extends GcrCertificateExtensionProps, GListModelProps {
|
|
115
|
+
}
|
|
116
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
117
|
+
export type GcrCertificateExtensionCrlDistributionPointsConstructOnly = GcrCertificateExtensionConstructOnly | GListModelConstructOnly;
|
|
118
|
+
|
|
119
|
+
/** A certificate extension that can be used to restrict an extended set of usages of a given certificate. */
|
|
120
|
+
export interface GcrCertificateExtensionExtendedKeyUsageProps extends GcrCertificateExtensionProps {
|
|
121
|
+
}
|
|
122
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
123
|
+
export type GcrCertificateExtensionExtendedKeyUsageConstructOnly = GcrCertificateExtensionConstructOnly;
|
|
124
|
+
|
|
125
|
+
/** A certificate extension that can be used to restrict the usages of a given certificate. */
|
|
126
|
+
export interface GcrCertificateExtensionKeyUsageProps extends GcrCertificateExtensionProps {
|
|
127
|
+
}
|
|
128
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
129
|
+
export type GcrCertificateExtensionKeyUsageConstructOnly = GcrCertificateExtensionConstructOnly;
|
|
130
|
+
|
|
131
|
+
/** A wrapper type for a list of [class@CertificateExtension]s. */
|
|
132
|
+
export interface GcrCertificateExtensionListProps extends GObjectProps, GListModelProps {
|
|
133
|
+
}
|
|
134
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
135
|
+
export type GcrCertificateExtensionListConstructOnly = GObjectConstructOnly | GListModelConstructOnly;
|
|
136
|
+
|
|
137
|
+
/** A certificate extension describing the Subject Alternative Name (SAN). */
|
|
138
|
+
export interface GcrCertificateExtensionSubjectAltNameProps extends GcrCertificateExtensionProps, GListModelProps {
|
|
139
|
+
}
|
|
140
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
141
|
+
export type GcrCertificateExtensionSubjectAltNameConstructOnly = GcrCertificateExtensionConstructOnly | GListModelConstructOnly;
|
|
142
|
+
|
|
143
|
+
/** A certificate extension that contains the subject key identifier (SKI). */
|
|
144
|
+
export interface GcrCertificateExtensionSubjectKeyIdentifierProps extends GcrCertificateExtensionProps {
|
|
145
|
+
}
|
|
146
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
147
|
+
export type GcrCertificateExtensionSubjectKeyIdentifierConstructOnly = GcrCertificateExtensionConstructOnly;
|
|
148
|
+
|
|
149
|
+
export interface GcrCertificateFieldProps extends GObjectProps {
|
|
150
|
+
/** @default NULL */
|
|
151
|
+
label?: string;
|
|
152
|
+
section?: Gcr.CertificateSection;
|
|
153
|
+
}
|
|
154
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
155
|
+
export type GcrCertificateFieldConstructOnly = GObjectConstructOnly | 'label' | 'section';
|
|
156
|
+
|
|
157
|
+
/** An object describing a certificate policy. */
|
|
158
|
+
export interface GcrCertificatePolicyProps extends GObjectProps, GListModelProps {
|
|
159
|
+
}
|
|
160
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
161
|
+
export type GcrCertificatePolicyConstructOnly = GObjectConstructOnly | GListModelConstructOnly;
|
|
162
|
+
|
|
163
|
+
/** An object describing a certificate policy qualifier. */
|
|
164
|
+
export interface GcrCertificatePolicyQualifierProps extends GObjectProps {
|
|
165
|
+
}
|
|
166
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
167
|
+
export type GcrCertificatePolicyQualifierConstructOnly = GObjectConstructOnly;
|
|
168
|
+
|
|
169
|
+
/** An object that allows creation of certificate requests. */
|
|
170
|
+
export interface GcrCertificateRequestProps extends GObjectProps {
|
|
171
|
+
/** The private key that this certificate request is for. */
|
|
172
|
+
'private-key'?: Gck.Object;
|
|
173
|
+
}
|
|
174
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
175
|
+
export type GcrCertificateRequestConstructOnly = GObjectConstructOnly | 'private-key';
|
|
176
|
+
|
|
177
|
+
export interface GcrCertificateSectionProps extends GObjectProps {
|
|
178
|
+
/** @default NULL */
|
|
179
|
+
label?: string;
|
|
180
|
+
}
|
|
181
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
182
|
+
export type GcrCertificateSectionConstructOnly = GObjectConstructOnly | 'label';
|
|
183
|
+
|
|
184
|
+
/** An object describing a CRL distribution point. */
|
|
185
|
+
export interface GcrDistributionPointProps extends GObjectProps {
|
|
186
|
+
}
|
|
187
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
188
|
+
export type GcrDistributionPointConstructOnly = GObjectConstructOnly;
|
|
189
|
+
|
|
190
|
+
/** An object describing a name as part of the Subject Alternative Name (SAN) extension. */
|
|
191
|
+
export interface GcrGeneralNameProps extends GObjectProps {
|
|
192
|
+
}
|
|
193
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
194
|
+
export type GcrGeneralNameConstructOnly = GObjectConstructOnly;
|
|
195
|
+
|
|
196
|
+
/** A list of [class@Gcr.GeneralName]s. */
|
|
197
|
+
export interface GcrGeneralNamesProps extends GObjectProps, GListModelProps {
|
|
198
|
+
}
|
|
199
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
200
|
+
export type GcrGeneralNamesConstructOnly = GObjectConstructOnly | GListModelConstructOnly;
|
|
201
|
+
|
|
202
|
+
/** A parser for parsing various types of files or data. */
|
|
203
|
+
export interface GcrParserProps extends GObjectProps {
|
|
204
|
+
}
|
|
205
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
206
|
+
export type GcrParserConstructOnly = GObjectConstructOnly;
|
|
207
|
+
|
|
208
|
+
/** A certificate loaded from a PKCS#11 storage. */
|
|
209
|
+
export interface GcrPkcs11CertificateProps extends GckObjectProps, GcrCertificateProps {
|
|
210
|
+
/** Automatically loaded attributes for this certificate. */
|
|
211
|
+
attributes?: Gck.Attributes;
|
|
212
|
+
}
|
|
213
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
214
|
+
export type GcrPkcs11CertificateConstructOnly = GckObjectConstructOnly | GcrCertificateConstructOnly | 'attributes';
|
|
215
|
+
|
|
216
|
+
/** A prompt displayed to the user. */
|
|
217
|
+
export interface GcrPromptProps extends GObjectProps {
|
|
218
|
+
/**
|
|
219
|
+
* The string handle of the caller's window.
|
|
220
|
+
* @default NULL
|
|
221
|
+
*/
|
|
222
|
+
'caller-window'?: string;
|
|
223
|
+
/**
|
|
224
|
+
* The label for the cancel button in the prompt.
|
|
225
|
+
* @default Cancel
|
|
226
|
+
*/
|
|
227
|
+
'cancel-label'?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Whether the additional choice is chosen or not.
|
|
230
|
+
* @default FALSE
|
|
231
|
+
*/
|
|
232
|
+
'choice-chosen'?: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* The label for the additional choice.
|
|
235
|
+
* @default NULL
|
|
236
|
+
*/
|
|
237
|
+
'choice-label'?: string;
|
|
238
|
+
/**
|
|
239
|
+
* The label for the continue button in the prompt.
|
|
240
|
+
* @default Continue
|
|
241
|
+
*/
|
|
242
|
+
'continue-label'?: string;
|
|
243
|
+
/**
|
|
244
|
+
* The detailed description of the prompt.
|
|
245
|
+
* @default NULL
|
|
246
|
+
*/
|
|
247
|
+
description?: string;
|
|
248
|
+
/**
|
|
249
|
+
* The prompt message for the user.
|
|
250
|
+
* @default NULL
|
|
251
|
+
*/
|
|
252
|
+
message?: string;
|
|
253
|
+
/**
|
|
254
|
+
* Whether the prompt will prompt for a new password.
|
|
255
|
+
* @default FALSE
|
|
256
|
+
*/
|
|
257
|
+
'password-new'?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* The title of the prompt.
|
|
260
|
+
* @default NULL
|
|
261
|
+
*/
|
|
262
|
+
title?: string;
|
|
263
|
+
/**
|
|
264
|
+
* A prompt warning displayed on the prompt, or %NULL for no warning.
|
|
265
|
+
* @default NULL
|
|
266
|
+
*/
|
|
267
|
+
warning?: string;
|
|
268
|
+
}
|
|
269
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
270
|
+
export type GcrPromptConstructOnly = GObjectConstructOnly;
|
|
271
|
+
|
|
272
|
+
/** Allows exchange of secrets between two processes on the same system without exposing those secrets to things like loggers, non-pageable memory etc. */
|
|
273
|
+
export interface GcrSecretExchangeProps extends GObjectProps {
|
|
274
|
+
/**
|
|
275
|
+
* The protocol being used for the exchange.
|
|
276
|
+
* @default sx-aes-1
|
|
277
|
+
*/
|
|
278
|
+
protocol?: string;
|
|
279
|
+
}
|
|
280
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
281
|
+
export type GcrSecretExchangeConstructOnly = GObjectConstructOnly | 'protocol';
|
|
282
|
+
|
|
283
|
+
/** An implementation of [iface@Certificate] which loads a certificate from DER data already located in memory. */
|
|
284
|
+
export interface GcrSimpleCertificateProps extends GObjectProps, GcrCertificateProps {
|
|
285
|
+
}
|
|
286
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
287
|
+
export type GcrSimpleCertificateConstructOnly = GObjectConstructOnly | GcrCertificateConstructOnly;
|
|
288
|
+
|
|
289
|
+
/** When used as the setup function while spawning an ssh command like ssh-add or ssh, this allows callbacks for passwords on the provided interaction. */
|
|
290
|
+
export interface GcrSshAskpassProps extends GObjectProps {
|
|
291
|
+
/** The interaction used to prompt for passwords. */
|
|
292
|
+
interaction?: Gio.TlsInteraction;
|
|
293
|
+
}
|
|
294
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
295
|
+
export type GcrSshAskpassConstructOnly = GObjectConstructOnly | 'interaction';
|
|
296
|
+
|
|
297
|
+
/** A [iface@Prompt] implementation which calls to the system prompter to display prompts in a system modal fashion. */
|
|
298
|
+
export interface GcrSystemPromptProps extends GObjectProps, GcrPromptProps, GAsyncInitableProps, GInitableProps {
|
|
299
|
+
/**
|
|
300
|
+
* The DBus bus name of the prompter to use for prompting, or %NULL for the default prompter.
|
|
301
|
+
* @default NULL
|
|
302
|
+
*/
|
|
303
|
+
'bus-name'?: string;
|
|
304
|
+
/** The #GcrSecretExchange to use when transferring passwords. */
|
|
305
|
+
'secret-exchange'?: Gcr.SecretExchange;
|
|
306
|
+
/**
|
|
307
|
+
* The timeout in seconds to wait when opening the prompt.
|
|
308
|
+
* @default -1
|
|
309
|
+
*/
|
|
310
|
+
'timeout-seconds'?: number;
|
|
311
|
+
}
|
|
312
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
313
|
+
export type GcrSystemPromptConstructOnly = GObjectConstructOnly | GcrPromptConstructOnly | GAsyncInitableConstructOnly | GInitableConstructOnly | 'bus-name' | 'timeout-seconds';
|
|
314
|
+
|
|
315
|
+
/** A prompter used by implementations of system prompts. */
|
|
316
|
+
export interface GcrSystemPrompterProps extends GObjectProps {
|
|
317
|
+
/** The #GType for prompts created by this prompter. */
|
|
318
|
+
'prompt-type'?: GObject.GType;
|
|
319
|
+
}
|
|
320
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
321
|
+
export type GcrSystemPrompterConstructOnly = GObjectConstructOnly | 'prompt-type';
|
|
322
|
+
|
|
323
|
+
// ---------------------------------------------------------------------------
|
|
324
|
+
// The GType-keyed widget map.
|
|
325
|
+
//
|
|
326
|
+
// Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
|
|
327
|
+
// consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
|
|
328
|
+
// for a Vue `GlobalComponents`, the class itself for a renderer whose element type
|
|
329
|
+
// is the class. None of those is baked in here.
|
|
330
|
+
//
|
|
331
|
+
// `slotCandidates` is a candidate list and never an answer: derived from methods
|
|
332
|
+
// taking exactly one widget argument. The GIR cannot tell adoption from reference —
|
|
333
|
+
// `set_title_widget` parents its argument and `set_activatable_widget` does not, and
|
|
334
|
+
// both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
|
|
335
|
+
// this is what notices when a release adds a candidate.
|
|
336
|
+
// ---------------------------------------------------------------------------
|
|
337
|
+
|
|
338
|
+
export interface Widgets {
|
|
339
|
+
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Every GType this namespace can create AND put on screen. A consumer derives its own
|
|
344
|
+
* tag map. For everything a UI file can instantiate — layout managers, event
|
|
345
|
+
* controllers, cell renderers, `GtkSizeGroup` — read `DECLS` below.
|
|
346
|
+
*/
|
|
347
|
+
export type WidgetGType = keyof Widgets;
|
|
348
|
+
|
|
349
|
+
// ---------------------------------------------------------------------------
|
|
350
|
+
// Child holders — the same shape, for objects that CARRY a widget without being one.
|
|
351
|
+
//
|
|
352
|
+
// `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
|
|
353
|
+
// `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
|
|
354
|
+
// them exactly like a container, so they belong in the vocabulary; a check asking "is
|
|
355
|
+
// this a widget" must still be able to say no. Hence a sibling table rather than four
|
|
356
|
+
// more rows in `Widgets`: concatenate them when you mean both.
|
|
357
|
+
// ---------------------------------------------------------------------------
|
|
358
|
+
|
|
359
|
+
export interface ChildHolders {
|
|
360
|
+
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/** Every GType this namespace holds a child in without it being a widget. */
|
|
364
|
+
export type ChildHolderGType = keyof ChildHolders;
|
|
365
|
+
|
|
366
|
+
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
367
|
+
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
368
|
+
|
|
369
|
+
/** The signal table this package already emits, reached by GType. */
|
|
370
|
+
export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
|
|
371
|
+
|
|
372
|
+
/** The instance type — what a `ref`-shaped prop should infer. */
|
|
373
|
+
export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
|
|
374
|
+
|
|
375
|
+
/** Property names that can only be set at construction. */
|
|
376
|
+
export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
|
|
377
|
+
|
|
378
|
+
/** Candidate child slots — see the note above; curation decides. */
|
|
379
|
+
export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* The same facts as runtime data, for a consumer that CHECKS them.
|
|
383
|
+
*
|
|
384
|
+
* Types are erased, so a spec that asks the installed GTK whether every property
|
|
385
|
+
* here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
|
|
386
|
+
* and every nick resolvable through an enum lookup cannot read the interfaces
|
|
387
|
+
* above. Emitted headlessly with no GTK present, which is exactly why the checking
|
|
388
|
+
* belongs to the consumer and the DATA belongs here.
|
|
389
|
+
*/
|
|
390
|
+
export const PROVENANCE: {
|
|
391
|
+
readonly namespace: string;
|
|
392
|
+
readonly version: string;
|
|
393
|
+
/** The version the LIBRARY states, or null where it states none. Never the namespace's. */
|
|
394
|
+
readonly libraryVersion: string | null;
|
|
395
|
+
readonly childHolders: number;
|
|
396
|
+
readonly droppedBases: readonly string[];
|
|
397
|
+
readonly inlinedBases: readonly string[];
|
|
398
|
+
/** `<decl>.<prop>` for every property printed `never` because TypeScript has no value for it. */
|
|
399
|
+
readonly unsettableProps: readonly string[];
|
|
400
|
+
/**
|
|
401
|
+
* `<decl>.<prop>: <Ns>.<Name>` for every property printed `never` because the model
|
|
402
|
+
* could not resolve its type across a namespace boundary — two independently released
|
|
403
|
+
* GIRs disagreeing, which is what the main emitter answers `never` for as well.
|
|
404
|
+
*/
|
|
405
|
+
readonly unresolvedProps: readonly string[];
|
|
406
|
+
/**
|
|
407
|
+
* `c:identifier-prefixes` from the GIR, verbatim and in order — `['G']` for Gio.
|
|
408
|
+
*
|
|
409
|
+
* The C prefix a type REFERENCE needs: resolving `Gio.Icon` means producing `GIcon`,
|
|
410
|
+
* and nothing else in this package states that `Gio` spells itself `G`. Carried rather
|
|
411
|
+
* than derived because GIR carries it, and a derivation over the `DECLS` keys is wrong
|
|
412
|
+
* wherever the C prefix is not a prefix of the type NAMES: gdkx11-4.0 and gdkwayland-4.0
|
|
413
|
+
* both state `Gdk` while every key they declare begins `GdkX11`/`GdkWayland`.
|
|
414
|
+
*
|
|
415
|
+
* Empty where the GIR states none — 17 of the 627 emitting namespaces — because
|
|
416
|
+
* inventing the namespace name there is a confident wrong answer in place of a missing
|
|
417
|
+
* one. A LIST because 20 of them state more than one, which no single string expresses.
|
|
418
|
+
*/
|
|
419
|
+
readonly identifierPrefixes: readonly string[];
|
|
420
|
+
/**
|
|
421
|
+
* Sibling vocabularies this one's DECLARATIONS come from, as import specifiers.
|
|
422
|
+
*
|
|
423
|
+
* A chain link with no `OWN_PROPS` row is ambiguous on its own — `GtkSeparator` has no
|
|
424
|
+
* settable property, `GApplication` has its properties in another package — and this
|
|
425
|
+
* list is what tells the two apart. Enum and bitfield NUMBERS are not here: those are
|
|
426
|
+
* carried in this file, because a `PROP_ENUMS` row naming a foreign GType gives a
|
|
427
|
+
* consumer nothing to load and a `.ui` file using the property never names its owner.
|
|
428
|
+
*/
|
|
429
|
+
readonly requiredVocabularies: readonly string[];
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
433
|
+
export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Declaration GType -> the signals it registers itself, never its parents'.
|
|
437
|
+
*
|
|
438
|
+
* Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
|
|
439
|
+
* abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
|
|
440
|
+
*/
|
|
441
|
+
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Instantiable GType -> every declaration its members come from, self first.
|
|
445
|
+
*
|
|
446
|
+
* The key set is what a UI description file can NAME: every registered, non-abstract
|
|
447
|
+
* class this namespace declares. GtkBuilder resolves a `<object class="…">` through
|
|
448
|
+
* `g_type_from_name`, which knows nothing about widgets, so this is wider than
|
|
449
|
+
* `Widgets` by design — `GtkSizeGroup`, `GtkTextTag`, every `GtkEventController`
|
|
450
|
+
* and every `GtkCellRenderer` are here and are not widgets.
|
|
451
|
+
*
|
|
452
|
+
* `Widgets` and `CHILD_HOLDERS` are the narrower questions and answer them unchanged.
|
|
453
|
+
*/
|
|
454
|
+
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
455
|
+
|
|
456
|
+
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
457
|
+
export const CHILD_HOLDERS: readonly string[];
|
|
458
|
+
|
|
459
|
+
/** Enum GType -> the nicks this surface offers. */
|
|
460
|
+
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
|
|
464
|
+
*
|
|
465
|
+
* Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 137 enums a
|
|
466
|
+
* GTK 4 vocabulary carries -- 112 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
|
|
467
|
+
* at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
|
|
468
|
+
* on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
|
|
469
|
+
*
|
|
470
|
+
* Read from the same GIR as the nicks, deliberately. A consumer reading the numbers off an
|
|
471
|
+
* installed typelib instead has two provenances for one table, and then cannot tell a
|
|
472
|
+
* missing number from a host older than the vocabulary.
|
|
473
|
+
*/
|
|
474
|
+
export const ENUM_VALUES: Readonly<Record<string, number>>;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* The `<enum GType>.<nick>` entries GIR marks `deprecated="1"`.
|
|
478
|
+
*
|
|
479
|
+
* Two names on one value is how GObject spells an alias -- `GTK_ALIGN_BASELINE` and
|
|
480
|
+
* `GTK_ALIGN_BASELINE_FILL` are both 4, and both keep a `ENUM_VALUES` entry. The pairing
|
|
481
|
+
* is visible in the numbers; which name is the old one is not, and this is that fact --
|
|
482
|
+
* where GIR states it. It usually does not: 4 registered-enum members across the 718 GIRs
|
|
483
|
+
* carry the attribute, and 179 of the 182 value-sharing pairs carry it on neither half, so
|
|
484
|
+
* absence from this list means GIR is silent, not that the nick is the current one.
|
|
485
|
+
*/
|
|
486
|
+
export const ENUM_DEPRECATED: readonly string[];
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* `<enum GType>.<nick>` -> the raw GIR `value` no number could be read from.
|
|
490
|
+
*
|
|
491
|
+
* The declared remainder, so that every nick in `ENUM_NICKS` is in `ENUM_VALUES` or in
|
|
492
|
+
* here and a drop cannot be silent. Two shapes reach it: a symbolic or absent value (Vala
|
|
493
|
+
* writes `(null)`, a char enum writes a letter) and an integer past
|
|
494
|
+
* `Number.MAX_SAFE_INTEGER`, where a literal would lose precision and stop being the
|
|
495
|
+
* GIR's number. Empty for Gtk, Adw, GLib and Gio.
|
|
496
|
+
*/
|
|
497
|
+
export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* `<bitfield GType>.<nick>` -> the integer GObject registers for that one member.
|
|
501
|
+
*
|
|
502
|
+
* `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
|
|
503
|
+
* nothing about a single member's number, and the number is what a host without GI needs.
|
|
504
|
+
* 23 settable properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared bare
|
|
505
|
+
* `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`,
|
|
506
|
+
* `GtkDropTarget:actions` among them. Counting is worst here: 119 of the 156 Gtk-4.0
|
|
507
|
+
* bitfield members this vocabulary carries disagree with their declaration position,
|
|
508
|
+
* against 29 of 672 enumeration members.
|
|
509
|
+
*
|
|
510
|
+
* Combine with `|` as GObject does. There is no nick table to pair this with, so a name
|
|
511
|
+
* here is resolvable and a SET still is not.
|
|
512
|
+
*/
|
|
513
|
+
export const FLAG_VALUES: Readonly<Record<string, number>>;
|
|
514
|
+
|
|
515
|
+
/** `<bitfield GType>.<nick>` -> the raw GIR `value` no number could be read from. */
|
|
516
|
+
export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* `<declaration GType>.<property>` -> the GType of that property's enum or bitfield.
|
|
520
|
+
*
|
|
521
|
+
* The join the value tables need and nothing else here carries. A host with no GI has a
|
|
522
|
+
* property name and a nick and needs a number; `ENUM_VALUES` is keyed by ENUM GType, and
|
|
523
|
+
* only this says which enum a property is. Keyed by DECLARATION like `OWN_PROPS`, so it is
|
|
524
|
+
* read at every link of a `DECLS` chain — `orientation` belongs to `GtkOrientable`, not
|
|
525
|
+
* to the `GtkBox` a caller starts from.
|
|
526
|
+
*
|
|
527
|
+
* Present only where the property's OWN type is the enum: an array of them, or a union that
|
|
528
|
+
* merely mentions one, would be an entry a consumer resolves wrongly.
|
|
529
|
+
*
|
|
530
|
+
* The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
|
|
531
|
+
* emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
|
|
532
|
+
* `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 83 of the 909
|
|
533
|
+
* entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
|
|
534
|
+
* owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
|
|
535
|
+
* resolves against SOME module.
|
|
536
|
+
*/
|
|
537
|
+
export const PROP_ENUMS: Readonly<Record<string, string>>;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* The kinds of value a GTK accessible property, relation or state takes.
|
|
541
|
+
*
|
|
542
|
+
* `enum` is the one that needs a second lookup: `ARIA_VALUE_ENUMS` names the enum GType,
|
|
543
|
+
* and `ENUM_NICKS` and `ENUM_VALUES` answer from there.
|
|
544
|
+
*/
|
|
545
|
+
export type AriaValueType = 'string' | 'integer' | 'double' | 'boolean' | 'reference' | 'enum';
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
|
|
549
|
+
*
|
|
550
|
+
* The one table in this file that is not a fact about a ParamSpec. A GtkBuilder or
|
|
551
|
+
* Blueprint `accessibility { … }` block is typed by GTK's ARIA table, not by the widget,
|
|
552
|
+
* and the two disagree where it costs most: `orientation` is settable on a `GtkLabel`
|
|
553
|
+
* that implements no `GtkOrientable`, and `checked` is a `GtkAccessibleTristate`, so
|
|
554
|
+
* `checked: true` is the number 1 rather than a boolean. Typing those slots from the
|
|
555
|
+
* widget's properties gets both wrong and raises nothing.
|
|
556
|
+
*
|
|
557
|
+
* Keyed like `ENUM_VALUES` because the ARIA names ARE enum members — of
|
|
558
|
+
* `GtkAccessibleProperty`, `GtkAccessibleRelation` and `GtkAccessibleState` — so
|
|
559
|
+
* `ENUM_NICKS` already lists them and one key parser reads both.
|
|
560
|
+
*
|
|
561
|
+
* Read from each member's own GIR documentation. `gtk_accessible_property_init_value()`
|
|
562
|
+
* is the C half of this table and is not introspectable; the doc sentence is, and states
|
|
563
|
+
* the type for 52 of the 53 members in gtk4 4.23.3. Complete or absent, never partial: a
|
|
564
|
+
* member the generator cannot answer for fails the build and names itself.
|
|
565
|
+
*/
|
|
566
|
+
export const ARIA_VALUE_TYPES: Readonly<Record<string, AriaValueType>>;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* The same keys, for the `'enum'` rows only -> the GType of that enum.
|
|
570
|
+
*
|
|
571
|
+
* A table of its own for the reason `PROP_ENUMS` is one: folded in, the values of
|
|
572
|
+
* `ARIA_VALUE_TYPES` would be six reserved words mixed with arbitrary GTypes and telling
|
|
573
|
+
* them apart would be the consumer's problem. Apart, `ARIA_VALUE_TYPES[k] === 'enum'` is
|
|
574
|
+
* the whole test and `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
|
|
575
|
+
*/
|
|
576
|
+
export const ARIA_VALUE_ENUMS: Readonly<Record<string, string>>;
|
|
577
|
+
|
|
578
|
+
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
579
|
+
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
|
|
583
|
+
*
|
|
584
|
+
* What keeps a runtime cross-check honest across a version gap without an
|
|
585
|
+
* allowlist: a name the installed library lacks is a defect UNLESS the version
|
|
586
|
+
* here is newer than the one running.
|
|
587
|
+
*
|
|
588
|
+
* ALL THREE key shapes, because that test only works for the names it covers. A
|
|
589
|
+
* property-only map leaves a consumer no way to explain a missing SIGNAL, which is
|
|
590
|
+
* a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
|
|
591
|
+
* explain a missing CLASS, and that one fails as a bare
|
|
592
|
+
* `TypeError: can't access property "$gtype", ctor() is undefined` that does not
|
|
593
|
+
* even name the GType.
|
|
594
|
+
*
|
|
595
|
+
* A key is present only where the GIR states a version — sparse by nature (`version`
|
|
596
|
+
* sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
|
|
597
|
+
*/
|
|
598
|
+
export const SINCE: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
// The widget vocabulary of Gcr-4 as runtime data.
|
|
2
|
+
//
|
|
3
|
+
// GENERATED — do not edit. Provenance: Gcr-4 — library 4.4.0
|
|
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: 'Gcr',
|
|
11
|
+
version: '4',
|
|
12
|
+
libraryVersion: '4.4.0',
|
|
13
|
+
childHolders: 0,
|
|
14
|
+
droppedBases: [],
|
|
15
|
+
inlinedBases: [],
|
|
16
|
+
unsettableProps: [],
|
|
17
|
+
unresolvedProps: [],
|
|
18
|
+
identifierPrefixes: ['Gcr'],
|
|
19
|
+
requiredVocabularies: ['@girs/gck-2/vocabulary', '@girs/gio-2.0/vocabulary', '@girs/gobject-2.0/vocabulary'],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const OWN_PROPS = {
|
|
23
|
+
GcrCertificateExtension: ['critical', 'value'],
|
|
24
|
+
GcrCertificateField: ['label', 'section'],
|
|
25
|
+
GcrCertificateRequest: ['private-key'],
|
|
26
|
+
GcrCertificateSection: ['label'],
|
|
27
|
+
GcrPkcs11Certificate: ['attributes'],
|
|
28
|
+
GcrPrompt: ['caller-window', 'cancel-label', 'choice-chosen', 'choice-label', 'continue-label', 'description', 'message', 'password-new', 'title', 'warning'],
|
|
29
|
+
GcrSecretExchange: ['protocol'],
|
|
30
|
+
GcrSshAskpass: ['interaction'],
|
|
31
|
+
GcrSystemPrompt: ['bus-name', 'secret-exchange', 'timeout-seconds'],
|
|
32
|
+
GcrSystemPrompter: ['prompt-type'],
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const OWN_SIGNALS = {
|
|
36
|
+
GcrParser: ['authenticate', 'parsed'],
|
|
37
|
+
GcrPrompt: ['prompt-close'],
|
|
38
|
+
GcrSystemPrompter: ['new-prompt'],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Every GType this namespace can INSTANTIATE -> the declarations its members come from.
|
|
42
|
+
//
|
|
43
|
+
// The key set is what a UI description file can name: a registered, non-abstract class.
|
|
44
|
+
// Not "every widget" — GtkBuilder resolves a name through `g_type_from_name`, which knows
|
|
45
|
+
// nothing about widgets, and a `.ui` file is full of `GtkSizeGroup`, `GtkTextTag`,
|
|
46
|
+
// `GtkEventController*` and `GtkCellRenderer*`. Use `Widgets` and `CHILD_HOLDERS`
|
|
47
|
+
// below for the narrower questions; they did not move.
|
|
48
|
+
export const DECLS = {
|
|
49
|
+
GcrAccessDescription: ['GcrAccessDescription', 'GObject'],
|
|
50
|
+
GcrCertificateChain: ['GcrCertificateChain', 'GObject'],
|
|
51
|
+
GcrCertificateExtension: ['GcrCertificateExtension', 'GObject'],
|
|
52
|
+
GcrCertificateExtensionAuthorityInfoAccess: ['GcrCertificateExtensionAuthorityInfoAccess', 'GcrCertificateExtension', 'GObject', 'GListModel'],
|
|
53
|
+
GcrCertificateExtensionAuthorityKeyIdentifier: ['GcrCertificateExtensionAuthorityKeyIdentifier', 'GcrCertificateExtension', 'GObject'],
|
|
54
|
+
GcrCertificateExtensionBasicConstraints: ['GcrCertificateExtensionBasicConstraints', 'GcrCertificateExtension', 'GObject'],
|
|
55
|
+
GcrCertificateExtensionCertificatePolicies: ['GcrCertificateExtensionCertificatePolicies', 'GcrCertificateExtension', 'GObject', 'GListModel'],
|
|
56
|
+
GcrCertificateExtensionCrlDistributionPoints: ['GcrCertificateExtensionCrlDistributionPoints', 'GcrCertificateExtension', 'GObject', 'GListModel'],
|
|
57
|
+
GcrCertificateExtensionExtendedKeyUsage: ['GcrCertificateExtensionExtendedKeyUsage', 'GcrCertificateExtension', 'GObject'],
|
|
58
|
+
GcrCertificateExtensionKeyUsage: ['GcrCertificateExtensionKeyUsage', 'GcrCertificateExtension', 'GObject'],
|
|
59
|
+
GcrCertificateExtensionList: ['GcrCertificateExtensionList', 'GObject', 'GListModel'],
|
|
60
|
+
GcrCertificateExtensionSubjectAltName: ['GcrCertificateExtensionSubjectAltName', 'GcrCertificateExtension', 'GObject', 'GListModel'],
|
|
61
|
+
GcrCertificateExtensionSubjectKeyIdentifier: ['GcrCertificateExtensionSubjectKeyIdentifier', 'GcrCertificateExtension', 'GObject'],
|
|
62
|
+
GcrCertificateField: ['GcrCertificateField', 'GObject'],
|
|
63
|
+
GcrCertificatePolicy: ['GcrCertificatePolicy', 'GObject', 'GListModel'],
|
|
64
|
+
GcrCertificatePolicyQualifier: ['GcrCertificatePolicyQualifier', 'GObject'],
|
|
65
|
+
GcrCertificateRequest: ['GcrCertificateRequest', 'GObject'],
|
|
66
|
+
GcrCertificateSection: ['GcrCertificateSection', 'GObject'],
|
|
67
|
+
GcrDistributionPoint: ['GcrDistributionPoint', 'GObject'],
|
|
68
|
+
GcrGeneralName: ['GcrGeneralName', 'GObject'],
|
|
69
|
+
GcrGeneralNames: ['GcrGeneralNames', 'GObject', 'GListModel'],
|
|
70
|
+
GcrParser: ['GcrParser', 'GObject'],
|
|
71
|
+
GcrPkcs11Certificate: ['GcrPkcs11Certificate', 'GckObject', 'GObject', 'GcrCertificate'],
|
|
72
|
+
GcrSecretExchange: ['GcrSecretExchange', 'GObject'],
|
|
73
|
+
GcrSimpleCertificate: ['GcrSimpleCertificate', 'GObject', 'GcrCertificate'],
|
|
74
|
+
GcrSshAskpass: ['GcrSshAskpass', 'GObject'],
|
|
75
|
+
GcrSystemPrompt: ['GcrSystemPrompt', 'GObject', 'GcrPrompt', 'GAsyncInitable', 'GInitable'],
|
|
76
|
+
GcrSystemPrompter: ['GcrSystemPrompter', 'GObject'],
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// The GTypes above that ARE widgets are the `Widgets` map in the sibling `.d.ts`; these
|
|
80
|
+
// are the ones that merely HOLD one, through `set_child`/`get_child`, descending from
|
|
81
|
+
// `GObject.Object`. A renderer places them like a container; a check asking "is this a
|
|
82
|
+
// widget" must not count them. Derived from the accessor pair, never from a list — the
|
|
83
|
+
// count is in the provenance line above.
|
|
84
|
+
export const CHILD_HOLDERS = [];
|
|
85
|
+
|
|
86
|
+
export const ENUM_NICKS = {};
|
|
87
|
+
|
|
88
|
+
// The number behind each of those nicks, read from GIR's own `value` attribute.
|
|
89
|
+
//
|
|
90
|
+
// It ships because position in `ENUM_NICKS` is not the value and a consumer with no
|
|
91
|
+
// typelib has no other way to learn it: a surface without GI still has to hand GObject an
|
|
92
|
+
// integer. The alternative a consumer reaches for first is counting, and counting is wrong
|
|
93
|
+
// on 6 of the 137 enums a GTK 4 vocabulary carries (112 in Gtk-4.0, 25 in Adw-1) --
|
|
94
|
+
// `GtkResponseType` runs -1 down to
|
|
95
|
+
// -11, `GtkTextWindowType` starts at 1, and `GtkConstraintStrength.required` is
|
|
96
|
+
// 1001001000 where counting answers 0.
|
|
97
|
+
//
|
|
98
|
+
// Same provenance as the nicks above, which is the point: a consumer that reads the numbers
|
|
99
|
+
// from an INSTALLED library instead gets two provenances for one table, and a member the
|
|
100
|
+
// vocabulary describes but the host predates then looks like a missing number rather than a
|
|
101
|
+
// version gap.
|
|
102
|
+
export const ENUM_VALUES = {};
|
|
103
|
+
|
|
104
|
+
// The nicks GIR marks `deprecated="1"`.
|
|
105
|
+
//
|
|
106
|
+
// Two members of one enum may share a value -- that is how GObject spells an alias, and
|
|
107
|
+
// `GTK_ALIGN_BASELINE` and `GTK_ALIGN_BASELINE_FILL` are both 4. `ENUM_VALUES` keeps
|
|
108
|
+
// both names, so nothing is lost, and this is what says which of the two a number should be
|
|
109
|
+
// spelled back as. Stated rather than derived: the pairing is visible in the values, the
|
|
110
|
+
// DIRECTION is not.
|
|
111
|
+
//
|
|
112
|
+
// Read it as evidence, not as a negative: 4 registered-enum members in the 718 GIRs carry
|
|
113
|
+
// the attribute at all, and 179 of the 182 value-sharing pairs carry it on neither half.
|
|
114
|
+
// A nick missing from here is a nick GIR says nothing about, not a nick GIR calls current.
|
|
115
|
+
export const ENUM_DEPRECATED = [];
|
|
116
|
+
|
|
117
|
+
// The declared remainder: nicks whose GIR `value` is not a number this can carry.
|
|
118
|
+
//
|
|
119
|
+
// Every nick in `ENUM_NICKS` is in `ENUM_VALUES` or here -- a nick in neither would be a
|
|
120
|
+
// silent drop. GIR carries two shapes no integer holds: a symbolic or absent value (Vala
|
|
121
|
+
// writes `(null)`, a char enum writes a letter) and an integer past
|
|
122
|
+
// `Number.MAX_SAFE_INTEGER`. The value kept here is the raw attribute, so the entry says
|
|
123
|
+
// WHAT was unreadable rather than only that something was. Measured over the 718 GIRs in
|
|
124
|
+
// ts-for-gir's `girs/`: 32 of 34096 registered-enum members, none in Gtk, Adw, GLib or Gio.
|
|
125
|
+
export const ENUM_VALUES_UNREADABLE = {};
|
|
126
|
+
|
|
127
|
+
// The number behind each member of a registered BITFIELD, keyed the same way.
|
|
128
|
+
//
|
|
129
|
+
// `ENUM_NICKS` refuses a bitfield because GObject cannot resolve a nick SET, and that
|
|
130
|
+
// reason says nothing about one member's number. 23 settable properties in Gtk-4.0 and
|
|
131
|
+
// Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
|
|
132
|
+
// `AdwTabView:shortcuts`, `GtkDropTarget:actions`, ... -- and they are typed bare
|
|
133
|
+
// `number`, so a host without GI has nothing to compute one from. Counting is worst
|
|
134
|
+
// exactly here: 119 of the 156 Gtk-4.0 bitfield members this vocabulary carries disagree
|
|
135
|
+
// with their declaration position, against 29 of 672 enumeration members.
|
|
136
|
+
//
|
|
137
|
+
// A table of its own rather than more rows in `ENUM_VALUES`, so that "every nick in
|
|
138
|
+
// `ENUM_NICKS` has a number or a declared reason" stays a claim about one set.
|
|
139
|
+
export const FLAG_VALUES = {};
|
|
140
|
+
|
|
141
|
+
// The same declared remainder for the bitfields. Every one of the 13 members in ts-for-gir's
|
|
142
|
+
// `girs/` whose value is past `Number.MAX_SAFE_INTEGER` is a bitfield member (Fwupd, Qmi),
|
|
143
|
+
// so this is the table that shape actually reaches.
|
|
144
|
+
export const FLAG_VALUES_UNREADABLE = {};
|
|
145
|
+
|
|
146
|
+
// Declaration GType + property name -> the GType of that property's enum or bitfield.
|
|
147
|
+
//
|
|
148
|
+
// Without it the value tables above are half an answer. A host with no GI knows it must set
|
|
149
|
+
// `orientation` to the number behind the nick `vertical`; `ENUM_VALUES` is keyed
|
|
150
|
+
// `GtkOrientation.vertical`, and nothing else says that `orientation` is a
|
|
151
|
+
// `GtkOrientation`. Deriving it is not available: `never` is a member of several Gtk enums,
|
|
152
|
+
// and choosing between them produces a wrong number rather than a missing one.
|
|
153
|
+
//
|
|
154
|
+
// Only where the property's OWN type is the enum. An array of them and a union that mentions
|
|
155
|
+
// one are both entries a consumer would resolve wrongly, so neither is written.
|
|
156
|
+
//
|
|
157
|
+
// A GType named here has numbers in SOME vocabulary, not necessarily this one: the namespace
|
|
158
|
+
// that OWNS an enum publishes it, so 83 of the 909 entries a full run emits want the owner's
|
|
159
|
+
// vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
|
|
160
|
+
export const PROP_ENUMS = {};
|
|
161
|
+
|
|
162
|
+
// `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
|
|
163
|
+
//
|
|
164
|
+
// The one table here that is not about a ParamSpec. A GtkBuilder or Blueprint
|
|
165
|
+
// `accessibility { … }` block is typed by GTK's ARIA table instead, and the two disagree
|
|
166
|
+
// where it matters: `orientation` is settable on a `GtkLabel` that implements no
|
|
167
|
+
// `GtkOrientable` and has no such property, and `checked` is a `GtkAccessibleTristate`, so
|
|
168
|
+
// `checked: true` means the number 1 and not the boolean. A consumer typing those slots
|
|
169
|
+
// from the widget gets both wrong, silently.
|
|
170
|
+
//
|
|
171
|
+
// Read from each member's own documentation, which is where GTK keeps the table --
|
|
172
|
+
// `gtk_accessible_property_init_value()` is the C half and is not introspectable, the
|
|
173
|
+
// sentence is. Complete or absent, never partial: a member whose documentation states no
|
|
174
|
+
// value type fails generation and names itself, because a missing row is indistinguishable
|
|
175
|
+
// from "GTK has no such name" and the plausible fallback emits `true` where GTK means 1.
|
|
176
|
+
export const ARIA_VALUE_TYPES = {};
|
|
177
|
+
|
|
178
|
+
// The same keys, for the `'enum'` rows only -> the GType of the enum.
|
|
179
|
+
//
|
|
180
|
+
// The join on from a kind to a number, and a table of its own for the reason `PROP_ENUMS`
|
|
181
|
+
// is one: folding the GType into `ARIA_VALUE_TYPES` would make its values a mix of six
|
|
182
|
+
// reserved words and arbitrary GTypes, and telling them apart would be the consumer's
|
|
183
|
+
// problem. With this, `ARIA_VALUE_TYPES[k] === 'enum'` is the whole test, and
|
|
184
|
+
// `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
|
|
185
|
+
export const ARIA_VALUE_ENUMS = {};
|
|
186
|
+
|
|
187
|
+
export const SLOT_CANDIDATES = {};
|
|
188
|
+
|
|
189
|
+
export const SINCE = {
|
|
190
|
+
'GcrAccessDescription': '4.3.91',
|
|
191
|
+
'GcrCertificateExtension': '4.3.90',
|
|
192
|
+
'GcrCertificateExtensionAuthorityInfoAccess': '4.3.91',
|
|
193
|
+
'GcrCertificateExtensionAuthorityKeyIdentifier': '4.3.91',
|
|
194
|
+
'GcrCertificateExtensionBasicConstraints': '4.3.90',
|
|
195
|
+
'GcrCertificateExtensionCertificatePolicies': '4.3.91',
|
|
196
|
+
'GcrCertificateExtensionCrlDistributionPoints': '4.3.91',
|
|
197
|
+
'GcrCertificateExtensionExtendedKeyUsage': '4.3.90',
|
|
198
|
+
'GcrCertificateExtensionKeyUsage': '4.3.90',
|
|
199
|
+
'GcrCertificateExtensionList': '4.3.90',
|
|
200
|
+
'GcrCertificateExtensionSubjectAltName': '4.3.90',
|
|
201
|
+
'GcrCertificateExtensionSubjectKeyIdentifier': '4.3.90',
|
|
202
|
+
'GcrCertificatePolicy': '4.3.91',
|
|
203
|
+
'GcrCertificatePolicyQualifier': '4.3.91',
|
|
204
|
+
'GcrDistributionPoint': '4.3.91',
|
|
205
|
+
'GcrGeneralName': '4.3.90',
|
|
206
|
+
'GcrGeneralNames': '4.3.91',
|
|
207
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gcr-4",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"libraryVersion": "4.4.0",
|
|
5
5
|
"description": "GJS TypeScript type definitions for Gcr-4, generated from library version 4.4.0",
|
|
6
6
|
"type": "module",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"import": "./gcr-4-import.js",
|
|
18
18
|
"default": "./gcr-4-import.js"
|
|
19
19
|
},
|
|
20
|
+
"./vocabulary": {
|
|
21
|
+
"types": "./gcr-4-vocabulary.d.ts",
|
|
22
|
+
"import": "./gcr-4-vocabulary.js",
|
|
23
|
+
"default": "./gcr-4-vocabulary.js"
|
|
24
|
+
},
|
|
20
25
|
"./gcr-4": {
|
|
21
26
|
"types": "./gcr-4.d.ts",
|
|
22
27
|
"import": "./gcr-4.js",
|
|
@@ -32,12 +37,12 @@
|
|
|
32
37
|
"test": "tsc --project tsconfig.json"
|
|
33
38
|
},
|
|
34
39
|
"dependencies": {
|
|
35
|
-
"@girs/gjs": "^5.
|
|
36
|
-
"@girs/gio-2.0": "^5.
|
|
37
|
-
"@girs/gobject-2.0": "^5.
|
|
38
|
-
"@girs/glib-2.0": "^5.
|
|
39
|
-
"@girs/gmodule-2.0": "^5.
|
|
40
|
-
"@girs/gck-2": "^5.
|
|
40
|
+
"@girs/gjs": "^5.3.0",
|
|
41
|
+
"@girs/gio-2.0": "^5.3.0",
|
|
42
|
+
"@girs/gobject-2.0": "^5.3.0",
|
|
43
|
+
"@girs/glib-2.0": "^5.3.0",
|
|
44
|
+
"@girs/gmodule-2.0": "^5.3.0",
|
|
45
|
+
"@girs/gck-2": "^5.3.0" },
|
|
41
46
|
"devDependencies": {
|
|
42
47
|
"typescript": "*"
|
|
43
48
|
},
|