interpreter: Hide the ComponentFactory from the public API

(also re-order the types in the docs of api/rs/slint/lib.rs to make the
non-literal types appart)
This commit is contained in:
Olivier Goffart 2023-07-27 09:36:21 +02:00 committed by Olivier Goffart
parent b55cdb9cf4
commit 627deb1e9f
2 changed files with 4 additions and 7 deletions

View file

@ -172,13 +172,11 @@ The follow table summarizes the entire mapping:
| `.slint` Type | Rust Type | Note |
| --- | --- | --- |
| `angle` | `f32` | The value in degrees |
| anonymous object | anonymous tuple | The fields are in alphabetical order. |
| `array` | [`ModelRc`] | Arrays are represented as models, so that their contents can change dynamically. |
| `bool` | `bool` | |
| `brush` | [`Brush`] | |
| `color` | [`Color`] | |
| `duration` | `i64` | At run-time, durations are always represented as signed 64-bit integers with millisecond precision. |
| enumeration | `enum` of the same name | The values are converted to CamelCase |
| `float` | `f32` | |
| `image` | [`Image`] | |
| `int` | `i32` | |
@ -187,6 +185,8 @@ The follow table summarizes the entire mapping:
| `Point` | [`LogicalPosition`] | A struct with `x` and `y` fields, representing logical coordinates. |
| `relative-font-size` | `f32` | Relative font size factor that is multiplied with the `Window.default-font-size` and can be converted to a `length`. |
| `string` | [`SharedString`] | A reference-counted string type that can be easily converted to a str reference. |
| anonymous object | anonymous tuple | The fields are in alphabetical order. |
| enumeration | `enum` of the same name | The values are converted to CamelCase |
| structure | `struct` of the same name | |
For user defined structures in the .slint, an extra struct is generated.