mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 05:14:48 +00:00
add sixtyfps-cpp draft
This commit is contained in:
parent
74b3c9147e
commit
b2b57887e2
6 changed files with 75 additions and 6 deletions
18
api/sixtyfps-cpp/include/sixtyfps.h
Normal file
18
api/sixtyfps-cpp/include/sixtyfps.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
|
||||
#include "sixtyfps_internal.h"
|
||||
|
||||
namespace sixtyfps {
|
||||
|
||||
// Bring opaque structure in scope
|
||||
using internal::ItemTreeNode;
|
||||
using internal::ComponentType;
|
||||
|
||||
template<typename Component> void run(Component *c, const ComponentType *t) {
|
||||
// FIXME! some static assert that the component is indeed a generated component matching
|
||||
// the vtable. In fact, i think the VTable should be a static member of the Component
|
||||
internal::sixtyfps_runtime_run_component(t, reinterpret_cast<internal::ComponentImpl *>(c));
|
||||
}
|
||||
|
||||
using internal::Rectangle;
|
||||
using internal::RectangleVTable;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue