Commit graph

33 commits

Author SHA1 Message Date
Olivier Goffart
0cb827a901 Two ways binding with optimized public property in the interpreter 2020-09-25 09:50:03 +02:00
Olivier Goffart
42aa91e3eb Support for signal with arguments in the interpreter 2020-09-09 11:27:58 +02:00
Olivier Goffart
e997dff094 Use a reference as a signal argument.
It will be easier to make that work with C++
2020-09-08 12:12:01 +02:00
Simon Hausmann
ff9c118e07 Propagate warnings to the end of the compilation step and print them 2020-09-04 20:34:20 +02:00
Olivier Goffart
f1ad78bc25 Qt style support for the rust backend
Need to set the SIXTYFPS_STYLE=native env variable while compiling
2020-09-01 12:25:11 +02:00
Olivier Goffart
80dd7dcb04 Allow to specify the canvas id when creating a new window with wasm 2020-08-26 17:01:17 +02:00
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Simon Hausmann
d3a474af26 Move corelib::Component and friends back into their dedicated component module 2020-08-12 11:39:07 +02:00
Simon Hausmann
0df86d7eeb Move corelib::abi::datastructures::Component to corelib 2020-08-12 10:53:03 +02:00
Olivier Goffart
e013ea6c50 Refactor the interpreter by trying to use FieldOffset insdead of usize for offsets
Give a unique identifier lifetime to instance so that they cannot be mixed safely
2020-08-11 10:22:16 +02:00
Olivier Goffart
00c32e9c6d vtable: remove the convinient type alias from the macro
If one really need them, they can be implemented by the user
2020-08-03 11:03:24 +02:00
Olivier Goffart
05c5f7c53d Test and fix animations on properties
The animation should not start when the property is initialized, only when the
property is set by the setter
2020-07-23 11:45:34 +02:00
Olivier Goffart
e00491811b Get rid of the context in properties/signal 2020-07-13 18:49:06 +02:00
Simon Hausmann
4f2f27cbda Simplify property and binding setting code in the interpreter
Change the Property RTTI to take an optional animation, instead of
having to match on each call site.
2020-06-26 20:33:55 +02:00
Olivier Goffart
0029921f1a Pin the items in the interpreter 2020-06-26 11:55:05 +02:00
Simon Hausmann
c18861125d Small typo fix :-) 2020-06-25 14:22:10 +02:00
Olivier Goffart
caca0d0ba4 Put the component in a Pin<>
Removed the drop and create from the ComponentVTable:
since we are not using VBox<ComponentVTable>, this simplifies a bit
the code of the interpreter and everything else.

But there is still a lot of changes everywhere to support that the Component
is pinned.
This is just for the component. Which would be required if later we want
to access the properties as Pin<Property<_>>. But we have not yet ability
to do projections
2020-06-24 14:13:27 +02:00
Olivier Goffart
f8b7989c0b Access the properties in the parent component of a repeated element
This required some refactoring of the EvaluationContext structure to include the parent context
2020-06-22 14:38:38 +02:00
Olivier Goffart
8f0520f2be Repeater in the viewer 2020-06-17 15:43:57 +02:00
Simon Hausmann
84d8eaa130 Add support for emitting signals for nodejs and the interpreter
This also enables the property and signal accessor test case for js.
2020-06-12 10:38:01 +02:00
Olivier Goffart
58618c0683 Documentation for the interpreter 2020-06-10 09:26:11 +02:00
Simon Hausmann
afd7319ae5 Rename corelib to sixtyfps_corelib
This is consistent with the other packages and since corelib is now also
a cdylib, libsixtyfps_corelib.so looks much better than libcorelib.so
:-)
2020-06-09 13:27:18 +02:00
Olivier Goffart
9fc60e104f Add another way to load .60 files from a build script 2020-06-05 13:45:38 +02:00
Olivier Goffart
3651885d87 Move the compiler binary in tools/
And rename sixtyfps_compiler to sixtyfps_compilerlib
2020-06-05 09:23:38 +02:00
Olivier Goffart
7a8c549625 Be able to read or write properties from JS 2020-06-04 15:48:39 +02:00
Olivier Goffart
49d2aec7e2 Node: add possibility to add signal handler
Right now, this only works once and then panic the second time
2020-06-04 12:49:33 +02:00
Olivier Goffart
5ee09398e8 Node: Allow to init properties to value 2020-06-03 17:33:45 +02:00
Olivier Goffart
30d61452ba Interpreter and node API: some refactoring towards being able to set properties from JS 2020-06-03 17:33:43 +02:00
Olivier Goffart
fd829fc89f Some more refactoring of the interpreter
Move the content of lib.rs to a module so we can have some
kind of public api in the lib.rs
2020-06-03 17:33:26 +02:00
Olivier Goffart
0a48252702 Interpreter: implement the ComponentVTable properly
with the drop and construct function
2020-06-03 17:33:26 +02:00
Olivier Goffart
8cfde5be5e Refactor the creation of dynamic type in the viewer
Put the creation of dynamic type in another module.
Respect the alignement.
2020-06-03 17:33:26 +02:00
Olivier Goffart
a8f02df642 Refactor the viewer into a binary, and an interpreter crate
The interpreter can be used from other crates such as the test or the JS for example
2020-06-02 17:05:48 +02:00