Commit graph

1174 commits

Author SHA1 Message Date
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Simon Hausmann
f08c4dfccb Add a debugging techniques page to the C++ and Rust documentation
This is listed under the reference ("how to") and explains `SIXTYFPS_SLOW_ANIMATIONS`, SIXTYFPS_DEBUG_PERFORMANCE` as well as `SIXTYFPS_SCALE_FACTOR`.

cc #728
2021-12-21 09:09:59 +01:00
Simon Hausmann
774be9ba76 Improve timer docs
Use the term interval instead of duration to emphasize that it's not a single shot.

(The single-shot docs still use duration)
2021-12-12 09:29:16 +01:00
Lukas Jung
f0a47ff154 Add mouse-cursor property to TouchArea 2021-12-07 22:41:24 +01:00
Olivier Goffart
310bf897cd Native ComboBox: style the background of the popup
Fixes: #720
2021-12-06 18:52:10 +01:00
Olivier Goffart
53775465dc
C++: add version macro
Fixes #705
2021-12-06 15:36:16 +01:00
Olivier Goffart
8b9be10ff8 Attempt to properly detect if the native style is available when cross compiling
... and using the sixtyfps! macro

The problem is that the OUT_DIR in the build script of the macro crate
is reporting a target directory for the host (since the macro itself is
built for the host), but we need to get the OUT_DIR of the crate, so query
it in the macro. Unfortunatelty, that env variable is only set when the
crate (using the macro) has a build script. So use a fallback to find the
target directory

Fixes #462
2021-12-06 12:59:48 +01:00
Olivier Goffart
ffe561f8d8 Use SharedVector internally in SharedString
Get rid of the triomphe dependency
2021-12-02 12:42:30 +01:00
Olivier Goffart
0e174b6aba Start working on makeing the generated code no_std 2021-12-01 10:36:29 +01:00
Olivier Goffart
a201c31eaf Don't use Lazy to initialize the ITEM_TREE, use OnceBox instead
Lazy needs std
2021-12-01 10:36:29 +01:00
Olivier Goffart
6b60e832ed Make sixtyfps-rs compile as a no_std crate 2021-11-30 21:33:32 +01:00
Olivier Goffart
6004c4ee2f Make the std feature optional in sixtyfps-rs
And tweak the MCU backend dependencie
2021-11-30 15:48:05 +01:00
Olivier Goffart
e4bd6bbfb8 Native style: respond to the StyleChange event
So that color scheme is updated when switching to the dark style, for example

Fixes #687
2021-11-29 17:18:23 +01:00
Olivier Goffart
c15a59892a C++: use the const version of begin and end from SharedVector::clear 2021-11-26 15:12:21 +01:00
Olivier Goffart
d9637816bb Fix memory leak in the C++ SharedVector
detaching in the destructor is not a good idea, make sure to use the const version
2021-11-26 15:02:46 +01:00
ogoffart
3278b39549 Bump version number to 0.1.6 2021-11-24 14:19:09 +00:00
Olivier Goffart
abed31454c Update version number in docs in preparation for the release 2021-11-24 14:10:16 +01:00
Simon Hausmann
78753cd3aa Include the architecture in the file name for non-Windows
On windows that's already included, but on Linux it should also be
there.
2021-11-24 13:45:52 +01:00
Simon Hausmann
42477db3e3 In the C++ prerequisites, link to the cmake website
It's easier that way :-)
2021-11-24 13:02:08 +01:00
Simon Hausmann
a244e16829 Add visiblity to the C++ binary packages
* Rename the package to `SixtyFPS-cpp-*` to make it easier to see that these are for C++
* Refer to the download and extraction process in the two C++ "READMEs"
* Set the home page url in the cmake project() command, from where cpack will pick it up for inclusion in the installer.

cc #631
2021-11-24 12:53:43 +01:00
Simon Hausmann
3550362f0b Fix blurry test in the NSIS installer for the C++ package on Windows
Enable High-DPI as per https://gitlab.kitware.com/cmake/cmake/-/issues/17724
2021-11-23 10:18:50 +01:00
Simon Hausmann
cd9db61545 Include the VS runtime dlls in the binary package
We bundle Qt and Qt needs the VC runtime DLLs. There are two options:
Find and locate vcredist.exe, include it in the NSIS installer and run
it. Alternatively, a cmake module exists to locates the DLLs and
install them.

This patch uses the latter option, for simplicity. When upstream ticket
https://gitlab.kitware.com/cmake/cmake/-/issues/17725 is implemented, we
could switch to the first option.

Note: This might include a few DLLs that Qt probably doesn't
need.
2021-11-22 16:04:09 +01:00
Olivier Goffart
d1cae710df preprocess the images at compile time
For the MCU port, we need to proccess the image to save them in the binary
in a convenient format.
This patch start this work by trying to anaylyze what format should an image
be using, and saving it as a texture in the binary.

The current graphical backend and the C++ frontend are not yet supported
2021-11-19 15:54:45 +01:00
Simon Hausmann
8f940a446e Make it possible to opt out of the default rendering backend selection
The default backend does not select any features or backends by default
on the Cargo.toml feature level. And with this change it also doesn't do
that anymore based on the target platform.

That means if the rust api crate is built with default-features = false,
no backend will be selected and the user has to take care of backend
initialization through other means.

The feature defaults, generally, are in the rust API crate, the
interpreter crate and C++ CMakeLists.txt. The latter triggers a cargo
build of sixtyfps-cpp with --no-default-features. However the cpp_test
job in the CI doesn't build sixtyfps-cpp with CMake but instead calls
cargo directly. Therefore the defaults are now also coded in the
sixtyfps-cpp Cargo.toml, to ensure that *a* rendering backend is chosen
(since the cfg.target bit is gone).
2021-11-19 15:02:52 +01:00
Olivier Goffart
921f5675d6 Put the licenses in the C++ binary package
Note that this also change the path names to "licenses" in the viewer package
2021-11-18 19:20:25 +01:00
Simon Hausmann
7f61d99734 Fix C++ examples not launching out of the box on Windows when using multi-config generator
We copy the sixtyfps_cpp.dll into the bin directory where the examples
are, but that needs to be a Debug/ or Release/ sub-directory in case of
a multi-config generator.
2021-11-18 11:40:45 +01:00
Olivier Goffart
7c34e7f27f C++ packages: Move the Qt plugins in the right directory 2021-11-18 10:23:06 +01:00
Olivier Goffart
6cfb18b5d7 Fix warnings in the tests in release
The maybe-uninitialized warning triggers while we know from what
we are testing that it is meant to be initialized
2021-11-18 10:23:06 +01:00
Olivier Goffart
304ca3b62f C++ package: Bundle the Qt binary in the binary package 2021-11-18 10:23:06 +01:00
Olivier Goffart
44118556c3 cpack: Only generate one package (the tar.gz one) 2021-11-18 10:23:06 +01:00
Olivier Goffart
238ae33fe6 Remove a presumably useless file
We have no memory of why this file is needed. Let's remove it
2021-11-16 18:01:28 +01:00
Olivier Goffart
7bf3fd2871 Fix invalid CMake package on windows because of missing IMPORTED_IMPLIB 2021-11-16 17:06:27 +01:00
Olivier Goffart
8a3b064b58 cmake: have the style as a cmake cache variable 2021-11-16 17:06:15 +01:00
Olivier Goffart
d97fe873ec Fix the FieldOffsets derive macro on non pub struct
When the struct expose as public a private type
2021-11-08 19:01:29 +01:00
Simon Hausmann
7d04ba98b1 Document MSRV in the crate README
This way it appears on crates.io

cc #622
2021-11-05 13:54:58 +01:00
Simon Hausmann
6346a55fdd Check the Rust version when using corrosion
Let cmake perform the version check. FindRust.cmake already uses VERSION_VAR
and therefore is versioned.

cc #622
2021-11-05 13:07:36 +01:00
Simon Hausmann
a4c5d3d9aa Fix build of bindings in sub-components in Rust
Implement the StrongComponentRef trait for VRcMapped so that the calls to set_property_binding
compile.
2021-11-05 11:29:59 +01:00
Olivier Goffart
3cdd830417 Bump vtable version 2021-11-04 19:57:52 +01:00
Simon Hausmann
4800217f2f Document the minimum supported Rust version
cc #622
2021-11-03 16:39:41 +01:00
Marat Nagayev
573588d634 Update cmake.md 2021-11-03 12:08:02 +01:00
Olivier Goffart
789ac719eb Make the parent_item function work with repeater component 2021-11-01 16:11:38 +01:00
Olivier Goffart
d26e95fb95 C++: Fixed sixtyfps::blocking_invoke_from_main_loop when the callable returns void
Fixes #623
2021-11-01 10:51:13 +01:00
Simon Hausmann
096fbab93d Simplify the destructor of generated C++ components
Similar to the parent commit, avoid creating an array of item refs and pass the item tree instead
to a run-time helper function.
2021-11-01 10:19:17 +01:00
Simon Hausmann
67579ec560 Simplify drop implementation of generated components
Avoid creating an intermediate array of items to free the graphics resources.
Instead call run-time function with the item tree as a parameter, which is traversed.

It's practically the same data structure that was previously created, except
that it is shared/global and has little holes for the dynamic tree items, but those are easy to skip.
2021-11-01 08:58:53 +01:00
Olivier Goffart
567c644a5f Fix PopupWindow position when all elements are not inlined
Pass a reference to the parent item in the show_popup function
so we can compute the exact location at runtime.
2021-10-28 15:52:29 +02:00
ogoffart
b25ae6fbcd Bump version number to 0.1.5 2021-10-26 07:36:54 +00:00
Olivier Goffart
ce65e7871c Update the GIT_TAG in the readme 2021-10-22 16:51:25 +02:00
Olivier Goffart
d194e18f99 Update the version number in the .md files 2021-10-22 16:09:02 +02:00
Olivier Goffart
794692cbb8 Update version in docs 2021-10-22 16:05:14 +02:00
Olivier Goffart
2f6ebfe38d Fix some docs warning 2021-10-22 14:32:17 +02:00