Skip to content

Commit

Permalink
Update from slint-ui/slint
Browse files Browse the repository at this point in the history
Pull web demos and C++/Rust reference docs from commit 3f8163fa3f0d5cef08d9e734711aef9b45284eaa (refs/heads/master)
  • Loading branch information
slint-team[bot] committed Aug 14, 2024
1 parent 76788fd commit a059d3e
Show file tree
Hide file tree
Showing 1,224 changed files with 376,558 additions and 325 deletions.
Binary file added releases/1.7.2/demos/android/energy-monitor.apk
Binary file not shown.
Binary file added releases/1.7.2/demos/android/todo_lib.apk
Binary file not shown.
62 changes: 62 additions & 0 deletions releases/1.7.2/demos/carousel/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!DOCTYPE html>

<!-- Copyright © SixtyFPS GmbH <[email protected]> -->
<!-- SPDX-License-Identifier: MIT -->

<html>
<!--
This is a static html file used to display the wasm build.
In order to generate the build
- uncomment the #wasm# lines in Cargo.toml
- Run `wasm-pack build --release --target web` in this directory.
-->

<head>
<meta charset="UTF-8">
<title>Slint Carousel example (Web Assembly version)</title>
<link rel="stylesheet" href="https://slint.dev/css/demos-v1.css">
<style>
@media screen and (max-width: 992px) and (orientation: landscape) {
.hide-in-mobile-landscape {
display: none;
}

* {
margin: 0;
padding: 0;
overflow: hidden;
}

canvas {
width: 100vw !important;
height: 100vh !important;
}
}

</style>
</head>

<body>
<h1 class="hide-in-mobile-landscape">Carousel example</h1>
<p class="hide-in-mobile-landscape">This is the <a href="https://slint.dev">Slint</a> Carousel example compiled to
WebAssembly.</p>
<div id="spinner" style="position: relative;">
<div class="spinner">Loading...</div>
</div>
<canvas id="canvas" width="640" height="480" unselectable="on"></canvas>
<p class="hide-in-mobile-landscape links">
<a href="https://github.com/slint-ui/slint/blob/master/examples/carousel/ui/carousel_demo.slint">
View Source Code on GitHub</a> -
<a href="https://slint.dev/editor?load_demo=examples/carousel/ui/carousel_demo.slint">
Open in SlintPad
</a>
</p>
<script type="module">
import init from './pkg/carousel.js';
init().finally(() => {
document.getElementById("spinner").remove();
});
</script>
</body>

</html>
47 changes: 47 additions & 0 deletions releases/1.7.2/demos/carousel/pkg/carousel.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* tslint:disable */
/* eslint-disable */
/**
*/
export function main(): void;

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
readonly memory: WebAssembly.Memory;
readonly main: () => void;
readonly slint_mock_elapsed_time: (a: number) => void;
readonly slint_get_mocked_time: () => number;
readonly slint_send_mouse_click: (a: number, b: number, c: number) => void;
readonly slint_send_keyboard_char: (a: number, b: number, c: number) => void;
readonly send_keyboard_string_sequence: (a: number, b: number) => void;
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
readonly __wbindgen_export_2: WebAssembly.Table;
readonly _dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0ae2baccfd5a7307: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3eed822787167cf0: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb09277208677da62: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut__A_B___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc62b81be21516a16: (a: number, b: number, c: number, d: number) => void;
readonly __wbindgen_exn_store: (a: number) => void;
readonly __wbindgen_start: () => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
* Instantiates the given `module`, which can either be bytes or
* a precompiled `WebAssembly.Module`.
*
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
*
* @returns {InitOutput}
*/
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;

/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
* for everything else, calls `WebAssembly.instantiate` directly.
*
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
*
* @returns {Promise<InitOutput>}
*/
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
Loading

0 comments on commit a059d3e

Please sign in to comment.