Remove the `parent_item` function. After the recent changes that did not
return an item anymore and since the item tree is exposed, this function
was only used to find the repeater a component was created by.
So replace the old function with a new one that only returns the parent
node in the parent component.
This saves a few lines of generated code that is not used anymore.
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
This avoid repeating the enums both in the compiler and in
the runtime library, and register them in a bunch of other places.
So it should be easier to add enums and enum values
Since cbindgen doesn't see through the macro, generate the enum
manually
cbindgen 0.21 was released which contains https://github.com/eqrion/cbindgen/pull/724
which allow to use raw identifier in enums shared with C++.
So now we can have `MouseCursor.move` in slint despite it being a rust keyword
Note that the strum macro also have trouble with the raw identifier, so we
take that in account in the conversion functions in the interpreter
Add accessors to the information necessary to stitch together the
Component-wide ItemTrees (which include DynamicNodes) into one logical
tree of Items.
* Build the backends without rtti unless needed
Only the interpreter needs the rtti generated code.
* Since `SlintElement` emits `#[cfg(feature = "rtti")]` tokens, each
crate using `SlintElement` needs to have an `rtti` feature.
* The selector gets backend specific rtti selection features, in order
for the interpreter to enable them.
* Enable rtti when building the C++ project with the interpreter enabled
- We need to make sure that the initialization of global is in the right order.
- In C++ and rust, we need to add accessor to the global component
- There can be `PropertyReference::Global` in binding of globals
- The interpreter globals need to hold references to the global they may depend on
Fixes#175
The README.md contains the warning that used to be in lib.rs.
Add README.md files to all internal crates
... pointing to the official public crate to use instead.
Rename internal crates
fixup: README files
fixup rename