Simon Hausmann
d3a474af26
Move corelib::Component and friends back into their dedicated component module
2020-08-12 11:39:07 +02:00
Simon Hausmann
b21aa4f9e7
Rename PropertyListenerScope to PropertyTracker
2020-08-12 11:31:33 +02:00
Simon Hausmann
0df86d7eeb
Move corelib::abi::datastructures::Component to corelib
2020-08-12 10:53:03 +02:00
Olivier Goffart
f4cce26d51
Test the mouse click
2020-08-10 12:54:29 +02:00
Olivier Goffart
36243ccdf7
Traverse item front to back for input events
2020-08-10 10:45:02 +02:00
Olivier Goffart
0a56912d0f
Mouse grab in rust
2020-08-07 16:06:49 +02:00
Olivier Goffart
5aa7ee86fe
Use a newtype for VisitChildrenResult instead of just isize
...
Makes the code easier to unserstand
2020-08-07 16:06:49 +02:00
Olivier Goffart
55ec533c40
WIP input events
...
Compile and passes tests. But the mouse event are currently not working
2020-08-07 16:06:49 +02:00
Simon Hausmann
3ad7a55038
Split corelib::abi::signals into corelib::signals and corelib::signals:ffi
2020-08-04 08:24:04 +02:00
Olivier Goffart
da11b33e9b
Version check
...
Compilation error when the compiler and the runtime are not on the same version
2020-08-03 18:44:36 +02:00
Simon Hausmann
37f874a26b
Rename test_ellapse_time to mock_elapsed_time
2020-08-03 17:52:42 +02:00
Simon Hausmann
f2166d91a6
Move tests out of abi
2020-08-03 17:48:17 +02:00
Simon Hausmann
0252d2ac34
Move slice out of abi
2020-08-03 17:41:16 +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
Simon Hausmann
a662d36dc3
Move ItemTreeNode from datastructures into item_tree
2020-08-03 14:38:08 +02:00
Simon Hausmann
76adda0abd
Move ComponentWindow and friends from datastructures into eventloop
2020-08-03 14:26:47 +02:00
Simon Hausmann
45b02e9a3e
Move the item visitor bits from datastructures into item_tree
2020-08-03 14:10:32 +02:00
Simon Hausmann
97a2fb2c7b
Move datastructures::EasingCurve into animations
2020-08-03 13:49:20 +02:00
Simon Hausmann
30d7a0b36d
Move PathData and friends from datastructure to
...
graphics
2020-08-03 13:43:44 +02:00
Simon Hausmann
b05a11945e
Move datastructures::LayoutInfo into layout
2020-08-03 13:31:43 +02:00
Simon Hausmann
fa87363dc5
Move Point, Rect and Size into graphics
...
And move the expanded structures for cbindgen into an ffi sub-module.
2020-08-03 13:24:39 +02:00
Simon Hausmann
69beab5957
Rename corelib::abi::primitives to corelib::items
2020-08-03 10:32:03 +02:00
Olivier Goffart
75671c18e7
Rename weak-pin crate to pin-weak
2020-07-31 18:18:12 +02:00
Simon Hausmann
884af3c88f
Implement support for nested layouts in the Rust generator
2020-07-30 19:41:29 +02:00
Olivier Goffart
b57f3775c9
Refactor GridLayout
2020-07-28 10:31:05 +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
Olivier Goffart
ab7ae9f3e2
Some refactoring of the rust generated code
...
Always use a Pin<Rc> for the component. (This is required to support repeater
within repeater as well anyway)
Do not use the context within the binding. We can get along by simply capturing
a weak pointer to the component
2020-07-13 16:37:54 +02:00
Simon Hausmann
4b75ec0ee8
Lay out items on a path
...
This works, but it's still missing support for positioning of the layout
itself.
2020-07-09 15:32:47 +02:00
Simon Hausmann
9a73443e14
Allow for path elements to contain bindings
2020-07-07 14:14:17 +02:00
Olivier Goffart
1cbd522a03
Rust: make non-constant model and if expression work
2020-07-03 14:04:23 +02:00
Simon Hausmann
f7517f403c
Make the color a valid property type
...
This replaces Property<u32> with Property<Color>
2020-06-26 21:46:37 +02:00
Olivier Goffart
d267039fa8
Put a pointer to the parent component in the component
...
This means we must use Rc for the component so we can use Weak for the parent pointer.
The idea is to get rid later of the context
2020-06-26 19:26:55 +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
56a75a69e5
Move the repeater part that is specific to rust within the rust lib
2020-06-19 10:06:13 +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
Olivier Goffart
6122f91fba
Begin with the generation of rhe repeater (rust only for now)
2020-06-16 13:47:02 +02:00
Olivier Goffart
e9b75d30b7
Add a bunch of deny(unsafe_code)
2020-06-12 21:04:27 +02:00
Olivier Goffart
30b201d946
Reduce the use of unsafe in corelib and in the rust backend
2020-06-12 19:03:15 +02:00
Olivier Goffart
66dc643bf9
WIP: refactor the item visitor
...
The C++ part hasn't been ported yet and some things still need polish
Introduce a visitor to not rely on the unsafe ItemTreeNode array.
2020-06-12 13:32:40 +02:00
Olivier Goffart
907bea3d3b
Layout for rust
2020-06-10 19:41:24 +02:00
Olivier Goffart
96a372e45d
Grid layout in the interpreter
...
current imploementation is just a prototype
2020-06-10 19:40:47 +02:00
Simon Hausmann
5bae6e01a5
Prepare for the ability to embed image data
...
The Image's source property used to be a string. Now it is a Resource
enum, which can either be None or an absolute file path to the image on
disk. This also replaces the internal Image type.
The compiler internally resolves the img bang expression to a resource
reference, which shall remain just an absolute path. For now the target
generator passes that through, but in the future the target generator
may choose a target specific way of embedding the data and thus
generating a different Resource type in the final code (through
compile_expression in the cpp and rust generator).
The C++ binding is a bit messy as cbindgen doesn't really support
exporting enums that can be constructed on the C++ side. So instead we
use cbindgen to merely export the type internally and only use the tag
from it then. The public API is then a custom Resource type that is
meant to be binary compatible.
2020-06-09 22:54:29 +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
Simon Hausmann
318e65b1d4
Fix typo
2020-06-05 17:41:59 +02:00
Olivier Goffart
9fc60e104f
Add another way to load .60 files from a build script
2020-06-05 13:45:38 +02:00
Simon Hausmann
a2c5e66bee
Rename gl renderer backend package
...
Use a full prefixed name (sixtyfps_rendering_backend_gl) to ensure that
the created static lib can be installed without file conflicts (libgl is
not a unique name).
2020-06-04 15:30:41 +02:00
Simon Hausmann
a3892ea102
Emit declared signals in the rust frontend
2020-05-28 15:20:30 +02:00
Simon Hausmann
4f9c53879b
Implement property references as bindings in the Rust frontend
2020-05-28 11:37:59 +02:00
Simon Hausmann
0504ea566c
Add support for declaring properties in Rust
2020-05-26 15:21:33 +02:00