Commit graph

464 commits

Author SHA1 Message Date
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
272a87ccf1 Fix C++ build
Map the target_pointer_width cfg's used for the opaque ffi interpreter
data structures to #ifdefs in CMake, to avoid that cbindgen generates
them multiple times without guard.
2021-03-25 09:37:34 +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
Simon Hausmann
4142a9198d Include the intrerperter in the doxygen scan
Amends commit 63cfb9b870
2021-03-23 15:59:17 +01:00
Simon Hausmann
63cfb9b870 Revert back to a unified C++ reference docs
Unfortunately I can't separate the interpreter docs from the regular
run-time library C++ docs with exhale/breathe. One way or another it
breaks and one disappears or shows errors. This change reverts commit
0bb497c816, commit
a769b630ca and commit
0e82faf845 and merges the two into one
reference for now.
2021-03-23 15:36:53 +01:00
Simon Hausmann
9e58b39317 Minor doc fix for Value 2021-03-23 14:07:46 +01:00
Simon Hausmann
ab99d9b19e Some class intro docs for Value
and hide the internal typedef
2021-03-23 13:45:53 +01:00
Simon Hausmann
81116607c1 Some class docs for C++ Struct
This also hides the internal constructor
2021-03-23 13:23:52 +01:00
Simon Hausmann
c06b0e10e1 Add/sync class summary docs for interpreter::Struct 2021-03-23 12:57:40 +01:00
Simon Hausmann
646ce85ea6 Fix doxygen error
It can't parse the std::enable_if bits in the range constructor of Struct,
so skip it.
2021-03-23 11:17:40 +01:00
Simon Hausmann
0bb497c816 Fix C++ Interpreter docs not showing up in detail
The hacked multi-project support doesn't support multiple output
directories, breathe will look only in the default project directory for
doxygen xml files. Therefore share them.
2021-03-23 11:15:13 +01:00
Simon Hausmann
a769b630ca Separate the C++ Interpreter API into a separate library root
Since breathe doesn't support multiple projects by default, this
uses a fork of the monkey-patch extensions to enable this.
2021-03-22 14:37:02 +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
0e82faf845 Exclude the interpreter C++ API from the general SixtyFPS API docs
These need to somehow go into a separate top-level item
2021-03-22 10:55:46 +01:00
Simon Hausmann
e1f9347aaa Add a diagnostics getter to ComponentCompiler 2021-03-19 18:34:39 +01:00
Olivier Goffart
b645860e27 Fix bad conflict resolution 2021-03-19 18:30:16 +01:00
Olivier Goffart
f2ffc0ebf6 ComponentDefinition::create in C++
Note thate there is a hack so `ComponentHandle<ComponentInstance>` (which is
binary compatible with `VRc<ComponentVTable, ErasedComponentBox>` works
2021-03-19 18:10:38 +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
59d6866b13 Remove the null state in ComponentDefinition
This isn't needed as it turns out and a cleaner API this way
2021-03-19 17:08:04 +01:00
Simon Hausmann
3588d6ffbe Start exposing ComponentDefinition to C++ 2021-03-19 16:50:12 +01:00
Simon Hausmann
9a8c6bf9f7 Move the string_to_slice helper into sixtyfps_string.h for easier editing 2021-03-19 14:16:30 +01:00
Simon Hausmann
3bb4b87bc7 Use a free-standing function for the string_view to slice conversion 2021-03-19 13:13:08 +01:00
Simon Hausmann
0c21008861 Add internal convenience API to construct a C++ slice from a string view 2021-03-19 12:54:22 +01:00
Simon Hausmann
591ae8557b Add include_paths setter/getter to ComponentCompiler 2021-03-19 09:56:46 +01:00
Simon Hausmann
318ee46d08 Fix build
Brown paper bag for me
2021-03-19 09:42:38 +01:00
Simon Hausmann
7af77839ad Add the skeleton for CompilerCompiler in C++ 2021-03-19 09:26:42 +01:00
Olivier Goffart
63460c1a24 ComponentInstance show/hide/run 2021-03-18 16:37:01 +01:00
Olivier Goffart
9cc69d73a1 C++ implementation of the ComponentInstance
still untested
2021-03-18 16:30:25 +01:00
Simon Hausmann
a734f7f63b Add type guards to the Struct range constructor
These provide much better error messages in case of a mismatch
2021-03-18 15:54:54 +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
533b7f05ce Remove the Value(Type) C++ constructor again
This theoretically makes sense for types that have default values, but
for example Value::Model requires a pointer Rc. But since we provide concrete constructors this
should not be needed.
2021-03-17 17:36:55 +01:00
Simon Hausmann
e539d03007 Add C++ Value Brush support 2021-03-17 17:22:57 +01:00
Olivier Goffart
d5823f2b42 Don't forget to destroy the previous value when assigning a new one 2021-03-17 17:11:23 +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