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
Simon Hausmann
ffb1d7bd83
Reformat sharedvector.h with clang-format
2021-03-17 15:03:48 +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
f5fb0bf297
Prospective Qt linkage fix for macOS
...
Try adding an LC_RPATH command to the cdylib that we're building (for example libsixtyfps_cpp.dylib),
to fix linkage against Qt, which uses `@rpath/QtCore.framework/XXX` for inter-library linkage dependencies.
2021-03-17 14:02:33 +01:00
Simon Hausmann
8e72d29669
Expose Value::to_string()
conversion and construction in C++
2021-03-17 13:28:53 +01:00
Olivier Goffart
6e9d4f9e8d
Fix linking of the interpreter
...
I don't know why, byt the 'crate-type = "lib"' seem to fix the problem
2021-03-17 12:38:05 +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
a06f0b22fa
Add a debug message to see what's set in the CI
2021-03-17 11:57:19 +01:00
Olivier Goffart
dbf06f73cc
Link the C++ lib against the interpreter
2021-03-17 11:44:45 +01:00
Simon Hausmann
372ba09741
Prospective fix for ctest on macOS in the CI
...
Try manually to propagate the local environment variable for the dyld framework path
It might not get propagated across the process boundaries by itself the way github actions set it in the local environment.
2021-03-17 11:34:34 +01:00
Simon Hausmann
c68405d4dd
Prospective fix for macos ctest not finding Qt
...
Not sure how this could happen, but we should be able to limit the rpath workaround to Linux
2021-03-17 08:52:52 +01:00
Olivier Goffart
29f930d733
Workaround test problem
...
Looks like the test executable need to be run from the cmake root build directory,
because it hardcodes a relative path to the library api/sixtyfps-cpp/libsixtyfps_cpp.so
This might actually be a corrosion bug.
2021-03-16 19:49:29 +01:00
Olivier Goffart
35cce45cbc
Add a fii feature so that we don't compile in the ffi code if not required
2021-03-16 18:09:57 +01:00
Simon Hausmann
cff1e7751d
Link against SixtyFPS in the C++ unit tests
2021-03-16 16:51:01 +01:00
Olivier Goffart
ca93d12cf8
Fix cpack
2021-03-16 16:47:03 +01:00
Olivier Goffart
0e351de1a6
Create a new crate to expose the C++
2021-03-16 16:34:02 +01:00
Simon Hausmann
ec1775f9ae
Add skeleton for C++ API tests
2021-03-16 16:30:54 +01:00
Simon Hausmann
8372d3f6d8
Rename call_*
to invoke_*
for callbacks
...
Fixes #187
2021-03-15 17:01:05 +01:00
Olivier Goffart
4f115edb87
Fix cmake install
2021-03-11 11:34:09 +01:00
Olivier Goffart
6f88d78303
Rename Resource
to ImageReference
in the runtime
2021-03-11 10:06:23 +01:00
Olivier Goffart
44e81a40d6
Fixup C++ build
2021-03-10 17:24:31 +01:00
Simon Hausmann
391d0152f0
Add Color::brighter/darker functions
...
These are exposed in .60 as well as in Rust and C++ and implemented by
converting to HSV color space and adjusting the brightness (value).
2021-02-24 10:49:27 +01:00
Simon Hausmann
1b870959e6
Use the Noto fonts from the C++ build of the printer demo
...
This adds API to register a font by path from C++
2021-02-22 11:17:39 +01:00
Olivier Goffart
b34a34cea0
C++ Make sure that the layout is properly updated when the model of a for
or if
changes
...
The problem is that the backend is using the `meta_property_listener` to know
if the layout must be updated, but the C++ code would not register a dependency
NOTE about the test: The test doesn't really test that it works because
the test backend don't have a meta_property_listener and apply the layout
inconditionally in sixtyfps_send_mouse_click
2021-02-18 09:40:12 +01:00