Simon Hausmann
096217ac03
WIP: Initial support for @native-init in Rust
...
A bunch of TODOs:
- add support facade types for components (for users to implement the
trait on)
- how to deal with `MyButton` being used in `main.slint` from two
different other `.slint` files, with alias in `main.slint`?
2024-01-12 17:24:19 +01:00
Olivier Goffart
4a1a7b1f7e
Fix slint warnings in the docs
2024-01-12 09:24:51 +01:00
Olivier Goffart
9111946a82
Introduce slint::run_event_loop_until_quit
...
Closes #1499
2024-01-11 13:52:02 +01:00
Tobias Hunger
f2025ecf2d
Test: Add explicit test for our time mocking infrastructure
2024-01-10 11:41:55 +01:00
Simon Hausmann
29621043f7
Node.js: Add fullscreen setter for Window
...
Amends 779aff0b39
2024-01-09 18:55:28 +01:00
Simon Hausmann
438b9afeaa
Reduce WindowAdapter API slightly ( #4304 )
...
Move the set_fullscreen function added to the WindowAdapter trait in 779aff0b39
to be a function in WindowProperties instead.
That way it'll be easier in the future to extend this with other window states without
having to modify or break the WindowAdapter trait API.
2024-01-09 18:55:06 +01:00
Simon Hausmann
aadac60a07
doc: Fix title case
2024-01-08 09:42:57 +01:00
Simon Hausmann
f5bf6e5dc0
Skia: Clean up pre present notify callback API
...
Move this back out of render() again and make it stateful in the renderer. Reduces the amount of book-keeping required and it's always the same callback anyway.
2024-01-04 10:35:09 +01:00
Simon Hausmann
3069e8e503
Add support for frame throttling on Wayland
...
Use winit's pre_present_notify() API to allow for the compositor to throttle rendering.
Fixes #4200
cc #1695
2024-01-04 09:21:53 +01:00
Simon Hausmann
55e3a0418a
Fix typedoc warning about unused parameters
2024-01-02 10:58:18 +01:00
Carter Hunt Fogelman
ff27bc79ae
Wrap all non-test uses of in a BufWriter/BufReader for efficiency
2023-12-27 09:15:53 +01:00
Simon Hausmann
d1529af3cc
python: hide native module behind python front-end API
...
Encapsulate the rust code behind a public API (in __init__.py for now)
2023-12-21 12:57:35 +01:00
Simon Hausmann
07c168bbf9
python: Clean up Cargo.toml
...
Remove unused dependencies and fetch needed ones from the workspace. We'll sort out the substituation with crates.io dependencies later when packaging.
2023-12-21 12:57:35 +01:00
Simon Hausmann
2c6af79104
Add a barebones README
2023-12-21 12:57:35 +01:00
Simon Hausmann
fb76502cf4
Run python tests without capturing stderr/stdout
...
... so that we can see backtraces
2023-12-21 12:57:35 +01:00
Simon Hausmann
33a1d07226
Add support for timers and run/quit_event_loop
2023-12-21 12:57:35 +01:00
Simon Hausmann
e4785220ef
Add a little test for manual trying :)
2023-12-21 12:57:35 +01:00
Simon Hausmann
08461d7b32
Convert None to Void correctly
2023-12-21 12:57:35 +01:00
Simon Hausmann
82c2728cfd
Add show/hide/run to component instance
2023-12-21 12:57:35 +01:00
Simon Hausmann
644ebbb2aa
Split value conversion into a separate module
2023-12-21 12:57:35 +01:00
Simon Hausmann
10d6aa199c
Split errors out into a separate module
2023-12-21 12:57:35 +01:00
Simon Hausmann
73024beb98
Begin wrapping the component compiler
2023-12-21 12:57:35 +01:00
Simon Hausmann
a2054e7ebd
Add boilerplate
2023-12-21 12:57:35 +01:00
Simon Hausmann
95044c3a09
Rename WindowRotation to RenderingRotation in the software renderer ( #4181 )
...
Same term as we're going to use in the linuxkms backend.
2023-12-19 08:47:55 +01:00
Simon Hausmann
18c5b1ebea
doc: Fix link from Rust API docs to Slint language docs for singletons
...
Fixes #4158
2023-12-14 13:41:25 +01:00
Simon Hausmann
cdc2ccec3b
Fix missing types from Node.js API docs
...
Commit 84fd6dc08c changed the import
from "rust-module" to "rust-module.cjs", which unfortunately broke
typedoc's visibility into the types. Revert back to using the import
without extension. With the given tsconfig files that works now and
typedoc publishes the docs for the re-exported types again.
Fixes #4153
2023-12-14 13:16:00 +01:00
Simon Hausmann
75f24163ed
C++: Added ComponentInstance::definition() getter to retrieve the ComponentDefinition for an instance
...
Fixes #4087
2023-12-14 07:43:29 +01:00
Simon Hausmann
b64de8ead8
Exclude npm package tarballs from ... npm package tarballs
2023-12-12 21:10:00 +01:00
Simon Hausmann
78b6c8e02c
Prepare for fetching slint npm binary packages from the @slint-ui/slint-ui-binary-* scope
...
That way we keep things clean on the top-level.
2023-12-12 14:34:17 +01:00
Simon Hausmann
8c1c87a600
Add support for building on demand
...
If binary packages are installed, then loading rust-module.cjs will work and
we don't need to do anything.
Otherwise, fall back to building.
2023-12-12 14:34:17 +01:00
Simon Hausmann
c1841fdfbe
Add support for compiling the linuxkms backend without libseat support
2023-12-11 17:36:17 +01:00
Florian Blasius
6da8120dfa
added palette global ( #3984 )
...
* Update docs/reference/src/language/builtins/globals.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update docs/reference/src/language/builtins/globals.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update docs/reference/src/language/builtins/globals.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update docs/reference/src/language/builtins/globals.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update docs/reference/src/language/builtins/globals.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
---------
Co-authored-by: Florian Blasius <florian.blasius@slint-ui.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
Co-authored-by: Florian Blasius <flovansl@fedora.fritz.box>
2023-12-11 14:44:05 +00:00
ogoffart
b081c489d6
Bump version number to 1.4.0
2023-12-11 11:21:37 +00:00
MicroBlock
003e177ef7
docs: fix winit link
2023-12-09 09:10:49 +01:00
Tobias Hunger
2bdcbc8e9f
core: Add a double-click callback to the TouchArea ( #4060 )
...
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2023-12-08 12:12:41 +01:00
Tobias Hunger
a24190924b
cmake-lint: cargo-feature is not a valid identifier in CMake
...
cmake-lint reports that `cargo-feature` is not a valid identifier. Change
it to `cargo_feature` instead, even though this seems to work anyway.
2023-12-04 17:07:09 +01:00
Tobias Hunger
3b7e79958a
cpp: Make Timer available to other FFI-exported types
...
We have a nice FFI-compatible wrapper areound rust timers in C++, so
allow to use that in other types exported to C++.
This also makes sure the rust and C++ side agree on the size of the
type, with the nice side effect that the rust Timer now uses half as
much space now as it did before.
2023-12-01 18:47:00 +01:00
Tobias Hunger
3a87342073
testing: Add a method to the testing interface to query the mocked time
...
I find this helpful when debugging tests using mocked time.
2023-12-01 17:36:18 +01:00
Simon Hausmann
4b4a7d6ff2
Remove Qt from the C++ packages on Windows and macOS
...
Commit 79b70782b4 was supposed to do this.
- Remove now unused Qt license file bunding from prepare_binary_package.sh
- Remove CMake Qt bundling option
2023-12-01 14:48:07 +01:00
ogoffart
b9255ab8e2
Bump version number to 1.3.2
2023-12-01 08:05:15 +00:00
Tobias Hunger
471bef422d
core: Do not report singleshot timers set up via start() as running
...
... after firing once. `running()` will now return `true` for such timers
till just before the callback is run and `false` after that point.
Add test a new test and update existing C++ tests to make them comply
with the changed behavior.
2023-11-30 20:14:45 +01:00
Olivier Goffart
583322be56
Update corrosion
2023-11-30 08:29:35 +01:00
Jocelyn Turcotte
678c7678e9
C++ API for KeyEvent.repeat
...
Add a new dispatch_key_press_repeat_event function to dispatch auto-repeated
key events.
2023-11-29 09:31:31 +01:00
Simon Hausmann
d4e51b810e
Node.js: Add some keywords and description to package.json ( #4018 )
2023-11-27 18:26:52 +01:00
Simon Hausmann
42d575262e
Fix SharedString::end() throwing an exception when MSVC iterator debugging is enabled ( #4017 )
...
Don't dereference end() of a string_view.
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2023-11-27 18:11:55 +01:00
Florian Blasius
5af7095fc9
move mapmodel to private_api ( #4015 )
...
Moved MapModel to private api because it is not ready now until the notify mechanism for node models is improved.
2023-11-27 13:11:31 +01:00
Simon Hausmann
e4cc80aeea
Fix typescript errors shown in VS code when editing node test files ( #3999 )
...
The nodenext module resolution was only passed to ts-node, but vscode didn't see it.
Use a dedicated tsconfig.json for vscode as well as ts-node.
2023-11-24 17:22:38 +08:00
Florian Blasius
b19cbba7ad
node: added MapModel ( #3946 )
...
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2023-11-23 12:20:06 +01:00
Olivier Goffart
b903c60a3a
Upgrade corrosion
2023-11-23 09:34:27 +01:00
ogoffart
0a5bf6c37b
Bump version number to 1.3.1
2023-11-23 07:47:07 +00:00