Simon Hausmann
63bf1af093
Add support for tracking the length of a model in Rust
...
This is done by exposing the ModelNotify to the caller via the new
ModelTracker trait, which has a function that allows "hooking" into the
dirty tracking of the size.
By extension, this also works in JavaScript.
cc #98
2021-10-20 15:25:28 +02:00
Simon Hausmann
c3d0fd04af
Add C++ API to introspect exported global singletons in the interpreter
...
This adds the necessary shims to expose the same API as Rust.
2021-09-15 07:56:28 +02:00
Olivier Goffart
70c57844b7
Add invoke_global_callback to the C++ interpreter API
2021-08-27 13:36:48 +02:00
Olivier Goffart
0fad27e23e
Add set_global_callback in the C++ interpreter API
2021-08-27 13:36:48 +02:00
Olivier Goffart
81688906f7
C++ Interpreter: add API to get/set global value
2021-08-27 13:36:48 +02:00
Tobias Hunger
91c78f61e9
Janitor: Fix clippy::needless_lifetimes
2021-08-18 00:24:51 +02:00
Tobias Hunger
bbbf6460df
Janitor: Fix clippy::redundant_closure
2021-08-18 00:24:51 +02:00
Olivier Goffart
532827b646
Fix the C++ interpreter API compatibility after the change from _ to -
...
Property name with _ should still be supported by set_property/get_property
2021-08-10 22:21:01 +02:00
Simon Hausmann
9e4b067f38
Provide sixtyfps::Window
by reference in the C++ interpreter API
2021-08-03 10:32:04 +02:00
Simon Hausmann
29f5853332
Provide sixtyfps::Window
by reference in the Rust API
...
This also removes Clone from the Window again, to avoid having to face
the question: Does cloning a window duplicate it on the screen?
2021-08-03 10:32:04 +02:00
Olivier Goffart
07bf0974d7
C++: Expose conversion betwen Value
and Image
...
Closes #350
2021-07-26 14:12:32 +02:00
Simon Hausmann
eaddbe664e
internal cleanup: Rename ComponentWindow to WindowRc
...
That's all it is nowadays, it's a wrapper around Rc<Window>. It's not an
alias because we need to also "wrap" it to C++ via cbindgen, but that's
about it.
2021-07-21 20:33:02 +02:00
Simon Hausmann
1c285694d7
internal cleanup: Remove the use of ComponentWindow in the interpreter
2021-07-21 17:41:12 +02:00
Simon Hausmann
ef184f7f1a
internal cleanup: Remove the rest of the ComponentWindow API
...
Now it just remains a wrapper around the Rc, and it can soon be moved to
the API crate hopefully.
2021-07-21 17:41:12 +02:00
Tobias Hunger
dc51d4ccda
Use impl Default
instead of new()
constructors
2021-07-12 13:22:25 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Tobias Hunger
13d7f5e7bd
Janitor: Fix typos in comments and user-facing strings
...
Also adapt tests for error messages containing the fixed strings.
No behavior change is intended!
2021-06-28 08:32:25 +02:00
Simon Hausmann
59425b3f02
C++: Docs for sixtyfps::interpreter::Diagnostic and DiagnosticLevel
2021-06-22 08:34:33 +02:00
Simon Hausmann
f7ff3ba0db
C++: Document PropertyDescriptor
2021-06-21 15:50:58 +02:00
Simon Hausmann
c0511a54ea
Rename ComponentDefintion::callback_names() to just callbacks()
...
That's consistent with properties().
2021-06-07 12:08:35 +02:00
Simon Hausmann
855808f9b5
Add API to the Rust and C++ interpreter library to return the names of all publicly declared callbacks
2021-06-07 11:43:04 +02:00
Simon Hausmann
fb19588c8c
Add missing C++ sixtyfps::ComponentDefinition::name()
...
It was already present in Rust
2021-06-07 11:30:22 +02:00
Simon Hausmann
70653ec7cd
Add C++ API for ComponentDefinition::properties()
2021-03-31 08:42:54 +02:00
Simon Hausmann
2904ee71e0
Move ValueType
into the public Rust interpreter API
...
That way we can use it to expose the list of public properties
2021-03-30 10:38:02 +02:00
Simon Hausmann
841da01717
Fix build of sixtyfps-interpreter with ffi support on armv7
...
The alignment and sizes are different for some of the enums, so their opaque counterparts need
to be defined accordingly in order for the assertions in ffi.rs to pass.
2021-03-24 11:57:35 +01:00
Olivier Goffart
1dba04721a
Add a qt_viewer example that uses QWidget
2021-03-23 17:13:41 +01:00
Simon Hausmann
2fed4ddaed
Split the interpreter ffi module into a separate file
2021-03-22 15:15:07 +01:00