Olivier Goffart
1e19e0a754
Rust codegen: fix compile if slint names matches internal names
...
Fixes #4419
2024-01-24 22:47:58 +01:00
Olivier Goffart
573d4a3b50
Remove the test function for sending double_click
...
They are not commonly used so no need to use semi-public api for that
and it's really easy to similate with ust two clicks anyway
The previous test function were added before there was public way to
send events
2024-01-24 10:20:06 +01:00
Simon Hausmann
9f440c2699
Node.js: Document global singletons
2024-01-23 17:51:01 +01:00
Olivier Goffart
f5bba87db0
Docs: explain how to use tokio futures
...
Discussed in https://github.com/slint-ui/slint/discussions/4377
2024-01-23 17:43:36 +01:00
Olivier Goffart
5a43f3b8af
Janitor: dependency updates
2024-01-22 12:36:32 +01:00
Simon Hausmann
8e0af0bf63
C++: Add convenience functions to clear and replace the VectorModel's vector
...
This was requested by a customer recently and it seems rather straight-forward to implement and offer. `clear()` mirrors `std::vector::clear()` and `set_vector` mirrors the `set_vec` we have in Rust.
2024-01-19 16:58:20 +01:00
Simon Hausmann
d44717a11d
doc: Add a section for targeting MCUs in the C++ documentation
...
Fixes #4180
2024-01-19 11:42:30 +01:00
Simon Hausmann
7a295d1b75
Bump Corrosion
...
Fixes #2508
2024-01-17 18:08:59 +01:00
Simon Hausmann
dd0805c8fc
Node.js: Add binaries for macOS and Windows
...
These are built with the default features of the interpreter crate, as
unfortunately napi-rs doesn't allow us to select features on the command
line yet. The next version (3.0) will add that, then we can keep the
binaries in sync.
So meanwhile, these are basically winit/femtovg/software enabled
binaries.
cc #1991
2024-01-17 11:48:54 +01:00
Simon Hausmann
787a8d6bfb
Node.js: Include napi generated module loader in npm package
...
That might help with build-on-demand.mjs trying to load it :)
2024-01-16 09:28:21 +01:00
Simon Hausmann
c9f11f7f72
Node.js: Add missing error argument to arrow function for debugging build-on-demand.mjs
2024-01-16 09:13:11 +01:00
Olivier Goffart
750a3033f8
C++ docs: add cmake reference
2024-01-15 17:36:29 +01:00
Simon Hausmann
732f9fa4ba
Node.js: Add some debug output to the build-on-demand.js
...
Maybe this will tell us why it doesn't work.
2024-01-15 15:09:47 +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