@girs/gtkfrdp-0.2 4.9.0 → 5.1.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/gtkfrdp-0.2)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gtkfrdp-0.2)
6
6
 
7
- GJS TypeScript type definitions for GtkFrdp-0.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.9.0.
7
+ GJS TypeScript type definitions for GtkFrdp-0.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.1.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.
@@ -242,6 +242,45 @@ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
242
242
  */
243
243
  export const PROP_ENUMS: Readonly<Record<string, string>>;
244
244
 
245
+ /**
246
+ * The kinds of value a GTK accessible property, relation or state takes.
247
+ *
248
+ * `enum` is the one that needs a second lookup: `ARIA_VALUE_ENUMS` names the enum GType,
249
+ * and `ENUM_NICKS` and `ENUM_VALUES` answer from there.
250
+ */
251
+ export type AriaValueType = 'string' | 'integer' | 'double' | 'boolean' | 'reference' | 'enum';
252
+
253
+ /**
254
+ * `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
255
+ *
256
+ * The one table in this file that is not a fact about a ParamSpec. A GtkBuilder or
257
+ * Blueprint `accessibility { … }` block is typed by GTK's ARIA table, not by the widget,
258
+ * and the two disagree where it costs most: `orientation` is settable on a `GtkLabel`
259
+ * that implements no `GtkOrientable`, and `checked` is a `GtkAccessibleTristate`, so
260
+ * `checked: true` is the number 1 rather than a boolean. Typing those slots from the
261
+ * widget's properties gets both wrong and raises nothing.
262
+ *
263
+ * Keyed like `ENUM_VALUES` because the ARIA names ARE enum members — of
264
+ * `GtkAccessibleProperty`, `GtkAccessibleRelation` and `GtkAccessibleState` — so
265
+ * `ENUM_NICKS` already lists them and one key parser reads both.
266
+ *
267
+ * Read from each member's own GIR documentation. `gtk_accessible_property_init_value()`
268
+ * is the C half of this table and is not introspectable; the doc sentence is, and states
269
+ * the type for 52 of the 53 members in gtk4 4.23.3. Complete or absent, never partial: a
270
+ * member the generator cannot answer for fails the build and names itself.
271
+ */
272
+ export const ARIA_VALUE_TYPES: Readonly<Record<string, AriaValueType>>;
273
+
274
+ /**
275
+ * The same keys, for the `'enum'` rows only -> the GType of that enum.
276
+ *
277
+ * A table of its own for the reason `PROP_ENUMS` is one: folded in, the values of
278
+ * `ARIA_VALUE_TYPES` would be six reserved words mixed with arbitrary GTypes and telling
279
+ * them apart would be the consumer's problem. Apart, `ARIA_VALUE_TYPES[k] === 'enum'` is
280
+ * the whole test and `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
281
+ */
282
+ export const ARIA_VALUE_ENUMS: Readonly<Record<string, string>>;
283
+
245
284
  /** Widget GType -> slot name -> the method that may adopt a child there. */
246
285
  export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
247
286
 
@@ -109,6 +109,31 @@ export const FLAG_VALUES_UNREADABLE = {};
109
109
  // vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
110
110
  export const PROP_ENUMS = {};
111
111
 
112
+ // `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
113
+ //
114
+ // The one table here that is not about a ParamSpec. A GtkBuilder or Blueprint
115
+ // `accessibility { … }` block is typed by GTK's ARIA table instead, and the two disagree
116
+ // where it matters: `orientation` is settable on a `GtkLabel` that implements no
117
+ // `GtkOrientable` and has no such property, and `checked` is a `GtkAccessibleTristate`, so
118
+ // `checked: true` means the number 1 and not the boolean. A consumer typing those slots
119
+ // from the widget gets both wrong, silently.
120
+ //
121
+ // Read from each member's own documentation, which is where GTK keeps the table --
122
+ // `gtk_accessible_property_init_value()` is the C half and is not introspectable, the
123
+ // sentence is. Complete or absent, never partial: a member whose documentation states no
124
+ // value type fails generation and names itself, because a missing row is indistinguishable
125
+ // from "GTK has no such name" and the plausible fallback emits `true` where GTK means 1.
126
+ export const ARIA_VALUE_TYPES = {};
127
+
128
+ // The same keys, for the `'enum'` rows only -> the GType of the enum.
129
+ //
130
+ // The join on from a kind to a number, and a table of its own for the reason `PROP_ENUMS`
131
+ // is one: folding the GType into `ARIA_VALUE_TYPES` would make its values a mix of six
132
+ // reserved words and arbitrary GTypes, and telling them apart would be the consumer's
133
+ // problem. With this, `ARIA_VALUE_TYPES[k] === 'enum'` is the whole test, and
134
+ // `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
135
+ export const ARIA_VALUE_ENUMS = {};
136
+
112
137
  export const SLOT_CANDIDATES = {};
113
138
 
114
139
  export const SINCE = {};
package/gtkfrdp-0.2.d.ts CHANGED
@@ -240,15 +240,12 @@ export namespace GtkFrdp {
240
240
  // Signals
241
241
  /** @signal */
242
242
  connect<K extends keyof Display.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Display.SignalSignatures[K]>): number;
243
- connect(signal: string, callback: (...args: any[]) => any): number;
244
243
 
245
244
  /** @signal */
246
245
  connect_after<K extends keyof Display.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Display.SignalSignatures[K]>): number;
247
- connect_after(signal: string, callback: (...args: any[]) => any): number;
248
246
 
249
247
  /** @signal */
250
- emit<K extends keyof Display.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Display.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
251
- emit(signal: string, ...args: any[]): void;
248
+ emit<K extends keyof Display.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Display.SignalSignatures[K]>): void;
252
249
 
253
250
  // Virtual methods
254
251
  /**
@@ -470,15 +467,12 @@ export namespace GtkFrdp {
470
467
  // Signals
471
468
  /** @signal */
472
469
  connect<K extends keyof Session.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Session.SignalSignatures[K]>): number;
473
- connect(signal: string, callback: (...args: any[]) => any): number;
474
470
 
475
471
  /** @signal */
476
472
  connect_after<K extends keyof Session.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Session.SignalSignatures[K]>): number;
477
- connect_after(signal: string, callback: (...args: any[]) => any): number;
478
473
 
479
474
  /** @signal */
480
- emit<K extends keyof Session.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Session.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
481
- emit(signal: string, ...args: any[]): void;
475
+ emit<K extends keyof Session.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Session.SignalSignatures[K]>): void;
482
476
 
483
477
  // Methods
484
478
  close(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gtkfrdp-0.2",
3
- "version": "4.9.0",
3
+ "version": "5.1.0",
4
4
  "description": "GJS TypeScript type definitions for GtkFrdp-0.2",
5
5
  "type": "module",
6
6
  "module": "gtkfrdp-0.2.js",
@@ -36,20 +36,20 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
39
- "@girs/gjs": "^4.9.0",
40
- "@girs/gtk-3.0": "^4.9.0",
41
- "@girs/xlib-2.0": "^4.9.0",
42
- "@girs/gdk-3.0": "^4.9.0",
43
- "@girs/cairo-1.0": "^4.9.0",
44
- "@girs/gobject-2.0": "^4.9.0",
45
- "@girs/glib-2.0": "^4.9.0",
46
- "@girs/pango-1.0": "^4.9.0",
47
- "@girs/harfbuzz-0.0": "^4.9.0",
48
- "@girs/freetype2-2.0": "^4.9.0",
49
- "@girs/gio-2.0": "^4.9.0",
50
- "@girs/gmodule-2.0": "^4.9.0",
51
- "@girs/gdkpixbuf-2.0": "^4.9.0",
52
- "@girs/atk-1.0": "^4.9.0" },
39
+ "@girs/gjs": "^5.1.0",
40
+ "@girs/gtk-3.0": "^5.1.0",
41
+ "@girs/xlib-2.0": "^5.1.0",
42
+ "@girs/gdk-3.0": "^5.1.0",
43
+ "@girs/cairo-1.0": "^5.1.0",
44
+ "@girs/gobject-2.0": "^5.1.0",
45
+ "@girs/glib-2.0": "^5.1.0",
46
+ "@girs/pango-1.0": "^5.1.0",
47
+ "@girs/harfbuzz-0.0": "^5.1.0",
48
+ "@girs/freetype2-2.0": "^5.1.0",
49
+ "@girs/gio-2.0": "^5.1.0",
50
+ "@girs/gmodule-2.0": "^5.1.0",
51
+ "@girs/gdkpixbuf-2.0": "^5.1.0",
52
+ "@girs/atk-1.0": "^5.1.0" },
53
53
  "devDependencies": {
54
54
  "typescript": "*"
55
55
  },