mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Add ComponentCompiler::build_from_path
This commit is contained in:
parent
fd9d154b27
commit
9eecdefb35
5 changed files with 57 additions and 0 deletions
|
@ -502,6 +502,18 @@ public:
|
|||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<ComponentDefinition> build_from_path(std::string_view path)
|
||||
{
|
||||
cbindgen_private::ComponentDefinitionOpaque result;
|
||||
if (cbindgen_private::sixtyfps_interpreter_component_compiler_build_from_path(
|
||||
&inner, sixtyfps::private_api::string_to_slice(path), &result)) {
|
||||
|
||||
return ComponentDefinition(result);
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue