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
fe59fb3ec3
C++: Hide sixtyfps::PathData from the public API
2021-06-21 15:50:58 +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
Simon Hausmann
07dd3ec82f
C++: Hide global comparison operators for private Slice API
2021-06-21 15:50:58 +02:00
Simon Hausmann
7f8f1b3105
Hide Property<T> and PropertyTracker<T> from the public C++ API
...
Move those two classes into the private_api namespace, which is excluded
from the API reference documentation.
For generate code the explicit qualification of Property<T> is changed,
for the cbindgen generated item types the private_api namespace is
pulled into the cbindgen_private namespace.
2021-06-21 15:50:58 +02:00
Simon Hausmann
85474f7670
Add support for sixtyfps::Image::size() in C++
...
Also added a unit test for the C++ implementation.
2021-06-20 11:18:28 +02:00
Simon Hausmann
3587d49445
Hide sixtyfps::Repeater::RepeaterInner from the C++ docs
2021-06-18 17:15:39 +02:00
Olivier Goffart
a0bea36e43
Fix preferred size of the Window with a layout
...
A few problem:
- the horizontal and vertical property were swapped
- The implementation of the "preferred_xxx" property was not materialized properly
because the `bindings` were borrowed in the materialize_fake_properties pass
- Since the Window has a stretch factor of 0., the preferred size of the inner layout
was not taken into account when merging the LayoutInfo. I believe taking the
maximum preferred size is the right solution when merging them.
2021-06-18 13:51:25 +02:00
Simon Hausmann
0a3ec534ae
Hide CallbackHelper and CallbackSignatureHelper from the API docs
...
There's no hide-from-docs tag for doxygen, so move these into the
private_api namespace.
2021-06-18 13:49:05 +02:00
Simon Hausmann
54c8c7761b
Refer to the tutorial from our front-pages that also refer to the reference docs
2021-06-17 16:38:19 +02:00
Olivier Goffart
cfc04bb4ab
C++: adapt to the layout horizontal/vertical split
2021-06-16 15:14:07 +02:00
Olivier Goffart
7b63bb7d65
Allow to simulate key event with the interpreter (C++)
2021-06-11 11:26:21 +02:00
Olivier Goffart
ce34ff87d0
Finish support for callback aliases
...
cc #111
2021-06-07 20:40:36 +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
Simon Hausmann
7ebbf20467
Fix doc build with nightly in CI
...
The #[doc = include_str!("...")] syntax is now the new external file
syntax in rust nightly - the old syntax was removed.
2021-06-06 20:52:10 +02:00
Simon Hausmann
5d24fde6f5
Make it easier to run the examples on Windows in the C++ build
...
Place the examples into the bin folder in the top-level directory (when
not built standalone), along with the sixtyfps dll.
2021-06-01 10:05:00 +02:00
Olivier Goffart
142a8dc185
Rename ImageReference to ImageInner and make Immage.0 private
2021-05-28 17:05:16 +02:00
Olivier Goffart
8e44ac2351
Image type: some more docs
2021-05-28 17:05:16 +02:00
Olivier Goffart
0b3fecf300
WIP: API to expose image loading from C++ and Rust
2021-05-28 17:05:16 +02:00
Olivier Goffart
4584c40544
Rename items::Image to ImageItem
...
Because there will be soon a sixtyfps::Image and the names
can't clash
2021-05-28 17:05:16 +02:00
Simon Hausmann
7ffc5cf59a
Minor doc touch-up
2021-05-26 08:00:47 +02:00
Olivier Goffart
4fbab34ce3
Make sixtyfps::Weak
Send so we can send it to threads and back
...
Also edit the documentation
2021-05-25 15:53:49 +02:00
Simon Hausmann
73f647c2e1
Add the Rust equivalent of sixtyfps::invoke_from_event_loop
...
The same API exists in C++.
2021-05-25 15:53:49 +02:00
Olivier Goffart
236011d17c
Make ComponentDefinition::properties only list the public properties as it should
...
Fixes #242
2021-05-25 15:48:22 +02:00
Olivier Goffart
0df8161a6b
Also require Qt 5.15 in the main CMakeLists
2021-05-21 08:01:30 +02:00
Simon Hausmann
5f6ed2488e
Avoid link error when cargo found Qt but CMake didn't
...
When using cmake to configure the C++ build and Qt is found, and then
build with `SIXTYFPS_NO_QT=0 cmake --build ..`, the C++ library is built
without Qt support but qt_viewer is built. Linkage then fails when it
tries to access the API in libsixtyfps_cpp.so that provides the QWidget,
as that symbol is not present.
So with newer CMake we use find_package to provide positive information
to the cargo build about where Qt is, and consequently this patch
provides negative information to disable Qt support if CMake could not
find Qt -- or it was deliberately disabled for example using
`-DCMAKE_DISABLE_FIND_PACKAGE_Qt5=1`.
cc #232
2021-05-20 20:33:07 +02:00
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