Olivier Goffart
5f38f03a1b
Test setting signal handler and a few fix to make it work
...
We were not parsing CodeBlock node from the signal handler correctly,
we wer eonly taking the first expression instead of the whole codeblock
In JS, emitting signal before the show() did not update the GLOBAL_CONTEXT
needed to emit signals defined in JS
2020-08-03 15:01:10 +02:00
Olivier Goffart
b8d440a6db
Rust: default visibility of everything to private
2020-08-03 15:01:10 +02:00
Olivier Goffart
8aef208340
Rust: add on_* to set signal handler
2020-08-03 15:01:10 +02:00
Olivier Goffart
b2a1a72450
C++: add on_* funciton to connect to signals
2020-08-03 15:01:10 +02:00
Olivier Goffart
a4efac920a
C++: make all properties and sub elements private
2020-08-03 15:01:10 +02:00
Simon Hausmann
a662d36dc3
Move ItemTreeNode from datastructures into item_tree
2020-08-03 14:38:08 +02:00
Simon Hausmann
f284af27c0
Fix build without rtti
2020-08-03 14:34:34 +02:00
Simon Hausmann
76adda0abd
Move ComponentWindow and friends from datastructures into eventloop
2020-08-03 14:26:47 +02:00
Simon Hausmann
8338bd4360
Move CachedRenderingData from datastructures into item_rendering
2020-08-03 14:17:38 +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
37fa04098f
Move MouseEvent and MouseEventType from datastructures into input
2020-08-03 13:55:33 +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
1b270f42d0
Move datastructures::Color into graphics
2020-08-03 13:27:35 +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
a2cec9e86f
Clean up LyonPathIterator API
...
* Remove Lyon from the name and instead call it PathDataIterator.
* Remove the fit() function and just provide two factory functions.
2020-08-03 13:18:38 +02:00
Olivier Goffart
026288ae19
Compile fix
2020-08-03 13:13:44 +02:00
Simon Hausmann
ce7f66320b
Move datastructures::Resource into graphics
...
It's only used for graphics at the moment and used
for image resources.
2020-08-03 12:47:05 +02:00
Simon Hausmann
05f3ff10a6
Rename graphics::RenderingPrimitive to HighLevelRenderingPrimitive
...
That plays better with the existing LowlLevelRenderingPrimitive.
2020-08-03 12:39:57 +02:00
Simon Hausmann
550d0122a5
Move datastructures::RenderingPrimitive to graphics
2020-08-03 12:39:52 +02:00
Simon Hausmann
aa398c6277
Rename Resource::EmbeddedDataOwned -> EmbeddedRgbaImage
2020-08-03 12:20:17 +02:00
Simon Hausmann
97a93a3157
Make LyonPathIterator private in terms of docs
2020-08-03 12:18:06 +02:00
Olivier Goffart
86a85cf838
vtable: change #[offset] to #[field_offset]
...
And add a documentation for it
2020-08-03 11:26:48 +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
Simon Hausmann
69beab5957
Rename corelib::abi::primitives to corelib::items
2020-08-03 10:32:03 +02:00
Simon Hausmann
72d2a430ee
Add missing sixtyfps- prefix to the corelib-macros crate
2020-08-03 10:24:52 +02:00
Simon Hausmann
c29791fbaa
Replace a few qualified abi::primitives paths with uses
...
That'll make it easier to do the next rename :-)
2020-08-03 10:13:32 +02:00
Simon Hausmann
44109130f0
Rename corelib_macro to corelib-macros
2020-08-03 10:01:58 +02:00
Simon Hausmann
6c5d423cd4
Rename sixtyfps_corelib to sixtyfps-corelib
2020-08-03 10:01:58 +02:00
Olivier Goffart
2e74fa43cd
Use pin-weak from crates.io
2020-08-03 09:18:04 +02:00
Olivier Goffart
cb67e40c32
Rename WeakPin -> PinWeak
2020-07-31 18:19:26 +02:00
Olivier Goffart
75671c18e7
Rename weak-pin crate to pin-weak
2020-07-31 18:18:12 +02:00
Olivier Goffart
77cf1e1e83
Some documentation change following today review
2020-07-31 16:28:59 +02:00
Olivier Goffart
678f426bfd
Review of langref.md
2020-07-31 16:12:37 +02:00
Simon Hausmann
480a8470f5
Remove dead code
2020-07-30 19:51:33 +02:00
Simon Hausmann
0bc5f38a4c
Added a test case for a nested grid layout
2020-07-30 19:41:45 +02:00
Simon Hausmann
cb7aca54d4
Implement support for nested layouts in the C++ generator
2020-07-30 19:41:38 +02:00
Simon Hausmann
884af3c88f
Implement support for nested layouts in the Rust generator
2020-07-30 19:41:29 +02:00
Simon Hausmann
1265c7f3d1
Fix crash with path layouts in the interpreter
2020-07-30 15:32:24 +02:00
Simon Hausmann
3f58d011c2
Add support for nested grid layouts to the interpreter
2020-07-30 14:46:08 +02:00
Olivier Goffart
9760cf4969
Begin to implement a Flickable
...
The implementation is still very rough and will need to be improved
2020-07-30 14:36:21 +02:00
Simon Hausmann
c32114cee6
Add helper function to calculate the layout info for a grid layout
...
The minimum/maximum widths/heights are the sum of the cells.
2020-07-30 10:25:08 +02:00
Simon Hausmann
94433b9bf1
Implement get_property_ref for Layouts in the interpreter
...
We can fetch the Property<> references from the custom_properties hash
by using the property name that was changed in the moving declarations
pass.
2020-07-30 10:24:03 +02:00
Simon Hausmann
e0c9f9a71d
Parse nested grid layouts
...
They don't work at run-time yet though.
2020-07-30 10:22:29 +02:00
Simon Hausmann
e881d89bf9
Get rid of visible x/y properties in GridLayout
...
It doesn't really make sense to have them in the API, the grid layout is
supposed to "own" the surrounding space. That can be an element and then
it should be a (0, 0) and distribute the element's width/height, or in
the future it can be a cell of a grid layout. Then there's an (x/y), but
that's implicit / hidden.
2020-07-29 18:52:22 +02:00
Simon Hausmann
4fccbba29d
Prepare for "virtualizing" the grid layout's width/height
...
Instead of storing the "within" element that we unconditionally take the
"width" and "height" properties from, let's pass through a property
reference expression to the width/height to use. For now that's still
the layout parent's width/height, but with this it can be replaced in
the future to refer to a "virtual" property that belongs to parent cell.
2020-07-29 18:52:22 +02:00
Simon Hausmann
8f8971f321
Move the grid and path layout extraction code into separate helper function
...
That'll make it easier to call them for nested layouts.
2020-07-29 18:52:22 +02:00
Simon Hausmann
30acb11362
Fix handling of properties of nested optimized layout elements
...
We need to traverse also into the expressions of nested layouts to ensure
any references inside are updated as the
"virtual" properties are moved.
2020-07-29 18:52:22 +02:00
Simon Hausmann
00271a3746
Extend the layout data structure in the compiler to allow nesting
2020-07-29 18:52:22 +02:00