Commit graph

17 commits

Author SHA1 Message Date
Tobias Hunger
a3b86690ff [reorg]: Move the rendering backends into internal 2022-01-31 16:00:50 +01:00
Olivier Goffart
319704d3fb C++: use default operator==
Since we now use C++20, we can simplify our code a bit
2022-01-24 17:16:55 +01:00
Tobias Hunger
7bba5c4e31 janitor: Fix warning when building C++ tooling
Replace `std::array::IntoIter::new(...)` with
`IntoIterator::into_iter(...)` as suggested by the compiler.
2022-01-12 12:31:15 +01:00
Simon Hausmann
aadb755fd7 Join separated documentation for some interpreter C++ API types
The docs were living in the public header file while the enums/structs were defined in Rust.
With the infrastructure of the parent commits we can join them together.
2022-01-05 16:32:55 +01:00
Simon Hausmann
dc387553ba Centralize the C++ sixtyfps version macros in the generated public header file 2022-01-05 16:32:55 +01:00
Simon Hausmann
174fd2659f Remove some duplication in the documentation of API that's shared between Rust and C++
This change makes the start of sharing the docs for the `TimerMode` enum
between Rust and C++. The reference to Timer::start in there works as
both doxygen and rustdoc find the right reference, but this needs
careful editing in the future and double-checking!

Another "caveat" is that the docs for the TimerMode enum say that the
enum is defined in the file "sixtyfps_generated_public.h", which is
correct as-is but not as pretty as "sixtyfps.h". I tried various ways
with \file and \includedoc, but couldn't get it working differently.

To implement this, the cppdocs steps now also runs cbindgen and cbindgen
generates a new sixtyfps_generated_public.h file that contains types we
do want to have in the public sixtyfps namespace.
2022-01-05 16:32:55 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +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
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
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
Olivier Goffart
ae3e1b4680 Allow normal Element to be in the Dialog's button row with dialog-button-role 2021-10-05 09:46:20 +02:00
Olivier Goffart
2716e4b4dd TouchArea: add the pointer-event callback
... instead of `pressed-changed`

This allows to see what mouse button was pressed.

Closes #535
2021-10-04 14:39:49 +02:00
Olivier Goffart
671df0f24f New widget: StandardButton 2021-09-29 16:25:44 +02:00
Simon Hausmann
4eef8c7688 Add API to sixtyfps::Image in Rust and C++ to access the optional path 2021-09-28 08:52:27 +02:00
Simon Hausmann
4f158618a1 Fix make install in the C++ build running cbindgen
Make install would still trigger the generated_headers_target CMake
custom command - due to the use of add_dependencies - and that would end
up running cbindgen. That in turn breaks "make install" when it's run in
an environment that doesn't have cargo in PATH (for example when using
"sudo make install").

This patch folds the generation of the C++ header files into the build
of the sixtyfps-cpp crate - via build.rs. By default the headers are
placed in api/sixtyfps-cpp/generated_include but the CMake build
redirects that into the build directory.

Note: Due to the way that corrosion works, cargo is still run when
running "make install", but it's path is absolute and there should not
be any reliance on the PATH environment variable.
2021-09-18 07:32:53 +02:00
Renamed from xtask/src/cbindgen.rs (Browse further)