Commit graph

222 commits

Author SHA1 Message Date
Tobias Hunger
2f6be7b31f Mass-add copyright headers into Cargo.toml files 2022-01-19 11:25:21 +01:00
Simon Hausmann
9e61d4168b Fix build of Paths with path elements with rust/llr
A `Path` with `MoveTo`/`LineTo`/etc. sub-elements now maps to an Expression::PathData of type
Type::PathData.

The llr lowering creates an Array of Type::PathElement, which is casted to PathData.

This only covers the element case. The compiled path events are still todo.
2022-01-12 16:22:35 +01:00
Tobias Hunger
2b222457ef
janitor: Remove some unnecessary to_string() calls 2022-01-04 18:23:02 +01:00
Tobias Hunger
6d69c343dc
Revert "Deduplicate use of ptr_eq for Models"
This was not intended to get uploaded without review!

This reverts commit d678f4b1da.
2022-01-03 17:10:27 +01:00
Tobias Hunger
d678f4b1da
Deduplicate use of ptr_eq for Models 2022-01-03 16:22:32 +01:00
Tobias Hunger
597467fae9 Manually update license information in Cargo.toml files
... that are not published or private or not processed by xtask for
other reasons.
2021-12-22 10:06:12 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
ogoffart
3278b39549 Bump version number to 0.1.6 2021-11-24 14:19:09 +00: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
ogoffart
b25ae6fbcd Bump version number to 0.1.5 2021-10-26 07:36:54 +00:00
Simon Hausmann
63bf1af093 Add support for tracking the length of a model in Rust
This is done by exposing the ModelNotify to the caller via the new
ModelTracker trait, which has a function that allows "hooking" into the
dirty tracking of the size.

By extension, this also works in JavaScript.

cc #98
2021-10-20 15:25:28 +02:00
ogoffart
77fcd5221b Bump version number to 0.1.4 2021-10-07 09:36:43 +00:00
ogoffart
8b9717633e Bump version number to 0.1.3 2021-10-05 10:31:45 +00:00
Simon Hausmann
7da24c40c3 Use the GL backend in the CI for node tests
In the CI we set SIXTYFPS_NO_QT=1 and this change removes the testing
backend from the nodejs tests, in order to fix #419 .
2021-09-06 15:56:59 +02:00
ogoffart
e54e03148f Bump version number to 0.1.2 2021-09-04 10:08:51 +02:00
Tobias Hunger
aea4ecca99 Apply pre-commit hooks to all files 2021-08-17 22:38:16 +02:00
Olivier Goffart
a39dd6ac4f Interpreter API: preserve the dashes and underscore when listing properties 2021-08-17 18:47:41 +02:00
Olivier Goffart
0dbb2a7758 Fix nodejs CI
replaceAll was added in node 15, but the CI still runs node 12
2021-08-10 22:21:01 +02:00
Olivier Goffart
c25538c982 Normalize identifiers to - instead of _
As a result
 - The error messages will now show the error with `-` instead of `_`
 - The LSP will auto-complete with -
 - The interpreter's list of properties will list the property with '-'
   (but we made the change so that set_property, get_property, and so on
   work also if passed a '-')
2021-08-10 22:21:01 +02:00
Simon Hausmann
8a3a68a4fa Add API to Rust sixtyfps::Image to enable creation from user supplied image buffers
This adds an ImageBuffer and PixelBuffer type for SharedVector
backed images. The documentation explains how to use this
with low-level rendering functions and the popular image crate.

Fixes #387
2021-08-10 15:56:01 +02:00
ogoffart
53f286258c Bump version number to 0.1.1 2021-08-10 08:06:20 +00:00
Tobias Hunger
87df173d17 Janitor: Fix clippy::explicit_counter_loop 2021-08-09 13:19:34 +02:00
Tobias Hunger
04738a900f Janitor: Fix clippy::map_clone 2021-08-04 22:50:35 +02:00
Tobias Hunger
46edbd0410 Janitor: Fix clippy::useless_format 2021-08-04 22:50:35 +02:00
Tobias Hunger
24a2021226 Janitor: Fix clippy::needless_borrow 2021-08-04 22:50:35 +02:00
Tobias Hunger
3c9451f94c Janitor: Fix clippy::needless_question_mark 2021-08-04 22:50:35 +02:00
Simon Hausmann
29f5853332 Provide sixtyfps::Window by reference in the Rust API
This also removes Clone from the Window again, to avoid having to face
the question: Does cloning a window duplicate it on the screen?
2021-08-03 10:32:04 +02:00
Simon Hausmann
66891a299c Start a new sixtyfps::Window API for Rust, C++, the interpreters and JS
The generated component now provides access to a Window type
via the window() accessor function.

This is part of #333
2021-08-03 10:32:04 +02:00
Olivier Goffart
fae6e0b52d Document that angles are represented in degrees at run-time 2021-07-26 17:36:02 +02:00
Tobias Hunger
9539a53480 Janitor: Fix clippy::redundant_clone 2021-07-23 13:48:52 +02:00
Tobias Hunger
d543bc3a1d Janitor: Fix clippy::assign_op_pattern 2021-07-23 13:48:52 +02:00
Tobias Hunger
0405beed83 Janitor: Fix clippy::redundant_static_lifetimes 2021-07-23 13:48:52 +02:00
Olivier Goffart
673c0ce81c Add a as_any to the Model trait to allow getting a reference to the original model 2021-07-20 15:38:10 +02:00
Tobias Hunger
efc0d63e8b Janitor: iter().cloned().collect() on a slice to create a Vec == to_vec()
This is clippy::iter_cloned_collect
2021-07-15 07:55:06 +02:00
Tobias Hunger
dc51d4ccda Use impl Default instead of new() constructors 2021-07-12 13:22:25 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
98cec35080 Increase version numbers 2021-06-28 10:39:43 +02:00
Tobias Hunger
e01bd87df8 Janitor: Fix warnings about markdown files
These might change the layout of the rendered markdown files. This will
also fix some typos along the way:-)
2021-06-28 08:32:25 +02:00
Tobias Hunger
13d7f5e7bd Janitor: Fix typos in comments and user-facing strings
Also adapt tests for error messages containing the fixed strings.

No behavior change is intended!
2021-06-28 08:32:25 +02:00
Tobias Hunger
4b1db93912 Janitor: Fix typo in function name
No behavior change is intended here!
2021-06-28 08:32:00 +02:00
Olivier Goffart
ce34ff87d0 Finish support for callback aliases
cc #111
2021-06-07 20:40:36 +02:00
Olivier Goffart
142a8dc185 Rename ImageReference to ImageInner and make Immage.0 private 2021-05-28 17:05:16 +02:00
Olivier Goffart
0b3fecf300 WIP: API to expose image loading from C++ and Rust 2021-05-28 17:05:16 +02:00
Olivier Goffart
f06bf8d5a7 Fix repeater in box layout 2021-05-11 14:59:57 +02:00
Olivier Goffart
7f7f2245d8 Use the testing backend for node 2021-05-11 11:40:26 +02:00
Olivier Goffart
3380383787 Bump version number
(Does not include docs and README yet)
2021-04-26 13:16:48 +02:00
Olivier Goffart
91ed04a72c Make length (still the default for all property) be the logical length
And a new `physical_length` is now the physical_length unit

Note: this does not change the runtime part yet
2021-04-21 17:15:19 +02:00
Olivier Goffart
7ae850d564 Rename Type::Length -> Type::PhysicalLength 2021-04-21 17:15:19 +02:00
Simon Hausmann
afe3df6381 Remove the public API for registering fonts by path or memory chunk
This is not needed anymore in the light of being able to write `import "blah.ttf"` in .60 markup
2021-04-14 10:01:33 +02:00
Simon Hausmann
794d3ec6ec Revert "Add a nodejs testing function for apply_layout"
This reverts commit beb5d63d1b.

Oops, the more modern style *is* to use send_mouse_click.
2021-04-08 16:58:37 +02:00