Olivier Goffart
653e7d0c5d
Some docs regarding the last model changes in the interpreter
2022-01-27 18:37:36 +01:00
Simon Hausmann
de40e002c3
WIP: Remove sixtyfps_interpreter::Value::Array
...
This is never created
2022-01-27 18:37:36 +01:00
Simon Hausmann
b6492b02e8
Fix read-access through C++ interpreter to models declared as arrays
...
Arrays declared in .60 are mapped to a SharedVectorModel<Value> in order
to permit for write access. They can also be turned intoValue::Array /
SharedVector<Value> very cheaply, when reading from C++.
2022-01-26 16:24:29 +01:00
Tobias Hunger
e3c4209b1f
Change Model::row_data to return an Option<T> ( #873 )
...
Change Model::row_data to return an Option<T> (rust) or std::optional<T> (c++)
Co-authored-by: Olivier Goffart <olivier@woboq.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2022-01-26 13:55:38 +01:00
Olivier Goffart
319704d3fb
C++: use default operator==
...
Since we now use C++20, we can simplify our code a bit
2022-01-24 17:16:55 +01:00
Olivier Goffart
973c5960b7
C++ interpreter: Use std::span instead of the internal Slice in the public API
2022-01-24 13:04:12 +01:00
Simon Hausmann
aadb755fd7
Join separated documentation for some interpreter C++ API types
...
The docs were living in the public header file while the enums/structs were defined in Rust.
With the infrastructure of the parent commits we can join them together.
2022-01-05 16:32:55 +01:00
Tobias Hunger
bfca0e3573
Mass update copyright messages to be more REUSE compliant
2021-12-22 10:06:12 +01: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
Simon Hausmann
4b8259017b
Doc fixes
...
Try to use the term "global singleton" consistently. That's also the
term we use in the language reference.
2021-08-27 13:46:44 +02:00
Simon Hausmann
0bb586e70f
Minor documentation fixes for the globals access API
2021-08-27 13:36:48 +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
Olivier Goffart
9b869f2dc0
C++ Add a few asserts that the non-thread safe API is not called in a thread
2021-08-12 12:59:50 +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
66891a299c
Start a new sixtyfps::Window API for Rust, C++, the interpreters and JS
...
The generated component now provides access to a Window type
via the window() accessor function.
This is part of #333
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
Tobias Hunger
39984b27db
Janitor: Fix spelling in comments
2021-07-03 15:49:43 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Olivier Goffart
fe81590b07
Silence a bunch of MSVC warnings
2021-07-01 13:47:22 +02:00
Olivier Goffart
640d178d9d
Fix compilation of the C++ interpreter
2021-06-28 12:16:59 +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
8e729fee95
C++: Fix remaining doxygen warnings in sixyfps_interpreter.h
2021-06-25 20:41:53 +02:00
Simon Hausmann
eef43bdf48
Fix typo
2021-06-24 11:10:55 +02:00
Simon Hausmann
59425b3f02
C++: Docs for sixtyfps::interpreter::Diagnostic and DiagnosticLevel
2021-06-22 08:34:33 +02:00
Simon Hausmann
2e4abc61e0
C++: Hide internal macros from documentation
...
That's SIXTYFPS_GET_ITEM_VTABLE, SIXTYFPS_DLL_IMPORT and
SIXTYFPS_QT_INTEGRATION
2021-06-22 08:27:08 +02:00
Simon Hausmann
51bc21c9a5
C++: Hide AbstractRepeaterView, Repeater and ModelPeer
...
These are not public API.
2021-06-21 15:50:58 +02:00
Simon Hausmann
f377b5db6c
C++: Document sixtyfps::interpreter::Value::Type
2021-06-21 15:50:58 +02:00
Simon Hausmann
f7ff3ba0db
C++: Document PropertyDescriptor
2021-06-21 15:50:58 +02:00
Olivier Goffart
7b63bb7d65
Allow to simulate key event with the interpreter (C++)
2021-06-11 11:26:21 +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
Olivier Goffart
052ea15989
Extends the C++ API docs for the interpreter a bit
2021-05-06 10:03:27 +02:00
Simon Hausmann
1e089389e5
Remove the example code from the interpreter namespace docs again
...
I can't seem to convince sphinx/breathe/doxygen to include them like
they work in the class docs.
I tried the markdown quotes, spaces, \code/\endcode, \rst/\endrst but no luck yet.
2021-04-27 14:11:46 +02:00
Simon Hausmann
140de87351
Add a brief overview section to the C++ interpreter namespace
...
This mirrors the Rust module side.
Unfortunately the code examples aren't rendered correctly :(
2021-04-27 13:02:41 +02:00
Simon Hausmann
70653ec7cd
Add C++ API for ComponentDefinition::properties()
2021-03-31 08:42:54 +02:00
Olivier Goffart
d37856b754
Avoid strict aliasing warning
2021-03-30 18:06:06 +02:00
Simon Hausmann
10189a844c
Make the C++ Value
API a little less error prone
...
Yesterday I ended up accidentally constructing a Value with a string literal
and that turned into a boolean value, resulting in run-time panic.
A deleted `const void *` constructor prevents this by producing a compile error instead of
picking the boolean constructor.
2021-03-26 09:55:13 +01:00
Simon Hausmann
25a1e666d9
Clarify model handling in C++ interpreter slightly
...
* Remove `Value::to_model()` as it is not implemented
* Document that models can be passed to .60 array/object properties
* Add a test for the extraction / setting behavior of arrays.
2021-03-25 16:57:09 +01:00
Olivier Goffart
0985318e3e
Properly drop the refcount of the ComponentWindow
...
Otherwise the ComponentWindow is leak, and so the QWidget is not destroyed
when it should be
2021-03-24 09:26:42 +01:00
Simon Hausmann
b51549ab58
Fix Struct::iterator test to be order agnostic
2021-03-23 17:49:28 +01:00
Simon Hausmann
d5662c117f
A few docs for ComponentInstance
...
There's more to do though
2021-03-23 17:32:19 +01:00
Simon Hausmann
8e05a15704
Polish the ComponentDefinition docs a little bit
2021-03-23 17:21:36 +01:00
Olivier Goffart
1dba04721a
Add a qt_viewer example that uses QWidget
2021-03-23 17:13:41 +01:00
Simon Hausmann
90d3953d42
Polish the ComponentDefinition docs a little bit
2021-03-23 17:10:14 +01:00
Simon Hausmann
e3f1e51a7a
Some basic class docs for Struct::iterator and two basic tests
2021-03-23 17:02:37 +01:00
Simon Hausmann
2a839134f4
More class docs for Value
2021-03-23 15:59:25 +01:00