| 1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
| 2 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 |
| 3 | |
| 4 | //include_path: ../../helper_components |
| 5 | import { MainWindow } from "main_window.slint" ; |
| 6 | |
| 7 | /* |
| 8 | |
| 9 | ```cpp |
| 10 | auto handle = MainWindow::create(); |
| 11 | const MainWindow &instance = *handle; |
| 12 | assert_eq(instance.get_some_prop(), 42); |
| 13 | ``` |
| 14 | |
| 15 | ```rust |
| 16 | let instance = MainWindow::new().unwrap(); |
| 17 | assert_eq!(instance.get_some_prop(), 42); |
| 18 | ``` |
| 19 | |
| 20 | ```js |
| 21 | var instance = new slint.MainWindow({}); |
| 22 | assert.equal(instance.some_prop, 42); |
| 23 | ``` |
| 24 | |
| 25 | */ |
| 26 | |