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
4b12ed03cf
Janitor: Fix typo in local function name
...
No behavior change is intended!
2021-06-28 08:32:00 +02:00
Olivier Goffart
99c140ae08
Allow accessing the width and height of the image in .60
...
Closes #208
2021-06-21 11:22:50 +02:00
Olivier Goffart
a97bcd5ae1
Use BTreeMap unstead of HashMap to store the bindings
...
Because the order is important to keep deterministic error and output
2021-06-18 21:47:00 +02:00
Olivier Goffart
d758102f26
Make the orientation a static parameter to BuiltinFunction::ImplicitLayoutInfo
2021-06-16 15:14:07 +02:00
Olivier Goffart
deaa0fddb0
WIP layout: split vertical and horizontal cache
...
Split the vertical and horizontal pass into different property cache
This will allow to implement "height for with"
This patch does not port the Rust or C++ binding yet
2021-06-16 15:14:07 +02:00
Olivier Goffart
2483425d57
Add abs()
2021-06-11 14:17:47 +02:00
Olivier Goffart
522e78915f
Fix the tests
2021-06-07 20:40:36 +02:00
Olivier Goffart
ce34ff87d0
Finish support for callback aliases
...
cc #111
2021-06-07 20:40:36 +02:00
Olivier Goffart
3ddc3c6ce5
Don't re-use Type::Void for inferred type
...
Make it explicit that it is inferred, and differentiate callback and property
2021-06-07 20:40:36 +02:00
Olivier Goffart
0598b3f095
The debug()
function can now take several args, and debug more types
2021-06-01 14:10:25 +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
edfa6319b2
Fix alias to globals with the interpreter
2021-05-21 16:03:57 +02:00
Olivier Goffart
896336c5c6
interpreter: Make GlobalComponent actual dynamic component
...
Will be required to fix the bug setting two way binding to global
poprerties
2021-05-21 15:25:56 +02:00
Olivier Goffart
91b43017ad
Fix build
2021-05-20 18:28:52 +02:00
Olivier Goffart
a1880bd943
Report an error when trying to convert from logical to physical coordinate in a global
2021-05-20 18:11:58 +02:00
Olivier Goffart
385844b6e5
Interpreter: make debug(...) go the the stderr instead of stdout
...
stdout breaks the LSP
Fixes #225
2021-05-17 12:56:33 +02:00
Olivier Goffart
a990e01cd8
Apply the layout restrictions to the parent element
2021-05-11 14:59:57 +02:00
Olivier Goffart
81473c2541
Remove implicit_size from the Item vtable
...
Use the preferred size in the layouting_info instead.
2021-05-11 14:59:57 +02:00
Olivier Goffart
f06bf8d5a7
Fix repeater in box layout
2021-05-11 14:59:57 +02:00
Olivier Goffart
b463e3cca4
WIP refactor layout
...
This commit add support for the box layout
2021-05-11 14:59:57 +02:00
Olivier Goffart
21a80f4562
WIP: Layout refactoring
...
Instead of using a solve_layout function in the component, use property to hold
a layout cache.
This commit only implement the GridLayout and only the interpreter part
2021-05-11 14:59:57 +02:00
Simon Hausmann
491b064e27
Fix loading of the printer demo in the online editor
...
Don't panic when loading a path from the file system fails, instead print an error.
2021-04-27 14:38:46 +02:00
Simon Hausmann
5e7a030e67
Fix cargo fmt
...
Remove trailing whitespace
2021-04-14 09:49:02 +02:00
Simon Hausmann
f7ce1ba8b4
Generate registration code for custom fonts imported in .60 files
...
This removes the need to manually register fonts. This is initially
applied to the printer demo, but the other demos and removal of the
public manual registration API will come in follow-up commits.
2021-04-14 09:30:32 +02:00
Olivier Goffart
e67deebc76
Make rgb() and rgba() a macro that can take 3 or 4 arguments
...
and that accept both percent or integer
Closes #139
2021-04-12 15:19:15 +02:00
Olivier Goffart
ca64a540c4
Continue support for rgb() function
...
Fixup of previous commit which was part of https://github.com/sixtyfpsui/sixtyfps/pull/139
2021-04-12 15:18:25 +02:00
Seo Sanghyeon
0a76f40093
Add rgb function
2021-04-12 13:24:46 +02:00
Olivier Goffart
5dfa2549c8
Put the named reference in a Rc so it will be easier to compute the use count and suck
2021-03-29 15:16:41 +02:00
Olivier Goffart
8866d116fe
Expose the sixtyfps_interpreter::Struct
2021-03-17 14:51:55 +01:00
Olivier Goffart
ad75d41e20
Rename struct priperties to fields
2021-03-16 12:50:33 +01:00
Olivier Goffart
3db3400951
Rename the Object type to Struct in the compiler
2021-03-16 12:38:53 +01:00
Simon Hausmann
8372d3f6d8
Rename call_*
to invoke_*
for callbacks
...
Fixes #187
2021-03-15 17:01:05 +01:00
Simon Hausmann
9034bd3d1a
Move the refined eval::Value
API to api::Value
...
This is the new public value representation for the interpreter
2021-03-15 15:12:34 +01:00
Simon Hausmann
c2c3e00cd7
Remove ModelPtr
from the interpreter
...
Instead stick a straight `Rc<dyn ...>` into the `Value` enum
2021-03-15 14:43:01 +01:00
Simon Hausmann
c9ef9c93d8
Hide Value::PathData/EasingCurve/EnumerationValue
...
As discussed, these are not yet for public API
2021-03-15 12:58:00 +01:00
Simon Hausmann
a4c196df60
Use api::Struct
in Value::Struct
, replacing Value::Object
2021-03-15 12:55:39 +01:00
Olivier Goffart
8074f74d67
Implement From instead of TryFrom for Value
...
Since all the TryFrom are actually infaillible
2021-03-15 12:39:40 +01:00
Olivier Goffart
41f52f9ad4
Remove Value::Color
2021-03-15 12:33:47 +01:00
Olivier Goffart
5a416d0fc7
Make the Value non_exhaustive
2021-03-15 12:07:52 +01:00
Simon Hausmann
41f77b2a27
Use SharedVector
for Value::Array
instead of Vec
...
That will make it more efficient to pass data into the interpreter in the future,
especially from C++.
2021-03-15 10:19:35 +01:00
Olivier Goffart
436d113b1e
Rename ResourceReference
to ImageReference
in the compiler
2021-03-11 10:29:05 +01:00
Olivier Goffart
933c1bbf59
Rename Value::Resource
to Value::Image
2021-03-11 10:15:53 +01:00
Olivier Goffart
6f88d78303
Rename Resource
to ImageReference
in the runtime
2021-03-11 10:06:23 +01:00
Olivier Goffart
03d9938f8b
More WIP work into the interpreter API
2021-03-10 11:46:20 +01:00
Simon Hausmann
391d0152f0
Add Color::brighter/darker functions
...
These are exposed in .60 as well as in Rust and C++ and implemented by
converting to HSV color space and adjusting the brightness (value).
2021-02-24 10:49:27 +01:00
Olivier Goffart
5727a4cf02
implement square root
2021-02-20 08:53:08 +01:00
Simon Hausmann
8b28c4d792
Fix compilation with empty image urls when resource embedding is enabled
...
`@image-url("")` should translate to `Resource::None` instead of
`Resource::AbsolutePath` to avoid that the rust compiler tries to
include a directory when embedding images.
2021-02-17 16:01:54 +01:00
Simon Hausmann
2dd5ea61bb
Add support for Path.fill-rule
...
For some reason it's not working with the Qt renderer though
2021-02-10 14:08:32 +01:00
Simon Hausmann
2ce672bd68
Reduce dependencies
...
Use only specific lyon packages instead of pulling all of them in.
This slightly speeds up compilation as well as for example lyon_tesselation
doesn't need to be compiled anymore.
2021-02-09 17:22:01 +01:00