Commit graph

862 commits

Author SHA1 Message Date
Simon Hausmann
00411f622e Remove one outdated section from the esp-idf troubleshooting 2024-09-19 23:36:41 +02:00
Simon Hausmann
f4406f7583 Add missing license tags 2024-09-19 23:36:41 +02:00
Simon Hausmann
7ad2dbbaba Integrating the MCU docs into the C++ docs
- Getting Started is now "Getting Started on Desktop"
- A new "Getting Started on MCU" section combines:
 - ESP-IDF
 - STM32 (for the board templates we provide)
 - Generic (instructions from cmake.md moved here)

The ESP-IDF README is now shortened and links to the C++ esp-idf
section (careful! This might become a dead link if we re-organize
in the future...)
2024-09-19 23:36:41 +02:00
Simon Hausmann
cd2b738c7a Rename SwipeGestureRecognizer to SwipeGestureHandler
The origin of this proposal is the name of the `swipe-left`, etc.
directional, boolean properties. They're missing another verb in their
name. In principle the right choice would be "recognize". That is what
the type name suggests, that's the term the documentation uses, so the
code should read `recognize-swipe-left: true;`. However that is a long
word. "Handle" is a verb that's simpler. It's also more generic (that's
a downside), but it's otherwise short enough to make things look
"right":

```
SwipeGestureHandler {
    handle-swipe-left: true;
    swiped => { something.naviate-left(); }
}
```

Therefore this patch proposes to rename the type to SwipeGestureHandler
and prefixes the boolean directional properties with "handle".
2024-09-18 16:37:27 +02:00
Simon Hausmann
ddfbd1821a For our Rust, C++, and Node.js templates, recommend the use of a zip archive download instead of git
This removes any git history of ours from the download, and removes the need to have git installed.
2024-09-18 10:48:38 +02:00
Olivier Goffart
d2bd5366f4 Timer::set_interval
Don't return an Option, just return 0 when the timer is not started.
As discussed in the API review, the rational is that the interval is
just like a field in a struct and when the struct is default
constructed, it is initialized to 0
2024-09-18 09:24:39 +02:00
Olivier Goffart
2405877591 CI: use "nightly" instead of the version in the filename of the C++ packages 2024-09-13 19:13:04 +02:00
Simon Hausmann
4d43d02b03 esp-idf: Add support for using pre-built binaries
Run the nightly esp-idf test against the esp-idf slint nightly
binaries, after creating them. The snapshot is run earlier as well
then, so that the tests don't "leak" into the morning working hours.
2024-09-11 19:27:41 +02:00
Olivier Goffart
5663ddd9cc
SwipeGestureRecognizer (#6005) 2024-09-09 14:40:55 +02:00
Simon Hausmann
f0a70bc150 Bump esp-println version
0.9 was yanked :(
2024-09-06 15:54:29 +02:00
Simon Hausmann
9c8b0a613b C++: Strip host suffix from package name if there's no host dependent content 2024-08-30 10:25:49 +02:00
Simon Hausmann
4d585279b0 STM32: Add support for rendering rotation 2024-08-30 08:49:26 +02:00
Olivier Goffart
30c98deecd C++: use PROJECT_VERSION for the CPACK version 2024-08-29 14:12:42 +02:00
Simon Hausmann
069b157143 Unify Slint project version in CMake build 2024-08-29 11:23:09 +02:00
Simon Hausmann
90b2058e49 Make it possible to configure a CMake build with the slint-compiler to be downloaded at app configure time 2024-08-29 11:23:09 +02:00
Simon Hausmann
35de15ce4b Remove stray CMake cache variable setting
The same line exists unconditionally further down in the same file.
2024-08-28 11:16:55 +02:00
Simon Hausmann
5d03d6e1bd Simplify slint-compiler import location logic in SlintConfig.cmake.in
Instead of detecting the suffix, just copy across the corrosion-determined file name.

Amends 13975d9def
2024-08-25 21:05:55 +02:00
Simon Hausmann
13975d9def Fix locating the slint-compiler.exe on cmake cross-compiled packages
When cross-compiling CMAKE_EXECUTABLE_SUFFIX may not be set to .exe even
though the host is Windows, because this variable always refers to the
target. This is a missing feature in cmake, so work around it for now.
See also https://gitlab.kitware.com/cmake/cmake/-/issues/17553 I made a
similar workaround in Corrosion long time ago with commit
b8a6b26a0f2d526e0492df9fd88c0495b0b8a64f

The target prop line is duplicated in favor of introducing a variable,
that would otherwise be at risk of being visible in the user scope.
2024-08-23 18:10:11 +02:00
Simon Hausmann
e488a36487 C++: For freestanding builds, default to the fluent style
Freestanding implies the lack of windowing system presence and therefore the choice of say Cupertino when building on macOS is not good.

Fluent isn't quite a great choice right now either, as it's not very touch friendly, but it's a compromise :)
2024-08-23 13:25:50 +02:00
Simon Hausmann
327e0d8d95
Fix C++ package names when not cross compiling 2024-08-22 20:15:41 +02:00
Simon Hausmann
d413fd5217
Build binary MCU packages as tarballs (#5900)
This includes xtensa for s3, esp riscv targets, as well as thumbv7
for STM32.

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2024-08-22 16:16:55 +02:00
Simon Hausmann
d78354f01b
Initial import of STM32 Platform Integration (#5892)
This is a head-only library for now.
2024-08-22 15:55:01 +02:00
Simon Hausmann
9bdade0105 Compile the multiple-includes test with a header-only build of appwindow.slint 2024-08-20 15:53:24 +02:00
Simon Hausmann
c25a03d6f7 C++: Make it possible to split up the C++ code generated for a .slint file
Add a COMPILATION_UNITS argument to slint_target_sources that defines into how many .cpp files to split up a .slint file. The new default is now one.
2024-08-20 15:53:24 +02:00
Simon Hausmann
e54eedc351 Document how to solve the multiple symbol definition errors that sometimes happen with the xtensa toolchains
Closes #5862
2024-08-20 12:44:30 +02:00
Olivier Goffart
a9f526491a Timer Element
Closes #5724
2024-08-16 16:36:38 +02:00
ogoffart
4dd7d96a28 Bump version number to 1.8.0 2024-08-15 12:44:46 +00:00
Simon Hausmann
a727d87796 CMake: Make it possible to override the scale factor
Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
2024-08-14 11:00:50 +02:00
Simon Hausmann
360f192b91 esp-idf: Adjust touch coordinates to scale factor
Taken from https://github.com/slint-ui/slint/pull/5016/files

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2024-08-14 11:00:50 +02:00
ogoffart
bbf7edc5a3 Bump version number to 1.7.2 2024-08-09 09:52:17 +00:00
Olivier Goffart
0f8246d598
C++: add assert_main_thread to public functions in the Window
Some have it some don't. Just add it everywhere.

See https://github.com/slint-ui/slint/discussions/5762
2024-08-06 22:52:45 +02:00
Simon Hausmann
8a7db55bb6
Route debug() calls in Slint consistently through Platform's debug_log() (#5718) 2024-07-29 16:31:09 +02:00
Olivier Goffart
5f78b599cf esp-idf README: fix compilation of the code sample
- `touch_handle` can't be initialized with an optional anymore, it is a
   pointer.
 - Take the opportunity to actually initialize the touch handle.
 - `bsp/display.h` for the box3 fails to compiled if it is included
   before `bsp/esp-bsp.h`
2024-07-24 22:57:57 +02:00
ogoffart
aa25e3cd44 Bump version number to 1.7.1 2024-07-23 12:05:34 +00:00
Simon Hausmann
e36eb6aba6 Document behaviour of globals when exporting multiple components
Fixes #5467
2024-07-18 13:43:13 +02:00
Simon Hausmann
c5f7c38914 esp-idf: Silence compilation warning by avoiding deprecated syntax 2024-07-17 10:41:34 +02:00
Simon Hausmann
bda89c25da Document that availability of slint::testing is conditional to enabling the feature and experimental features. 2024-07-11 11:47:09 +02:00
Simon Hausmann
2be4b320b9 C++: Include AccessibleRole in the slint::testing namespace docs 2024-07-11 11:47:09 +02:00
Simon Hausmann
27dc6e53c0
API review: enable all features in the C++ docs (#5592)
And make sure that functions excluded when freestanding is enabled are included in the docs.
2024-07-11 08:29:51 +02:00
Simon Hausmann
bc1ada20bd Revert "C++: Enable software renderer by default"
This reverts commit 42571bbddb.

The line-by-line renderer doesn't compile with xcode 15.4,
and TestWindowAdapter doesn't compile with gcc 10 in the linux CI.
2024-07-10 22:39:20 +02:00
Simon Hausmann
42571bbddb
C++: Enable software renderer by default
It's also enabled by default in the rust crates and the tools.
2024-07-10 22:19:20 +02:00
Olivier Goffart
e67e46ab47 LLR: merge the popup's x and y property access in one expression 2024-07-10 17:54:03 +02:00
Simon Hausmann
419042f476 Add support for using own properties in PopupWindow's x and y properties
This allows positioning popup windows in a way that takes their width/height into account.
2024-07-10 13:43:41 +02:00
Olivier Goffart
42d7661ec6 C++: make the PhysicalRegion::rectangles non-overlapping 2024-07-10 10:58:27 +02:00
Simon Hausmann
6750a454c1 Rename touch and panel to touch_handle and panel_handle and document their nullptr values 2024-07-08 21:36:47 +02:00
Simon Hausmann
4c432c261d API review (esp-idf): Replace the use of std::optional<esp_lcd_touch_handle_t> with esp_lcd_touch_handle_t directly
esp_lcd_touch_handle_t is a pointer, so might as well treat it like one.

Also default initialize the panel pointer.
2024-07-08 21:36:47 +02:00
Olivier Goffart
35a6e7bde5 Split Text item into SimpleText and ComplexText
SimpleText has all the most common properties and is half the size
2024-07-05 12:51:25 +02:00
Olivier Goffart
6b1c02be94 C++: document the SLINT_FEATURE_* macros 2024-07-05 12:50:05 +02:00
Simon Hausmann
6d79ca1a05 Document the SLINT_FEATURE_XXX pre-processor variables
and sync them with the existing features.
2024-07-04 13:39:13 +02:00
Simon Hausmann
7ab7dd63c5 Document SLINT_ENABLED/DISABLED_FEATURES target properties 2024-07-04 13:39:13 +02:00