@girs/cogl-16 5.1.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 CHANGED
@@ -4,7 +4,7 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/cogl-16)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/cogl-16)
6
6
 
7
- GJS TypeScript type definitions for Cogl-16 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.1.0.
7
+ GJS TypeScript type definitions for Cogl-16 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/cogl-16/ambient` | only the `gi://` module declarations |
27
27
  | `@girs/cogl-16/import` | only the `imports.gi` declarations |
28
28
  | `@girs/cogl-16/cogl-16` | the namespace, without the side-effecting declarations |
29
+ | `@girs/cogl-16/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/cogl-16/import`:
67
68
  const Cogl = imports.gi.Cogl;
68
69
  ```
69
70
 
71
+ ## Widget vocabulary
72
+
73
+ `cogl-16` 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/cogl-16/vocabulary';
78
+ import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/cogl-16/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,515 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for Cogl-16.
3
+ *
4
+ * GENERATED — do not edit. Provenance: Cogl-16 — prop(s) no TypeScript value satisfies: Cogl.Framebuffer.driver-config Cogl.Texture.loader
5
+ *
6
+ * 24 instantiable GTypes (of which 0 concrete widgets), 27 declarations, 13 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 Cogl from './cogl-16.js';
28
+ import type { GObjectConstructOnly, GObjectProps } from '@girs/gobject-2.0/vocabulary';
29
+
30
+ // ---------------------------------------------------------------------------
31
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
32
+ //
33
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
34
+ // some nicks keep an underscore the substitution would have replaced, and only the
35
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
36
+ // how a derived nick passes review and breaks elsewhere.
37
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
38
+ // ---------------------------------------------------------------------------
39
+
40
+ export type CoglAttributeTypeNick = 'byte' | 'unsigned-byte' | 'short' | 'unsigned-short' | 'float';
41
+ export type CoglBufferBindTargetNick = 'pixel-pack' | 'pixel-unpack' | 'attribute-buffer' | 'index-buffer' | 'count';
42
+ export type CoglBufferUpdateHintNick = 'static' | 'dynamic' | 'stream';
43
+ export type CoglDepthTestFunctionNick = 'never' | 'less' | 'equal' | 'lequal' | 'greater' | 'notequal' | 'gequal' | 'always';
44
+ export type CoglFilterReturnNick = 'continue' | 'remove';
45
+ export type CoglIndicesTypeNick = 'byte' | 'short' | 'int';
46
+ export type CoglPixelFormatNick = 'any' | 'a-8' | 'rgb-565' | 'rgba-4444' | 'rgba-5551' | 'yuv' | 'r-8' | 'rg-88' | 'rgb-888' | 'bgr-888' | 'rgbx-8888' | 'rgba-8888' | 'bgrx-8888' | 'bgra-8888' | 'xrgb-8888' | 'argb-8888' | 'xbgr-8888' | 'abgr-8888' | 'rgba-8888-pre' | 'bgra-8888-pre' | 'argb-8888-pre' | 'abgr-8888-pre' | 'rgba-4444-pre' | 'rgba-5551-pre' | 'rgba-1010102' | 'bgra-1010102' | 'xrgb-2101010' | 'argb-2101010' | 'xbgr-2101010' | 'abgr-2101010' | 'rgba-1010102-pre' | 'bgra-1010102-pre' | 'argb-2101010-pre' | 'abgr-2101010-pre' | 'rgbx-fp-16161616' | 'rgba-fp-16161616' | 'bgrx-fp-16161616' | 'bgra-fp-16161616' | 'xrgb-fp-16161616' | 'argb-fp-16161616' | 'xbgr-fp-16161616' | 'abgr-fp-16161616' | 'rgba-fp-16161616-pre' | 'bgra-fp-16161616-pre' | 'argb-fp-16161616-pre' | 'abgr-fp-16161616-pre' | 'rgba-fp-32323232' | 'rgba-fp-32323232-pre' | 'r-16' | 'rg-1616' | 'rgba-16161616' | 'rgba-16161616-pre' | 'depth-16' | 'depth-24-stencil-8';
47
+ export type CoglRendererErrorNick = 'xlib-display-open' | 'bad-constraint';
48
+ export type CoglShaderTypeNick = 'vertex' | 'fragment';
49
+ export type CoglSystemErrorNick = 'cogl-system-error-unsupported' | 'cogl-system-error-no-memory';
50
+ export type CoglVerticesModeNick = 'points' | 'lines' | 'line-loop' | 'line-strip' | 'triangles' | 'triangle-strip' | 'triangle-fan';
51
+ export type CoglWindingNick = 'clockwise' | 'counter-clockwise';
52
+ export type CoglWinsysFeatureNick = 'vblank-counter' | 'vblank-wait' | 'texture-from-pixmap' | 'swap-buffers-event' | 'swap-region' | 'swap-region-throttle' | 'swap-region-synchronized' | 'buffer-age' | 'sync-and-complete-event' | 'n-features';
53
+
54
+ // ---------------------------------------------------------------------------
55
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
56
+ // inheritance rather than flattening per widget.
57
+ //
58
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
59
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
60
+ // because GObject installs interface properties on the implementor at runtime while
61
+ // GIR keeps them once, on the interface.
62
+ // ---------------------------------------------------------------------------
63
+
64
+ export interface CoglAtlasProps extends GObjectProps {
65
+ }
66
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
67
+ export type CoglAtlasConstructOnly = GObjectConstructOnly;
68
+
69
+ /** Functions for managing textures in Cogl's global set of texture atlases A texture atlas is a texture that contains many smaller images that an application is interested in. */
70
+ export interface CoglAtlasTextureProps extends CoglTextureProps {
71
+ }
72
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
73
+ export type CoglAtlasTextureConstructOnly = CoglTextureConstructOnly;
74
+
75
+ export interface CoglAttributeProps extends GObjectProps {
76
+ }
77
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
78
+ export type CoglAttributeConstructOnly = GObjectConstructOnly;
79
+
80
+ /** Functions for creating and manipulating attribute buffers */
81
+ export interface CoglAttributeBufferProps extends CoglBufferProps {
82
+ }
83
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
84
+ export type CoglAttributeBufferConstructOnly = CoglBufferConstructOnly;
85
+
86
+ /** Functions for loading images Cogl allows loading image data into memory as CoglBitmaps without loading them immediately into GPU textures. */
87
+ export interface CoglBitmapProps extends GObjectProps {
88
+ }
89
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
90
+ export type CoglBitmapConstructOnly = GObjectConstructOnly;
91
+
92
+ /** Common buffer functions, including data upload APIs The CoglBuffer API provides a common interface to manipulate buffers that have been allocated either via `cogl_pixel_buffer_new()` or `cogl_attribu… */
93
+ export interface CoglBufferProps extends GObjectProps {
94
+ context?: Cogl.Context;
95
+ /** @default COGL_BUFFER_BIND_TARGET_PIXEL_PACK */
96
+ 'default-target'?: CoglBufferBindTargetNick | Cogl.BufferBindTarget;
97
+ /** @default 0 */
98
+ size?: bigint | number;
99
+ /** @default COGL_BUFFER_UPDATE_HINT_STATIC */
100
+ 'update-hint'?: CoglBufferUpdateHintNick | Cogl.BufferUpdateHint;
101
+ }
102
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
103
+ export type CoglBufferConstructOnly = GObjectConstructOnly | 'context' | 'default-target' | 'size';
104
+
105
+ /** The top level application context. */
106
+ export interface CoglContextProps extends GObjectProps {
107
+ }
108
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
109
+ export type CoglContextConstructOnly = GObjectConstructOnly;
110
+
111
+ /** Common aspects of a display pipeline The basic intention for this object is to let the application configure common display preferences before creating a context, and there are a few different aspect… */
112
+ export interface CoglDisplayProps extends GObjectProps {
113
+ }
114
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
115
+ export type CoglDisplayConstructOnly = GObjectConstructOnly;
116
+
117
+ /** Frame information. */
118
+ export interface CoglFrameInfoProps extends GObjectProps {
119
+ }
120
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
121
+ export type CoglFrameInfoConstructOnly = GObjectConstructOnly;
122
+
123
+ export interface CoglFramebufferProps extends GObjectProps {
124
+ context?: Cogl.Context;
125
+ 'driver-config'?: never;
126
+ /** @default -1 */
127
+ height?: number;
128
+ /** @default -1 */
129
+ width?: number;
130
+ }
131
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
132
+ export type CoglFramebufferConstructOnly = GObjectConstructOnly | 'context' | 'driver-config';
133
+
134
+ /** Functions for creating and manipulating vertex indices. */
135
+ export interface CoglIndexBufferProps extends CoglBufferProps {
136
+ }
137
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
138
+ export type CoglIndexBufferConstructOnly = CoglBufferConstructOnly;
139
+
140
+ /** Describe vertex indices stored in a #CoglIndexBuffer. */
141
+ export interface CoglIndicesProps extends GObjectProps {
142
+ }
143
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
144
+ export type CoglIndicesConstructOnly = GObjectConstructOnly;
145
+
146
+ /** Efficiently tracking many related transformations. */
147
+ export interface CoglMatrixStackProps extends GObjectProps {
148
+ }
149
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
150
+ export type CoglMatrixStackConstructOnly = GObjectConstructOnly;
151
+
152
+ /** Functions for creating and manipulating offscreen framebuffers. */
153
+ export interface CoglOffscreenProps extends CoglFramebufferProps {
154
+ }
155
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
156
+ export type CoglOffscreenConstructOnly = CoglFramebufferConstructOnly;
157
+
158
+ export interface CoglOnscreenProps extends CoglFramebufferProps {
159
+ }
160
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
161
+ export type CoglOnscreenConstructOnly = CoglFramebufferConstructOnly;
162
+
163
+ /** Functions for creating and manipulating the GPU pipeline Cogl allows creating and manipulating objects representing the full configuration of the GPU pipeline. */
164
+ export interface CoglPipelineProps extends GObjectProps {
165
+ }
166
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
167
+ export type CoglPipelineConstructOnly = GObjectConstructOnly;
168
+
169
+ export interface CoglPixelBufferProps extends CoglBufferProps {
170
+ }
171
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
172
+ export type CoglPixelBufferConstructOnly = CoglBufferConstructOnly;
173
+
174
+ /** Functions for creating, manipulating and drawing primitives */
175
+ export interface CoglPrimitiveProps extends GObjectProps {
176
+ }
177
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
178
+ export type CoglPrimitiveConstructOnly = GObjectConstructOnly;
179
+
180
+ export interface CoglProgramProps extends GObjectProps {
181
+ }
182
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
183
+ export type CoglProgramConstructOnly = GObjectConstructOnly;
184
+
185
+ /** Choosing a means to render A #CoglRenderer represents a means to render. */
186
+ export interface CoglRendererProps extends GObjectProps {
187
+ }
188
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
189
+ export type CoglRendererConstructOnly = GObjectConstructOnly;
190
+
191
+ export interface CoglScanoutProps extends GObjectProps {
192
+ }
193
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
194
+ export type CoglScanoutConstructOnly = GObjectConstructOnly;
195
+
196
+ /** Functions for accessing the programmable GL pipeline Cogl allows accessing the GL programmable pipeline in order to create vertex and fragment shaders. */
197
+ export interface CoglShaderProps extends GObjectProps {
198
+ }
199
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
200
+ export type CoglShaderConstructOnly = GObjectConstructOnly;
201
+
202
+ /** Functions for creating and manipulating shader snippets `CoglSnippet`s are used to modify or replace parts of a #CoglPipeline using GLSL. */
203
+ export interface CoglSnippetProps extends GObjectProps {
204
+ }
205
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
206
+ export type CoglSnippetConstructOnly = GObjectConstructOnly;
207
+
208
+ /** Functions for creating and manipulating sub-textures. */
209
+ export interface CoglSubTextureProps extends CoglTextureProps {
210
+ }
211
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
212
+ export type CoglSubTextureConstructOnly = CoglTextureConstructOnly;
213
+
214
+ /** Functions for creating and manipulating textures Cogl allows creating and manipulating textures using a uniform API that tries to hide all the various complexities of creating, loading and manipulati… */
215
+ export interface CoglTextureProps extends GObjectProps {
216
+ context?: Cogl.Context;
217
+ /** @default COGL_PIXEL_FORMAT_ANY */
218
+ format?: CoglPixelFormatNick | Cogl.PixelFormat;
219
+ /** @default -1 */
220
+ height?: number;
221
+ loader?: never;
222
+ /** @default -1 */
223
+ width?: number;
224
+ }
225
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
226
+ export type CoglTextureConstructOnly = GObjectConstructOnly | 'context' | 'format' | 'height' | 'loader' | 'width';
227
+
228
+ /** Functions for creating and manipulating 2D textures These functions allow low-level 2D textures to be allocated. */
229
+ export interface CoglTexture2DProps extends CoglTextureProps {
230
+ }
231
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
232
+ export type CoglTexture2DConstructOnly = CoglTextureConstructOnly;
233
+
234
+ /** Functions for creating and manipulating 2D meta textures that may internally be comprised of multiple 2D textures with power-of-two sizes. */
235
+ export interface CoglTexture2DSlicedProps extends CoglTextureProps {
236
+ }
237
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
238
+ export type CoglTexture2DSlicedConstructOnly = CoglTextureConstructOnly;
239
+
240
+ // ---------------------------------------------------------------------------
241
+ // The GType-keyed widget map.
242
+ //
243
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
244
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
245
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
246
+ // is the class. None of those is baked in here.
247
+ //
248
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
249
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
250
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
251
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
252
+ // this is what notices when a release adds a candidate.
253
+ // ---------------------------------------------------------------------------
254
+
255
+ export interface Widgets {
256
+
257
+ }
258
+
259
+ /**
260
+ * Every GType this namespace can create AND put on screen. A consumer derives its own
261
+ * tag map. For everything a UI file can instantiate — layout managers, event
262
+ * controllers, cell renderers, `GtkSizeGroup` — read `DECLS` below.
263
+ */
264
+ export type WidgetGType = keyof Widgets;
265
+
266
+ // ---------------------------------------------------------------------------
267
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
268
+ //
269
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
270
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
271
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
272
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
273
+ // more rows in `Widgets`: concatenate them when you mean both.
274
+ // ---------------------------------------------------------------------------
275
+
276
+ export interface ChildHolders {
277
+
278
+ }
279
+
280
+ /** Every GType this namespace holds a child in without it being a widget. */
281
+ export type ChildHolderGType = keyof ChildHolders;
282
+
283
+ /** The writable, optional, GObject-keyed property surface of one GType. */
284
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
285
+
286
+ /** The signal table this package already emits, reached by GType. */
287
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
288
+
289
+ /** The instance type — what a `ref`-shaped prop should infer. */
290
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
291
+
292
+ /** Property names that can only be set at construction. */
293
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
294
+
295
+ /** Candidate child slots — see the note above; curation decides. */
296
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
297
+
298
+ /**
299
+ * The same facts as runtime data, for a consumer that CHECKS them.
300
+ *
301
+ * Types are erased, so a spec that asks the installed GTK whether every property
302
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
303
+ * and every nick resolvable through an enum lookup cannot read the interfaces
304
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
305
+ * belongs to the consumer and the DATA belongs here.
306
+ */
307
+ export const PROVENANCE: {
308
+ readonly namespace: string;
309
+ readonly version: string;
310
+ /** The version the LIBRARY states, or null where it states none. Never the namespace's. */
311
+ readonly libraryVersion: string | null;
312
+ readonly childHolders: number;
313
+ readonly droppedBases: readonly string[];
314
+ readonly inlinedBases: readonly string[];
315
+ /** `<decl>.<prop>` for every property printed `never` because TypeScript has no value for it. */
316
+ readonly unsettableProps: readonly string[];
317
+ /**
318
+ * `<decl>.<prop>: <Ns>.<Name>` for every property printed `never` because the model
319
+ * could not resolve its type across a namespace boundary — two independently released
320
+ * GIRs disagreeing, which is what the main emitter answers `never` for as well.
321
+ */
322
+ readonly unresolvedProps: readonly string[];
323
+ /**
324
+ * `c:identifier-prefixes` from the GIR, verbatim and in order — `['G']` for Gio.
325
+ *
326
+ * The C prefix a type REFERENCE needs: resolving `Gio.Icon` means producing `GIcon`,
327
+ * and nothing else in this package states that `Gio` spells itself `G`. Carried rather
328
+ * than derived because GIR carries it, and a derivation over the `DECLS` keys is wrong
329
+ * wherever the C prefix is not a prefix of the type NAMES: gdkx11-4.0 and gdkwayland-4.0
330
+ * both state `Gdk` while every key they declare begins `GdkX11`/`GdkWayland`.
331
+ *
332
+ * Empty where the GIR states none — 17 of the 627 emitting namespaces — because
333
+ * inventing the namespace name there is a confident wrong answer in place of a missing
334
+ * one. A LIST because 20 of them state more than one, which no single string expresses.
335
+ */
336
+ readonly identifierPrefixes: readonly string[];
337
+ /**
338
+ * Sibling vocabularies this one's DECLARATIONS come from, as import specifiers.
339
+ *
340
+ * A chain link with no `OWN_PROPS` row is ambiguous on its own — `GtkSeparator` has no
341
+ * settable property, `GApplication` has its properties in another package — and this
342
+ * list is what tells the two apart. Enum and bitfield NUMBERS are not here: those are
343
+ * carried in this file, because a `PROP_ENUMS` row naming a foreign GType gives a
344
+ * consumer nothing to load and a `.ui` file using the property never names its owner.
345
+ */
346
+ readonly requiredVocabularies: readonly string[];
347
+ };
348
+
349
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
350
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
351
+
352
+ /**
353
+ * Declaration GType -> the signals it registers itself, never its parents'.
354
+ *
355
+ * Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
356
+ * abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
357
+ */
358
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
359
+
360
+ /**
361
+ * Instantiable GType -> every declaration its members come from, self first.
362
+ *
363
+ * The key set is what a UI description file can NAME: every registered, non-abstract
364
+ * class this namespace declares. GtkBuilder resolves a `<object class="…">` through
365
+ * `g_type_from_name`, which knows nothing about widgets, so this is wider than
366
+ * `Widgets` by design — `GtkSizeGroup`, `GtkTextTag`, every `GtkEventController`
367
+ * and every `GtkCellRenderer` are here and are not widgets.
368
+ *
369
+ * `Widgets` and `CHILD_HOLDERS` are the narrower questions and answer them unchanged.
370
+ */
371
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
372
+
373
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
374
+ export const CHILD_HOLDERS: readonly string[];
375
+
376
+ /** Enum GType -> the nicks this surface offers. */
377
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
378
+
379
+ /**
380
+ * `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
381
+ *
382
+ * Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 137 enums a
383
+ * GTK 4 vocabulary carries -- 112 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
384
+ * at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
385
+ * on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
386
+ *
387
+ * Read from the same GIR as the nicks, deliberately. A consumer reading the numbers off an
388
+ * installed typelib instead has two provenances for one table, and then cannot tell a
389
+ * missing number from a host older than the vocabulary.
390
+ */
391
+ export const ENUM_VALUES: Readonly<Record<string, number>>;
392
+
393
+ /**
394
+ * The `<enum GType>.<nick>` entries GIR marks `deprecated="1"`.
395
+ *
396
+ * Two names on one value is how GObject spells an alias -- `GTK_ALIGN_BASELINE` and
397
+ * `GTK_ALIGN_BASELINE_FILL` are both 4, and both keep a `ENUM_VALUES` entry. The pairing
398
+ * is visible in the numbers; which name is the old one is not, and this is that fact --
399
+ * where GIR states it. It usually does not: 4 registered-enum members across the 718 GIRs
400
+ * carry the attribute, and 179 of the 182 value-sharing pairs carry it on neither half, so
401
+ * absence from this list means GIR is silent, not that the nick is the current one.
402
+ */
403
+ export const ENUM_DEPRECATED: readonly string[];
404
+
405
+ /**
406
+ * `<enum GType>.<nick>` -> the raw GIR `value` no number could be read from.
407
+ *
408
+ * The declared remainder, so that every nick in `ENUM_NICKS` is in `ENUM_VALUES` or in
409
+ * here and a drop cannot be silent. Two shapes reach it: a symbolic or absent value (Vala
410
+ * writes `(null)`, a char enum writes a letter) and an integer past
411
+ * `Number.MAX_SAFE_INTEGER`, where a literal would lose precision and stop being the
412
+ * GIR's number. Empty for Gtk, Adw, GLib and Gio.
413
+ */
414
+ export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
415
+
416
+ /**
417
+ * `<bitfield GType>.<nick>` -> the integer GObject registers for that one member.
418
+ *
419
+ * `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
420
+ * nothing about a single member's number, and the number is what a host without GI needs.
421
+ * 23 settable properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared bare
422
+ * `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`,
423
+ * `GtkDropTarget:actions` among them. Counting is worst here: 119 of the 156 Gtk-4.0
424
+ * bitfield members this vocabulary carries disagree with their declaration position,
425
+ * against 29 of 672 enumeration members.
426
+ *
427
+ * Combine with `|` as GObject does. There is no nick table to pair this with, so a name
428
+ * here is resolvable and a SET still is not.
429
+ */
430
+ export const FLAG_VALUES: Readonly<Record<string, number>>;
431
+
432
+ /** `<bitfield GType>.<nick>` -> the raw GIR `value` no number could be read from. */
433
+ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
434
+
435
+ /**
436
+ * `<declaration GType>.<property>` -> the GType of that property's enum or bitfield.
437
+ *
438
+ * The join the value tables need and nothing else here carries. A host with no GI has a
439
+ * property name and a nick and needs a number; `ENUM_VALUES` is keyed by ENUM GType, and
440
+ * only this says which enum a property is. Keyed by DECLARATION like `OWN_PROPS`, so it is
441
+ * read at every link of a `DECLS` chain — `orientation` belongs to `GtkOrientable`, not
442
+ * to the `GtkBox` a caller starts from.
443
+ *
444
+ * Present only where the property's OWN type is the enum: an array of them, or a union that
445
+ * merely mentions one, would be an entry a consumer resolves wrongly.
446
+ *
447
+ * The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
448
+ * emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
449
+ * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 83 of the 909
450
+ * entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
451
+ * owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
452
+ * resolves against SOME module.
453
+ */
454
+ export const PROP_ENUMS: Readonly<Record<string, string>>;
455
+
456
+ /**
457
+ * The kinds of value a GTK accessible property, relation or state takes.
458
+ *
459
+ * `enum` is the one that needs a second lookup: `ARIA_VALUE_ENUMS` names the enum GType,
460
+ * and `ENUM_NICKS` and `ENUM_VALUES` answer from there.
461
+ */
462
+ export type AriaValueType = 'string' | 'integer' | 'double' | 'boolean' | 'reference' | 'enum';
463
+
464
+ /**
465
+ * `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
466
+ *
467
+ * The one table in this file that is not a fact about a ParamSpec. A GtkBuilder or
468
+ * Blueprint `accessibility { … }` block is typed by GTK's ARIA table, not by the widget,
469
+ * and the two disagree where it costs most: `orientation` is settable on a `GtkLabel`
470
+ * that implements no `GtkOrientable`, and `checked` is a `GtkAccessibleTristate`, so
471
+ * `checked: true` is the number 1 rather than a boolean. Typing those slots from the
472
+ * widget's properties gets both wrong and raises nothing.
473
+ *
474
+ * Keyed like `ENUM_VALUES` because the ARIA names ARE enum members — of
475
+ * `GtkAccessibleProperty`, `GtkAccessibleRelation` and `GtkAccessibleState` — so
476
+ * `ENUM_NICKS` already lists them and one key parser reads both.
477
+ *
478
+ * Read from each member's own GIR documentation. `gtk_accessible_property_init_value()`
479
+ * is the C half of this table and is not introspectable; the doc sentence is, and states
480
+ * the type for 52 of the 53 members in gtk4 4.23.3. Complete or absent, never partial: a
481
+ * member the generator cannot answer for fails the build and names itself.
482
+ */
483
+ export const ARIA_VALUE_TYPES: Readonly<Record<string, AriaValueType>>;
484
+
485
+ /**
486
+ * The same keys, for the `'enum'` rows only -> the GType of that enum.
487
+ *
488
+ * A table of its own for the reason `PROP_ENUMS` is one: folded in, the values of
489
+ * `ARIA_VALUE_TYPES` would be six reserved words mixed with arbitrary GTypes and telling
490
+ * them apart would be the consumer's problem. Apart, `ARIA_VALUE_TYPES[k] === 'enum'` is
491
+ * the whole test and `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
492
+ */
493
+ export const ARIA_VALUE_ENUMS: Readonly<Record<string, string>>;
494
+
495
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
496
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
497
+
498
+ /**
499
+ * `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
500
+ *
501
+ * What keeps a runtime cross-check honest across a version gap without an
502
+ * allowlist: a name the installed library lacks is a defect UNLESS the version
503
+ * here is newer than the one running.
504
+ *
505
+ * ALL THREE key shapes, because that test only works for the names it covers. A
506
+ * property-only map leaves a consumer no way to explain a missing SIGNAL, which is
507
+ * a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
508
+ * explain a missing CLASS, and that one fails as a bare
509
+ * `TypeError: can't access property "$gtype", ctor() is undefined` that does not
510
+ * even name the GType.
511
+ *
512
+ * A key is present only where the GIR states a version — sparse by nature (`version`
513
+ * sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
514
+ */
515
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,311 @@
1
+ // The widget vocabulary of Cogl-16 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: Cogl-16 — prop(s) no TypeScript value satisfies: Cogl.Framebuffer.driver-config Cogl.Texture.loader
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: 'Cogl',
11
+ version: '16',
12
+ libraryVersion: null,
13
+ childHolders: 0,
14
+ droppedBases: [],
15
+ inlinedBases: [],
16
+ unsettableProps: ['Cogl.Framebuffer.driver-config', 'Cogl.Texture.loader'],
17
+ unresolvedProps: [],
18
+ identifierPrefixes: ['Cogl'],
19
+ requiredVocabularies: ['@girs/gobject-2.0/vocabulary'],
20
+ };
21
+
22
+ export const OWN_PROPS = {
23
+ CoglBuffer: ['context', 'default-target', 'size', 'update-hint'],
24
+ CoglFramebuffer: ['context', 'driver-config', 'height', 'width'],
25
+ CoglTexture: ['context', 'format', 'height', 'loader', 'width'],
26
+ };
27
+
28
+ export const OWN_SIGNALS = {
29
+ CoglFramebuffer: ['destroy'],
30
+ CoglScanout: ['scanout-failed'],
31
+ };
32
+
33
+ // Every GType this namespace can INSTANTIATE -> the declarations its members come from.
34
+ //
35
+ // The key set is what a UI description file can name: a registered, non-abstract class.
36
+ // Not "every widget" — GtkBuilder resolves a name through `g_type_from_name`, which knows
37
+ // nothing about widgets, and a `.ui` file is full of `GtkSizeGroup`, `GtkTextTag`,
38
+ // `GtkEventController*` and `GtkCellRenderer*`. Use `Widgets` and `CHILD_HOLDERS`
39
+ // below for the narrower questions; they did not move.
40
+ export const DECLS = {
41
+ CoglAtlas: ['CoglAtlas', 'GObject'],
42
+ CoglAtlasTexture: ['CoglAtlasTexture', 'CoglTexture', 'GObject'],
43
+ CoglAttribute: ['CoglAttribute', 'GObject'],
44
+ CoglAttributeBuffer: ['CoglAttributeBuffer', 'CoglBuffer', 'GObject'],
45
+ CoglBitmap: ['CoglBitmap', 'GObject'],
46
+ CoglContext: ['CoglContext', 'GObject'],
47
+ CoglDisplay: ['CoglDisplay', 'GObject'],
48
+ CoglFrameInfo: ['CoglFrameInfo', 'GObject'],
49
+ CoglIndexBuffer: ['CoglIndexBuffer', 'CoglBuffer', 'GObject'],
50
+ CoglIndices: ['CoglIndices', 'GObject'],
51
+ CoglMatrixStack: ['CoglMatrixStack', 'GObject'],
52
+ CoglOffscreen: ['CoglOffscreen', 'CoglFramebuffer', 'GObject'],
53
+ CoglOnscreen: ['CoglOnscreen', 'CoglFramebuffer', 'GObject'],
54
+ CoglPipeline: ['CoglPipeline', 'GObject'],
55
+ CoglPixelBuffer: ['CoglPixelBuffer', 'CoglBuffer', 'GObject'],
56
+ CoglPrimitive: ['CoglPrimitive', 'GObject'],
57
+ CoglProgram: ['CoglProgram', 'GObject'],
58
+ CoglRenderer: ['CoglRenderer', 'GObject'],
59
+ CoglScanout: ['CoglScanout', 'GObject'],
60
+ CoglShader: ['CoglShader', 'GObject'],
61
+ CoglSnippet: ['CoglSnippet', 'GObject'],
62
+ CoglSubTexture: ['CoglSubTexture', 'CoglTexture', 'GObject'],
63
+ CoglTexture2D: ['CoglTexture2D', 'CoglTexture', 'GObject'],
64
+ CoglTexture2DSliced: ['CoglTexture2DSliced', 'CoglTexture', 'GObject'],
65
+ };
66
+
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.
72
+ export const CHILD_HOLDERS = [];
73
+
74
+ export const ENUM_NICKS = {
75
+ CoglAttributeType: ['byte', 'unsigned-byte', 'short', 'unsigned-short', 'float'],
76
+ CoglBufferBindTarget: ['pixel-pack', 'pixel-unpack', 'attribute-buffer', 'index-buffer', 'count'],
77
+ CoglBufferUpdateHint: ['static', 'dynamic', 'stream'],
78
+ CoglDepthTestFunction: ['never', 'less', 'equal', 'lequal', 'greater', 'notequal', 'gequal', 'always'],
79
+ CoglFilterReturn: ['continue', 'remove'],
80
+ CoglIndicesType: ['byte', 'short', 'int'],
81
+ CoglPixelFormat: ['any', 'a-8', 'rgb-565', 'rgba-4444', 'rgba-5551', 'yuv', 'r-8', 'rg-88', 'rgb-888', 'bgr-888', 'rgbx-8888', 'rgba-8888', 'bgrx-8888', 'bgra-8888', 'xrgb-8888', 'argb-8888', 'xbgr-8888', 'abgr-8888', 'rgba-8888-pre', 'bgra-8888-pre', 'argb-8888-pre', 'abgr-8888-pre', 'rgba-4444-pre', 'rgba-5551-pre', 'rgba-1010102', 'bgra-1010102', 'xrgb-2101010', 'argb-2101010', 'xbgr-2101010', 'abgr-2101010', 'rgba-1010102-pre', 'bgra-1010102-pre', 'argb-2101010-pre', 'abgr-2101010-pre', 'rgbx-fp-16161616', 'rgba-fp-16161616', 'bgrx-fp-16161616', 'bgra-fp-16161616', 'xrgb-fp-16161616', 'argb-fp-16161616', 'xbgr-fp-16161616', 'abgr-fp-16161616', 'rgba-fp-16161616-pre', 'bgra-fp-16161616-pre', 'argb-fp-16161616-pre', 'abgr-fp-16161616-pre', 'rgba-fp-32323232', 'rgba-fp-32323232-pre', 'r-16', 'rg-1616', 'rgba-16161616', 'rgba-16161616-pre', 'depth-16', 'depth-24-stencil-8'],
82
+ CoglRendererError: ['xlib-display-open', 'bad-constraint'],
83
+ CoglShaderType: ['vertex', 'fragment'],
84
+ CoglSystemError: ['cogl-system-error-unsupported', 'cogl-system-error-no-memory'],
85
+ CoglVerticesMode: ['points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip', 'triangle-fan'],
86
+ CoglWinding: ['clockwise', 'counter-clockwise'],
87
+ CoglWinsysFeature: ['vblank-counter', 'vblank-wait', 'texture-from-pixmap', 'swap-buffers-event', 'swap-region', 'swap-region-throttle', 'swap-region-synchronized', 'buffer-age', 'sync-and-complete-event', 'n-features'],
88
+ };
89
+
90
+ // The number behind each of those nicks, read from GIR's own `value` attribute.
91
+ //
92
+ // It ships because position in `ENUM_NICKS` is not the value and a consumer with no
93
+ // typelib has no other way to learn it: a surface without GI still has to hand GObject an
94
+ // integer. The alternative a consumer reaches for first is counting, and counting is wrong
95
+ // on 6 of the 137 enums a GTK 4 vocabulary carries (112 in Gtk-4.0, 25 in Adw-1) --
96
+ // `GtkResponseType` runs -1 down to
97
+ // -11, `GtkTextWindowType` starts at 1, and `GtkConstraintStrength.required` is
98
+ // 1001001000 where counting answers 0.
99
+ //
100
+ // Same provenance as the nicks above, which is the point: a consumer that reads the numbers
101
+ // from an INSTALLED library instead gets two provenances for one table, and a member the
102
+ // vocabulary describes but the host predates then looks like a missing number rather than a
103
+ // version gap.
104
+ export const ENUM_VALUES = {
105
+ 'CoglAttributeType.byte': 5120,
106
+ 'CoglAttributeType.float': 5126,
107
+ 'CoglAttributeType.short': 5122,
108
+ 'CoglAttributeType.unsigned-byte': 5121,
109
+ 'CoglAttributeType.unsigned-short': 5123,
110
+ 'CoglBufferBindTarget.attribute-buffer': 2,
111
+ 'CoglBufferBindTarget.count': 4,
112
+ 'CoglBufferBindTarget.index-buffer': 3,
113
+ 'CoglBufferBindTarget.pixel-pack': 0,
114
+ 'CoglBufferBindTarget.pixel-unpack': 1,
115
+ 'CoglBufferUpdateHint.dynamic': 1,
116
+ 'CoglBufferUpdateHint.static': 0,
117
+ 'CoglBufferUpdateHint.stream': 2,
118
+ 'CoglDepthTestFunction.always': 519,
119
+ 'CoglDepthTestFunction.equal': 514,
120
+ 'CoglDepthTestFunction.gequal': 518,
121
+ 'CoglDepthTestFunction.greater': 516,
122
+ 'CoglDepthTestFunction.lequal': 515,
123
+ 'CoglDepthTestFunction.less': 513,
124
+ 'CoglDepthTestFunction.never': 512,
125
+ 'CoglDepthTestFunction.notequal': 517,
126
+ 'CoglFilterReturn.continue': 0,
127
+ 'CoglFilterReturn.remove': 1,
128
+ 'CoglIndicesType.byte': 0,
129
+ 'CoglIndicesType.int': 2,
130
+ 'CoglIndicesType.short': 1,
131
+ 'CoglPixelFormat.a-8': 17,
132
+ 'CoglPixelFormat.abgr-2101010': 125,
133
+ 'CoglPixelFormat.abgr-2101010-pre': 253,
134
+ 'CoglPixelFormat.abgr-8888': 115,
135
+ 'CoglPixelFormat.abgr-8888-pre': 243,
136
+ 'CoglPixelFormat.abgr-fp-16161616': 123,
137
+ 'CoglPixelFormat.abgr-fp-16161616-pre': 251,
138
+ 'CoglPixelFormat.any': 0,
139
+ 'CoglPixelFormat.argb-2101010': 93,
140
+ 'CoglPixelFormat.argb-2101010-pre': 221,
141
+ 'CoglPixelFormat.argb-8888': 83,
142
+ 'CoglPixelFormat.argb-8888-pre': 211,
143
+ 'CoglPixelFormat.argb-fp-16161616': 91,
144
+ 'CoglPixelFormat.argb-fp-16161616-pre': 219,
145
+ 'CoglPixelFormat.bgr-888': 34,
146
+ 'CoglPixelFormat.bgra-1010102': 61,
147
+ 'CoglPixelFormat.bgra-1010102-pre': 189,
148
+ 'CoglPixelFormat.bgra-8888': 51,
149
+ 'CoglPixelFormat.bgra-8888-pre': 179,
150
+ 'CoglPixelFormat.bgra-fp-16161616': 59,
151
+ 'CoglPixelFormat.bgra-fp-16161616-pre': 187,
152
+ 'CoglPixelFormat.bgrx-8888': 35,
153
+ 'CoglPixelFormat.bgrx-fp-16161616': 43,
154
+ 'CoglPixelFormat.depth-16': 265,
155
+ 'CoglPixelFormat.depth-24-stencil-8': 771,
156
+ 'CoglPixelFormat.r-16': 14,
157
+ 'CoglPixelFormat.r-8': 8,
158
+ 'CoglPixelFormat.rg-1616': 15,
159
+ 'CoglPixelFormat.rg-88': 9,
160
+ 'CoglPixelFormat.rgb-565': 4,
161
+ 'CoglPixelFormat.rgb-888': 2,
162
+ 'CoglPixelFormat.rgba-1010102': 29,
163
+ 'CoglPixelFormat.rgba-1010102-pre': 157,
164
+ 'CoglPixelFormat.rgba-16161616': 26,
165
+ 'CoglPixelFormat.rgba-16161616-pre': 154,
166
+ 'CoglPixelFormat.rgba-4444': 21,
167
+ 'CoglPixelFormat.rgba-4444-pre': 149,
168
+ 'CoglPixelFormat.rgba-5551': 22,
169
+ 'CoglPixelFormat.rgba-5551-pre': 150,
170
+ 'CoglPixelFormat.rgba-8888': 19,
171
+ 'CoglPixelFormat.rgba-8888-pre': 147,
172
+ 'CoglPixelFormat.rgba-fp-16161616': 27,
173
+ 'CoglPixelFormat.rgba-fp-16161616-pre': 155,
174
+ 'CoglPixelFormat.rgba-fp-32323232': 28,
175
+ 'CoglPixelFormat.rgba-fp-32323232-pre': 156,
176
+ 'CoglPixelFormat.rgbx-8888': 3,
177
+ 'CoglPixelFormat.rgbx-fp-16161616': 11,
178
+ 'CoglPixelFormat.xbgr-2101010': 109,
179
+ 'CoglPixelFormat.xbgr-8888': 99,
180
+ 'CoglPixelFormat.xbgr-fp-16161616': 107,
181
+ 'CoglPixelFormat.xrgb-2101010': 77,
182
+ 'CoglPixelFormat.xrgb-8888': 67,
183
+ 'CoglPixelFormat.xrgb-fp-16161616': 75,
184
+ 'CoglPixelFormat.yuv': 7,
185
+ 'CoglRendererError.bad-constraint': 1,
186
+ 'CoglRendererError.xlib-display-open': 0,
187
+ 'CoglShaderType.fragment': 1,
188
+ 'CoglShaderType.vertex': 0,
189
+ 'CoglSystemError.cogl-system-error-no-memory': 1,
190
+ 'CoglSystemError.cogl-system-error-unsupported': 0,
191
+ 'CoglVerticesMode.line-loop': 2,
192
+ 'CoglVerticesMode.line-strip': 3,
193
+ 'CoglVerticesMode.lines': 1,
194
+ 'CoglVerticesMode.points': 0,
195
+ 'CoglVerticesMode.triangle-fan': 6,
196
+ 'CoglVerticesMode.triangle-strip': 5,
197
+ 'CoglVerticesMode.triangles': 4,
198
+ 'CoglWinding.clockwise': 0,
199
+ 'CoglWinding.counter-clockwise': 1,
200
+ 'CoglWinsysFeature.buffer-age': 7,
201
+ 'CoglWinsysFeature.n-features': 9,
202
+ 'CoglWinsysFeature.swap-buffers-event': 3,
203
+ 'CoglWinsysFeature.swap-region': 4,
204
+ 'CoglWinsysFeature.swap-region-synchronized': 6,
205
+ 'CoglWinsysFeature.swap-region-throttle': 5,
206
+ 'CoglWinsysFeature.sync-and-complete-event': 8,
207
+ 'CoglWinsysFeature.texture-from-pixmap': 2,
208
+ 'CoglWinsysFeature.vblank-counter': 0,
209
+ 'CoglWinsysFeature.vblank-wait': 1,
210
+ };
211
+
212
+ // The nicks GIR marks `deprecated="1"`.
213
+ //
214
+ // Two members of one enum may share a value -- that is how GObject spells an alias, and
215
+ // `GTK_ALIGN_BASELINE` and `GTK_ALIGN_BASELINE_FILL` are both 4. `ENUM_VALUES` keeps
216
+ // both names, so nothing is lost, and this is what says which of the two a number should be
217
+ // spelled back as. Stated rather than derived: the pairing is visible in the values, the
218
+ // DIRECTION is not.
219
+ //
220
+ // Read it as evidence, not as a negative: 4 registered-enum members in the 718 GIRs carry
221
+ // the attribute at all, and 179 of the 182 value-sharing pairs carry it on neither half.
222
+ // A nick missing from here is a nick GIR says nothing about, not a nick GIR calls current.
223
+ export const ENUM_DEPRECATED = [];
224
+
225
+ // The declared remainder: nicks whose GIR `value` is not a number this can carry.
226
+ //
227
+ // Every nick in `ENUM_NICKS` is in `ENUM_VALUES` or here -- a nick in neither would be a
228
+ // silent drop. GIR carries two shapes no integer holds: a symbolic or absent value (Vala
229
+ // writes `(null)`, a char enum writes a letter) and an integer past
230
+ // `Number.MAX_SAFE_INTEGER`. The value kept here is the raw attribute, so the entry says
231
+ // WHAT was unreadable rather than only that something was. Measured over the 718 GIRs in
232
+ // ts-for-gir's `girs/`: 32 of 34096 registered-enum members, none in Gtk, Adw, GLib or Gio.
233
+ export const ENUM_VALUES_UNREADABLE = {};
234
+
235
+ // The number behind each member of a registered BITFIELD, keyed the same way.
236
+ //
237
+ // `ENUM_NICKS` refuses a bitfield because GObject cannot resolve a nick SET, and that
238
+ // reason says nothing about one member's number. 23 settable properties in Gtk-4.0 and
239
+ // Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
240
+ // `AdwTabView:shortcuts`, `GtkDropTarget:actions`, ... -- and they are typed bare
241
+ // `number`, so a host without GI has nothing to compute one from. Counting is worst
242
+ // exactly here: 119 of the 156 Gtk-4.0 bitfield members this vocabulary carries disagree
243
+ // with their declaration position, against 29 of 672 enumeration members.
244
+ //
245
+ // A table of its own rather than more rows in `ENUM_VALUES`, so that "every nick in
246
+ // `ENUM_NICKS` has a number or a declared reason" stays a claim about one set.
247
+ export const FLAG_VALUES = {
248
+ 'CoglBufferAccess.read': 1,
249
+ 'CoglBufferAccess.read-write': 3,
250
+ 'CoglBufferAccess.write': 2,
251
+ 'CoglBufferBit.color': 1,
252
+ 'CoglBufferBit.depth': 2,
253
+ 'CoglBufferBit.stencil': 4,
254
+ 'CoglBufferMapHint.discard': 1,
255
+ 'CoglBufferMapHint.discard-range': 2,
256
+ 'CoglReadPixelsFlags.color-buffer': 1,
257
+ };
258
+
259
+ // The same declared remainder for the bitfields. Every one of the 13 members in ts-for-gir's
260
+ // `girs/` whose value is past `Number.MAX_SAFE_INTEGER` is a bitfield member (Fwupd, Qmi),
261
+ // so this is the table that shape actually reaches.
262
+ export const FLAG_VALUES_UNREADABLE = {};
263
+
264
+ // Declaration GType + property name -> the GType of that property's enum or bitfield.
265
+ //
266
+ // Without it the value tables above are half an answer. A host with no GI knows it must set
267
+ // `orientation` to the number behind the nick `vertical`; `ENUM_VALUES` is keyed
268
+ // `GtkOrientation.vertical`, and nothing else says that `orientation` is a
269
+ // `GtkOrientation`. Deriving it is not available: `never` is a member of several Gtk enums,
270
+ // and choosing between them produces a wrong number rather than a missing one.
271
+ //
272
+ // Only where the property's OWN type is the enum. An array of them and a union that mentions
273
+ // one are both entries a consumer would resolve wrongly, so neither is written.
274
+ //
275
+ // A GType named here has numbers in SOME vocabulary, not necessarily this one: the namespace
276
+ // that OWNS an enum publishes it, so 83 of the 909 entries a full run emits want the owner's
277
+ // vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
278
+ export const PROP_ENUMS = {
279
+ 'CoglBuffer.default-target': 'CoglBufferBindTarget',
280
+ 'CoglBuffer.update-hint': 'CoglBufferUpdateHint',
281
+ 'CoglTexture.format': 'CoglPixelFormat',
282
+ };
283
+
284
+ // `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
285
+ //
286
+ // The one table here that is not about a ParamSpec. A GtkBuilder or Blueprint
287
+ // `accessibility { … }` block is typed by GTK's ARIA table instead, and the two disagree
288
+ // where it matters: `orientation` is settable on a `GtkLabel` that implements no
289
+ // `GtkOrientable` and has no such property, and `checked` is a `GtkAccessibleTristate`, so
290
+ // `checked: true` means the number 1 and not the boolean. A consumer typing those slots
291
+ // from the widget gets both wrong, silently.
292
+ //
293
+ // Read from each member's own documentation, which is where GTK keeps the table --
294
+ // `gtk_accessible_property_init_value()` is the C half and is not introspectable, the
295
+ // sentence is. Complete or absent, never partial: a member whose documentation states no
296
+ // value type fails generation and names itself, because a missing row is indistinguishable
297
+ // from "GTK has no such name" and the plausible fallback emits `true` where GTK means 1.
298
+ export const ARIA_VALUE_TYPES = {};
299
+
300
+ // The same keys, for the `'enum'` rows only -> the GType of the enum.
301
+ //
302
+ // The join on from a kind to a number, and a table of its own for the reason `PROP_ENUMS`
303
+ // is one: folding the GType into `ARIA_VALUE_TYPES` would make its values a mix of six
304
+ // reserved words and arbitrary GTypes, and telling them apart would be the consumer's
305
+ // problem. With this, `ARIA_VALUE_TYPES[k] === 'enum'` is the whole test, and
306
+ // `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
307
+ export const ARIA_VALUE_ENUMS = {};
308
+
309
+ export const SLOT_CANDIDATES = {};
310
+
311
+ export const SINCE = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cogl-16",
3
- "version": "5.1.0",
3
+ "version": "5.3.0",
4
4
  "description": "GJS TypeScript type definitions for Cogl-16",
5
5
  "type": "module",
6
6
  "module": "cogl-16.js",
@@ -16,6 +16,11 @@
16
16
  "import": "./cogl-16-import.js",
17
17
  "default": "./cogl-16-import.js"
18
18
  },
19
+ "./vocabulary": {
20
+ "types": "./cogl-16-vocabulary.d.ts",
21
+ "import": "./cogl-16-vocabulary.js",
22
+ "default": "./cogl-16-vocabulary.js"
23
+ },
19
24
  "./cogl-16": {
20
25
  "types": "./cogl-16.d.ts",
21
26
  "import": "./cogl-16.js",
@@ -31,13 +36,13 @@
31
36
  "test": "tsc --project tsconfig.json"
32
37
  },
33
38
  "dependencies": {
34
- "@girs/gjs": "^5.1.0",
35
- "@girs/xlib-2.0": "^5.1.0",
36
- "@girs/mtk-16": "^5.1.0",
37
- "@girs/graphene-1.0": "^5.1.0",
38
- "@girs/gobject-2.0": "^5.1.0",
39
- "@girs/glib-2.0": "^5.1.0",
40
- "@girs/gl-1.0": "^5.1.0" },
39
+ "@girs/gjs": "^5.3.0",
40
+ "@girs/xlib-2.0": "^5.3.0",
41
+ "@girs/mtk-16": "^5.3.0",
42
+ "@girs/graphene-1.0": "^5.3.0",
43
+ "@girs/gobject-2.0": "^5.3.0",
44
+ "@girs/glib-2.0": "^5.3.0",
45
+ "@girs/gl-1.0": "^5.3.0" },
41
46
  "devDependencies": {
42
47
  "typescript": "*"
43
48
  },
package/tsconfig.json CHANGED
@@ -41,7 +41,7 @@
41
41
  ]
42
42
  }
43
43
  },
44
- "include": ["./cogl-16.d.ts"]
44
+ "include": ["./cogl-16.d.ts","./cogl-16-vocabulary.d.ts"]
45
45
  }
46
46
 
47
47