@gtkx/runtime 2.0.0-beta.1 → 2.0.0-beta.10
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 +43 -40
- package/dist/descriptors.d.ts +2 -1
- package/dist/descriptors.d.ts.map +1 -1
- package/dist/descriptors.js +5 -1
- package/dist/descriptors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +17 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +13 -0
- package/dist/internal.js.map +1 -1
- package/dist/lifecycle.js +1 -1
- package/dist/lifecycle.js.map +1 -1
- package/dist/listeners.d.ts +3 -13
- package/dist/listeners.d.ts.map +1 -1
- package/dist/listeners.js +12 -12
- package/dist/listeners.js.map +1 -1
- package/dist/mixin.d.ts +5 -3
- package/dist/mixin.d.ts.map +1 -1
- package/dist/mixin.js +36 -9
- package/dist/mixin.js.map +1 -1
- package/dist/object.d.ts +14 -3
- package/dist/object.d.ts.map +1 -1
- package/dist/object.js +20 -27
- package/dist/object.js.map +1 -1
- package/dist/properties.d.ts +4 -2
- package/dist/properties.d.ts.map +1 -1
- package/dist/properties.js +69 -16
- package/dist/properties.js.map +1 -1
- package/dist/property-brand.d.ts +5 -0
- package/dist/property-brand.d.ts.map +1 -0
- package/dist/property-brand.js +5 -0
- package/dist/property-brand.js.map +1 -0
- package/dist/register-class.d.ts +102 -20
- package/dist/register-class.d.ts.map +1 -1
- package/dist/register-class.js +19 -37
- package/dist/register-class.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +4 -4
- package/dist/registry.js.map +1 -1
- package/dist/signal-brand.d.ts +12 -0
- package/dist/signal-brand.d.ts.map +1 -0
- package/dist/signal-brand.js +6 -0
- package/dist/signal-brand.js.map +1 -0
- package/dist/signal.d.ts +39 -2
- package/dist/signal.d.ts.map +1 -1
- package/dist/signal.js +75 -5
- package/dist/signal.js.map +1 -1
- package/dist/type.d.ts.map +1 -1
- package/dist/type.js +1 -1
- package/dist/type.js.map +1 -1
- package/dist/value.d.ts +2 -1
- package/dist/value.d.ts.map +1 -1
- package/dist/value.js +28 -7
- package/dist/value.js.map +1 -1
- package/package.json +7 -5
- package/src/descriptors.ts +7 -0
- package/src/index.ts +2 -2
- package/src/internal.ts +42 -0
- package/src/lifecycle.ts +1 -1
- package/src/listeners.ts +21 -26
- package/src/mixin.ts +55 -9
- package/src/object.ts +57 -7
- package/src/properties.ts +94 -17
- package/src/property-brand.ts +5 -0
- package/src/register-class.ts +296 -95
- package/src/registry.ts +4 -4
- package/src/signal-brand.ts +29 -0
- package/src/signal.ts +177 -6
- package/src/type.ts +1 -1
- package/src/value.ts +40 -5
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
<h1 align="center">GTKX</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
The React framework for Linux
|
|
9
|
-
Write native
|
|
10
|
-
Real
|
|
8
|
+
The React framework for Linux.<br />
|
|
9
|
+
Write native GNOME applications with React and TypeScript.
|
|
10
|
+
Real Adwaita and GTK4 widgets with standard web tooling.
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
@@ -38,11 +38,12 @@
|
|
|
38
38
|
|
|
39
39
|
## Demo
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
This app starts with an Adwaita application shell, renders native GTK4 widgets inside it, and uses ordinary React hooks and events:
|
|
42
42
|
|
|
43
43
|
```tsx
|
|
44
44
|
import * as Gtk from "@gtkx/gi/gtk";
|
|
45
|
-
import {
|
|
45
|
+
import { AdwApplication, AdwApplicationWindow, AdwHeaderBar, AdwToolbarView } from "@gtkx/jsx/adw";
|
|
46
|
+
import { GtkBox, GtkButton, GtkLabel } from "@gtkx/jsx/gtk";
|
|
46
47
|
import { createRoot, quit } from "@gtkx/react";
|
|
47
48
|
import { useState } from "react";
|
|
48
49
|
|
|
@@ -50,38 +51,40 @@ const Counter = () => {
|
|
|
50
51
|
const [count, setCount] = useState(0);
|
|
51
52
|
|
|
52
53
|
return (
|
|
53
|
-
<
|
|
54
|
+
<AdwApplicationWindow
|
|
54
55
|
title="Hello GTKX"
|
|
55
56
|
defaultWidth={400}
|
|
56
57
|
defaultHeight={300}
|
|
57
58
|
onCloseRequest={quit}
|
|
58
59
|
>
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
60
|
+
<AdwToolbarView topBar={<AdwHeaderBar />}>
|
|
61
|
+
<GtkBox
|
|
62
|
+
orientation={Gtk.Orientation.VERTICAL}
|
|
63
|
+
spacing={20}
|
|
64
|
+
marginTop={40}
|
|
65
|
+
marginBottom={40}
|
|
66
|
+
marginStart={40}
|
|
67
|
+
marginEnd={40}
|
|
68
|
+
valign={Gtk.Align.CENTER}
|
|
69
|
+
halign={Gtk.Align.CENTER}
|
|
70
|
+
>
|
|
71
|
+
<GtkLabel cssClasses={["title-1"]}>Welcome to GTKX!</GtkLabel>
|
|
72
|
+
<GtkLabel cssClasses={["title-2"]}>{`Count: ${String(count)}`}</GtkLabel>
|
|
73
|
+
<GtkButton
|
|
74
|
+
label="Increment"
|
|
75
|
+
onClicked={() => setCount((c) => c + 1)}
|
|
76
|
+
cssClasses={["suggested-action", "pill"]}
|
|
77
|
+
/>
|
|
78
|
+
</GtkBox>
|
|
79
|
+
</AdwToolbarView>
|
|
80
|
+
</AdwApplicationWindow>
|
|
78
81
|
);
|
|
79
82
|
};
|
|
80
83
|
|
|
81
84
|
const App = () => (
|
|
82
|
-
<
|
|
85
|
+
<AdwApplication>
|
|
83
86
|
<Counter />
|
|
84
|
-
</
|
|
87
|
+
</AdwApplication>
|
|
85
88
|
);
|
|
86
89
|
|
|
87
90
|
createRoot().render(<App />);
|
|
@@ -91,9 +94,9 @@ This is the [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/
|
|
|
91
94
|
|
|
92
95
|
## Why GTKX
|
|
93
96
|
|
|
94
|
-
###
|
|
97
|
+
### Adwaita-first application development
|
|
95
98
|
|
|
96
|
-
|
|
99
|
+
GTKX uses Adwaita as the foundation for applications, windows, navigation, dialogs, and adaptive layouts, with the complete GTK4 toolkit underneath. It adds a declarative React layer and an integrated TypeScript toolchain to the GNOME platform:
|
|
97
100
|
|
|
98
101
|
- a React reconciler that exposes every GObject as a JSX element,
|
|
99
102
|
- a CLI for scaffolding, development, and production builds,
|
|
@@ -102,17 +105,17 @@ GTK4 is mature, and GtkBuilder XML can lay out a static interface, but nothing r
|
|
|
102
105
|
- a Testing Library-style API for querying and driving your widgets in tests,
|
|
103
106
|
- and a Model Context Protocol (MCP) server that exposes your live app to AI agents.
|
|
104
107
|
|
|
105
|
-
###
|
|
108
|
+
### Native GNOME widgets, without a compatibility layer
|
|
106
109
|
|
|
107
|
-
React Native and similar frameworks hide the native toolkit so one API can run everywhere. GTKX
|
|
110
|
+
React Native and similar frameworks hide the native toolkit so one API can run everywhere. GTKX renders real Adwaita and GTK4 widgets and exposes any other GObject-Introspection library on your system. It is GNOME-native and Linux-only by design.
|
|
108
111
|
|
|
109
112
|
### Why Node.js, and why generated bindings
|
|
110
113
|
|
|
111
114
|
GTKX runs on Node.js, which puts native modules, the npm ecosystem, and the tooling built for Node.js APIs within reach. GJS is GNOME's own runtime, built on SpiderMonkey rather than V8; node-gtk runs on Node.js but is lightly maintained, on the older nan/V8 ABI rather than N-API, and still centered on GTK3. The [Why GTKX guide](https://gtkx.dev/guide/why-gtkx) covers what running on Node.js means day to day.
|
|
112
115
|
|
|
113
|
-
GTKX generates the TypeScript types and
|
|
116
|
+
GTKX generates the TypeScript types and native FFI calls from the same GObject-Introspection data, so the types cannot drift from the calls they back. `Adw-1` is the sole default GIR root; its GIR include pulls in `Gtk-4.0`, so codegen covers both complete API surfaces. Neither belongs in a GTKX 2 `libraries` list.
|
|
114
117
|
|
|
115
|
-
At runtime, the native Rust core calls straight into the system
|
|
118
|
+
At runtime, the native Rust core calls straight into the system Adwaita, GTK4, and GLib libraries through libffi, without loading libgirepository at all.
|
|
116
119
|
|
|
117
120
|
## Quick start
|
|
118
121
|
|
|
@@ -121,10 +124,10 @@ GTKX is Linux-only and needs Node.js 26.7 or later. See [Requirements](#requirem
|
|
|
121
124
|
Scaffold a new app with the `create-gtkx` initializer:
|
|
122
125
|
|
|
123
126
|
```sh
|
|
124
|
-
npm create gtkx
|
|
127
|
+
npm create gtkx@beta
|
|
125
128
|
```
|
|
126
129
|
|
|
127
|
-
The same command works with other package managers: `pnpm create gtkx` or `yarn create gtkx`.
|
|
130
|
+
The same command works with other package managers: `pnpm create gtkx@beta` or `yarn create gtkx@beta`.
|
|
128
131
|
|
|
129
132
|
Then run your new app:
|
|
130
133
|
|
|
@@ -145,7 +148,7 @@ The documentation at **[gtkx.dev](https://gtkx.dev)** includes a step-by-step tu
|
|
|
145
148
|
|
|
146
149
|
GTKX is Linux-only. You need:
|
|
147
150
|
|
|
148
|
-
- Linux with the
|
|
151
|
+
- Linux with the Adwaita (1.8 or later), GTK4 (4.20 or later), and GLib development libraries
|
|
149
152
|
- Node.js 26.7 or later
|
|
150
153
|
|
|
151
154
|
The `@gtkx/native` addon ships prebuilt for x64 and arm64 glibc Linux; other targets need to build it from the GTKX repository, which requires a Rust toolchain.
|
|
@@ -154,10 +157,10 @@ The `@gtkx/native` addon ships prebuilt for x64 and arm64 glibc Linux; other tar
|
|
|
154
157
|
|
|
155
158
|
Explore the [example apps](https://github.com/gtkx-org/gtkx/tree/main/examples):
|
|
156
159
|
|
|
157
|
-
- [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world): the counter above.
|
|
158
|
-
- [`gtk-demo`](https://github.com/gtkx-org/gtkx/tree/main/examples/gtk-demo):
|
|
159
|
-
- [`browser`](https://github.com/gtkx-org/gtkx/tree/main/examples/browser):
|
|
160
|
-
- [`animations`](https://github.com/gtkx-org/gtkx/tree/main/examples/animations):
|
|
160
|
+
- [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world): the Adwaita counter above.
|
|
161
|
+
- [`gtk-demo`](https://github.com/gtkx-org/gtkx/tree/main/examples/gtk-demo): the official GTK4 widget showcase in an Adwaita application shell, covering lists, dialogs, gestures, CSS, and OpenGL.
|
|
162
|
+
- [`browser`](https://github.com/gtkx-org/gtkx/tree/main/examples/browser): an Adwaita browser built around `WebKitWebView`.
|
|
163
|
+
- [`animations`](https://github.com/gtkx-org/gtkx/tree/main/examples/animations): an Adwaita showcase for `@gtkx/animated`, with React Spring animations driven by the GTK frame clock.
|
|
161
164
|
- [`navigation`](https://github.com/gtkx-org/gtkx/tree/main/examples/navigation): a tour of `@gtkx/navigation`, React Navigation's stack, tab, and drawer navigators rendered with libadwaita.
|
|
162
165
|
- [`tutorial`](https://github.com/gtkx-org/gtkx/tree/main/examples/tutorial): the Tasks app the documentation builds.
|
|
163
166
|
|
package/dist/descriptors.d.ts
CHANGED
|
@@ -278,6 +278,7 @@ declare const fundamentalLifecycleFor: (typeName: string) => FundamentalLifecycl
|
|
|
278
278
|
declare const fundamentalT: (sharedLibrary: string, refFnName: string, unrefFnName: string, options?: FundamentalOptions) => FundamentalDescriptor;
|
|
279
279
|
/** Builds a descriptor for an array of items in one of the supported container layouts. */
|
|
280
280
|
declare const arrayT: (itemDescriptor: Descriptor, arrayKind?: ArrayKind, ownership?: Ownership, options?: ArrayOptions) => ArrayDescriptor;
|
|
281
|
+
declare const preserveArrayNull: (descriptor: ArrayDescriptor) => ArrayDescriptor;
|
|
281
282
|
/** Builds a descriptor for a `GList` of items. */
|
|
282
283
|
declare const listT: (itemDescriptor: Descriptor, ownership?: Ownership, options?: ArrayOptions) => ArrayDescriptor;
|
|
283
284
|
/** Builds a descriptor for a `GSList` of items. */
|
|
@@ -296,5 +297,5 @@ declare const cursorArrayT: (itemDescriptor: Descriptor, bounds: CursorBounds, o
|
|
|
296
297
|
declare const fixedArrayT: (itemDescriptor: Descriptor, fixedSize: number, ownership?: Ownership, options?: ArrayOptions) => ArrayDescriptor;
|
|
297
298
|
/** Builds a descriptor for a function pointer, marshalling a JavaScript function into a native closure. */
|
|
298
299
|
declare const callbackT: (argDescriptors: Descriptor[], returnDescriptor: Descriptor, options?: CallbackOptions) => CallbackDescriptor;
|
|
299
|
-
export { int8T, uint8T, int16T, uint16T, int32T, uint32T, int64T, uint64T, bigint64T, biguint64T, gtypeT, isGtypeDescriptor, float32T, float64T, booleanT, voidT, unicharT, bufferT, stringT, objectT, refT, hashTableT, enumT, flagsT, boxedT, structT, fundamentalLifecycleFor, fundamentalT, arrayT, listT, slistT, ptrArrayT, gArrayT, byteArrayT, sizedArrayT, fixedArrayT, cursorArrayT, callbackT, type BoxedDescriptor, type ObjectDescriptor, type StructDescriptor, type FundamentalDescriptor, type ArrayDescriptor, type HashTableDescriptor, type CallbackDescriptor, type RefDescriptor, };
|
|
300
|
+
export { int8T, uint8T, int16T, uint16T, int32T, uint32T, int64T, uint64T, bigint64T, biguint64T, gtypeT, isGtypeDescriptor, float32T, float64T, booleanT, voidT, unicharT, bufferT, stringT, objectT, refT, hashTableT, enumT, flagsT, boxedT, structT, fundamentalLifecycleFor, fundamentalT, arrayT, preserveArrayNull, listT, slistT, ptrArrayT, gArrayT, byteArrayT, sizedArrayT, fixedArrayT, cursorArrayT, callbackT, type BoxedDescriptor, type ObjectDescriptor, type StructDescriptor, type FundamentalDescriptor, type ArrayDescriptor, type HashTableDescriptor, type CallbackDescriptor, type RefDescriptor, };
|
|
300
301
|
//# sourceMappingURL=descriptors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desc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AA,MAAM,SAAS,GACX,gBAAgB,UAAU,EAAE,EAC5B,kBAAkB,UAAU,EAC5B,UAAU,eAAe,KAC1B,kBAUF,CAAC;AAEF,OAAO,EACH,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,SAAS,EACT,UAAU,EACV,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,UAAU,EACV,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,uBAAuB,EACvB,YAAY,EACZ,MAAM,EACN,iBAAiB,EACjB,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,UAAU,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,aAAa,GACrB,CAAC"}
|
package/dist/descriptors.js
CHANGED
|
@@ -220,6 +220,10 @@ const arrayT = (itemDescriptor, arrayKind = "array", ownership = "borrowed", opt
|
|
|
220
220
|
}
|
|
221
221
|
return result;
|
|
222
222
|
};
|
|
223
|
+
const preserveArrayNull = (descriptor) => {
|
|
224
|
+
Reflect.set(descriptor, "preserveNull", true);
|
|
225
|
+
return descriptor;
|
|
226
|
+
};
|
|
223
227
|
/** Builds a descriptor for a `GList` of items. */
|
|
224
228
|
const listT = (itemDescriptor, ownership = "borrowed", options = {}) => arrayT(itemDescriptor, "glist", ownership, options);
|
|
225
229
|
/** Builds a descriptor for a `GSList` of items. */
|
|
@@ -268,5 +272,5 @@ const callbackT = (argDescriptors, returnDescriptor, options) => {
|
|
|
268
272
|
applyClosureOptions(result, options);
|
|
269
273
|
return result;
|
|
270
274
|
};
|
|
271
|
-
export { int8T, uint8T, int16T, uint16T, int32T, uint32T, int64T, uint64T, bigint64T, biguint64T, gtypeT, isGtypeDescriptor, float32T, float64T, booleanT, voidT, unicharT, bufferT, stringT, objectT, refT, hashTableT, enumT, flagsT, boxedT, structT, fundamentalLifecycleFor, fundamentalT, arrayT, listT, slistT, ptrArrayT, gArrayT, byteArrayT, sizedArrayT, fixedArrayT, cursorArrayT, callbackT, };
|
|
275
|
+
export { int8T, uint8T, int16T, uint16T, int32T, uint32T, int64T, uint64T, bigint64T, biguint64T, gtypeT, isGtypeDescriptor, float32T, float64T, booleanT, voidT, unicharT, bufferT, stringT, objectT, refT, hashTableT, enumT, flagsT, boxedT, structT, fundamentalLifecycleFor, fundamentalT, arrayT, preserveArrayNull, listT, slistT, ptrArrayT, gArrayT, byteArrayT, sizedArrayT, fixedArrayT, cursorArrayT, callbackT, };
|
|
272
276
|
//# sourceMappingURL=descriptors.js.map
|
package/dist/descriptors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptors.js","sourceRoot":"","sources":["../src/descriptors.ts"],"names":[],"mappings":"AA0LA,wDAAwD;AACxD,MAAM,KAAK,GAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/C,yDAAyD;AACzD,MAAM,MAAM,GAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAClD,yDAAyD;AACzD,MAAM,MAAM,GAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAClD,0DAA0D;AAC1D,MAAM,OAAO,GAAqB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACrD,yDAAyD;AACzD,MAAM,MAAM,GAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAClD,0DAA0D;AAC1D,MAAM,OAAO,GAAqB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACrD,kGAAkG;AAClG,MAAM,MAAM,GAAoB,EAAE,IAAI,EAA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ACP,SAAS,EACT,UAAU,EACV,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,UAAU,EACV,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,uBAAuB,EACvB,YAAY,EACZ,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,UAAU,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,GASZ,CAAC","sourcesContent":["import type { ArrayKind, Descriptor, Ownership } from \"@gtkx/native\";\nimport type { AnyClass } from \"@gtkx/utils\";\n\n/** Descriptor variant for a `gint8`. */\ntype Int8Descriptor = Extract<Descriptor, { kind: \"int8\" }>;\n/** Descriptor variant for a `guint8`. */\ntype Uint8Descriptor = Extract<Descriptor, { kind: \"uint8\" }>;\n/** Descriptor variant for a `gint16`. */\ntype Int16Descriptor = Extract<Descriptor, { kind: \"int16\" }>;\n/** Descriptor variant for a `guint16`. */\ntype Uint16Descriptor = Extract<Descriptor, { kind: \"uint16\" }>;\n/** Descriptor variant for a `gint32`. */\ntype Int32Descriptor = Extract<Descriptor, { kind: \"int32\" }>;\n/** Descriptor variant for a `guint32`. */\ntype Uint32Descriptor = Extract<Descriptor, { kind: \"uint32\" }>;\n/** Descriptor variant for a `gint64` marshalled as a number. */\ntype Int64Descriptor = Extract<Descriptor, { kind: \"int64\" }>;\n/** Descriptor variant for a `guint64` marshalled as a number. */\ntype Uint64Descriptor = Extract<Descriptor, { kind: \"uint64\" }>;\n/** Descriptor variant for a `gint64` marshalled as a bigint. */\ntype BigInt64Descriptor = Extract<Descriptor, { kind: \"bigint64\" }>;\n/** Descriptor variant for a `guint64` marshalled as a bigint. */\ntype BigUint64Descriptor = Extract<Descriptor, { kind: \"biguint64\" }>;\n/** Descriptor variant for a `gfloat`. */\ntype Float32Descriptor = Extract<Descriptor, { kind: \"float32\" }>;\n/** Descriptor variant for a `gdouble`. */\ntype Float64Descriptor = Extract<Descriptor, { kind: \"float64\" }>;\n/** Descriptor variant for an enumeration, carrying the library and `get_type` symbol its GType comes from. */\ntype EnumDescriptor = Extract<Descriptor, { kind: \"enum\" }>;\n/** Descriptor variant for a flags type, carrying the library and `get_type` symbol its GType comes from. */\ntype FlagsDescriptor = Extract<Descriptor, { kind: \"flags\" }>;\n/** Descriptor variant for a `gboolean`. */\ntype BooleanDescriptor = Extract<Descriptor, { kind: \"boolean\" }>;\n/** Descriptor variant for a C string. */\ntype StringDescriptor = Extract<Descriptor, { kind: \"string\" }>;\n\n/** Descriptor variant for a `GObject`, extended with the statically declared type of its value. */\ntype ObjectDescriptor = Extract<Descriptor, { kind: \"object\" }> & {\n /** Retains and supplies the declared wrapper when no more-derived wrapper is registered. */\n fallbackClass?: () => AnyClass;\n};\n\n/** Descriptor variant for a `gunichar`. */\ntype UnicharDescriptor = Extract<Descriptor, { kind: \"unichar\" }>;\n/** Descriptor variant for the absence of a value. */\ntype VoidDescriptor = Extract<Descriptor, { kind: \"void\" }>;\n/** Descriptor variant for an opaque `gpointer`. */\ntype BufferDescriptor = Extract<Descriptor, { kind: \"buffer\" }>;\n\n/** Descriptor variant for a `GBoxed` value, extended with the statically declared type of its value. */\ntype BoxedDescriptor = Extract<Descriptor, { kind: \"boxed\" }> & {\n /** Retains and supplies the declared wrapper when none is registered. */\n fallbackClass?: () => AnyClass;\n};\n\n/** Descriptor variant for a plain C struct, extended with the class its decoded value is wrapped in. */\ntype StructDescriptor = Extract<Descriptor, { kind: \"struct\" }> & {\n /** Class a decoded value is wrapped in; without it the wrapper comes from the value's own GType. */\n wrapperClass?: AnyClass;\n};\n\n/** Descriptor variant for a ref-counted fundamental type, extended with the class its decoded value is wrapped in. */\ntype FundamentalDescriptor = Extract<Descriptor, { kind: \"fundamental\" }> & {\n /** Class a decoded value is wrapped in; without it the wrapper comes from the type named by `typeName`. */\n wrapperClass?: AnyClass;\n /** Retains and supplies the declared wrapper after checking the runtime-type registry. */\n fallbackClass?: () => AnyClass;\n};\n\n/** Descriptor variant for an array of items in one of the supported container layouts. */\ntype ArrayDescriptor = Extract<Descriptor, { kind: \"array\" }>;\n/** Descriptor variant for a `GHashTable`, marshalled as an array of key/value pairs. */\ntype HashTableDescriptor = Extract<Descriptor, { kind: \"hashtable\" }>;\n/** Descriptor variant for a function pointer a JavaScript function is marshalled into. */\ntype CallbackDescriptor = Extract<Descriptor, { kind: \"callback\" }>;\n/** Descriptor variant for a pointer to another descriptor's value, for an output or inout argument. */\ntype RefDescriptor = Extract<Descriptor, { kind: \"ref\" }>;\n\n/** Descriptor for a `GType`: a `guint64` marked so it resolves to `G_TYPE_GTYPE` rather than an integer. */\ntype TypeDescriptor = BigUint64Descriptor & {\n /** Distinguishes a GType from a plain `guint64` when the GLib type and the GValue type are resolved. */\n type: true;\n};\n\n/** How a boxed value is stored, and where its GType and free function are resolved from. */\ntype BoxedOptions = {\n /** The caller owns the storage the callee fills, so a decoded value is borrowed instead of copied. */\n isCallerAllocated?: boolean;\n /** The value is embedded in the containing struct rather than reached through a pointer. */\n isInline?: boolean;\n /** Whether a decoded value is owned by the caller; defaults to `\"borrowed\"`. */\n ownership?: Ownership;\n /** Library `getTypeFnName` and `freeFnName` are resolved in. */\n sharedLibrary?: string;\n /** Symbol returning the boxed GType, used when the type is not already registered under its name. */\n getTypeFnName?: string;\n /** Symbol that frees the value, for a boxed type with no GType of its own. */\n freeFnName?: string;\n /** Byte size of the value, needed to copy it into an inline field. */\n size?: number;\n /** Returns the wrapper class of the declared type, used when none is registered for the GType. */\n fallbackClass?: () => AnyClass;\n};\n\n/** Callback result, closure ownership, and lifetime options. */\ntype CallbackOptions = {\n /** The callee also takes a destroy notify, which frees the closure once it is done with it. */\n hasDestroy?: boolean;\n /** Signature of that destroy notify; defaults to `destroyNotify`, a one-argument `GDestroyNotify`. */\n destroyKind?: CallbackDescriptor[\"destroyKind\"];\n /** The callee also takes a `user_data` pointer; without one the closure can never be freed. */\n hasUserData?: boolean;\n /** Position of `user_data` among the callback's own arguments, dropped before the closure is called. */\n userDataIndex?: number;\n /** Converts a thrown value to the callback's trailing `GError**`. */\n canThrow?: boolean;\n /** Lifetime of the closure; defaults to `notified` when `hasDestroy` is set and `call` otherwise. */\n scope?: CallbackDescriptor[\"scope\"];\n};\n\n/** The lengths and strides a C array layout needs beyond its element type. */\ntype ArrayOptions = {\n /** Stride in bytes between elements stored inline in the array. */\n elementSize?: number | undefined;\n /** Position of the argument whose buffer a cursor array points into. */\n baseParamIndex?: number | undefined;\n /** Position of the argument carrying the element count, for a length-bounded array. */\n sizeParamIndex?: number | undefined;\n /** Element count of a fixed-length array. */\n fixedSize?: number | undefined;\n /** Whether the array carries raw bytes, and so decodes to a `Uint8Array` rather than to numbers. */\n isBytes?: boolean | undefined;\n /** Allocates and decodes caller-owned storage for a fixed-length out array. */\n isCallerAllocated?: boolean | undefined;\n /** Adds a zero element after the declared length. */\n isZeroTerminated?: boolean | undefined;\n};\n\n/** Where a cursor array's base buffer and total length come from. */\ntype CursorBounds = {\n /** Position of the argument holding the buffer the cursor points into. */\n baseParamIndex: number;\n /** Position of the argument carrying that buffer's element count. */\n sizeParamIndex: number;\n};\n\n/** How a ref-counted fundamental value is named, wrapped and stored. */\ntype FundamentalOptions = {\n /** Whether a decoded value is owned by the caller; defaults to `\"borrowed\"`. */\n ownership?: Ownership;\n /** GLib type name the wrapper class is looked up by. */\n typeName?: string;\n /** Class a decoded value is wrapped in, instead of the one registered for `typeName`. */\n wrapperClass?: AnyClass;\n /** Returns the wrapper class of the declared type, used when none is registered for the value's type. */\n fallbackClass?: () => AnyClass;\n /** The caller owns the storage the callee fills, so a decoded value is borrowed instead of acquired. */\n isCallerAllocated?: boolean;\n /** The value is embedded in the containing struct rather than reached through a pointer. */\n isInline?: boolean;\n};\n\ntype FundamentalLifecycle = {\n sharedLibrary: string;\n refFnName: string;\n unrefFnName: string;\n};\n\n/** How a plain C struct is stored and wrapped. */\ntype StructOptions = {\n /** The caller owns the storage the callee fills, so a decoded value is borrowed instead of copied. */\n isCallerAllocated?: boolean;\n /** The value is embedded in the containing struct rather than reached through a pointer. */\n isInline?: boolean;\n /** Byte size of the struct, needed to copy it rather than borrow the pointer. */\n size?: number;\n /** Class a decoded value is wrapped in, instead of the one registered for its GType. */\n wrapperClass?: AnyClass;\n /** Library the struct's declared copy and free functions are resolved from; without it neither is used. */\n sharedLibrary?: string;\n /** Function duplicating an instance, used instead of a byte copy when the struct declares one. */\n copyFnName?: string;\n /** Function releasing an instance, used instead of `g_free` when the struct declares one. */\n freeFnName?: string;\n};\n\n/** Descriptor for a `gint8`, marshalled as a number. */\nconst int8T: Int8Descriptor = { kind: \"int8\" };\n/** Descriptor for a `guint8`, marshalled as a number. */\nconst uint8T: Uint8Descriptor = { kind: \"uint8\" };\n/** Descriptor for a `gint16`, marshalled as a number. */\nconst int16T: Int16Descriptor = { kind: \"int16\" };\n/** Descriptor for a `guint16`, marshalled as a number. */\nconst uint16T: Uint16Descriptor = { kind: \"uint16\" };\n/** Descriptor for a `gint32`, marshalled as a number. */\nconst int32T: Int32Descriptor = { kind: \"int32\" };\n/** Descriptor for a `guint32`, marshalled as a number. */\nconst uint32T: Uint32Descriptor = { kind: \"uint32\" };\n/** Descriptor for a `gint64`, marshalled as a number and rejected outside the 2^53 safe range. */\nconst int64T: Int64Descriptor = { kind: \"int64\" };\n/** Descriptor for a `guint64`, marshalled as a number and rejected outside the 2^53 safe range. */\nconst uint64T: Uint64Descriptor = { kind: \"uint64\" };\n/** Descriptor for a `gint64`, marshalled as a bigint so the full 64-bit range survives. */\nconst bigint64T: BigInt64Descriptor = { kind: \"bigint64\" };\n/** Descriptor for a `guint64`, marshalled as a bigint so the full 64-bit range survives. */\nconst biguint64T: BigUint64Descriptor = { kind: \"biguint64\" };\n/** Descriptor for a `GType`, marshalled as a bigint and recognized as a GType by GValue conversion. */\nconst gtypeT: TypeDescriptor = { kind: \"biguint64\", type: true };\n/** Descriptor for a `gfloat`. */\nconst float32T: Float32Descriptor = { kind: \"float32\" };\n/** Descriptor for a `gdouble`. */\nconst float64T: Float64Descriptor = { kind: \"float64\" };\n/** Descriptor for a `gboolean`, marshalled as a JavaScript boolean. */\nconst booleanT: BooleanDescriptor = { kind: \"boolean\" };\n/** Descriptor for the absence of a value, used as the return descriptor of a `void` function. */\nconst voidT: VoidDescriptor = { kind: \"void\" };\n/** Descriptor for a `gunichar`, marshalled as a single-character string or a codepoint number. */\nconst unicharT: UnicharDescriptor = { kind: \"unichar\" };\n/** Descriptor for an opaque `gpointer`, taken from a typed array's memory or a numeric address. */\nconst bufferT: BufferDescriptor = { kind: \"buffer\" };\nconst fundamentalLifecycles: Map<string, FundamentalLifecycle> = new Map();\n\nconst isGtypeDescriptor = (descriptor: Descriptor): descriptor is TypeDescriptor =>\n descriptor.kind === \"biguint64\" && \"type\" in descriptor;\n\n/** Builds a C-string descriptor, including optional buffer length and record-owned storage. */\nconst stringT = (\n ownership: Ownership = \"borrowed\",\n length?: number,\n hasOwnedStorage?: boolean,\n): StringDescriptor => {\n const result: StringDescriptor = { kind: \"string\", ownership };\n\n if (length !== undefined) {\n result.length = length;\n }\n\n if (hasOwnedStorage === true) {\n result.hasOwnedStorage = true;\n }\n\n return result;\n};\n\n/** Builds a runtime-typed `GObject` descriptor with an optional retained fallback class. */\nconst objectT = (\n ownership: Ownership = \"borrowed\",\n fallbackClass?: () => AnyClass,\n typeName?: string,\n): ObjectDescriptor => {\n const result: ObjectDescriptor = { kind: \"object\", ownership };\n\n if (fallbackClass !== undefined) {\n result.fallbackClass = fallbackClass;\n }\n\n if (typeName !== undefined) {\n result.typeName = typeName;\n }\n\n return result;\n};\n\n/** Wraps a descriptor in a pointer to it, for an output or inout argument. */\nconst refT = (innerDescriptor: Descriptor, isInout = false): RefDescriptor =>\n isInout ? { kind: \"ref\", innerDescriptor, inout: true } : { kind: \"ref\", innerDescriptor };\n\n/** Builds a descriptor for a `GHashTable`, marshalled as an array of key/value pairs. */\nconst hashTableT = (\n keyDescriptor: Descriptor,\n valueDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n): HashTableDescriptor => ({\n kind: \"hashtable\",\n keyDescriptor,\n valueDescriptor,\n ownership,\n});\n\n/** Builds an enum descriptor from a GType function or an explicit set of members. */\nconst enumT = (\n sharedLibrary: string,\n typeFnName: string,\n isSigned: boolean,\n members?: number[],\n): EnumDescriptor => {\n const result: EnumDescriptor = {\n kind: \"enum\",\n sharedLibrary,\n getTypeFnName: typeFnName,\n isSigned,\n };\n\n if (members !== undefined) {\n result.members = members;\n }\n\n return result;\n};\n\n/** Builds a flags descriptor from a GType function or an explicit bit mask. */\nconst flagsT = (sharedLibrary: string, typeFnName: string, isSigned: boolean, mask?: number): FlagsDescriptor => {\n const result: FlagsDescriptor = {\n kind: \"flags\",\n sharedLibrary,\n getTypeFnName: typeFnName,\n isSigned,\n };\n\n if (mask !== undefined) {\n result.mask = mask;\n }\n\n return result;\n};\n\nconst applyBoxedNames = (result: BoxedDescriptor, options: BoxedOptions): void => {\n if (options.sharedLibrary !== undefined) {\n result.sharedLibrary = options.sharedLibrary;\n }\n\n if (options.getTypeFnName !== undefined) {\n result.getTypeFnName = options.getTypeFnName;\n }\n\n if (options.freeFnName !== undefined) {\n result.freeFnName = options.freeFnName;\n }\n};\n\nconst applyBoxedOptions = (result: BoxedDescriptor, options: BoxedOptions): void => {\n applyBoxedNames(result, options);\n\n if (options.fallbackClass !== undefined) {\n result.fallbackClass = options.fallbackClass;\n }\n\n if (options.isCallerAllocated) {\n result.isCallerAllocated = true;\n }\n\n if (options.isInline) {\n result.isInline = true;\n }\n\n if (options.size !== undefined) {\n result.size = options.size;\n }\n};\n\n/** Builds a descriptor for a `GBoxed` value of the named type. */\nconst boxedT = (typeName: string, options: BoxedOptions = {}): BoxedDescriptor => {\n const result: BoxedDescriptor = {\n kind: \"boxed\",\n ownership: options.ownership ?? \"borrowed\",\n typeName,\n };\n\n applyBoxedOptions(result, options);\n\n return result;\n};\n\nconst applyStructLifecycle = (result: StructDescriptor, options: StructOptions): void => {\n if (options.sharedLibrary === undefined) {\n return;\n }\n\n result.sharedLibrary = options.sharedLibrary;\n\n if (options.copyFnName !== undefined) {\n result.copyFnName = options.copyFnName;\n }\n\n if (options.freeFnName !== undefined) {\n result.freeFnName = options.freeFnName;\n }\n};\n\n/** Builds a descriptor for a plain C struct. */\nconst structT = (ownership: Ownership = \"borrowed\", options: StructOptions = {}): StructDescriptor => {\n const result: StructDescriptor = { kind: \"struct\", ownership };\n\n if (options.size !== undefined) {\n result.size = options.size;\n }\n\n if (options.wrapperClass !== undefined) {\n result.wrapperClass = options.wrapperClass;\n }\n\n if (options.isCallerAllocated) {\n result.isCallerAllocated = true;\n }\n\n if (options.isInline) {\n result.isInline = true;\n }\n\n applyStructLifecycle(result, options);\n\n return result;\n};\n\nconst recordFundamentalLifecycle = (typeName: string, lifecycle: FundamentalLifecycle): void => {\n if (!fundamentalLifecycles.has(typeName)) {\n fundamentalLifecycles.set(typeName, lifecycle);\n }\n};\n\nconst fundamentalLifecycleFor = (typeName: string): FundamentalLifecycle | undefined =>\n fundamentalLifecycles.get(typeName);\n\nconst applyFundamentalClasses = (result: FundamentalDescriptor, options: FundamentalOptions): void => {\n if (options.wrapperClass !== undefined) {\n result.wrapperClass = options.wrapperClass;\n }\n\n if (options.fallbackClass !== undefined) {\n result.fallbackClass = options.fallbackClass;\n }\n};\n\n/** Builds a descriptor for a fundamental type whose lifetime is managed by named ref and unref functions. */\nconst fundamentalT = (\n sharedLibrary: string,\n refFnName: string,\n unrefFnName: string,\n options: FundamentalOptions = {},\n): FundamentalDescriptor => {\n const ownership = options.ownership ?? \"borrowed\";\n const result: FundamentalDescriptor = { kind: \"fundamental\", ownership, sharedLibrary, refFnName, unrefFnName };\n\n if (options.typeName !== undefined) {\n result.typeName = options.typeName;\n recordFundamentalLifecycle(options.typeName, { sharedLibrary, refFnName, unrefFnName });\n }\n\n applyFundamentalClasses(result, options);\n\n if (options.isCallerAllocated) {\n result.isCallerAllocated = true;\n }\n\n if (options.isInline) {\n result.isInline = true;\n }\n\n return result;\n};\n\nconst applyArrayBounds = (result: ArrayDescriptor, options: ArrayOptions): void => {\n if (options.baseParamIndex !== undefined) {\n result.baseParamIndex = options.baseParamIndex;\n }\n\n if (options.sizeParamIndex !== undefined) {\n result.sizeParamIndex = options.sizeParamIndex;\n }\n\n if (options.fixedSize !== undefined) {\n result.fixedSize = options.fixedSize;\n }\n};\n\n/** Builds a descriptor for an array of items in one of the supported container layouts. */\nconst arrayT = (\n itemDescriptor: Descriptor,\n arrayKind: ArrayKind = \"array\",\n ownership: Ownership = \"borrowed\",\n options?: ArrayOptions,\n): ArrayDescriptor => {\n const result: ArrayDescriptor = { kind: \"array\", itemDescriptor, arrayKind, ownership };\n\n if (options === undefined) {\n return result;\n }\n\n applyArrayBounds(result, options);\n\n if (options.elementSize !== undefined) {\n result.elementSize = options.elementSize;\n }\n\n if (options.isBytes === true) {\n result.isBytes = true;\n }\n\n if (options.isCallerAllocated === true) {\n result.isCallerAllocated = true;\n }\n\n if (options.isZeroTerminated === true) {\n result.isZeroTerminated = true;\n }\n\n return result;\n};\n\n/** Builds a descriptor for a `GList` of items. */\nconst listT = (\n itemDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"glist\", ownership, options);\n\n/** Builds a descriptor for a `GSList` of items. */\nconst slistT = (\n itemDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"gslist\", ownership, options);\n\n/** Builds a descriptor for a `GPtrArray` of items. */\nconst ptrArrayT = (\n itemDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"gptrarray\", ownership, options);\n\n/** Builds a descriptor for a `GArray` of items. */\nconst gArrayT = (\n itemDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"garray\", ownership, options);\n\n/** Builds a descriptor for a `GByteArray`. */\nconst byteArrayT = (ownership: Ownership = \"borrowed\"): ArrayDescriptor =>\n arrayT(uint8T, \"gbytearray\", ownership, { isBytes: true });\n\n/** Builds a descriptor for a C array whose length is carried by another argument. */\nconst sizedArrayT = (\n itemDescriptor: Descriptor,\n sizeParamIndex: number,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"sized\", ownership, { ...options, sizeParamIndex });\n\n/** Builds an out-array cursor into another argument's buffer. */\nconst cursorArrayT = (\n itemDescriptor: Descriptor,\n bounds: CursorBounds,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"cursor\", ownership, { ...options, ...bounds });\n\n/** Builds a descriptor for a C array of a fixed length. */\nconst fixedArrayT = (\n itemDescriptor: Descriptor,\n fixedSize: number,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"fixed\", ownership, { ...options, fixedSize });\n\nconst applyClosureLifetimeOptions = (result: CallbackDescriptor, options: CallbackOptions): void => {\n if (options.hasDestroy !== undefined) {\n result.hasDestroy = options.hasDestroy;\n }\n\n if (options.destroyKind !== undefined) {\n result.destroyKind = options.destroyKind;\n }\n\n if (options.scope !== undefined) {\n result.scope = options.scope;\n }\n};\n\nconst applyClosureOptions = (result: CallbackDescriptor, options: CallbackOptions): void => {\n applyClosureLifetimeOptions(result, options);\n\n if (options.hasUserData !== undefined) {\n result.hasUserData = options.hasUserData;\n }\n\n if (options.userDataIndex !== undefined) {\n result.userDataIndex = options.userDataIndex;\n }\n\n if (options.canThrow !== undefined) {\n result.canThrow = options.canThrow;\n }\n};\n\n/** Builds a descriptor for a function pointer, marshalling a JavaScript function into a native closure. */\nconst callbackT = (\n argDescriptors: Descriptor[],\n returnDescriptor: Descriptor,\n options?: CallbackOptions,\n): CallbackDescriptor => {\n const result: CallbackDescriptor = { kind: \"callback\", argDescriptors, returnDescriptor };\n\n if (options === undefined) {\n return result;\n }\n\n applyClosureOptions(result, options);\n\n return result;\n};\n\nexport {\n int8T,\n uint8T,\n int16T,\n uint16T,\n int32T,\n uint32T,\n int64T,\n uint64T,\n bigint64T,\n biguint64T,\n gtypeT,\n isGtypeDescriptor,\n float32T,\n float64T,\n booleanT,\n voidT,\n unicharT,\n bufferT,\n stringT,\n objectT,\n refT,\n hashTableT,\n enumT,\n flagsT,\n boxedT,\n structT,\n fundamentalLifecycleFor,\n fundamentalT,\n arrayT,\n listT,\n slistT,\n ptrArrayT,\n gArrayT,\n byteArrayT,\n sizedArrayT,\n fixedArrayT,\n cursorArrayT,\n callbackT,\n type BoxedDescriptor,\n type ObjectDescriptor,\n type StructDescriptor,\n type FundamentalDescriptor,\n type ArrayDescriptor,\n type HashTableDescriptor,\n type CallbackDescriptor,\n type RefDescriptor,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"descriptors.js","sourceRoot":"","sources":["../src/descriptors.ts"],"names":[],"mappings":"AA0LA,wDAAwD;AACxD,MAAM,KAAK,GAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/C,yDAAyD;AACzD,MAAM,MAAM,GAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAClD,yDAAyD;AACzD,MAAM,MAAM,GAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAClD,0DAA0D;AAC1D,MAAM,OAAO,GAAqB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACrD,yDAAyD;AACzD,MAAM,MAAM,GAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAClD,0DAA0D;AAC1D,MAAM,OAAO,GAAqB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACrD,kGAAkG;AAClG,MAAM,M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AAC;IAED,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAErC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,EACH,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,SAAS,EACT,UAAU,EACV,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,UAAU,EACV,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,uBAAuB,EACvB,YAAY,EACZ,MAAM,EACN,iBAAiB,EACjB,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,UAAU,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,GASZ,CAAC","sourcesContent":["import type { ArrayKind, Descriptor, Ownership } from \"@gtkx/native\";\nimport type { AnyClass } from \"@gtkx/utils\";\n\n/** Descriptor variant for a `gint8`. */\ntype Int8Descriptor = Extract<Descriptor, { kind: \"int8\" }>;\n/** Descriptor variant for a `guint8`. */\ntype Uint8Descriptor = Extract<Descriptor, { kind: \"uint8\" }>;\n/** Descriptor variant for a `gint16`. */\ntype Int16Descriptor = Extract<Descriptor, { kind: \"int16\" }>;\n/** Descriptor variant for a `guint16`. */\ntype Uint16Descriptor = Extract<Descriptor, { kind: \"uint16\" }>;\n/** Descriptor variant for a `gint32`. */\ntype Int32Descriptor = Extract<Descriptor, { kind: \"int32\" }>;\n/** Descriptor variant for a `guint32`. */\ntype Uint32Descriptor = Extract<Descriptor, { kind: \"uint32\" }>;\n/** Descriptor variant for a `gint64` marshalled as a number. */\ntype Int64Descriptor = Extract<Descriptor, { kind: \"int64\" }>;\n/** Descriptor variant for a `guint64` marshalled as a number. */\ntype Uint64Descriptor = Extract<Descriptor, { kind: \"uint64\" }>;\n/** Descriptor variant for a `gint64` marshalled as a bigint. */\ntype BigInt64Descriptor = Extract<Descriptor, { kind: \"bigint64\" }>;\n/** Descriptor variant for a `guint64` marshalled as a bigint. */\ntype BigUint64Descriptor = Extract<Descriptor, { kind: \"biguint64\" }>;\n/** Descriptor variant for a `gfloat`. */\ntype Float32Descriptor = Extract<Descriptor, { kind: \"float32\" }>;\n/** Descriptor variant for a `gdouble`. */\ntype Float64Descriptor = Extract<Descriptor, { kind: \"float64\" }>;\n/** Descriptor variant for an enumeration, carrying the library and `get_type` symbol its GType comes from. */\ntype EnumDescriptor = Extract<Descriptor, { kind: \"enum\" }>;\n/** Descriptor variant for a flags type, carrying the library and `get_type` symbol its GType comes from. */\ntype FlagsDescriptor = Extract<Descriptor, { kind: \"flags\" }>;\n/** Descriptor variant for a `gboolean`. */\ntype BooleanDescriptor = Extract<Descriptor, { kind: \"boolean\" }>;\n/** Descriptor variant for a C string. */\ntype StringDescriptor = Extract<Descriptor, { kind: \"string\" }>;\n\n/** Descriptor variant for a `GObject`, extended with the statically declared type of its value. */\ntype ObjectDescriptor = Extract<Descriptor, { kind: \"object\" }> & {\n /** Retains and supplies the declared wrapper when no more-derived wrapper is registered. */\n fallbackClass?: () => AnyClass;\n};\n\n/** Descriptor variant for a `gunichar`. */\ntype UnicharDescriptor = Extract<Descriptor, { kind: \"unichar\" }>;\n/** Descriptor variant for the absence of a value. */\ntype VoidDescriptor = Extract<Descriptor, { kind: \"void\" }>;\n/** Descriptor variant for an opaque `gpointer`. */\ntype BufferDescriptor = Extract<Descriptor, { kind: \"buffer\" }>;\n\n/** Descriptor variant for a `GBoxed` value, extended with the statically declared type of its value. */\ntype BoxedDescriptor = Extract<Descriptor, { kind: \"boxed\" }> & {\n /** Retains and supplies the declared wrapper when none is registered. */\n fallbackClass?: () => AnyClass;\n};\n\n/** Descriptor variant for a plain C struct, extended with the class its decoded value is wrapped in. */\ntype StructDescriptor = Extract<Descriptor, { kind: \"struct\" }> & {\n /** Class a decoded value is wrapped in; without it the wrapper comes from the value's own GType. */\n wrapperClass?: AnyClass;\n};\n\n/** Descriptor variant for a ref-counted fundamental type, extended with the class its decoded value is wrapped in. */\ntype FundamentalDescriptor = Extract<Descriptor, { kind: \"fundamental\" }> & {\n /** Class a decoded value is wrapped in; without it the wrapper comes from the type named by `typeName`. */\n wrapperClass?: AnyClass;\n /** Retains and supplies the declared wrapper after checking the runtime-type registry. */\n fallbackClass?: () => AnyClass;\n};\n\n/** Descriptor variant for an array of items in one of the supported container layouts. */\ntype ArrayDescriptor = Extract<Descriptor, { kind: \"array\" }>;\n/** Descriptor variant for a `GHashTable`, marshalled as an array of key/value pairs. */\ntype HashTableDescriptor = Extract<Descriptor, { kind: \"hashtable\" }>;\n/** Descriptor variant for a function pointer a JavaScript function is marshalled into. */\ntype CallbackDescriptor = Extract<Descriptor, { kind: \"callback\" }>;\n/** Descriptor variant for a pointer to another descriptor's value, for an output or inout argument. */\ntype RefDescriptor = Extract<Descriptor, { kind: \"ref\" }>;\n\n/** Descriptor for a `GType`: a `guint64` marked so it resolves to `G_TYPE_GTYPE` rather than an integer. */\ntype TypeDescriptor = BigUint64Descriptor & {\n /** Distinguishes a GType from a plain `guint64` when the GLib type and the GValue type are resolved. */\n type: true;\n};\n\n/** How a boxed value is stored, and where its GType and free function are resolved from. */\ntype BoxedOptions = {\n /** The caller owns the storage the callee fills, so a decoded value is borrowed instead of copied. */\n isCallerAllocated?: boolean;\n /** The value is embedded in the containing struct rather than reached through a pointer. */\n isInline?: boolean;\n /** Whether a decoded value is owned by the caller; defaults to `\"borrowed\"`. */\n ownership?: Ownership;\n /** Library `getTypeFnName` and `freeFnName` are resolved in. */\n sharedLibrary?: string;\n /** Symbol returning the boxed GType, used when the type is not already registered under its name. */\n getTypeFnName?: string;\n /** Symbol that frees the value, for a boxed type with no GType of its own. */\n freeFnName?: string;\n /** Byte size of the value, needed to copy it into an inline field. */\n size?: number;\n /** Returns the wrapper class of the declared type, used when none is registered for the GType. */\n fallbackClass?: () => AnyClass;\n};\n\n/** Callback result, closure ownership, and lifetime options. */\ntype CallbackOptions = {\n /** The callee also takes a destroy notify, which frees the closure once it is done with it. */\n hasDestroy?: boolean;\n /** Signature of that destroy notify; defaults to `destroyNotify`, a one-argument `GDestroyNotify`. */\n destroyKind?: CallbackDescriptor[\"destroyKind\"];\n /** The callee also takes a `user_data` pointer; without one the closure can never be freed. */\n hasUserData?: boolean;\n /** Position of `user_data` among the callback's own arguments, dropped before the closure is called. */\n userDataIndex?: number;\n /** Converts a thrown value to the callback's trailing `GError**`. */\n canThrow?: boolean;\n /** Lifetime of the closure; defaults to `notified` when `hasDestroy` is set and `call` otherwise. */\n scope?: CallbackDescriptor[\"scope\"];\n};\n\n/** The lengths and strides a C array layout needs beyond its element type. */\ntype ArrayOptions = {\n /** Stride in bytes between elements stored inline in the array. */\n elementSize?: number | undefined;\n /** Position of the argument whose buffer a cursor array points into. */\n baseParamIndex?: number | undefined;\n /** Position of the argument carrying the element count, for a length-bounded array. */\n sizeParamIndex?: number | undefined;\n /** Element count of a fixed-length array. */\n fixedSize?: number | undefined;\n /** Whether the array carries raw bytes, and so decodes to a `Uint8Array` rather than to numbers. */\n isBytes?: boolean | undefined;\n /** Allocates and decodes caller-owned storage for a fixed-length out array. */\n isCallerAllocated?: boolean | undefined;\n /** Adds a zero element after the declared length. */\n isZeroTerminated?: boolean | undefined;\n};\n\n/** Where a cursor array's base buffer and total length come from. */\ntype CursorBounds = {\n /** Position of the argument holding the buffer the cursor points into. */\n baseParamIndex: number;\n /** Position of the argument carrying that buffer's element count. */\n sizeParamIndex: number;\n};\n\n/** How a ref-counted fundamental value is named, wrapped and stored. */\ntype FundamentalOptions = {\n /** Whether a decoded value is owned by the caller; defaults to `\"borrowed\"`. */\n ownership?: Ownership;\n /** GLib type name the wrapper class is looked up by. */\n typeName?: string;\n /** Class a decoded value is wrapped in, instead of the one registered for `typeName`. */\n wrapperClass?: AnyClass;\n /** Returns the wrapper class of the declared type, used when none is registered for the value's type. */\n fallbackClass?: () => AnyClass;\n /** The caller owns the storage the callee fills, so a decoded value is borrowed instead of acquired. */\n isCallerAllocated?: boolean;\n /** The value is embedded in the containing struct rather than reached through a pointer. */\n isInline?: boolean;\n};\n\ntype FundamentalLifecycle = {\n sharedLibrary: string;\n refFnName: string;\n unrefFnName: string;\n};\n\n/** How a plain C struct is stored and wrapped. */\ntype StructOptions = {\n /** The caller owns the storage the callee fills, so a decoded value is borrowed instead of copied. */\n isCallerAllocated?: boolean;\n /** The value is embedded in the containing struct rather than reached through a pointer. */\n isInline?: boolean;\n /** Byte size of the struct, needed to copy it rather than borrow the pointer. */\n size?: number;\n /** Class a decoded value is wrapped in, instead of the one registered for its GType. */\n wrapperClass?: AnyClass;\n /** Library the struct's declared copy and free functions are resolved from; without it neither is used. */\n sharedLibrary?: string;\n /** Function duplicating an instance, used instead of a byte copy when the struct declares one. */\n copyFnName?: string;\n /** Function releasing an instance, used instead of `g_free` when the struct declares one. */\n freeFnName?: string;\n};\n\n/** Descriptor for a `gint8`, marshalled as a number. */\nconst int8T: Int8Descriptor = { kind: \"int8\" };\n/** Descriptor for a `guint8`, marshalled as a number. */\nconst uint8T: Uint8Descriptor = { kind: \"uint8\" };\n/** Descriptor for a `gint16`, marshalled as a number. */\nconst int16T: Int16Descriptor = { kind: \"int16\" };\n/** Descriptor for a `guint16`, marshalled as a number. */\nconst uint16T: Uint16Descriptor = { kind: \"uint16\" };\n/** Descriptor for a `gint32`, marshalled as a number. */\nconst int32T: Int32Descriptor = { kind: \"int32\" };\n/** Descriptor for a `guint32`, marshalled as a number. */\nconst uint32T: Uint32Descriptor = { kind: \"uint32\" };\n/** Descriptor for a `gint64`, marshalled as a number and rejected outside the 2^53 safe range. */\nconst int64T: Int64Descriptor = { kind: \"int64\" };\n/** Descriptor for a `guint64`, marshalled as a number and rejected outside the 2^53 safe range. */\nconst uint64T: Uint64Descriptor = { kind: \"uint64\" };\n/** Descriptor for a `gint64`, marshalled as a bigint so the full 64-bit range survives. */\nconst bigint64T: BigInt64Descriptor = { kind: \"bigint64\" };\n/** Descriptor for a `guint64`, marshalled as a bigint so the full 64-bit range survives. */\nconst biguint64T: BigUint64Descriptor = { kind: \"biguint64\" };\n/** Descriptor for a `GType`, marshalled as a bigint and recognized as a GType by GValue conversion. */\nconst gtypeT: TypeDescriptor = { kind: \"biguint64\", type: true };\n/** Descriptor for a `gfloat`. */\nconst float32T: Float32Descriptor = { kind: \"float32\" };\n/** Descriptor for a `gdouble`. */\nconst float64T: Float64Descriptor = { kind: \"float64\" };\n/** Descriptor for a `gboolean`, marshalled as a JavaScript boolean. */\nconst booleanT: BooleanDescriptor = { kind: \"boolean\" };\n/** Descriptor for the absence of a value, used as the return descriptor of a `void` function. */\nconst voidT: VoidDescriptor = { kind: \"void\" };\n/** Descriptor for a `gunichar`, marshalled as a single-character string or a codepoint number. */\nconst unicharT: UnicharDescriptor = { kind: \"unichar\" };\n/** Descriptor for an opaque `gpointer`, taken from a typed array's memory or a numeric address. */\nconst bufferT: BufferDescriptor = { kind: \"buffer\" };\nconst fundamentalLifecycles: Map<string, FundamentalLifecycle> = new Map();\n\nconst isGtypeDescriptor = (descriptor: Descriptor): descriptor is TypeDescriptor =>\n descriptor.kind === \"biguint64\" && \"type\" in descriptor;\n\n/** Builds a C-string descriptor, including optional buffer length and record-owned storage. */\nconst stringT = (\n ownership: Ownership = \"borrowed\",\n length?: number,\n hasOwnedStorage?: boolean,\n): StringDescriptor => {\n const result: StringDescriptor = { kind: \"string\", ownership };\n\n if (length !== undefined) {\n result.length = length;\n }\n\n if (hasOwnedStorage === true) {\n result.hasOwnedStorage = true;\n }\n\n return result;\n};\n\n/** Builds a runtime-typed `GObject` descriptor with an optional retained fallback class. */\nconst objectT = (\n ownership: Ownership = \"borrowed\",\n fallbackClass?: () => AnyClass,\n typeName?: string,\n): ObjectDescriptor => {\n const result: ObjectDescriptor = { kind: \"object\", ownership };\n\n if (fallbackClass !== undefined) {\n result.fallbackClass = fallbackClass;\n }\n\n if (typeName !== undefined) {\n result.typeName = typeName;\n }\n\n return result;\n};\n\n/** Wraps a descriptor in a pointer to it, for an output or inout argument. */\nconst refT = (innerDescriptor: Descriptor, isInout = false): RefDescriptor =>\n isInout ? { kind: \"ref\", innerDescriptor, inout: true } : { kind: \"ref\", innerDescriptor };\n\n/** Builds a descriptor for a `GHashTable`, marshalled as an array of key/value pairs. */\nconst hashTableT = (\n keyDescriptor: Descriptor,\n valueDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n): HashTableDescriptor => ({\n kind: \"hashtable\",\n keyDescriptor,\n valueDescriptor,\n ownership,\n});\n\n/** Builds an enum descriptor from a GType function or an explicit set of members. */\nconst enumT = (\n sharedLibrary: string,\n typeFnName: string,\n isSigned: boolean,\n members?: number[],\n): EnumDescriptor => {\n const result: EnumDescriptor = {\n kind: \"enum\",\n sharedLibrary,\n getTypeFnName: typeFnName,\n isSigned,\n };\n\n if (members !== undefined) {\n result.members = members;\n }\n\n return result;\n};\n\n/** Builds a flags descriptor from a GType function or an explicit bit mask. */\nconst flagsT = (sharedLibrary: string, typeFnName: string, isSigned: boolean, mask?: number): FlagsDescriptor => {\n const result: FlagsDescriptor = {\n kind: \"flags\",\n sharedLibrary,\n getTypeFnName: typeFnName,\n isSigned,\n };\n\n if (mask !== undefined) {\n result.mask = mask;\n }\n\n return result;\n};\n\nconst applyBoxedNames = (result: BoxedDescriptor, options: BoxedOptions): void => {\n if (options.sharedLibrary !== undefined) {\n result.sharedLibrary = options.sharedLibrary;\n }\n\n if (options.getTypeFnName !== undefined) {\n result.getTypeFnName = options.getTypeFnName;\n }\n\n if (options.freeFnName !== undefined) {\n result.freeFnName = options.freeFnName;\n }\n};\n\nconst applyBoxedOptions = (result: BoxedDescriptor, options: BoxedOptions): void => {\n applyBoxedNames(result, options);\n\n if (options.fallbackClass !== undefined) {\n result.fallbackClass = options.fallbackClass;\n }\n\n if (options.isCallerAllocated) {\n result.isCallerAllocated = true;\n }\n\n if (options.isInline) {\n result.isInline = true;\n }\n\n if (options.size !== undefined) {\n result.size = options.size;\n }\n};\n\n/** Builds a descriptor for a `GBoxed` value of the named type. */\nconst boxedT = (typeName: string, options: BoxedOptions = {}): BoxedDescriptor => {\n const result: BoxedDescriptor = {\n kind: \"boxed\",\n ownership: options.ownership ?? \"borrowed\",\n typeName,\n };\n\n applyBoxedOptions(result, options);\n\n return result;\n};\n\nconst applyStructLifecycle = (result: StructDescriptor, options: StructOptions): void => {\n if (options.sharedLibrary === undefined) {\n return;\n }\n\n result.sharedLibrary = options.sharedLibrary;\n\n if (options.copyFnName !== undefined) {\n result.copyFnName = options.copyFnName;\n }\n\n if (options.freeFnName !== undefined) {\n result.freeFnName = options.freeFnName;\n }\n};\n\n/** Builds a descriptor for a plain C struct. */\nconst structT = (ownership: Ownership = \"borrowed\", options: StructOptions = {}): StructDescriptor => {\n const result: StructDescriptor = { kind: \"struct\", ownership };\n\n if (options.size !== undefined) {\n result.size = options.size;\n }\n\n if (options.wrapperClass !== undefined) {\n result.wrapperClass = options.wrapperClass;\n }\n\n if (options.isCallerAllocated) {\n result.isCallerAllocated = true;\n }\n\n if (options.isInline) {\n result.isInline = true;\n }\n\n applyStructLifecycle(result, options);\n\n return result;\n};\n\nconst recordFundamentalLifecycle = (typeName: string, lifecycle: FundamentalLifecycle): void => {\n if (!fundamentalLifecycles.has(typeName)) {\n fundamentalLifecycles.set(typeName, lifecycle);\n }\n};\n\nconst fundamentalLifecycleFor = (typeName: string): FundamentalLifecycle | undefined =>\n fundamentalLifecycles.get(typeName);\n\nconst applyFundamentalClasses = (result: FundamentalDescriptor, options: FundamentalOptions): void => {\n if (options.wrapperClass !== undefined) {\n result.wrapperClass = options.wrapperClass;\n }\n\n if (options.fallbackClass !== undefined) {\n result.fallbackClass = options.fallbackClass;\n }\n};\n\n/** Builds a descriptor for a fundamental type whose lifetime is managed by named ref and unref functions. */\nconst fundamentalT = (\n sharedLibrary: string,\n refFnName: string,\n unrefFnName: string,\n options: FundamentalOptions = {},\n): FundamentalDescriptor => {\n const ownership = options.ownership ?? \"borrowed\";\n const result: FundamentalDescriptor = { kind: \"fundamental\", ownership, sharedLibrary, refFnName, unrefFnName };\n\n if (options.typeName !== undefined) {\n result.typeName = options.typeName;\n recordFundamentalLifecycle(options.typeName, { sharedLibrary, refFnName, unrefFnName });\n }\n\n applyFundamentalClasses(result, options);\n\n if (options.isCallerAllocated) {\n result.isCallerAllocated = true;\n }\n\n if (options.isInline) {\n result.isInline = true;\n }\n\n return result;\n};\n\nconst applyArrayBounds = (result: ArrayDescriptor, options: ArrayOptions): void => {\n if (options.baseParamIndex !== undefined) {\n result.baseParamIndex = options.baseParamIndex;\n }\n\n if (options.sizeParamIndex !== undefined) {\n result.sizeParamIndex = options.sizeParamIndex;\n }\n\n if (options.fixedSize !== undefined) {\n result.fixedSize = options.fixedSize;\n }\n};\n\n/** Builds a descriptor for an array of items in one of the supported container layouts. */\nconst arrayT = (\n itemDescriptor: Descriptor,\n arrayKind: ArrayKind = \"array\",\n ownership: Ownership = \"borrowed\",\n options?: ArrayOptions,\n): ArrayDescriptor => {\n const result: ArrayDescriptor = { kind: \"array\", itemDescriptor, arrayKind, ownership };\n\n if (options === undefined) {\n return result;\n }\n\n applyArrayBounds(result, options);\n\n if (options.elementSize !== undefined) {\n result.elementSize = options.elementSize;\n }\n\n if (options.isBytes === true) {\n result.isBytes = true;\n }\n\n if (options.isCallerAllocated === true) {\n result.isCallerAllocated = true;\n }\n\n if (options.isZeroTerminated === true) {\n result.isZeroTerminated = true;\n }\n\n return result;\n};\n\nconst preserveArrayNull = (descriptor: ArrayDescriptor): ArrayDescriptor => {\n Reflect.set(descriptor, \"preserveNull\", true);\n\n return descriptor;\n};\n\n/** Builds a descriptor for a `GList` of items. */\nconst listT = (\n itemDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"glist\", ownership, options);\n\n/** Builds a descriptor for a `GSList` of items. */\nconst slistT = (\n itemDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"gslist\", ownership, options);\n\n/** Builds a descriptor for a `GPtrArray` of items. */\nconst ptrArrayT = (\n itemDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"gptrarray\", ownership, options);\n\n/** Builds a descriptor for a `GArray` of items. */\nconst gArrayT = (\n itemDescriptor: Descriptor,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"garray\", ownership, options);\n\n/** Builds a descriptor for a `GByteArray`. */\nconst byteArrayT = (ownership: Ownership = \"borrowed\"): ArrayDescriptor =>\n arrayT(uint8T, \"gbytearray\", ownership, { isBytes: true });\n\n/** Builds a descriptor for a C array whose length is carried by another argument. */\nconst sizedArrayT = (\n itemDescriptor: Descriptor,\n sizeParamIndex: number,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"sized\", ownership, { ...options, sizeParamIndex });\n\n/** Builds an out-array cursor into another argument's buffer. */\nconst cursorArrayT = (\n itemDescriptor: Descriptor,\n bounds: CursorBounds,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"cursor\", ownership, { ...options, ...bounds });\n\n/** Builds a descriptor for a C array of a fixed length. */\nconst fixedArrayT = (\n itemDescriptor: Descriptor,\n fixedSize: number,\n ownership: Ownership = \"borrowed\",\n options: ArrayOptions = {},\n): ArrayDescriptor => arrayT(itemDescriptor, \"fixed\", ownership, { ...options, fixedSize });\n\nconst applyClosureLifetimeOptions = (result: CallbackDescriptor, options: CallbackOptions): void => {\n if (options.hasDestroy !== undefined) {\n result.hasDestroy = options.hasDestroy;\n }\n\n if (options.destroyKind !== undefined) {\n result.destroyKind = options.destroyKind;\n }\n\n if (options.scope !== undefined) {\n result.scope = options.scope;\n }\n};\n\nconst applyClosureOptions = (result: CallbackDescriptor, options: CallbackOptions): void => {\n applyClosureLifetimeOptions(result, options);\n\n if (options.hasUserData !== undefined) {\n result.hasUserData = options.hasUserData;\n }\n\n if (options.userDataIndex !== undefined) {\n result.userDataIndex = options.userDataIndex;\n }\n\n if (options.canThrow !== undefined) {\n result.canThrow = options.canThrow;\n }\n};\n\n/** Builds a descriptor for a function pointer, marshalling a JavaScript function into a native closure. */\nconst callbackT = (\n argDescriptors: Descriptor[],\n returnDescriptor: Descriptor,\n options?: CallbackOptions,\n): CallbackDescriptor => {\n const result: CallbackDescriptor = { kind: \"callback\", argDescriptors, returnDescriptor };\n\n if (options === undefined) {\n return result;\n }\n\n applyClosureOptions(result, options);\n\n return result;\n};\n\nexport {\n int8T,\n uint8T,\n int16T,\n uint16T,\n int32T,\n uint32T,\n int64T,\n uint64T,\n bigint64T,\n biguint64T,\n gtypeT,\n isGtypeDescriptor,\n float32T,\n float64T,\n booleanT,\n voidT,\n unicharT,\n bufferT,\n stringT,\n objectT,\n refT,\n hashTableT,\n enumT,\n flagsT,\n boxedT,\n structT,\n fundamentalLifecycleFor,\n fundamentalT,\n arrayT,\n preserveArrayNull,\n listT,\n slistT,\n ptrArrayT,\n gArrayT,\n byteArrayT,\n sizedArrayT,\n fixedArrayT,\n cursorArrayT,\n callbackT,\n type BoxedDescriptor,\n type ObjectDescriptor,\n type StructDescriptor,\n type FundamentalDescriptor,\n type ArrayDescriptor,\n type HashTableDescriptor,\n type CallbackDescriptor,\n type RefDescriptor,\n};\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { onExit, quit, quitApplication, runApplication, type RunApplicationResul
|
|
|
8
8
|
export { offSignal, onceSignal, onSignal } from "./listeners.js";
|
|
9
9
|
export { installMixins, type Mixin } from "./mixin.js";
|
|
10
10
|
export { fromNative, toHashTableEntries, toNative } from "./native-value.js";
|
|
11
|
-
export { type ConstructBinding, type ConstructBindings,
|
|
11
|
+
export { type ConstructBinding, type ConstructBindings, getProperty, newObjectWithProperties, registerConstructProperties, setProperty, } from "./object.js";
|
|
12
12
|
export { getParamSpecFlags, getParamSpecOwnerType, getParamSpecValueType } from "./param-spec.js";
|
|
13
13
|
export { promisify, trimFinish } from "./promisify.js";
|
|
14
14
|
export { coerceObjectProperty, getDeclaredPropertyName, isReadableProperty, newParamSpecOverride, } from "./properties.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC/G,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,KAAK,eAAe,EAAE,mBAAmB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["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AiB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,KAAK,cAAc,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { onExit, quit, quitApplication, runApplication } from "./lifecycle.js";
|
|
|
8
8
|
export { offSignal, onceSignal, onSignal } from "./listeners.js";
|
|
9
9
|
export { installMixins } from "./mixin.js";
|
|
10
10
|
export { fromNative, toHashTableEntries, toNative } from "./native-value.js";
|
|
11
|
-
export {
|
|
11
|
+
export { getProperty, newObjectWithProperties, registerConstructProperties, setProperty, } from "./object.js";
|
|
12
12
|
export { getParamSpecFlags, getParamSpecOwnerType, getParamSpecValueType } from "./param-spec.js";
|
|
13
13
|
export { promisify, trimFinish } from "./promisify.js";
|
|
14
14
|
export { coerceObjectProperty, getDeclaredPropertyName, isReadableProperty, newParamSpecOverride, } from "./properties.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAsD,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC/G,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAwB,mBAAmB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAoB,MAAM,YAAY,CAAC;AACjE,OAAO,EAAiC,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,cAAc,EAA6B,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE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vG,OAAO,EACH,YAAY,EACZ,SAAS,EACT,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,EAE5B,SAAS,EACT,UAAU,GAGb,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EAEjB,oBAAoB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EACH,WAAW,EACX,YAAY,EACZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EACV,YAAY,EACZ,YAAY,EAEZ,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,OAAO,EACP,QAAQ,EACR,UAAU,EACV,QAAQ,GACX,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,SAAS,EACT,aAAa,EAEb,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAGH,WAAW,EAGX,SAAS,GAGZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAoC,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAiB,MAAM,aAAa,CAAC","sourcesContent":["import \"./exit-hook.js\";\n\nexport { type ApplicationClass, type CommandLineApplication, createApplication } from \"./application-class.js\";\nexport { CallbackMarshalError } from \"./callback.js\";\nexport { type ClosureCallback, ClosureMarshalError, toClosure, tryToClosure } from \"./closure.js\";\nexport { createErrorDomain, type ErrorDomain } from \"./error.js\";\nexport { type Field, type StridedField } from \"./field.js\";\nexport { onExit, quit, quitApplication, runApplication, type RunApplicationResult } from \"./lifecycle.js\";\nexport { offSignal, onceSignal, onSignal } from \"./listeners.js\";\nexport { installMixins, type Mixin } from \"./mixin.js\";\nexport { fromNative, toHashTableEntries, toNative } from \"./native-value.js\";\nexport {\n type ConstructBinding,\n type ConstructBindings,\n getProperty,\n newObjectWithProperties,\n registerConstructProperties,\n setProperty,\n} from \"./object.js\";\nexport { getParamSpecFlags, getParamSpecOwnerType, getParamSpecValueType } from \"./param-spec.js\";\nexport { promisify, trimFinish } from \"./promisify.js\";\nexport {\n coerceObjectProperty,\n getDeclaredPropertyName,\n isReadableProperty,\n newParamSpecOverride,\n} from \"./properties.js\";\nexport { matchAllRegex, matchRegex } from \"./regex.js\";\nexport { type Interface, registerClass, type SignalGType, type SignalSpec } from \"./register-class.js\";\nexport {\n getClassType,\n getHandle,\n getInstanceType,\n getWrapperClass,\n installInterfaces,\n peekTypeClass,\n registerClassStruct,\n registerInterface,\n registerWrapperClass,\n registerWrapperClassResolver,\n type StaticBase,\n setHandle,\n wrapHandle,\n type WrapperClass,\n type WrapperClassResolver,\n} from \"./registry.js\";\nexport {\n connectSignal,\n disconnectSignal,\n emitSignal,\n getSignalBaseName,\n type SignalHandler,\n signalForHandlerName,\n} from \"./signal.js\";\nexport { t } from \"./t.js\";\nexport {\n resolveType,\n TYPE_BOOLEAN,\n TYPE_BOXED,\n TYPE_CHAR,\n TYPE_DOUBLE,\n TYPE_ENUM,\n TYPE_FLAGS,\n TYPE_FLOAT,\n TYPE_GTYPE,\n TYPE_INT,\n TYPE_INT64,\n TYPE_INTERFACE,\n TYPE_INVALID,\n TYPE_LONG,\n TYPE_NONE,\n TYPE_OBJECT,\n TYPE_PARAM,\n TYPE_POINTER,\n TYPE_STRING,\n TYPE_UCHAR,\n TYPE_UINT,\n TYPE_UINT64,\n TYPE_ULONG,\n TYPE_UNICHAR,\n TYPE_VARIANT,\n type TypedClass,\n retainWrapperClasses,\n typeFromName,\n typeInterfaces,\n typeIsA,\n typeName,\n typeParent,\n valueIsA,\n} from \"./type.js\";\nexport {\n fromValue,\n getBoxedValue,\n type JsValue,\n setBoxedValue,\n toValueHandle,\n tryToValueHandle,\n ValueMarshalError,\n} from \"./value.js\";\nexport {\n type ByteArray,\n type FromVariantOptions,\n fromVariant,\n type RecursiveFromVariantOptions,\n type RecursiveVariantValue,\n toVariant,\n type VariantInput,\n type VariantValue,\n} from \"./variant.js\";\nexport { callParent, callVfunc } from \"./vfunc-call.js\";\nexport { alloc, type ExternalObject, type Handle, read, write } from \"@gtkx/native\";\nexport { type AnyClass } from \"@gtkx/utils\";\n"]}
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
|
+
import { markSyntheticSignalMembers as markSyntheticSignalMembersImpl } from "./mixin.js";
|
|
2
|
+
import { naturalSignalMember } from "./signal-brand.js";
|
|
3
|
+
import { emitSignalByName as emitSignalByNameImpl, signalConnect as signalConnectImpl, signalEmit as signalEmitImpl } from "./signal.js";
|
|
4
|
+
declare const markSyntheticSignalMembers: typeof markSyntheticSignalMembersImpl;
|
|
5
|
+
declare const emitSignalByName: typeof emitSignalByNameImpl;
|
|
6
|
+
declare const signalConnect: typeof signalConnectImpl;
|
|
7
|
+
declare const signalEmit: typeof signalEmitImpl;
|
|
8
|
+
type SignalMethodReceiver<T, K extends PropertyKey> = T extends {
|
|
9
|
+
[naturalSignalMember]?: infer TMembers;
|
|
10
|
+
} ? K extends keyof NonNullable<TMembers> ? never : unknown : unknown;
|
|
11
|
+
export { preserveArrayNull } from "./descriptors.js";
|
|
1
12
|
/** @internal */
|
|
2
13
|
export { registerElementMetadata } from "./element-metadata.js";
|
|
3
14
|
export { elementMetadataVersion, registeredElementProperties, registeredElementSignals, } from "./element-metadata.js";
|
|
4
15
|
export { createErrorDomain } from "./error.js";
|
|
16
|
+
export { markSyntheticSignalMembers };
|
|
5
17
|
export { type ApplicationInstance, getApplicationInstance } from "./lifecycle.js";
|
|
18
|
+
export { descriptorFreePropertySpec, propertyMapOverride, writablePropertyMapOverride, } from "./property-brand.js";
|
|
6
19
|
export { getExactWrapperClass, resolveWrapperClass } from "./registry.js";
|
|
20
|
+
export type { SignalMethodReceiver };
|
|
21
|
+
export { classSignalMember, naturalSignalMember, signalEmitMapOverride, signalMapOverride, } from "./signal-brand.js";
|
|
7
22
|
export { hasSignalListener } from "./signal.js";
|
|
23
|
+
export { emitSignalByName, signalConnect, signalEmit };
|
|
24
|
+
export { canonicalDetailedSignalName, canonicalSignalName, connectSignalByName, installSignalDispatch, } from "./signal.js";
|
|
8
25
|
export { resolveType } from "./type.js";
|
|
9
26
|
export { fromValue, getBoxedValue, getValueType, inoutValueForBoxedDescriptor, newValueForDescriptor, outValueForBoxedDescriptor, toValue, } from "./value.js";
|
|
10
27
|
//# sourceMappingURL=internal.d.ts.map
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EACH,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EACH,SAAS,EACT,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,qBAAq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MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC1E,YAAY,EAAE,oBAAoB,EAAE,CAAC;AACrC,OAAO,EACH,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC;AACvD,OAAO,EACH,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EACH,SAAS,EACT,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,qBAAqB,EACrB,0BAA0B,EAC1B,OAAO,GACV,MAAM,YAAY,CAAC"}
|
package/dist/internal.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
import { markSyntheticSignalMembers as markSyntheticSignalMembersImpl } from "./mixin.js";
|
|
2
|
+
import { naturalSignalMember } from "./signal-brand.js";
|
|
3
|
+
import { emitSignalByName as emitSignalByNameImpl, signalConnect as signalConnectImpl, signalEmit as signalEmitImpl, } from "./signal.js";
|
|
4
|
+
const markSyntheticSignalMembers = markSyntheticSignalMembersImpl;
|
|
5
|
+
const emitSignalByName = emitSignalByNameImpl;
|
|
6
|
+
const signalConnect = signalConnectImpl;
|
|
7
|
+
const signalEmit = signalEmitImpl;
|
|
8
|
+
export { preserveArrayNull } from "./descriptors.js";
|
|
1
9
|
/** @internal */
|
|
2
10
|
export { registerElementMetadata } from "./element-metadata.js";
|
|
3
11
|
export { elementMetadataVersion, registeredElementProperties, registeredElementSignals, } from "./element-metadata.js";
|
|
4
12
|
export { createErrorDomain } from "./error.js";
|
|
13
|
+
export { markSyntheticSignalMembers };
|
|
5
14
|
export { getApplicationInstance } from "./lifecycle.js";
|
|
15
|
+
export { descriptorFreePropertySpec, propertyMapOverride, writablePropertyMapOverride, } from "./property-brand.js";
|
|
6
16
|
export { getExactWrapperClass, resolveWrapperClass } from "./registry.js";
|
|
17
|
+
export { classSignalMember, naturalSignalMember, signalEmitMapOverride, signalMapOverride, } from "./signal-brand.js";
|
|
7
18
|
export { hasSignalListener } from "./signal.js";
|
|
19
|
+
export { emitSignalByName, signalConnect, signalEmit };
|
|
20
|
+
export { canonicalDetailedSignalName, canonicalSignalName, connectSignalByName, installSignalDispatch, } from "./signal.js";
|
|
8
21
|
export { resolveType } from "./type.js";
|
|
9
22
|
export { fromValue, getBoxedValue, getValueType, inoutValueForBoxedDescriptor, newValueForDescriptor, outValueForBoxedDescriptor, toValue, } from "./value.js";
|
|
10
23
|
//# sourceMappingURL=internal.js.map
|
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EACH,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAA4B,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,IAAI,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EACH,gBAAgB,IAAI,oBAAoB,EACxC,aAAa,IAAI,iBAAiB,EAClC,UA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mixin.js\";\nimport { naturalSignalMember } from \"./signal-brand.js\";\nimport {\n emitSignalByName as emitSignalByNameImpl,\n signalConnect as signalConnectImpl,\n signalEmit as signalEmitImpl,\n} from \"./signal.js\";\n\nconst markSyntheticSignalMembers: typeof markSyntheticSignalMembersImpl = markSyntheticSignalMembersImpl;\nconst emitSignalByName: typeof emitSignalByNameImpl = emitSignalByNameImpl;\nconst signalConnect: typeof signalConnectImpl = signalConnectImpl;\nconst signalEmit: typeof signalEmitImpl = signalEmitImpl;\n\ntype SignalMethodReceiver<T, K extends PropertyKey> = T extends {\n [naturalSignalMember]?: infer TMembers;\n}\n ? K extends keyof NonNullable<TMembers>\n ? never\n : unknown\n : unknown;\n\nexport { preserveArrayNull } from \"./descriptors.js\";\n/** @internal */\nexport { registerElementMetadata } from \"./element-metadata.js\";\nexport {\n elementMetadataVersion,\n registeredElementProperties,\n registeredElementSignals,\n} from \"./element-metadata.js\";\nexport { createErrorDomain } from \"./error.js\";\nexport { markSyntheticSignalMembers };\nexport { type ApplicationInstance, getApplicationInstance } from \"./lifecycle.js\";\nexport {\n descriptorFreePropertySpec,\n propertyMapOverride,\n writablePropertyMapOverride,\n} from \"./property-brand.js\";\nexport { getExactWrapperClass, resolveWrapperClass } from \"./registry.js\";\nexport type { SignalMethodReceiver };\nexport {\n classSignalMember,\n naturalSignalMember,\n signalEmitMapOverride,\n signalMapOverride,\n} from \"./signal-brand.js\";\nexport { hasSignalListener } from \"./signal.js\";\nexport { emitSignalByName, signalConnect, signalEmit };\nexport {\n canonicalDetailedSignalName,\n canonicalSignalName,\n connectSignalByName,\n installSignalDispatch,\n} from \"./signal.js\";\nexport { resolveType } from \"./type.js\";\nexport {\n fromValue,\n getBoxedValue,\n getValueType,\n inoutValueForBoxedDescriptor,\n newValueForDescriptor,\n outValueForBoxedDescriptor,\n toValue,\n} from \"./value.js\";\n"]}
|
package/dist/lifecycle.js
CHANGED
|
@@ -88,7 +88,7 @@ const getApplicationInstance = (application) => {
|
|
|
88
88
|
const runApplication = (application, argv) => {
|
|
89
89
|
if (!isDerivedApplication(application)) {
|
|
90
90
|
throw new Error("runApplication: this application was not built by GTKX, so its command line cannot be " +
|
|
91
|
-
"parsed and it cannot be shut down safely; render <
|
|
91
|
+
"parsed and it cannot be shut down safely; render <AdwApplication> or <GtkApplication>, " +
|
|
92
92
|
"or construct it with createApplication from @gtkx/runtime");
|
|
93
93
|
}
|
|
94
94
|
claimDefaultApplication(application);
|