Commit graph

874 commits

Author SHA1 Message Date
Wilston Oreo
bef532b5fc
Optional C++ namespaces (#4759)
Co-authored-by: Michael Winkelmann <michael@winkelmann.site>
2024-03-06 19:43:11 +01:00
Simon Hausmann
fa2cf8c28a C++ Interpreter: Add support for setting the translation domain
This maps straight to the Rust API.
2024-02-22 16:58:38 +01:00
Olivier Goffart
9f0c3c94a9 C++: minimize/maximize/fullscreen API on Window 2024-02-22 13:17:50 +01:00
Ralph Minderhoud
9cb1a4a4e0
Add API for minimize/maximize on Window component (#4581)
Closes #4400
2024-02-22 10:40:36 +01:00
Olivier Goffart
7b2ff89f1c Fix nightly warnings
eg:
```
warning: the item `Box` is imported redundantly
```
2024-02-21 10:52:04 +01:00
ogoffart
a0eed4e58e Bump version number to 1.5.0 2024-02-20 17:33:11 +00:00
Olivier Goffart
97067c3d65 Add 9slice information at runtime 2024-02-13 14:46:27 +01:00
Olivier Goffart
9b094251b8 C++: only enable the qt backend by default on Linux 2024-02-07 15:20:03 +01:00
Olivier Goffart
af8075d1b2 Only enable the Qt backend by default on Linux
The trick is that the backend selector build by default with the
i-slint-backend-qt, but the "enable" feature is only enabled if the
qt-backend feature is enabled explicitly, or on linux from the slint
or slint-interpreter crate
2024-02-07 15:20:03 +01:00
J-P Nurmi
cc5d2b24e5 Add BasicBorderRectangle to avoid unnecessary xxx-border-radius bindings 2024-02-06 18:01:35 +01:00
Olivier Goffart
5e12f0876f C++: fix the FilterModel's row_removed
Same fix as in the rust equivalent from previous commit
2024-02-05 12:04:30 +01:00
Olivier Goffart
9200480b53 Fix a few links to the docs that changed with the new structure 2024-02-03 09:38:49 +01:00
ogoffart
fec2b961db Bump version number to 1.4.1 2024-02-01 09:12:42 +00:00
Simon Hausmann
45f182e666
C++: Permit passing a value to VectorModel::set_vector by value (#4491)
The previous signature would not allow that, but we should allow it for consistency with the constructor.
2024-01-31 16:09:06 +01:00
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
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
Olivier Goffart
750a3033f8
C++ docs: add cmake reference 2024-01-15 17:36:29 +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
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
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
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
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
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
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
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
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
Olivier Goffart
e008019243 C++: Fix warning on macOS about unused variable 2023-11-17 10:58:20 +01:00
Olivier Goffart
0efd2fd2a4 janitor: code formating 2023-11-03 15:43:29 +01:00
Olivier Goffart
f043234890 C++: fix (private) properties of type EasingCurve
tests/cases/properties/animation_props_depends.slint in previous commit
added a property<easing> and that didn't work with C++
2023-11-03 15:11:06 +01:00
Ken Carpenter
b20536131f
Add more easing formulas (#3812)
Closes #2655
2023-11-03 09:20:44 +01:00