@girs/gcrgtk3-4 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/gcrgtk3-4-vocabulary.d.ts +78 -11
- package/gcrgtk3-4-vocabulary.js +47 -11
- 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 GcrGtk3-4 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.
|
|
7
|
+
GJS TypeScript type definitions for GcrGtk3-4 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.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* GENERATED — do not edit. Provenance: GcrGtk3-4 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
|
|
5
5
|
*
|
|
6
|
-
* 1 concrete widgets,
|
|
6
|
+
* 2 instantiable GTypes (of which 1 concrete widgets), 2 declarations, 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
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
import type Gcr from '@girs/gcr-4';
|
|
28
28
|
import type GcrGtk3 from './gcrgtk3-4.js';
|
|
29
|
-
import type { GtkBoxConstructOnly, GtkBoxProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-3.0/vocabulary';
|
|
29
|
+
import type { GtkBoxConstructOnly, GtkBoxProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkEntryBufferConstructOnly, GtkEntryBufferProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-3.0/vocabulary';
|
|
30
30
|
|
|
31
31
|
// ---------------------------------------------------------------------------
|
|
32
32
|
// Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
|
|
@@ -56,6 +56,12 @@ export interface GcrCertificateWidgetProps extends GtkBoxProps, GtkBuildableProp
|
|
|
56
56
|
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
57
57
|
export type GcrCertificateWidgetConstructOnly = GtkBoxConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
|
|
58
58
|
|
|
59
|
+
/** A [class@Gtk.EntryBuffer] that uses non-pageable memory. */
|
|
60
|
+
export interface GcrSecureEntryBufferProps extends GtkEntryBufferProps {
|
|
61
|
+
}
|
|
62
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
63
|
+
export type GcrSecureEntryBufferConstructOnly = GtkEntryBufferConstructOnly;
|
|
64
|
+
|
|
59
65
|
// ---------------------------------------------------------------------------
|
|
60
66
|
// The GType-keyed widget map.
|
|
61
67
|
//
|
|
@@ -81,7 +87,11 @@ export interface Widgets {
|
|
|
81
87
|
};
|
|
82
88
|
}
|
|
83
89
|
|
|
84
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Every GType this namespace can create AND put on screen. A consumer derives its own
|
|
92
|
+
* tag map. For everything a UI file can instantiate — layout managers, event
|
|
93
|
+
* controllers, cell renderers, `GtkSizeGroup` — read `DECLS` below.
|
|
94
|
+
*/
|
|
85
95
|
export type WidgetGType = keyof Widgets;
|
|
86
96
|
|
|
87
97
|
// ---------------------------------------------------------------------------
|
|
@@ -133,7 +143,14 @@ export const PROVENANCE: {
|
|
|
133
143
|
readonly childHolders: number;
|
|
134
144
|
readonly droppedBases: readonly string[];
|
|
135
145
|
readonly inlinedBases: readonly string[];
|
|
146
|
+
/** `<decl>.<prop>` for every property printed `never` because TypeScript has no value for it. */
|
|
136
147
|
readonly unsettableProps: readonly string[];
|
|
148
|
+
/**
|
|
149
|
+
* `<decl>.<prop>: <Ns>.<Name>` for every property printed `never` because the model
|
|
150
|
+
* could not resolve its type across a namespace boundary — two independently released
|
|
151
|
+
* GIRs disagreeing, which is what the main emitter answers `never` for as well.
|
|
152
|
+
*/
|
|
153
|
+
readonly unresolvedProps: readonly string[];
|
|
137
154
|
};
|
|
138
155
|
|
|
139
156
|
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
@@ -147,7 +164,17 @@ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
|
147
164
|
*/
|
|
148
165
|
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
149
166
|
|
|
150
|
-
/**
|
|
167
|
+
/**
|
|
168
|
+
* Instantiable GType -> every declaration its members come from, self first.
|
|
169
|
+
*
|
|
170
|
+
* The key set is what a UI description file can NAME: every registered, non-abstract
|
|
171
|
+
* class this namespace declares. GtkBuilder resolves a `<object class="…">` through
|
|
172
|
+
* `g_type_from_name`, which knows nothing about widgets, so this is wider than
|
|
173
|
+
* `Widgets` by design — `GtkSizeGroup`, `GtkTextTag`, every `GtkEventController`
|
|
174
|
+
* and every `GtkCellRenderer` are here and are not widgets.
|
|
175
|
+
*
|
|
176
|
+
* `Widgets` and `CHILD_HOLDERS` are the narrower questions and answer them unchanged.
|
|
177
|
+
*/
|
|
151
178
|
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
152
179
|
|
|
153
180
|
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
@@ -159,8 +186,8 @@ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
|
159
186
|
/**
|
|
160
187
|
* `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
|
|
161
188
|
*
|
|
162
|
-
* Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the
|
|
163
|
-
* GTK 4 vocabulary carries --
|
|
189
|
+
* Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 137 enums a
|
|
190
|
+
* GTK 4 vocabulary carries -- 112 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
|
|
164
191
|
* at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
|
|
165
192
|
* on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
|
|
166
193
|
*
|
|
@@ -198,10 +225,11 @@ export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
|
|
|
198
225
|
*
|
|
199
226
|
* `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
|
|
200
227
|
* nothing about a single member's number, and the number is what a host without GI needs.
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* among them. Counting is worst here:
|
|
204
|
-
*
|
|
228
|
+
* 23 settable properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared bare
|
|
229
|
+
* `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`,
|
|
230
|
+
* `GtkDropTarget:actions` among them. Counting is worst here: 119 of the 156 Gtk-4.0
|
|
231
|
+
* bitfield members this vocabulary carries disagree with their declaration position,
|
|
232
|
+
* against 29 of 672 enumeration members.
|
|
205
233
|
*
|
|
206
234
|
* Combine with `|` as GObject does. There is no nick table to pair this with, so a name
|
|
207
235
|
* here is resolvable and a SET still is not.
|
|
@@ -225,13 +253,52 @@ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
|
|
|
225
253
|
*
|
|
226
254
|
* The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
|
|
227
255
|
* emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
|
|
228
|
-
* `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` —
|
|
256
|
+
* `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 83 of the 909
|
|
229
257
|
* entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
|
|
230
258
|
* owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
|
|
231
259
|
* resolves against SOME module.
|
|
232
260
|
*/
|
|
233
261
|
export const PROP_ENUMS: Readonly<Record<string, string>>;
|
|
234
262
|
|
|
263
|
+
/**
|
|
264
|
+
* The kinds of value a GTK accessible property, relation or state takes.
|
|
265
|
+
*
|
|
266
|
+
* `enum` is the one that needs a second lookup: `ARIA_VALUE_ENUMS` names the enum GType,
|
|
267
|
+
* and `ENUM_NICKS` and `ENUM_VALUES` answer from there.
|
|
268
|
+
*/
|
|
269
|
+
export type AriaValueType = 'string' | 'integer' | 'double' | 'boolean' | 'reference' | 'enum';
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
|
|
273
|
+
*
|
|
274
|
+
* The one table in this file that is not a fact about a ParamSpec. A GtkBuilder or
|
|
275
|
+
* Blueprint `accessibility { … }` block is typed by GTK's ARIA table, not by the widget,
|
|
276
|
+
* and the two disagree where it costs most: `orientation` is settable on a `GtkLabel`
|
|
277
|
+
* that implements no `GtkOrientable`, and `checked` is a `GtkAccessibleTristate`, so
|
|
278
|
+
* `checked: true` is the number 1 rather than a boolean. Typing those slots from the
|
|
279
|
+
* widget's properties gets both wrong and raises nothing.
|
|
280
|
+
*
|
|
281
|
+
* Keyed like `ENUM_VALUES` because the ARIA names ARE enum members — of
|
|
282
|
+
* `GtkAccessibleProperty`, `GtkAccessibleRelation` and `GtkAccessibleState` — so
|
|
283
|
+
* `ENUM_NICKS` already lists them and one key parser reads both.
|
|
284
|
+
*
|
|
285
|
+
* Read from each member's own GIR documentation. `gtk_accessible_property_init_value()`
|
|
286
|
+
* is the C half of this table and is not introspectable; the doc sentence is, and states
|
|
287
|
+
* the type for 52 of the 53 members in gtk4 4.23.3. Complete or absent, never partial: a
|
|
288
|
+
* member the generator cannot answer for fails the build and names itself.
|
|
289
|
+
*/
|
|
290
|
+
export const ARIA_VALUE_TYPES: Readonly<Record<string, AriaValueType>>;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* The same keys, for the `'enum'` rows only -> the GType of that enum.
|
|
294
|
+
*
|
|
295
|
+
* A table of its own for the reason `PROP_ENUMS` is one: folded in, the values of
|
|
296
|
+
* `ARIA_VALUE_TYPES` would be six reserved words mixed with arbitrary GTypes and telling
|
|
297
|
+
* them apart would be the consumer's problem. Apart, `ARIA_VALUE_TYPES[k] === 'enum'` is
|
|
298
|
+
* the whole test and `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
|
|
299
|
+
*/
|
|
300
|
+
export const ARIA_VALUE_ENUMS: Readonly<Record<string, string>>;
|
|
301
|
+
|
|
235
302
|
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
236
303
|
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
237
304
|
|
package/gcrgtk3-4-vocabulary.js
CHANGED
|
@@ -14,6 +14,7 @@ export const PROVENANCE = {
|
|
|
14
14
|
droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object', 'Atk.ImplementorIface'],
|
|
15
15
|
inlinedBases: [],
|
|
16
16
|
unsettableProps: [],
|
|
17
|
+
unresolvedProps: [],
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export const OWN_PROPS = {
|
|
@@ -22,14 +23,23 @@ export const OWN_PROPS = {
|
|
|
22
23
|
|
|
23
24
|
export const OWN_SIGNALS = {};
|
|
24
25
|
|
|
26
|
+
// Every GType this namespace can INSTANTIATE -> the declarations its members come from.
|
|
27
|
+
//
|
|
28
|
+
// The key set is what a UI description file can name: a registered, non-abstract class.
|
|
29
|
+
// Not "every widget" — GtkBuilder resolves a name through `g_type_from_name`, which knows
|
|
30
|
+
// nothing about widgets, and a `.ui` file is full of `GtkSizeGroup`, `GtkTextTag`,
|
|
31
|
+
// `GtkEventController*` and `GtkCellRenderer*`. Use `Widgets` and `CHILD_HOLDERS`
|
|
32
|
+
// below for the narrower questions; they did not move.
|
|
25
33
|
export const DECLS = {
|
|
26
34
|
GcrCertificateWidget: ['GcrCertificateWidget', 'GtkBox', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkOrientable'],
|
|
35
|
+
GcrSecureEntryBuffer: ['GcrSecureEntryBuffer', 'GtkEntryBuffer'],
|
|
27
36
|
};
|
|
28
37
|
|
|
29
|
-
// The GTypes above that are
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
38
|
+
// The GTypes above that ARE widgets are the `Widgets` map in the sibling `.d.ts`; these
|
|
39
|
+
// are the ones that merely HOLD one, through `set_child`/`get_child`, descending from
|
|
40
|
+
// `GObject.Object`. A renderer places them like a container; a check asking "is this a
|
|
41
|
+
// widget" must not count them. Derived from the accessor pair, never from a list — the
|
|
42
|
+
// count is in the provenance line above.
|
|
33
43
|
export const CHILD_HOLDERS = [];
|
|
34
44
|
|
|
35
45
|
export const ENUM_NICKS = {};
|
|
@@ -39,7 +49,7 @@ export const ENUM_NICKS = {};
|
|
|
39
49
|
// It ships because position in `ENUM_NICKS` is not the value and a consumer with no
|
|
40
50
|
// typelib has no other way to learn it: a surface without GI still has to hand GObject an
|
|
41
51
|
// integer. The alternative a consumer reaches for first is counting, and counting is wrong
|
|
42
|
-
// on 6 of the
|
|
52
|
+
// on 6 of the 137 enums a GTK 4 vocabulary carries (112 in Gtk-4.0, 25 in Adw-1) --
|
|
43
53
|
// `GtkResponseType` runs -1 down to
|
|
44
54
|
// -11, `GtkTextWindowType` starts at 1, and `GtkConstraintStrength.required` is
|
|
45
55
|
// 1001001000 where counting answers 0.
|
|
@@ -76,11 +86,12 @@ export const ENUM_VALUES_UNREADABLE = {};
|
|
|
76
86
|
// The number behind each member of a registered BITFIELD, keyed the same way.
|
|
77
87
|
//
|
|
78
88
|
// `ENUM_NICKS` refuses a bitfield because GObject cannot resolve a nick SET, and that
|
|
79
|
-
// reason says nothing about one member's number.
|
|
80
|
-
//
|
|
81
|
-
// `AdwTabView:shortcuts`, ... -- and they are typed bare
|
|
82
|
-
// has nothing to compute one from. Counting is worst
|
|
83
|
-
//
|
|
89
|
+
// reason says nothing about one member's number. 23 settable properties in Gtk-4.0 and
|
|
90
|
+
// Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
|
|
91
|
+
// `AdwTabView:shortcuts`, `GtkDropTarget:actions`, ... -- and they are typed bare
|
|
92
|
+
// `number`, so a host without GI has nothing to compute one from. Counting is worst
|
|
93
|
+
// exactly here: 119 of the 156 Gtk-4.0 bitfield members this vocabulary carries disagree
|
|
94
|
+
// with their declaration position, against 29 of 672 enumeration members.
|
|
84
95
|
//
|
|
85
96
|
// A table of its own rather than more rows in `ENUM_VALUES`, so that "every nick in
|
|
86
97
|
// `ENUM_NICKS` has a number or a declared reason" stays a claim about one set.
|
|
@@ -103,10 +114,35 @@ export const FLAG_VALUES_UNREADABLE = {};
|
|
|
103
114
|
// one are both entries a consumer would resolve wrongly, so neither is written.
|
|
104
115
|
//
|
|
105
116
|
// A GType named here has numbers in SOME vocabulary, not necessarily this one: the namespace
|
|
106
|
-
// that OWNS an enum publishes it, so
|
|
117
|
+
// that OWNS an enum publishes it, so 83 of the 909 entries a full run emits want the owner's
|
|
107
118
|
// vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
|
|
108
119
|
export const PROP_ENUMS = {};
|
|
109
120
|
|
|
121
|
+
// `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
|
|
122
|
+
//
|
|
123
|
+
// The one table here that is not about a ParamSpec. A GtkBuilder or Blueprint
|
|
124
|
+
// `accessibility { … }` block is typed by GTK's ARIA table instead, and the two disagree
|
|
125
|
+
// where it matters: `orientation` is settable on a `GtkLabel` that implements no
|
|
126
|
+
// `GtkOrientable` and has no such property, and `checked` is a `GtkAccessibleTristate`, so
|
|
127
|
+
// `checked: true` means the number 1 and not the boolean. A consumer typing those slots
|
|
128
|
+
// from the widget gets both wrong, silently.
|
|
129
|
+
//
|
|
130
|
+
// Read from each member's own documentation, which is where GTK keeps the table --
|
|
131
|
+
// `gtk_accessible_property_init_value()` is the C half and is not introspectable, the
|
|
132
|
+
// sentence is. Complete or absent, never partial: a member whose documentation states no
|
|
133
|
+
// value type fails generation and names itself, because a missing row is indistinguishable
|
|
134
|
+
// from "GTK has no such name" and the plausible fallback emits `true` where GTK means 1.
|
|
135
|
+
export const ARIA_VALUE_TYPES = {};
|
|
136
|
+
|
|
137
|
+
// The same keys, for the `'enum'` rows only -> the GType of the enum.
|
|
138
|
+
//
|
|
139
|
+
// The join on from a kind to a number, and a table of its own for the reason `PROP_ENUMS`
|
|
140
|
+
// is one: folding the GType into `ARIA_VALUE_TYPES` would make its values a mix of six
|
|
141
|
+
// reserved words and arbitrary GTypes, and telling them apart would be the consumer's
|
|
142
|
+
// problem. With this, `ARIA_VALUE_TYPES[k] === 'enum'` is the whole test, and
|
|
143
|
+
// `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
|
|
144
|
+
export const ARIA_VALUE_ENUMS = {};
|
|
145
|
+
|
|
110
146
|
export const SLOT_CANDIDATES = {};
|
|
111
147
|
|
|
112
148
|
export const SINCE = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gcrgtk3-4",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for GcrGtk3-4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gcrgtk3-4.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-4": "^5.
|
|
54
|
-
"@girs/gck-2": "^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-4": "^5.2.0",
|
|
54
|
+
"@girs/gck-2": "^5.2.0" },
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"typescript": "*"
|
|
57
57
|
},
|