Commit graph

31 commits

Author SHA1 Message Date
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
Olivier Goffart
90fd7b1403 Manual implementation of Debug for Property
Helps with debugging. It is too verbose with useless info otherwise
2021-02-18 10:30:59 +01:00
Simon Hausmann
7982325da4 Change Rectangle::background's type to be a brush
This also introduces the brush type in the compiler and generators. At the
moment only conversion from Color is implemented.
2021-02-03 12:49:44 +01:00
Simon Hausmann
bc194241fd Prepare for Brush becoming a property type
We're going to need support for InterpolatedValue, which at the moment
has trait requirements that are a bit too tight.

It's sufficient if it takes references to values and doesn't require Copy or Clone.
The latter can go into the bounds where it's actually used.
2021-02-03 11:04:52 +01:00
Olivier Goffart
3606717172 Make sure to unlock the Property in cse of panic
This way we don't have another panic while unwinding if a panic
occurs while evaluating a property binding
2021-01-27 16:46:22 +01:00
Olivier Goffart
d5c4885955 Transitions in C++ 2020-11-20 11:38:03 +01:00
Olivier Goffart
091a0834d3 Transitions in rust (C++ and interpreter not implemented yet) 2020-11-20 10:30:17 +01:00
Olivier Goffart
4d4c73925c Some refactoring to prepare for transitions on properties 2020-11-20 09:39:06 +01:00
Olivier Goffart
c50fc6f51c More work on state properties with transitions
C++ set the proper binding for StateInfo state binding
2020-11-19 13:31:18 +01:00
Olivier Goffart
cfa9413861 More work on the state binding for transition:
When there is a transition, turn the state property into a property of StateInfo

Not yet implemented for C++
2020-11-19 12:43:28 +01:00
Olivier Goffart
05924da620 Create a StateInfo object and a special binding for it 2020-11-18 17:29:04 +01:00
Olivier Goffart
103c7cf9a5 Use a custom Instant that is repr(C) 2020-11-18 16:37:22 +01:00
Olivier Goffart
4bbe3362a0 Properties: use a loop instead of a recursion when deleting dependency nodes
to avoid stack overflow
2020-11-05 11:34:26 +01:00
Olivier Goffart
2ece3817cc Make ModelHandle a struct
Last commit broke for structures containing models, because models are not PartialEq.
So we need to implement PartialEq for ModelHandle. Which means a struct needs to
be created
2020-10-31 13:32:19 +01:00
Olivier Goffart
d2255327fe Properties: make sure that the falue is different before marking all dependencies dirty
Fix the animation of the gauge in the printer demo
2020-10-31 12:58:11 +01:00
Olivier Goffart
dec06be70c WIP ListView 2020-10-02 18:07:39 +02:00
Olivier Goffart
c0473a7c94 Forgot to implement intercept_set_binding in the rust case 2020-09-28 14:36:03 +02:00
Olivier Goffart
3b6679ed4b Two ways binding works also work as three ways binding and more
A side effect is that the order of calling set_binding and link_two_ways is no longer relevant
2020-09-28 10:42:27 +02:00
Olivier Goffart
60cf022b69 Fix the two ways binding being flacky in the interpreter
The two way binding must be set at the end.
It is flacky because the order currently depends on the order in the Hashmap
2020-09-25 17:07:22 +02:00
Olivier Goffart
abe24e2e9e C++ two way bindings 2020-09-25 15:21:37 +02:00
Olivier Goffart
20430566c1 Implement two ways binding in the runtime. 2020-09-25 12:46:21 +02:00
Olivier Goffart
cfa172f5c9 Add an explaining comment for properties 2020-09-23 14:06:08 +02:00
Olivier Goffart
4a0a65f113 C++ model that can be changed 2020-09-15 12:18:36 +02:00
Olivier Goffart
4de2e57175 Use a Model trait in the rust backend 2020-09-14 14:02:34 +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
e655909e9f Adding missing missing_docs guards
Those used to be in the abi {} sub-module
2020-08-12 11:45:55 +02:00
Simon Hausmann
b21aa4f9e7 Rename PropertyListenerScope to PropertyTracker 2020-08-12 11:31:33 +02:00
Simon Hausmann
8a14e15233 Fix signature of Property::set_animated_binding to take an impl Binding 2020-08-12 11:25:19 +02:00
Simon Hausmann
b7d6fed89f Rename Property::get_without_registering_dependency to get_untracked 2020-08-12 11:25:07 +02:00
Simon Hausmann
9b13b363c3 Move corelib::abi::properties to corelib::properties
And the bits that are only there for the C binding are now in an ffi sub-module.
2020-08-03 17:32:28 +02:00
Renamed from sixtyfps_runtime/corelib/abi/properties.rs (Browse further)