Skip to content

Commit f3ec35c

Browse files
Update from slint-ui/slint
Pull web demos and C++/Rust reference docs from commit 0caf3b8114f992eed94e11ec0b08afe5d6a30c0a (refs/heads/master)
1 parent 610714a commit f3ec35c

File tree

7,964 files changed

+916207
-346
lines changed

Some content is hidden

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

7,964 files changed

+916207
-346
lines changed
7.42 MB
Binary file not shown.
8.22 MB
Binary file not shown.
5.82 MB
Binary file not shown.
6.23 MB
Binary file not shown.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!DOCTYPE html>
2+
3+
<!-- Copyright © SixtyFPS GmbH <[email protected]> -->
4+
<!-- SPDX-License-Identifier: MIT -->
5+
6+
<html>
7+
<!--
8+
This is a static html file used to display the wasm build.
9+
In order to generate the build
10+
- uncomment the #wasm# lines in Cargo.toml
11+
- Run `wasm-pack build --release --target web` in this directory.
12+
-->
13+
14+
<head>
15+
<meta charset="UTF-8">
16+
<title>Slint Carousel example (Web Assembly version)</title>
17+
<link rel="stylesheet" href="https://slint.dev/css/demos-v1.css">
18+
<style>
19+
@media screen and (max-width: 992px) and (orientation: landscape) {
20+
.hide-in-mobile-landscape {
21+
display: none;
22+
}
23+
24+
* {
25+
margin: 0;
26+
padding: 0;
27+
overflow: hidden;
28+
}
29+
30+
canvas {
31+
width: 100vw !important;
32+
height: 100vh !important;
33+
}
34+
}
35+
36+
</style>
37+
</head>
38+
39+
<body>
40+
<h1 class="hide-in-mobile-landscape">Carousel example</h1>
41+
<p class="hide-in-mobile-landscape">This is the <a href="https://slint.dev">Slint</a> Carousel example compiled to
42+
WebAssembly.</p>
43+
<div id="spinner" style="position: relative;">
44+
<div class="spinner">Loading...</div>
45+
</div>
46+
<canvas id="canvas" width="640" height="480" unselectable="on"></canvas>
47+
<p class="hide-in-mobile-landscape links">
48+
<a href="https://github.com/slint-ui/slint/blob/master/examples/carousel/ui/carousel_demo.slint">
49+
View Source Code on GitHub</a> -
50+
<a href="https://slint.dev/editor?load_demo=examples/carousel/ui/carousel_demo.slint">
51+
Open in SlintPad
52+
</a>
53+
</p>
54+
<script type="module">
55+
import init from './pkg/carousel.js';
56+
init().finally(() => {
57+
document.getElementById("spinner").remove();
58+
});
59+
</script>
60+
</body>
61+
62+
</html>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
export function main(): void;
4+
5+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
6+
7+
export interface InitOutput {
8+
readonly memory: WebAssembly.Memory;
9+
readonly main: () => void;
10+
readonly slint_qt_get_widget: (a: number) => number;
11+
readonly slint_mock_elapsed_time: (a: bigint) => void;
12+
readonly slint_get_mocked_time: () => bigint;
13+
readonly slint_send_mouse_click: (a: number, b: number, c: number) => void;
14+
readonly slint_send_keyboard_char: (a: number, b: number, c: number) => void;
15+
readonly send_keyboard_string_sequence: (a: number, b: number) => void;
16+
readonly __externref_table_alloc: () => number;
17+
readonly __wbindgen_export_1: WebAssembly.Table;
18+
readonly __wbindgen_exn_store: (a: number) => void;
19+
readonly __wbindgen_malloc: (a: number, b: number) => number;
20+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
21+
readonly __wbindgen_export_5: WebAssembly.Table;
22+
readonly wasm_bindgen__convert__closures_____invoke__h90287a03ff9fcc2c: (a: number, b: number) => void;
23+
readonly closure204_externref_shim: (a: number, b: number, c: any) => void;
24+
readonly closure401_externref_shim: (a: number, b: number, c: any) => void;
25+
readonly closure306_externref_shim: (a: number, b: number, c: any, d: any) => void;
26+
readonly __wbindgen_start: () => void;
27+
}
28+
29+
export type SyncInitInput = BufferSource | WebAssembly.Module;
30+
/**
31+
* Instantiates the given `module`, which can either be bytes or
32+
* a precompiled `WebAssembly.Module`.
33+
*
34+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
35+
*
36+
* @returns {InitOutput}
37+
*/
38+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
39+
40+
/**
41+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
42+
* for everything else, calls `WebAssembly.instantiate` directly.
43+
*
44+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
45+
*
46+
* @returns {Promise<InitOutput>}
47+
*/
48+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;

0 commit comments

Comments
 (0)