Skip to content

Commit 773190e

Browse files
Update from slint-ui/slint
Pull web demos and C++/Rust reference docs from commit 7ada390251a80d2b001e2f213867d38376ce1e72 (refs/heads/master)
1 parent 653d902 commit 773190e

File tree

3,799 files changed

+8964
-6064
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,799 files changed

+8964
-6064
lines changed
0 Bytes
Binary file not shown.
-4 KB
Binary file not shown.
0 Bytes
Binary file not shown.

snapshots/master/demos/carousel/pkg/carousel.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export interface InitOutput {
1919
readonly __wbindgen_malloc: (a: number, b: number) => number;
2020
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
2121
readonly __wbindgen_export_5: WebAssembly.Table;
22-
readonly closure146_externref_shim: (a: number, b: number, c: any) => void;
23-
readonly wasm_bindgen__convert__closures_____invoke__h862bde3b4995a113: (a: number, b: number) => void;
22+
readonly wasm_bindgen__convert__closures_____invoke__h4bfbf2172cadd390: (a: number, b: number) => void;
23+
readonly closure152_externref_shim: (a: number, b: number, c: any) => void;
2424
readonly closure356_externref_shim: (a: number, b: number, c: any) => void;
2525
readonly closure259_externref_shim: (a: number, b: number, c: any, d: any) => void;
2626
readonly __wbindgen_start: () => void;

snapshots/master/demos/carousel/pkg/carousel.js

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -215,24 +215,20 @@ state => {
215215
}
216216
);
217217

218-
function makeMutClosure(arg0, arg1, dtor, f) {
218+
function makeClosure(arg0, arg1, dtor, f) {
219219
const state = { a: arg0, b: arg1, cnt: 1, dtor };
220220
const real = (...args) => {
221221

222222
// First up with a closure we increment the internal reference
223223
// count. This ensures that the Rust closure environment won't
224224
// be deallocated while we're invoking it.
225225
state.cnt++;
226-
const a = state.a;
227-
state.a = 0;
228226
try {
229-
return f(a, state.b, ...args);
227+
return f(state.a, state.b, ...args);
230228
} finally {
231229
if (--state.cnt === 0) {
232-
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
230+
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b); state.a = 0;
233231
CLOSURE_DTORS.unregister(state);
234-
} else {
235-
state.a = a;
236232
}
237233
}
238234
};
@@ -241,20 +237,24 @@ function makeMutClosure(arg0, arg1, dtor, f) {
241237
return real;
242238
}
243239

244-
function makeClosure(arg0, arg1, dtor, f) {
240+
function makeMutClosure(arg0, arg1, dtor, f) {
245241
const state = { a: arg0, b: arg1, cnt: 1, dtor };
246242
const real = (...args) => {
247243

248244
// First up with a closure we increment the internal reference
249245
// count. This ensures that the Rust closure environment won't
250246
// be deallocated while we're invoking it.
251247
state.cnt++;
248+
const a = state.a;
249+
state.a = 0;
252250
try {
253-
return f(state.a, state.b, ...args);
251+
return f(a, state.b, ...args);
254252
} finally {
255253
if (--state.cnt === 0) {
256-
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b); state.a = 0;
254+
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
257255
CLOSURE_DTORS.unregister(state);
256+
} else {
257+
state.a = a;
258258
}
259259
}
260260
};
@@ -272,19 +272,19 @@ export function main() {
272272
wasm.main();
273273
}
274274

275-
function __wbg_adapter_8(arg0, arg1, arg2) {
276-
wasm.closure146_externref_shim(arg0, arg1, arg2);
275+
function __wbg_adapter_6(arg0, arg1) {
276+
wasm.wasm_bindgen__convert__closures_____invoke__h4bfbf2172cadd390(arg0, arg1);
277277
}
278278

279-
function __wbg_adapter_15(arg0, arg1) {
280-
wasm.wasm_bindgen__convert__closures_____invoke__h862bde3b4995a113(arg0, arg1);
279+
function __wbg_adapter_11(arg0, arg1, arg2) {
280+
wasm.closure152_externref_shim(arg0, arg1, arg2);
281281
}
282282

283-
function __wbg_adapter_18(arg0, arg1, arg2) {
283+
function __wbg_adapter_22(arg0, arg1, arg2) {
284284
wasm.closure356_externref_shim(arg0, arg1, arg2);
285285
}
286286

287-
function __wbg_adapter_29(arg0, arg1, arg2, arg3) {
287+
function __wbg_adapter_43(arg0, arg1, arg2, arg3) {
288288
wasm.closure259_externref_shim(arg0, arg1, arg2, arg3);
289289
}
290290

@@ -1619,74 +1619,79 @@ function __wbg_get_imports() {
16191619
const ret = arg0.y;
16201620
return ret;
16211621
};
1622+
imports.wbg.__wbindgen_cast_09bc5a1867d871c0 = function(arg0, arg1) {
1623+
// Cast intrinsic for `Closure(Closure { dtor_idx: 151, function: Function { arguments: [NamedExternref("CompositionEvent")], shim_idx: 152, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1624+
const ret = makeClosure(arg0, arg1, 151, __wbg_adapter_11);
1625+
return ret;
1626+
};
16221627
imports.wbg.__wbindgen_cast_0b4fa2ac1f975346 = function(arg0, arg1) {
16231628
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [NamedExternref("Event")], shim_idx: 356, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1624-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_18);
1629+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_22);
16251630
return ret;
16261631
};
16271632
imports.wbg.__wbindgen_cast_0c1c695d0a87f43c = function(arg0, arg1) {
16281633
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [NamedExternref("WheelEvent")], shim_idx: 356, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1629-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_18);
1630-
return ret;
1631-
};
1632-
imports.wbg.__wbindgen_cast_0e6e7d84ed0e864a = function(arg0, arg1) {
1633-
// Cast intrinsic for `Closure(Closure { dtor_idx: 145, function: Function { arguments: [NamedExternref("InputEvent")], shim_idx: 146, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1634-
const ret = makeClosure(arg0, arg1, 145, __wbg_adapter_8);
1634+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_22);
16351635
return ret;
16361636
};
16371637
imports.wbg.__wbindgen_cast_107dd922cc101a20 = function(arg0, arg1) {
16381638
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 356, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1639-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_18);
1640-
return ret;
1641-
};
1642-
imports.wbg.__wbindgen_cast_196bc9c3f5e1b6f0 = function(arg0, arg1) {
1643-
// Cast intrinsic for `Closure(Closure { dtor_idx: 145, function: Function { arguments: [NamedExternref("ClipboardEvent")], shim_idx: 146, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1644-
const ret = makeClosure(arg0, arg1, 145, __wbg_adapter_8);
1639+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_22);
16451640
return ret;
16461641
};
16471642
imports.wbg.__wbindgen_cast_1b1a4d8f471385de = function(arg0, arg1) {
16481643
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [NamedExternref("PageTransitionEvent")], shim_idx: 356, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1649-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_18);
1644+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_22);
16501645
return ret;
16511646
};
16521647
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
16531648
// Cast intrinsic for `Ref(String) -> Externref`.
16541649
const ret = getStringFromWasm0(arg0, arg1);
16551650
return ret;
16561651
};
1652+
imports.wbg.__wbindgen_cast_25637687cd89929f = function(arg0, arg1) {
1653+
// Cast intrinsic for `Closure(Closure { dtor_idx: 151, function: Function { arguments: [NamedExternref("ClipboardEvent")], shim_idx: 152, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1654+
const ret = makeClosure(arg0, arg1, 151, __wbg_adapter_11);
1655+
return ret;
1656+
};
1657+
imports.wbg.__wbindgen_cast_34d9863970b61d9f = function(arg0, arg1) {
1658+
// Cast intrinsic for `Closure(Closure { dtor_idx: 151, function: Function { arguments: [NamedExternref("InputEvent")], shim_idx: 152, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1659+
const ret = makeClosure(arg0, arg1, 151, __wbg_adapter_11);
1660+
return ret;
1661+
};
1662+
imports.wbg.__wbindgen_cast_34f933e7496d0fef = function(arg0, arg1) {
1663+
// Cast intrinsic for `Closure(Closure { dtor_idx: 151, function: Function { arguments: [NamedExternref("Event")], shim_idx: 152, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1664+
const ret = makeClosure(arg0, arg1, 151, __wbg_adapter_11);
1665+
return ret;
1666+
};
16571667
imports.wbg.__wbindgen_cast_417465a31d507910 = function(arg0, arg1) {
16581668
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 356, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1659-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_18);
1669+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_22);
16601670
return ret;
16611671
};
16621672
imports.wbg.__wbindgen_cast_41b7da0d0782cb51 = function(arg0, arg1) {
16631673
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 356, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1664-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_18);
1674+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_22);
16651675
return ret;
16661676
};
16671677
imports.wbg.__wbindgen_cast_5ab4f7c847d67190 = function(arg0, arg1) {
16681678
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [Externref], shim_idx: 356, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1669-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_18);
1679+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_22);
16701680
return ret;
16711681
};
16721682
imports.wbg.__wbindgen_cast_6ad92dc75f46d93a = function(arg0, arg1) {
16731683
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [NamedExternref("Array<any>"), NamedExternref("ResizeObserver")], shim_idx: 259, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1674-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_29);
1675-
return ret;
1676-
};
1677-
imports.wbg.__wbindgen_cast_7ca16f95c5f05e23 = function(arg0, arg1) {
1678-
// Cast intrinsic for `Closure(Closure { dtor_idx: 145, function: Function { arguments: [NamedExternref("Event")], shim_idx: 146, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1679-
const ret = makeClosure(arg0, arg1, 145, __wbg_adapter_8);
1684+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_43);
16801685
return ret;
16811686
};
16821687
imports.wbg.__wbindgen_cast_8b64f72225cf182f = function(arg0, arg1) {
16831688
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [NamedExternref("FocusEvent")], shim_idx: 356, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1684-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_18);
1689+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_22);
16851690
return ret;
16861691
};
1687-
imports.wbg.__wbindgen_cast_a812cbf6ca8627b4 = function(arg0, arg1) {
1688-
// Cast intrinsic for `Closure(Closure { dtor_idx: 145, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 146, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1689-
const ret = makeClosure(arg0, arg1, 145, __wbg_adapter_8);
1692+
imports.wbg.__wbindgen_cast_c12f9ddb305639d8 = function(arg0, arg1) {
1693+
// Cast intrinsic for `Closure(Closure { dtor_idx: 151, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 152, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1694+
const ret = makeClosure(arg0, arg1, 151, __wbg_adapter_11);
16901695
return ret;
16911696
};
16921697
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
@@ -1701,12 +1706,7 @@ function __wbg_get_imports() {
17011706
};
17021707
imports.wbg.__wbindgen_cast_f21b2b21f84ef31b = function(arg0, arg1) {
17031708
// Cast intrinsic for `Closure(Closure { dtor_idx: 355, function: Function { arguments: [], shim_idx: 358, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1704-
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_15);
1705-
return ret;
1706-
};
1707-
imports.wbg.__wbindgen_cast_fd923091787eb77b = function(arg0, arg1) {
1708-
// Cast intrinsic for `Closure(Closure { dtor_idx: 145, function: Function { arguments: [NamedExternref("CompositionEvent")], shim_idx: 146, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1709-
const ret = makeClosure(arg0, arg1, 145, __wbg_adapter_8);
1709+
const ret = makeMutClosure(arg0, arg1, 355, __wbg_adapter_6);
17101710
return ret;
17111711
};
17121712
imports.wbg.__wbindgen_init_externref_table = function() {
9.21 KB
Binary file not shown.

snapshots/master/demos/carousel/pkg/carousel_bg.wasm.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export const __wbindgen_exn_store: (a: number) => void;
1414
export const __wbindgen_malloc: (a: number, b: number) => number;
1515
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
1616
export const __wbindgen_export_5: WebAssembly.Table;
17-
export const closure146_externref_shim: (a: number, b: number, c: any) => void;
18-
export const wasm_bindgen__convert__closures_____invoke__h862bde3b4995a113: (a: number, b: number) => void;
17+
export const wasm_bindgen__convert__closures_____invoke__h4bfbf2172cadd390: (a: number, b: number) => void;
18+
export const closure152_externref_shim: (a: number, b: number, c: any) => void;
1919
export const closure356_externref_shim: (a: number, b: number, c: any) => void;
2020
export const closure259_externref_shim: (a: number, b: number, c: any, d: any) => void;
2121
export const __wbindgen_start: () => void;

snapshots/master/demos/energy-monitor/pkg/energy_monitor.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export interface InitOutput {
1919
readonly __wbindgen_malloc: (a: number, b: number) => number;
2020
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
2121
readonly __wbindgen_export_5: WebAssembly.Table;
22-
readonly closure3734_externref_shim: (a: number, b: number, c: any, d: any) => void;
23-
readonly closure3334_externref_shim: (a: number, b: number, c: any) => void;
24-
readonly closure3733_externref_shim: (a: number, b: number, c: any) => void;
25-
readonly closure3780_externref_shim: (a: number, b: number, c: any) => void;
26-
readonly wasm_bindgen__convert__closures_____invoke__hec96763067b8c433: (a: number, b: number) => void;
22+
readonly closure3715_externref_shim: (a: number, b: number, c: any) => void;
23+
readonly closure3127_externref_shim: (a: number, b: number, c: any) => void;
24+
readonly closure3716_externref_shim: (a: number, b: number, c: any, d: any) => void;
25+
readonly closure3778_externref_shim: (a: number, b: number, c: any) => void;
26+
readonly wasm_bindgen__convert__closures_____invoke__hc8db5c7b4472991d: (a: number, b: number) => void;
2727
readonly __wbindgen_start: () => void;
2828
}
2929

0 commit comments

Comments
 (0)