Olivier Goffart
ef7fb6422a
C++ Image API: introduce the SharedPixelBuffer
2023-03-20 17:22:56 +01:00
Olivier Goffart
be47c8464c
C++: implement creation of image from raw data
...
Issue #616
2023-03-20 17:22:56 +01:00
Olivier Goffart
81cb89d374
C++: fix including the generated file in several translation units
2023-02-17 16:42:40 +01:00
Olivier Goffart
e57627d535
Use the new syntax in more tests
...
That are failing otherwise as there would be a warning
2023-02-14 12:38:39 +01:00
Olivier Goffart
eaa9db4911
C++: use size_t everywhere as index in our models
...
cc #2024
2023-02-07 15:25:44 +01:00
Olivier Goffart
ae20ec59c8
Rename PointerEventButton::None to PointerEventButton::Other
...
And mark the enum non_exhaustive
closes #1903
2023-01-26 13:36:54 +01:00
Olivier Goffart
8967deef56
C++: add a manual test to test the platform API using Qt
2023-01-17 10:21:11 +01:00
Olivier Goffart
8d0cdc6ec2
C++: cmake: move the build instruction for the tests in the tests dir
2023-01-17 10:21:11 +01:00
Olivier Goffart
629a64ba89
C++ interpreter: do the renaming invoke_callback -> invoke
2023-01-02 23:55:47 +01:00
Florian Blasius
61c39b5fa1
Add support for dispatching key events through the public platform API
...
This change adds `KeyPress` and `KeyRelease` variants to the
`WindowEvent` enum, along with the new `slint::Key` enum, that allows
encoding keys.
2022-11-15 10:34:17 +01:00
Simon Hausmann
e9db914fb1
Add is_visible to NodeJS and C++ Window types ( #1816 )
...
Amends commit 82278a5742
2022-11-04 16:24:24 +01:00
Simon Hausmann
6df60fa723
Add a C++ Sort Model class ( #1688 )
...
This allows automatically sorting a model.
2022-09-28 10:03:05 +02:00
Simon Hausmann
cfbdce735f
Add a C++ Map Model class ( #1687 )
...
* Add a C++ Map Model class
This matches the MapModel in the Rust API.
2022-09-27 16:03:56 +02:00
Simon Hausmann
56983482b9
Rename C++'s internal AbstractRepeaterView to ModelChangeListener
...
For consistency with the Rust model implementation.
2022-09-27 10:26:55 +02:00
Simon Hausmann
5b95466fa6
Add a C++ Filter Model class ( #1685 )
...
Add a C++ Filter Model class
This matches the FilterModel in the Rust API.
2022-09-27 10:24:47 +02:00
Simon Hausmann
98e1befd0d
Port the C++ generator and C++ API to the new window ownership model
...
One key difference to the Rust way is what `slint::Window` means. In
Rust that holds the `WindowInner` and `slint::Window` is only exposed as
`&slint::Window`. This is possible because the component owns the
`Rc<dyn PlatformWindow>`, which has a function to return the
`&slint::Window`.
In C++ `slint::Window` is also exposed as `slint::Window&` in the
`window()` getter, but there's no way to get a reference to a C++
wrapper for the Rust `&slint::Window` that the `PlatformWindow` trait
returns. Therefore in C++ `slint::Window` wraps `Rc<dyn
PlatformWindow>`.
2022-08-19 15:07:27 +02:00
Olivier Goffart
ca6dfc0cb5
Run clang-format over C++ files
2022-08-17 07:44:22 +02:00
Olivier Goffart
2aaefa8e0d
C++: Setting a value to a property having a binding should always clear the binding
...
... even if the old value holds the same value as the new value
This fixes test_cpp_bindings_two_way_priority_default
Also add a C++ unit test that tests the Property type specificaly
2022-05-09 09:30:01 +02:00
Simon Hausmann
9a8c5fed9f
Remove the ugly style
...
It's ugly ;-)
The combo box for the style is commented out for now, so that we can
easily re-add it in the future once we add a new style.
2022-04-13 10:35:42 +02:00
Olivier Goffart
350f0d0d6a
C++ interpreter API: add a Value::Value(int)
constructor ( #974 )
2022-02-21 14:00:51 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
c273537990
Use logos from the logo folder over the vscode-extension icon
2022-02-04 14:28:10 +01:00
Simon Hausmann
fcf59f3793
Rename the C++ header files
2022-02-02 13:07:26 +01:00
Simon Hausmann
7d297da2fc
Rename the sixtyfps C++ namespaces
2022-02-02 12:11:27 +01:00
Olivier Goffart
03534039d6
Replace more .60 by .slint
...
Mainly an automated change with
git grep -O"sed -i 's/\.60/.slint/g'" -w "\.60"
and some manual checks
2022-02-02 10:12:31 +01:00
Olivier Goffart
0c0a783095
Rename all our .60 files to .slint
2022-02-02 10:05:45 +01:00
Olivier Goffart
f9c3e7a8de
C++ interpreter: first crash when invoking native callback
...
This was a regression following the move to the edition 2021.
The CallbackUserData was not capture in the lamda, its member were moved.
So the destructor was called right after it was set.
We must make sure we capture the whole CallbackUserData, so put the callback
inside of it. This also reduce a bit of code duplication at the same time.
Test the callback invokation with statefull lambda
2022-01-31 22:25:24 +01:00
Tobias Hunger
842f75e653
[reorg]: Move api/sixtyfps-rs/sixtyfps-* into api/rs
2022-01-31 18:24:33 +01:00