@gjsify/gtk-host 0.41.0 → 0.44.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 +481 -6
- package/lib/esm/adapters/react.js +1 -0
- package/lib/esm/adapters/solid.js +1 -0
- package/lib/esm/adapters/vue.js +1 -0
- package/lib/esm/attrs.js +0 -0
- package/lib/esm/conformance/diagnostics.js +2 -2
- package/lib/esm/conformance/index.js +2 -2
- package/lib/esm/descriptors/adw.js +1 -1
- package/lib/esm/descriptors/gtk.js +1 -1
- package/lib/esm/descriptors/index.js +1 -1
- package/lib/esm/errors.js +1 -1
- package/lib/esm/generated/props.js +0 -0
- package/lib/esm/generated/widgets.js +1 -0
- package/lib/esm/host.js +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/jsx-runtime.js +1 -0
- package/lib/esm/policies.js +1 -1
- package/lib/esm/probe.js +1 -0
- package/lib/esm/props.js +1 -1
- package/lib/esm/react-jsx-runtime.js +1 -0
- package/lib/esm/registry.js +1 -1
- package/lib/esm/signals.js +1 -1
- package/lib/esm/style/errors.js +1 -0
- package/lib/esm/style/gtk-css.js +1 -0
- package/lib/esm/style/gtk-props.js +1 -0
- package/lib/esm/style/index.js +1 -0
- package/lib/esm/style/layout.js +1 -0
- package/lib/esm/style/paint.js +1 -0
- package/lib/esm/style/resolve.js +1 -0
- package/lib/esm/style/sheet.js +3 -0
- package/lib/esm/style/tokens.js +1 -0
- package/lib/esm/tags.js +2 -0
- package/lib/esm/vue-components.js +0 -0
- package/lib/types/adapters/react.d.ts +224 -0
- package/lib/types/adapters/react.spec.d.ts +2 -0
- package/lib/types/adapters/solid.d.ts +78 -0
- package/lib/types/adapters/solid.spec.d.ts +2 -0
- package/lib/types/adapters/vue.d.ts +24 -0
- package/lib/types/adapters/vue.spec.d.ts +2 -0
- package/lib/types/attrs.d.ts +102 -0
- package/lib/types/buildable.spec.d.ts +2 -0
- package/lib/types/conformance/diagnostics.d.ts +26 -2
- package/lib/types/conformance/index.d.ts +24 -1
- package/lib/types/conformance/vectors.d.mts +34 -0
- package/lib/types/descriptors/index.d.ts +52 -1
- package/lib/types/errors.d.ts +21 -0
- package/lib/types/generated/props.d.ts +5505 -0
- package/lib/types/generated/surface-data.d.mts +22 -0
- package/lib/types/generated/widgets.d.ts +3 -0
- package/lib/types/generated.spec.d.ts +4 -0
- package/lib/types/generator/emit-types.d.mts +54 -0
- package/lib/types/generator/emit.d.mts +50 -0
- package/lib/types/generator/gir.d.mts +164 -0
- package/lib/types/generator/main.d.mts +23 -0
- package/lib/types/generator/mini.fixture.d.mts +30 -0
- package/lib/types/generator/surface.d.mts +62 -0
- package/lib/types/generator/tsmap.d.mts +73 -0
- package/lib/types/generator.spec.d.ts +2 -0
- package/lib/types/host.d.ts +102 -1
- package/lib/types/index.d.ts +6 -3
- package/lib/types/jsx-runtime.d.ts +70 -0
- package/lib/types/policies.d.ts +58 -0
- package/lib/types/probe.d.ts +87 -0
- package/lib/types/props.d.ts +52 -2
- package/lib/types/react-jsx-runtime.d.ts +108 -0
- package/lib/types/registry.d.ts +1 -1
- package/lib/types/signals.d.ts +16 -1
- package/lib/types/style/errors.d.ts +6 -0
- package/lib/types/style/gtk-css.d.ts +24 -0
- package/lib/types/style/gtk-css.spec.d.ts +2 -0
- package/lib/types/style/gtk-props.d.ts +27 -0
- package/lib/types/style/gtk-props.spec.d.ts +2 -0
- package/lib/types/style/index.d.ts +13 -0
- package/lib/types/style/layout.d.ts +163 -0
- package/lib/types/style/layout.spec.d.ts +2 -0
- package/lib/types/style/paint.d.ts +53 -0
- package/lib/types/style/paint.spec.d.ts +2 -0
- package/lib/types/style/resolve.d.ts +58 -0
- package/lib/types/style/sheet.d.ts +40 -0
- package/lib/types/style/sheet.spec.d.ts +2 -0
- package/lib/types/style/tokens.d.ts +58 -0
- package/lib/types/tags.d.ts +25 -0
- package/lib/types/testing/gate.d.mts +25 -0
- package/lib/types/types.d.ts +56 -3
- package/lib/types/vue-components.d.ts +46 -0
- package/package.json +85 -8
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type GObject from '@girs/gobject-2.0';
|
|
2
|
+
import type { HostNode } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* A `notify::` handler.
|
|
5
|
+
*
|
|
6
|
+
* The host strips the emitting object (`next(...args.slice(1))` in `signals.ts`),
|
|
7
|
+
* so what reaches the callback is the ParamSpec alone. Declared HERE rather than in
|
|
8
|
+
* the generated file because it is the same for every property in GTK — and because
|
|
9
|
+
* a generator that emitted it would have to import GObject for a type that has
|
|
10
|
+
* nothing to do with the GIR it read.
|
|
11
|
+
*/
|
|
12
|
+
export type NotifyHandler = (pspec: GObject.ParamSpec) => void;
|
|
13
|
+
declare const outParam: unique symbol;
|
|
14
|
+
/**
|
|
15
|
+
* A signal parameter GIR declares `out`/`inout` with `caller-allocates="0"`.
|
|
16
|
+
*
|
|
17
|
+
* GJS still passes an argument in that position, and what it holds is whatever
|
|
18
|
+
* was in the memory the marshaller allocated: measured on gjs 1.88.1 / GTK
|
|
19
|
+
* 4.22.4, a handler on `Gtk.SpinButton::input` receives `new_value` as
|
|
20
|
+
* `6.9526682391035e-310`, and one on `Gtk.Editable::insert-text` receives
|
|
21
|
+
* `position` as `1711500784`. Both arrive as ordinary numbers. Nothing warns.
|
|
22
|
+
*
|
|
23
|
+
* So the slot is DECLARED — dropping it would silently shift every parameter
|
|
24
|
+
* after it — and given a type nothing can be read out of, and nothing but
|
|
25
|
+
* itself assigns to. Annotating the parameter `number` is then a compile error
|
|
26
|
+
* naming the position, which is the only place a reader would have looked.
|
|
27
|
+
*
|
|
28
|
+
* `caller-allocates="1"` is a different thing and keeps its real type: there the
|
|
29
|
+
* callee is handed a live object to FILL, as `Gtk.Overlay::get-child-position`
|
|
30
|
+
* is handed a `Gdk.Rectangle`.
|
|
31
|
+
*/
|
|
32
|
+
export type OutParam = {
|
|
33
|
+
readonly [outParam]: never;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* What may appear as a child, mirroring Solid's own `JSX.Element`.
|
|
37
|
+
*
|
|
38
|
+
* The shape is copied from `solid-js/types/jsx.d.ts` because a renderer's element
|
|
39
|
+
* union is not a free choice: a string, a number and a boolean are all legal
|
|
40
|
+
* children there, an array of children is legal recursively, and a FUNCTION is
|
|
41
|
+
* not. Substituting our host node for the DOM's `Node` is the only change.
|
|
42
|
+
*/
|
|
43
|
+
export type ElementChild = HostNode | ElementChildren | string | number | boolean | null | undefined;
|
|
44
|
+
export interface ElementChildren extends Array<ElementChild> {
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Add the `.once` spelling of every event prop, without generating 2× the members.
|
|
48
|
+
*
|
|
49
|
+
* `signals.ts` accepts `onClickedOnce` for every `onClicked`, including every
|
|
50
|
+
* `onNotifyFooOnce`, which would be another ~1000 generated members. A mapped type
|
|
51
|
+
* derives them from the interface instead — including the ones a consumer adds by
|
|
52
|
+
* declaration merging.
|
|
53
|
+
*/
|
|
54
|
+
export type WithOnce<T> = T & {
|
|
55
|
+
[K in keyof T & string as K extends `on${string}` ? `${K}Once` : never]?: T[K];
|
|
56
|
+
};
|
|
57
|
+
/** Which of a container's slots this child goes into. Read by `setSlot()`. */
|
|
58
|
+
export interface SlotAttribute {
|
|
59
|
+
slot?: string | null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The `on:<raw-signal-name>` escape hatch, typed.
|
|
63
|
+
*
|
|
64
|
+
* `parseEventProp` takes `on:` + a signal name verbatim, which is how a signal
|
|
65
|
+
* whose name resists the camelCase derivation gets bound at all. The handler type
|
|
66
|
+
* is deliberately the widest one that is not `any`: parameters of `never` accept
|
|
67
|
+
* a handler declared with any parameters, so nothing a consumer writes is refused.
|
|
68
|
+
* An inline arrow's parameter arrives as `never` here, which is the price of an
|
|
69
|
+
* escape hatch that carries no signal-specific knowledge.
|
|
70
|
+
*/
|
|
71
|
+
export interface RawSignalAttributes {
|
|
72
|
+
[key: `on:${string}`]: ((...args: never[]) => unknown) | undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Per-element attributes a JSX dialect needs on top of the GObject properties.
|
|
76
|
+
*
|
|
77
|
+
* `ref` and `children` MUST be real members of the element's own props. Measured:
|
|
78
|
+
* TypeScript unions `JSX.IntrinsicAttributes` into the attributes of a COMPONENT
|
|
79
|
+
* and not of an intrinsic element, so a `ref` that is not declared here is
|
|
80
|
+
* rejected outright (TS2322) — and `children` that is not declared makes every
|
|
81
|
+
* nested element an error (TS2559). `children` must also be OPTIONAL: a required
|
|
82
|
+
* one makes `<gtk-box/>` an error (TS2741).
|
|
83
|
+
*
|
|
84
|
+
* `T` is the widget's own instance type, so `ref={(el) => …}` infers `el` as
|
|
85
|
+
* `Gtk.Box` rather than the `unknown` a DOM renderer settles for.
|
|
86
|
+
*/
|
|
87
|
+
export interface JsxAttributes<T> extends SlotAttribute, RawSignalAttributes {
|
|
88
|
+
children?: ElementChild;
|
|
89
|
+
ref?: T | ((el: T) => void) | undefined;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Per-element attributes for Vue.
|
|
93
|
+
*
|
|
94
|
+
* Deliberately NOT `JsxAttributes`: Vue supplies `ref` and `key` itself through
|
|
95
|
+
* `VNodeProps`, which every registered component's props are intersected with.
|
|
96
|
+
* Declaring our own `ref` would intersect two different `ref` types and could
|
|
97
|
+
* leave the property unusable, so the Vue surface adds only what Vue does not —
|
|
98
|
+
* and `children` is a SLOT in Vue, never a prop.
|
|
99
|
+
*/
|
|
100
|
+
export interface VueAttributes extends SlotAttribute, RawSignalAttributes {
|
|
101
|
+
}
|
|
102
|
+
export {};
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
export interface DiagnosticsGate {
|
|
2
|
-
/** Warning-or-worse messages seen since the last `reset()`. */
|
|
2
|
+
/** Warning-or-worse messages ABOUT THE TREE, seen since the last `reset()`. */
|
|
3
3
|
readonly seen: readonly string[];
|
|
4
|
+
/**
|
|
5
|
+
* Warning-or-worse messages about the HOST's graphics stack, kept apart.
|
|
6
|
+
*
|
|
7
|
+
* Recorded rather than dropped: `assertQuiet` names the count so a run is
|
|
8
|
+
* never quietly forgiven, and a caller that genuinely wants to assert on the
|
|
9
|
+
* environment can read them.
|
|
10
|
+
*/
|
|
11
|
+
readonly environment: readonly string[];
|
|
4
12
|
reset(): void;
|
|
5
|
-
/** Throw if anything was recorded, naming every message. */
|
|
13
|
+
/** Throw if anything about the tree was recorded, naming every message. */
|
|
6
14
|
assertQuiet(context?: string): void;
|
|
7
15
|
}
|
|
16
|
+
/** Whether `message` describes the host's graphics stack rather than the tree. */
|
|
17
|
+
export declare function isEnvironmentDiagnostic(message: string): boolean;
|
|
8
18
|
/**
|
|
9
19
|
* Install the writer func once per process and return the gate.
|
|
10
20
|
*
|
|
@@ -14,4 +24,18 @@ export interface DiagnosticsGate {
|
|
|
14
24
|
* what GLib's default writer does with `G_MESSAGES_DEBUG` unset: message-and-above
|
|
15
25
|
* is printed, info/debug is not.
|
|
16
26
|
*/
|
|
27
|
+
/**
|
|
28
|
+
* What a log record SAYS — and never the empty string.
|
|
29
|
+
*
|
|
30
|
+
* `MESSAGE` is a structured field like any other, and a record is allowed to
|
|
31
|
+
* arrive without one. The first version answered `String(raw ?? '')`, so such a
|
|
32
|
+
* record was counted and then described as nothing: a CI run failed with
|
|
33
|
+
* `GTK reported 1 diagnostic(s) that would have passed at exit 0:` followed by a
|
|
34
|
+
* BLANK LIST, over a test that had just constructed 164 widgets. A gate that can
|
|
35
|
+
* count a failure but not name it sends the reader back to guessing, which is the
|
|
36
|
+
* state this whole module exists to end.
|
|
37
|
+
*
|
|
38
|
+
* So a record with no `MESSAGE` is rendered from the fields it does carry.
|
|
39
|
+
*/
|
|
40
|
+
export declare function describeLogRecord(fields: unknown, decoder?: TextDecoder): string;
|
|
17
41
|
export declare function installDiagnosticsGate(): DiagnosticsGate;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { installDiagnosticsGate, type DiagnosticsGate } from './diagnostics.js';
|
|
1
|
+
export { describeLogRecord, installDiagnosticsGate, isEnvironmentDiagnostic, type DiagnosticsGate, } from './diagnostics.js';
|
|
2
2
|
import type Gtk from '@girs/gtk-4.0';
|
|
3
3
|
import type { ChildPolicy, HostElement, WidgetDescriptor } from '../types.js';
|
|
4
4
|
/** Every method name a policy names, so the check does not have to know the shapes. */
|
|
@@ -22,5 +22,28 @@ export declare function gtkChildren(widget: Gtk.Widget): Gtk.Widget[];
|
|
|
22
22
|
export declare const gtkChildTypes: (widget: Gtk.Widget) => string[];
|
|
23
23
|
/** The addresses a host element's element-children occupy, in shadow order. */
|
|
24
24
|
export declare function addressesOf(el: HostElement): Gtk.Widget[];
|
|
25
|
+
/**
|
|
26
|
+
* First STRICT descendant matching `pred`, breadth-first over the REAL GTK tree.
|
|
27
|
+
*
|
|
28
|
+
* Both showcase probes wrote this, identically. It excludes the root on purpose:
|
|
29
|
+
* every caller is asking "what did the renderer put INSIDE this", and a root that
|
|
30
|
+
* matches its own predicate answers a different question.
|
|
31
|
+
*
|
|
32
|
+
* Breadth-first is not incidental either — `findDescendant(root, w => w instanceof
|
|
33
|
+
* Gtk.Box)` on an Adwaita window finds an INTERNAL box of the header bar before
|
|
34
|
+
* anything the author wrote, which is why a probe that needs a specific widget
|
|
35
|
+
* reaches it through a landmark (a button's `get_parent()`) rather than by type.
|
|
36
|
+
* Measured: with a search-by-type version, authoring `orientation="horizontal"`
|
|
37
|
+
* still printed PROBE: PASS with byte-identical output.
|
|
38
|
+
*/
|
|
39
|
+
export declare function findDescendant(root: Gtk.Widget, pred: (widget: Gtk.Widget) => boolean): Gtk.Widget | null;
|
|
40
|
+
/**
|
|
41
|
+
* Every widget in a subtree, ROOT FIRST and depth-first — GTK's own document order.
|
|
42
|
+
*
|
|
43
|
+
* Depth-first and not breadth-first, because the callers that collect (rather than
|
|
44
|
+
* search) are asserting on ORDER: "the rows land before the counter row" is only a
|
|
45
|
+
* claim about the tree if the walk visits it the way the tree reads.
|
|
46
|
+
*/
|
|
47
|
+
export declare function descendants(root: Gtk.Widget): Gtk.Widget[];
|
|
25
48
|
/** Recursive GType dump — what a devtools tree walk would show. */
|
|
26
49
|
export declare function dumpTree(widget: Gtk.Widget, depth?: number): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Gtk from 'gi://Gtk?version=4.0';
|
|
2
|
+
import type { DiagnosticsGate } from './diagnostics.js';
|
|
3
|
+
/** A tree in the one shape all three adapters can build: tag, props, children. */
|
|
4
|
+
export interface VectorElement {
|
|
5
|
+
readonly tag: string;
|
|
6
|
+
readonly props?: Record<string, unknown>;
|
|
7
|
+
/** A string child is a TEXT NODE — never a bulk `setElementText` write. */
|
|
8
|
+
readonly children?: readonly VectorNode[];
|
|
9
|
+
}
|
|
10
|
+
export type VectorNode = string | VectorElement;
|
|
11
|
+
/** `h('GtkBox', { spacing: 6 }, h('GtkLabel', null, 'hi'))`. */
|
|
12
|
+
export declare const h: (tag: string, props?: Record<string, unknown> | null, ...children: VectorNode[]) => VectorElement;
|
|
13
|
+
export interface VectorMount {
|
|
14
|
+
/**
|
|
15
|
+
* Re-render the SAME tree shape with new props and new text, flushed — Vue's
|
|
16
|
+
* `nextTick`, React's `flushSync`, Solid's synchronous effects.
|
|
17
|
+
*/
|
|
18
|
+
patch(tree: VectorElement): Promise<void>;
|
|
19
|
+
unmount(): void;
|
|
20
|
+
}
|
|
21
|
+
export interface VectorHarness {
|
|
22
|
+
/** Names the describe block, so a failure says which adapter. */
|
|
23
|
+
readonly framework: string;
|
|
24
|
+
/** Mount `tree` into a container the application owns, flushed on return. */
|
|
25
|
+
mount(container: Gtk.Widget, tree: VectorElement): Promise<VectorMount>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Every vector, against one adapter.
|
|
29
|
+
*
|
|
30
|
+
* `gated` rather than a bare `describe`: `@gjsify/unit` keeps ONE
|
|
31
|
+
* `beforeEach`/`afterEach` slot per module and nulls both when a describe returns,
|
|
32
|
+
* so hooks registered outside the block cover exactly one sibling.
|
|
33
|
+
*/
|
|
34
|
+
export declare function runAdapterVectors(harness: VectorHarness, gate: DiagnosticsGate): Promise<void>;
|
|
@@ -1,5 +1,56 @@
|
|
|
1
|
+
import type { GeneratedWidget, WidgetDescriptor } from '../types.js';
|
|
1
2
|
export { GTK_DESCRIPTORS } from './gtk.js';
|
|
2
3
|
export { ADW_DESCRIPTORS } from './adw.js';
|
|
3
|
-
export
|
|
4
|
+
export { GENERATED_PROVENANCE, GENERATED_WIDGETS } from '../generated/widgets.js';
|
|
5
|
+
/**
|
|
6
|
+
* The hand-measured table: every widget whose PLACEMENT RULE is known.
|
|
7
|
+
*
|
|
8
|
+
* Kept separate from `BUILTIN_DESCRIPTORS` because the generator's gates take it
|
|
9
|
+
* as their input. Merging first and then checking would make G1 ("every curated
|
|
10
|
+
* gtype is in the GIR") and G3 ("every method a policy names exists") trivially
|
|
11
|
+
* true — the generated rows come from the GIR by construction and name no method,
|
|
12
|
+
* so a gate fed the merged table would pass while checking nothing.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CURATED_DESCRIPTORS: readonly WidgetDescriptor[];
|
|
15
|
+
/**
|
|
16
|
+
* Construct-only properties a GType ABORTS the process without.
|
|
17
|
+
*
|
|
18
|
+
* Not an exception: `adw_layout_slot_constructed` calls `g_error()`, which is
|
|
19
|
+
* fatal by contract — no catch, no diagnostic, SIGABRT and a core dump. A table
|
|
20
|
+
* that merely LISTS such a tag hands a renderer a way to kill the process, and
|
|
21
|
+
* `descriptorProblems()` cannot see it because it never instantiates anything.
|
|
22
|
+
*
|
|
23
|
+
* MEASURED bare-constructing all 164 generated rows on gjs 1.88.1 / GTK 4.22.4 /
|
|
24
|
+
* libadwaita 1.9.3, resuming past each abort: **163 construct, one does not**, and not a
|
|
25
|
+
* single row throws. So this map is one entry rather than a policy — and
|
|
26
|
+
* `constructsEveryDescriptor` in `generated.spec.ts` is what keeps it one entry.
|
|
27
|
+
*
|
|
28
|
+
* CURATED, like every other placement fact: the GIR says `id` is construct-only
|
|
29
|
+
* and nullable, which is exactly what it says about properties that construct
|
|
30
|
+
* fine. Only running it tells them apart (ADR 0028 § 1).
|
|
31
|
+
*/
|
|
32
|
+
export declare const REQUIRED_CONSTRUCT_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
33
|
+
export declare function mergeGenerated(curated: readonly WidgetDescriptor[], generated: readonly GeneratedWidget[]): WidgetDescriptor[];
|
|
34
|
+
/**
|
|
35
|
+
* Curated placement rules, plus a tag for every other widget in the GIR.
|
|
36
|
+
*
|
|
37
|
+
* The direction is one-way and enforced by shape rather than by review: a
|
|
38
|
+
* `GeneratedWidget` carries no `children`, no `textSink` and no `eventAliases`, so
|
|
39
|
+
* the generator CANNOT contradict a curated descriptor — it can only add a gtype
|
|
40
|
+
* that was not there. A generated-only row gets `children: { kind: 'uncurated' }`,
|
|
41
|
+
* which means the widget can be created, given properties and given handlers,
|
|
42
|
+
* while inserting a child into it raises an error naming the tag that needs a
|
|
43
|
+
* curated policy. Guessing an adder is the one thing not on offer: `add`, `append`
|
|
44
|
+
* and `set_child` all exist somewhere in GTK, and calling the wrong one is a
|
|
45
|
+
* warning at exit 0.
|
|
46
|
+
*/
|
|
47
|
+
export declare const BUILTIN_DESCRIPTORS: readonly WidgetDescriptor[];
|
|
4
48
|
/** Install the built-in table. Idempotent — registration is keyed on the GType name. */
|
|
5
49
|
export declare function registerBuiltinWidgets(): void;
|
|
50
|
+
/** What the shipped table is made of, for a diagnostic or an about box. */
|
|
51
|
+
export declare const tableProvenance: () => {
|
|
52
|
+
gir: "Gtk-4.0 Adw-1";
|
|
53
|
+
curated: number;
|
|
54
|
+
generated: number;
|
|
55
|
+
total: number;
|
|
56
|
+
};
|
package/lib/types/errors.d.ts
CHANGED
|
@@ -16,11 +16,26 @@ export declare class GtkHostError extends Error {
|
|
|
16
16
|
}
|
|
17
17
|
export declare const err: {
|
|
18
18
|
unknownTag: (tag: string) => GtkHostError;
|
|
19
|
+
missingConstructProp: (tag: string, prop: string) => GtkHostError;
|
|
19
20
|
unknownProp: (tag: string, prop: string) => GtkHostError;
|
|
20
21
|
readOnlyProp: (tag: string, prop: string) => GtkHostError;
|
|
21
22
|
badEnum: (tag: string, prop: string, nick: string, gtypeName: string) => GtkHostError;
|
|
22
23
|
unknownSignal: (tag: string, prop: string, signal: string) => GtkHostError;
|
|
23
24
|
signalTaken: (tag: string, prop: string, other: string, signal: string) => GtkHostError;
|
|
25
|
+
/**
|
|
26
|
+
* A DOM event-phase modifier has no GObject translation, so it is named, not guessed.
|
|
27
|
+
*
|
|
28
|
+
* `capture` selects a phase of DOM tree propagation and a GObject signal does not
|
|
29
|
+
* propagate through a tree at all — it is emitted on ONE object. `passive` is a
|
|
30
|
+
* promise not to call `preventDefault`, which no GObject signal has. Kebabing
|
|
31
|
+
* either into the signal name produced `emits no signal "clicked-capture"`, i.e.
|
|
32
|
+
* this host blaming the user's spelling for a concept it simply does not carry.
|
|
33
|
+
*
|
|
34
|
+
* It lived in `signals.ts` as a bare `new GtkHostError` for its whole life, which
|
|
35
|
+
* made this file's claim to BE the list false: the code existed, and the only
|
|
36
|
+
* place that enumerates the codes did not know it.
|
|
37
|
+
*/
|
|
38
|
+
eventModifier: (prop: string, modifier: string) => GtkHostError;
|
|
24
39
|
badString: (tag: string, prop: string, got: string) => GtkHostError;
|
|
25
40
|
badBoolean: (tag: string, prop: string, value: string) => GtkHostError;
|
|
26
41
|
badFlags: (tag: string, prop: string, value: string, gtypeName: string) => GtkHostError;
|
|
@@ -29,5 +44,11 @@ export declare const err: {
|
|
|
29
44
|
unclaimedChild: (parentTag: string, childTag: string) => GtkHostError;
|
|
30
45
|
unknownSlot: (parentTag: string, slot: string, known: string[]) => GtkHostError;
|
|
31
46
|
rejectedChild: (parentTag: string, childTag: string, reason: string) => GtkHostError;
|
|
47
|
+
uncuratedPlacement: (parentTag: string, childTag: string) => GtkHostError;
|
|
48
|
+
siblingCycle: (parentTag: string) => GtkHostError;
|
|
32
49
|
notAWidget: (tag: string) => GtkHostError;
|
|
50
|
+
occupiedSlot: (parentTag: string, childTag: string, setter: string) => GtkHostError;
|
|
51
|
+
notAnElement: (kind: string) => GtkHostError;
|
|
52
|
+
destroyedNode: (tag: string) => GtkHostError;
|
|
53
|
+
notAHostParent: (got: string) => GtkHostError;
|
|
33
54
|
};
|