Olivier Goffart
0034a3e67d
Fix restarting the event loop with the GL backend
...
We must reset the proxy to a queue so one can restart it with pending events
2021-05-11 17:48:56 +02:00
Olivier Goffart
aabd320e83
C++ Api to run a functor from a thread
2021-05-11 16:42:59 +02:00
Olivier Goffart
ba1aff84d0
Layout refactoring: C++ part
2021-05-11 14:59:57 +02:00
Olivier Goffart
720001a223
Remove the solve_layout from the component vtable
...
no longer required
2021-05-11 14:59:57 +02:00
Olivier Goffart
f06bf8d5a7
Fix repeater in box layout
2021-05-11 14:59:57 +02:00
Olivier Goffart
7f7f2245d8
Use the testing backend for node
2021-05-11 11:40:26 +02:00
Olivier Goffart
988c2b0b9d
Use the testing backend for the C++ integration tests
2021-05-11 11:40:26 +02:00
Simon Hausmann
b30aaf2c06
Fix Qt detection in C++ build when qmake is not in PATH but CMAKE_PREFIX_PATH is set
...
find_package(Qt5) may do a better job at finding qmake, especially if the build is invoked
through Qt Creator, which may make sure that CMAKE_PREFIX_PATH is set.
Forward the qmake path therefore the the rust build.
2021-05-11 10:55:15 +02:00
Simon Hausmann
c6a4841cd4
Simplify item vtable retrieval in C++
...
Use a macro instead of a template function to make the getter vs. global
symbol choice.
2021-05-11 07:55:51 +02:00
Simon Hausmann
28701d2f90
Fix item vtable usage on Windows
...
The item tree is intended to be initialized with pointers to the item
vtables, which are implemented using data relocation records that
resolve to the symbols exported by the sixtyfps_cpp shared library.
On windows, according to
https://docs.microsoft.com/en-us/cpp/c-language/rules-and-limitations-for-dllimport-dllexport?view=msvc-160
such data relocations are not supported, so this patch implements the
fallback through getter functions.
2021-05-10 22:54:06 +02:00
Simon Hausmann
4198513832
Add a dummy indirection in C++ for the item vtable access
...
This will allow for a compile-time decision in the future whether
to use the vtable symbol or getter function.
2021-05-10 22:54:06 +02:00
Simon Hausmann
98a91ec3e5
Generate item vtable symbol declarations via cbindgen xtask
...
... instead of declaring them by hand in sixtyfps.h
This will make it easier to introduce an indirection in one place.
2021-05-10 22:54:06 +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
ef1a605953
Add support for showing warning diagnostics in the online editor
2021-04-30 15:43:05 +02:00
Simon Hausmann
9dcbf4b5ad
Revert "Change docs to point to the 0.0.6 version of the wasm interpreter"
...
This reverts commit 944c6e44af
because
we're past the release and should pointer back to master builds.
2021-04-27 17:43:45 +02:00
Simon Hausmann
944c6e44af
Change docs to point to the 0.0.6 version of the wasm interpreter
...
... in time for the release
2021-04-27 17:07:38 +02:00
Simon Hausmann
de8e398ad2
Bump cargo sixtyfps crate dependency version in Rust docs
2021-04-27 15:48:53 +02:00
Simon Hausmann
5acd05d2f1
Update use of GIT_TAG in the C++ docs
2021-04-27 15:47:05 +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
Olivier Goffart
e7f5578617
Also make the repeater's is_dirty as Property in C++
2021-04-27 11:24:19 +02:00
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
Olivier Goffart
3380383787
Bump version number
...
(Does not include docs and README yet)
2021-04-26 13:16:48 +02:00
Olivier Goffart
a904a9f507
Update the corrosion tag
2021-04-23 17:37:37 +02:00
Olivier Goffart
d0153fb7cd
Fix warnings
2021-04-23 16:34:30 +02:00
Olivier Goffart
91ed04a72c
Make length
(still the default for all property) be the logical length
...
And a new `physical_length` is now the physical_length unit
Note: this does not change the runtime part yet
2021-04-21 17:15:19 +02:00
Olivier Goffart
7ae850d564
Rename Type::Length -> Type::PhysicalLength
2021-04-21 17:15:19 +02:00
Olivier Goffart
ba2f2d5719
Add an Opacity element that does nothing
2021-04-15 10:17:52 +02:00
Simon Hausmann
afe3df6381
Remove the public API for registering fonts by path or memory chunk
...
This is not needed anymore in the light of being able to write `import "blah.ttf"` in .60 markup
2021-04-14 10:01:33 +02:00
Olivier Goffart
cb06394685
Remove some more use of SyntaxNode and SyntaxToken
2021-04-13 17:10:56 +02:00
Simon Hausmann
794d3ec6ec
Revert "Add a nodejs testing function for apply_layout"
...
This reverts commit beb5d63d1b
.
Oops, the more modern style *is* to use send_mouse_click.
2021-04-08 16:58:37 +02:00
Simon Hausmann
beb5d63d1b
Add a nodejs testing function for apply_layout
...
This will allow making the JS test code more similar to the C++/Rust code,
allowing replacing synthetic mouse clicks.
2021-04-08 16:51:51 +02:00
Simon Hausmann
b8e621a76b
Fix C++ build
...
Add the preferred size merging logic also to C++ LayoutInfo::merge.
Amends commit 843f52b3c5
2021-04-08 13:16:06 +02:00
Simon Hausmann
7ab518786f
Re-run clang-format on sixtyfps.h
2021-04-08 13:10:41 +02:00
Olivier Goffart
0fb2b6424e
Update neon version
2021-04-07 13:52:21 +02:00
Olivier Goffart
c3ab89dd3e
Refactor import opening and its hook
...
This way the hook is called regardless if the file exist in the import path or not
2021-04-06 12:27:59 +02:00
Simon Hausmann
1e4921de13
Fix LSP server staying alive when closing preview window
...
* Provide an internal behavior parameter to run_event_loop() that we can use
from the preview to not quit when the last window was closed.
* Fix Drop for the winit event loop GraphicsWindow to drop the backend window correctly
when unmapping, not when the graphics window dies. Otherwise QuitOnLastWindowClosed doesn't work.
2021-04-06 12:11:55 +02:00
Simon Hausmann
477729da52
Improve brush property test coverage
...
Test that assigning colors works:
* Test the implicit `Brush(const Color &)` C++ constructor
* Add derive_more::From to allow convenient conversion in Rust
* When assigning to brush properties in JavaScript, try at least to see if it's a color string (could be extended in the future)
2021-04-01 08:27:10 +02:00
Simon Hausmann
d4178e0935
Avoid duplicate symbols when linking .o files
...
Mark some functions as inline to avoid generating symbols that would
produce duplicate errors when linking multiple .o files that include the
SixtyFPS headers.
2021-03-31 08:42:54 +02:00
Simon Hausmann
3f6bbaf53a
Make it possible to use the C++ headers without CMake
...
Detect the pointer size solely via the pre-processor
2021-03-31 08:42:54 +02:00
Simon Hausmann
7a708525d9
Fix usage of installed C++ headers
...
Include two new internal header files in the install set
2021-03-31 08:42:54 +02:00
Simon Hausmann
70653ec7cd
Add C++ API for ComponentDefinition::properties()
2021-03-31 08:42:54 +02:00
Simon Hausmann
342f77139b
Add public Rust interpreter API to introspect the public properties
2021-03-31 08:42:54 +02:00
Simon Hausmann
9a6e9c3a53
Simplify internal interpreter property descriptor API
...
Return an iterator when querying the properties. This requires a
one-time copy of the property declarations out of the compiler data
structure, which is read-only.
2021-03-31 08:42:54 +02:00
Olivier Goffart
8ef0b3481c
Don't make CI fails for warnings on windows
2021-03-30 19:25:00 +02:00
Olivier Goffart
a0cc8a2976
Have C++ warning in test break the CI
2021-03-30 18:06:24 +02:00
Olivier Goffart
d37856b754
Avoid strict aliasing warning
2021-03-30 18:06:06 +02:00
Simon Hausmann
26b58bb0a5
Docs for PropertyTracker
2021-03-26 10:43:13 +01:00
Simon Hausmann
bfd2a2add9
Fix exhale warning about overriding PREDEFINED
2021-03-26 10:32:22 +01: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