mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 12:54:45 +00:00
Reformat public header with Qt's clang-format
This commit is contained in:
parent
83eb00b080
commit
802c8d1add
2 changed files with 99 additions and 13 deletions
|
@ -13,13 +13,14 @@ namespace sixtyfps {
|
|||
using internal::ComponentType;
|
||||
using internal::ItemTreeNode;
|
||||
|
||||
template <typename Component> void run(Component *c) {
|
||||
// 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_with_gl_renderer(
|
||||
&Component::component_type,
|
||||
reinterpret_cast<internal::ComponentImpl *>(c));
|
||||
template<typename Component>
|
||||
void run(Component *c)
|
||||
{
|
||||
// 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_with_gl_renderer(
|
||||
&Component::component_type, reinterpret_cast<internal::ComponentImpl *>(c));
|
||||
}
|
||||
|
||||
using internal::Image;
|
||||
|
@ -30,14 +31,14 @@ using internal::RectangleVTable;
|
|||
// the component has static lifetime so it does not need to be destroyed
|
||||
// FIXME: we probably need some kind of way to dinstinguish static component and
|
||||
// these on the heap
|
||||
inline void dummy_destory(const ComponentType *, internal::ComponentImpl *) {}
|
||||
inline void dummy_destory(const ComponentType *, internal::ComponentImpl *) { }
|
||||
|
||||
constexpr inline ItemTreeNode make_item_node(std::intptr_t offset,
|
||||
const internal::ItemVTable *vtable,
|
||||
uint32_t child_count,
|
||||
uint32_t child_index) {
|
||||
return ItemTreeNode{
|
||||
ItemTreeNode::Tag::Item,
|
||||
{ItemTreeNode::Item_Body{offset, vtable, child_count, child_index}}};
|
||||
uint32_t child_count, uint32_t child_index)
|
||||
{
|
||||
return ItemTreeNode { ItemTreeNode::Tag::Item,
|
||||
{ ItemTreeNode::Item_Body { offset, vtable, child_count,
|
||||
child_index } } };
|
||||
}
|
||||
} // namespace sixtyfps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue