Olivier Goffart
3ab11b62e6
C++ SharedString API: allow assigning from const char *
...
There is already a constructor that takes a char*, so there should be an
assignment operator as well
2021-04-27 10:37:27 +02:00
Simon Hausmann
70653ec7cd
Add C++ API for ComponentDefinition::properties()
2021-03-31 08:42:54 +02:00
Simon Hausmann
4cbcf2611f
Fix recurring C++ timers
...
* sixtyfps_timer_start needs to *take* the timer id out of the Rust
timer to avoid that the subsequent drop stops the timer again
* For the Qt event loop, call `timer_event()` once before entering
QCoreApplication::exec(), to schedule any timers that were started
beforehand.
* Added a way to quit the event loop gently, in order to use that
from the C++ unit test.
2021-03-25 20:07:12 +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
Simon Hausmann
3bd5b0eadf
Add support for recursive dependency tracking across PropertyTracker instances
...
By default PropertyTracker::evaluate() registers the currently
evaluating binding/tracker as a dependency. This should help with
repeaters and other scenarios where in the run-time we use property
trackers but want to track the overall "dirtyness" in the window with
regards to whether a redraw is needed or not.
The new evaluate_as_dependency_root() function allows skipping this
mechanism and is used for the two trackers in the window.
2021-03-25 12:29:19 +01:00
Simon Hausmann
b51549ab58
Fix Struct::iterator test to be order agnostic
2021-03-23 17:49:28 +01:00
Simon Hausmann
e3f1e51a7a
Some basic class docs for Struct::iterator and two basic tests
2021-03-23 17:02:37 +01:00
Olivier Goffart
bd6cace54c
Test and fix C++ invokation of callback
2021-03-22 14:30:00 +01:00
Olivier Goffart
d79131f18f
Split the tests into two files for the interpreter and others
2021-03-22 11:24:11 +01:00
Simon Hausmann
e1f9347aaa
Add a diagnostics getter to ComponentCompiler
2021-03-19 18:34:39 +01:00
Simon Hausmann
9eecdefb35
Add ComponentCompiler::build_from_path
2021-03-19 17:26:19 +01:00
Simon Hausmann
fd9d154b27
Add getter/setter for the style
2021-03-19 17:17:57 +01:00
Simon Hausmann
3588d6ffbe
Start exposing ComponentDefinition to C++
2021-03-19 16:50:12 +01:00
Simon Hausmann
591ae8557b
Add include_paths setter/getter to ComponentCompiler
2021-03-19 09:56:46 +01:00
Simon Hausmann
7af77839ad
Add the skeleton for CompilerCompiler in C++
2021-03-19 09:26:42 +01:00
Simon Hausmann
8916b7e13e
Add a range and initializer list constructor to Struct
2021-03-18 15:28:02 +01:00
Olivier Goffart
09b7b92dbe
Value comparison in C++
2021-03-18 15:26:53 +01:00
Olivier Goffart
8a14c4fa25
Iterator over interpreter::Struct
2021-03-18 15:07:38 +01:00
Olivier Goffart
a3d0f3155d
Fix double delete of the Value in Struct::get_field
2021-03-18 14:20:30 +01:00
Simon Hausmann
c6740fe592
Move field accessors from Value to Struct in C++
2021-03-18 13:33:50 +01:00
Olivier Goffart
3335ff8da5
C++ API to put a model in the interpreter::Value
2021-03-18 12:17:01 +01:00
Simon Hausmann
02c1150fa7
Add the boilerplate for Struct in C++
2021-03-18 12:12:48 +01:00
Simon Hausmann
e539d03007
Add C++ Value Brush support
2021-03-17 17:22:57 +01:00
Simon Hausmann
79612d7354
Add C++ Value Array construction/extraction
2021-03-17 16:52:30 +01:00
Simon Hausmann
dc30106037
Add SharedVector<T>::empty() and a constructor that takes an initializer list
2021-03-17 15:19:59 +01:00
Simon Hausmann
831bf58baa
Add Value bool conversion to C++
2021-03-17 14:15:48 +01:00
Simon Hausmann
0877f0c82a
Add C++ Value number construction & conversion
2021-03-17 14:07:49 +01:00
Simon Hausmann
8e72d29669
Expose Value::to_string()
conversion and construction in C++
2021-03-17 13:28:53 +01:00
Simon Hausmann
cf2b02c9fa
Add the initial C++ header file for the interpreter with the start of Value
2021-03-17 12:10:12 +01:00
Simon Hausmann
cff1e7751d
Link against SixtyFPS in the C++ unit tests
2021-03-16 16:51:01 +01:00
Simon Hausmann
ec1775f9ae
Add skeleton for C++ API tests
2021-03-16 16:30:54 +01:00