add sixtyfps-cpp draft

This commit is contained in:
Olivier Goffart 2020-05-06 12:52:31 +02:00
parent 74b3c9147e
commit b2b57887e2
6 changed files with 75 additions and 6 deletions

View 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;
}