mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 04:45:13 +00:00
SixtyFPS -> Slint in the C++ documentation
This commit is contained in:
parent
ad4eea9e96
commit
f48d7d9f9e
13 changed files with 44 additions and 44 deletions
|
@ -8,7 +8,7 @@ This guide lists all API incompatible changes between major versions and describ
|
|||
|
||||
In version 0.2.0 we have increased the minimum version of C++. You need to have a C++ compiler installed that supports C++ 20 or newer.
|
||||
|
||||
If you are building SixtyFPS from source, you need to make sure that your Rust installation is up-to-date. If you have installed Rust using `rustup`, then you can upgrade to the latest Version of Rust by running `rustup update`.
|
||||
If you are building Slint from source, you need to make sure that your Rust installation is up-to-date. If you have installed Rust using `rustup`, then you can upgrade to the latest Version of Rust by running `rustup update`.
|
||||
|
||||
### CMakeLists.txt
|
||||
|
||||
|
@ -43,7 +43,7 @@ if (value.has_value()) {
|
|||
|
||||
#### Callbacks
|
||||
|
||||
Callbacks declared in `.60` markup can be invoked from C++ using {cpp:func}`sixtyfps::interpreter::ComponentInstance::invoke_callback()` or {cpp:func}`sixtyfps::interpreter::ComponentInstance::invoke_global_callback()`. The arguments to the callback at invocation time used to require the use of `sixtyfps::Slice` type. This was changed to use the C++ 20 [`std::span`](https://en.cppreference.com/w/cpp/container/span) type, for easier passing.
|
||||
Callbacks declared in `.60` markup can be invoked from C++ using {cpp:func}`slint::interpreter::ComponentInstance::invoke_callback()` or {cpp:func}`slint::interpreter::ComponentInstance::invoke_global_callback()`. The arguments to the callback at invocation time used to require the use of `sixtyfps::Slice` type. This was changed to use the C++ 20 [`std::span`](https://en.cppreference.com/w/cpp/container/span) type, for easier passing.
|
||||
|
||||
Old code:
|
||||
|
||||
|
@ -55,7 +55,7 @@ instance->invoke_callback("foo", sixtyfps::Slice{ args, 2 });
|
|||
New code:
|
||||
|
||||
```cpp
|
||||
sixtyfps::Value args[] = { SharedString("Hello"), 42. };
|
||||
slint::Value args[] = { SharedString("Hello"), 42. };
|
||||
instance->invoke_callback("foo", args);
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue