Commit graph

2871 commits

Author SHA1 Message Date
Olivier Goffart
d7b86cd0c4 Polishing of the interpreter API after review 2021-03-15 14:43:55 +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
f1a7847820 Fixup syntax_tests 2021-03-15 12:41:10 +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
34632206e6 Add some comments in the interpreter API 2021-03-15 12:13:41 +01:00
Olivier Goffart
5a416d0fc7 Make the Value non_exhaustive 2021-03-15 12:07:52 +01:00
Olivier Goffart
a203097b88 Attempt to fix windows syntax_tests
Looks like the slashes were not canonical on Windows
2021-03-15 12:05:03 +01:00
Olivier Goffart
5c79f2dbe1 Expose the Diagnostic as the return type in the interpreter API 2021-03-15 11:56:30 +01:00
Olivier Goffart
cae88f0823 Create a Diagnostic quen the main .60 file can't be loaded 2021-03-15 11:44:20 +01:00
Simon Hausmann
2ae5b8413a Fix wasm build
Re-add the compiler configuration internal API. When `from_string` is complete then we can switch to the new public
compiler config API.

And use diagnostics accessor functions.
2021-03-15 11:25:48 +01:00
Olivier Goffart
b2572f8bb3 Fix parser test macro 2021-03-15 10:50:33 +01:00
Simon Hausmann
70ff7baa85 Fix compilation after diagnostics API changes 2021-03-15 10:43:26 +01:00
Olivier Goffart
014e13b05f Make Diagnostic field private 2021-03-15 10:37:24 +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
Simon Hausmann
fdeca052cb Provide the same CompilerConfiguration wrapper in the interpreter API as in the Rust build API 2021-03-15 10:05:56 +01:00
Olivier Goffart
730b1ccff2 Refactor diagnostic: Merge BuildDiagnostic and FileDiagnostic 2021-03-12 19:32:50 +01:00
Olivier Goffart
11e0be5130 Add the SourceLocation into the Diagnostic 2021-03-12 12:49:19 +01:00
Olivier Goffart
fc35d101d9 Rename diagnostics::level to DiagnosticLevel 2021-03-11 16:27:40 +01:00
Olivier Goffart
968dfaae87 Put what is the FileDiagnostics into the SourceFile so the SourceFile has the content 2021-03-11 16:23:46 +01:00
Olivier Goffart
7c48bcdd4c Add the source file getter to the Spanned trait, and remove SpannedWithSourceFile 2021-03-11 14:09:55 +01:00
Olivier Goffart
bf88bad131 Mention our Mattermost instance in the Readme 2021-03-11 11:39:49 +01:00
Olivier Goffart
4f115edb87 Fix cmake install 2021-03-11 11:34:09 +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
c840b046ae Rename the "resource" type to "image" 2021-03-10 17:24:31 +01:00
Olivier Goffart
44e81a40d6 Fixup C++ build 2021-03-10 17:24:31 +01:00
Olivier Goffart
89bbdce88e Polish a bit the Brush API 2021-03-10 16:54:33 +01:00
Olivier Goffart
03d9938f8b More WIP work into the interpreter API 2021-03-10 11:46:20 +01:00
Olivier Goffart
7584b571ea Interpreter: refactor in preparation to expose a public API 2021-03-10 09:08:25 +01:00
Olivier Goffart
16426c91b0 There is no x11 feature for corelib anymore since that is moved to the backend 2021-03-09 19:52:18 +01:00
Olivier Goffart
9e3f316e30 Docs: Fix some broken links 2021-03-09 19:32:52 +01:00
Olivier Goffart
6154736910 Some work toward a public interpreter API 2021-03-09 19:31:29 +01:00
Tobias Hunger
639b42697e Printerdemo: Do not allow 0 copies
Just a bit of polish. The functionality is already implemented, so use
it;-)
2021-03-05 20:09:13 +01:00
Simon Hausmann
eba0402c3b Disable test on macOS for now
The test run with Qt and they end up creating QWidget instances in
different threads, which eventually crashes.
2021-03-05 19:55:24 +01:00
Olivier Goffart
7132db6083 Revert "Ci: runthe test with the GL backend"
This reverts commit 5c7701b9ca.

The test don't pass on mac with the GL backend, and mac was the platform which
had problems with the Qt backend in the first place.
2021-03-05 16:40:48 +01:00
Olivier Goffart
5c7701b9ca
Ci: runthe test with the GL backend
The Qt backend does not like the threading of the tests so much.
2021-03-05 16:09:29 +01:00
Olivier Goffart
6f715c5612 Don't call render for items outside of the clip rects 2021-03-05 13:05:02 +01:00
Olivier Goffart
aa4101cf13
Clarify the License FAQ regarding permissive licenses
cc https://github.com/sixtyfpsui/sixtyfps/issues/184
2021-03-04 08:51:22 +01:00
Simon Hausmann
f4059ab3cf Fix wasm build 2021-03-02 13:55:34 +01:00
Simon Hausmann
b591f7de2c Add Window.default-font-size
This allows getting rid of the `DemoText` element in the printer demo
2021-03-02 13:33:43 +01:00
Simon Hausmann
27bdb4d481 Added Window.default-font-family
One step towards getting rid of `DemoText` in the printer demo
2021-03-02 13:25:21 +01:00
Simon Hausmann
f087cc18bc Remove extern "C" functions from wasm module
We don't need these functions and their export. They account for ~20kb in
the optimized .wasm - plus JS glue code.
2021-02-26 17:04:49 +01:00
Simon Hausmann
3d7eb6ac70 Fix brightening function name in .60
An earlier revision of the patch called it `lighter` and it was renamed
to `brighter`, as bright is the opposite of dark. But the function name
in .60 wasn't changed yet.

Amends commit 391d0152f0
2021-02-24 13:40:27 +01:00
Simon Hausmann
1891cbd054 Use Color.darker in the printer demo to compute push button state colors 2021-02-24 13:22:28 +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
Simon Hausmann
a42c3a0b01 Make it slightly easier to navigate between pages on a small screen
Make the title also clickable in order to go back
2021-02-24 08:36:46 +01:00