Olivier Goffart
f744fcccab
Lookup within objects properties
...
Generated code not yet implemented
2020-06-22 17:35:01 +02:00
Olivier Goffart
fa0c393dca
Interpreter: Fix property access from parent component in repeater element
2020-06-22 15:22:38 +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
53e61629ca
Fix access to property declared within the repeater.
...
The move_declaration pass should recurse into sub-components for repeater elements
2020-06-22 10:26:22 +02:00
Simon Hausmann
98ba6a66be
Switch glow version to upstream master revision
...
My fix for creating textures from html canvas elements was merged into
upstream. Until a new version is on crates.io, let's use a pinned sha1
from upstream instead of my fork.
2020-06-22 08:30:30 +02:00
Simon Hausmann
f98b18d327
Fix animation integration into the event loop
...
* Allow closing the window even when animations are still running (*facepalm*)
* Remember to update animations with each frame (*facepalm again*)
2020-06-20 16:24:17 +02:00
Simon Hausmann
db6b130570
Prepare for animations as temporary bindings
...
By allowing the binding of a property to be a reference-counted trait
object, instead of just a plain function pointer.
2020-06-20 16:24:17 +02:00
Simon Hausmann
072bff1871
Introduce the animation driver in the event loop
...
This re-applies commit 1ef269305e
but with
an Rc<RefCell<>> to make the borrow checker happy :-)
2020-06-20 16:24:17 +02:00
Olivier Goffart
1bb8d94ab8
Support array for model in rust and in the interpreter
2020-06-19 19:46:59 +02:00
Olivier Goffart
4e3473d40c
clang_format
2020-06-19 14:30:50 +02:00
Olivier Goffart
022cd64625
Support for array model in C++
2020-06-19 14:29:54 +02:00
Olivier Goffart
6238d0d14f
Prepare for the ability to access the model
...
Add an expression type for the access of the model variable from a repeater
2020-06-19 13:46:55 +02:00
Olivier Goffart
864e74601d
Add a Model type for
...
I guess in the future we want to make model a type that knows its inside
2020-06-19 13:13:19 +02:00
Olivier Goffart
56a75a69e5
Move the repeater part that is specific to rust within the rust lib
2020-06-19 10:06:13 +02:00
Olivier Goffart
911d34e777
Use BTreeMap for the object type so that type order is deterministic
2020-06-18 17:48:08 +02:00
Olivier Goffart
3e6cd4ae16
Update development.md
2020-06-18 17:18:11 +02:00
Olivier Goffart
41d68b6c33
Some documentation
2020-06-18 17:16:34 +02:00
Olivier Goffart
be8f127317
Object and array parsing
2020-06-18 15:22:30 +02:00
Olivier Goffart
897edb8ac1
Parse object literal
2020-06-18 12:35:37 +02:00
Olivier Goffart
93dbc3b02d
Parse array
2020-06-18 12:20:04 +02:00
Olivier Goffart
dd3097e23c
Fixup
2020-06-17 20:27:18 +02:00
Simon Hausmann
8f613685ba
Expose a ComponentWindow in C++
...
This paves a way for a more modular API.
2020-06-17 19:15:18 +02:00
Simon Hausmann
9df888578f
Expose a ComponentWindow type in Rust
...
This comes with a factory function that re-directs to the backend and a
run member function to replace
sixtyfps_runtime_run_component_with_gl_renderer. For now it's all still
hidden in the generated run() method.
2020-06-17 19:15:18 +02:00
Simon Hausmann
778c6c8cca
Fix the C++ tests
...
Don't link against the corelib shared library anymore
2020-06-17 19:14:56 +02:00
Simon Hausmann
d78c93bfee
Revert "Integrate the animation driver into the event loop"
...
This reverts commit 1ef269305e
. Breaks the
wasm build, to be fixed later.
2020-06-17 18:58:32 +02:00
Simon Hausmann
c0e3f6c250
Fix build
...
The parent commit erroneously removed the trait, which was because of a
local conflict with further changes.
2020-06-17 18:52:49 +02:00
Simon Hausmann
9df8b5da1a
Add some documentation for the PropertyNotify trait
2020-06-17 18:49:10 +02:00
Olivier Goffart
54f81d4d29
C++ Only link against the backend library
...
For some raison, not all symbols gets exported,
add some dummy code which seems to do the trick
2020-06-17 18:38:47 +02:00
Olivier Goffart
8f0520f2be
Repeater in the viewer
2020-06-17 15:43:57 +02:00
Simon Hausmann
1ef269305e
Integrate the animation driver into the event loop
2020-06-17 15:16:46 +02:00
Simon Hausmann
85bf8a195a
Improve EventLoop encapsulation
...
Hide the winit loop and extract it only in the GL renderer
2020-06-17 15:16:46 +02:00
Olivier Goffart
096fd7bbb4
Repeater in C++
2020-06-17 14:39:33 +02:00
Olivier Goffart
8651acbef4
Small renaming in the cpp generator
...
Take the component by Rc as this will be usefull when generating repeated expression
2020-06-17 10:50:20 +02:00
Olivier Goffart
7bd186a159
Small fixups
2020-06-17 10:35:30 +02:00
Olivier Goffart
f74c801b59
Fix a bunch of warning in the generated rust
2020-06-17 10:26:20 +02:00
Simon Hausmann
e1455ff4ce
Move fn eventloop::run into the eventloop::EventLoop impl
2020-06-17 10:18:36 +02:00
Simon Hausmann
5711f25195
Newtype'ify the event loop
...
That way it'll be easier to introduce a user event later and control the
public API.
2020-06-17 10:15:03 +02:00
Olivier Goffart
5cd4ed7347
Arithmetic operations
2020-06-16 19:04:03 +02:00
Olivier Goffart
e8c825b434
Add a test for embedded conditionals
...
Also fix the initialization of properties in C++, make them zero-initialized like in rust
2020-06-16 17:47:10 +02:00
Olivier Goffart
d7fe69ff74
Lookup the index from a repeater expression
2020-06-16 17:23:38 +02:00
Simon Hausmann
2b95b344d8
Further cleanups
...
Move the GraphicsWindow into graphics.rs -- there's not much in that
file otherwise ;-) and now lib.rs is concise again.
2020-06-16 16:38:37 +02:00
Simon Hausmann
4922364c46
Cleanup: move the event loop code into a separate module
2020-06-16 16:26:52 +02:00
Simon Hausmann
405de0b0ca
Further separation between window and the event loop
...
Make it possible to create the window without an event loop and allow mapping
the window later.
2020-06-16 16:09:52 +02:00
Olivier Goffart
56aad7f474
Fix looking up of 'id' so that we can't access inaccessible id
2020-06-16 16:04:38 +02:00
Simon Hausmann
cb0aeb0db7
Minor GenericWindow trait cleanup
...
The trait functions don't need to consume an Rc, it turns out.
2020-06-16 14:42:13 +02:00
Olivier Goffart
c940e8d734
Add missing files
2020-06-16 14:11:26 +02:00
Simon Hausmann
8d7395099c
More main window cleanups
...
Fold the standalone functions of rendering and input event processing into the
generic window trait impl
2020-06-16 14:03:57 +02:00
Olivier Goffart
a4423374d8
Fix warnings
2020-06-16 13:59:10 +02:00
Olivier Goffart
6122f91fba
Begin with the generation of rhe repeater (rust only for now)
2020-06-16 13:47:02 +02:00
Olivier Goffart
064db5aa5b
const-field-offset: Add a way to specify the crate name
2020-06-16 13:47:02 +02:00