Add API to the Rust and C++ interpreter library to return the names of all publicly declared callbacks

This commit is contained in:
Simon Hausmann 2021-06-07 11:43:04 +02:00
parent fb19588c8c
commit 855808f9b5
4 changed files with 43 additions and 1 deletions

View file

@ -710,6 +710,16 @@ public:
return props;
}
/// Returns a vector of strings that describe the list of public callbacks that can be invoked
/// using ComponentInstance::invoke_callback and set using ComponentInstance::set_callback.
sixtyfps::SharedVector<sixtyfps::SharedString> callback_names() const
{
sixtyfps::SharedVector<sixtyfps::SharedString> callback_names;
cbindgen_private::sixtyfps_interpreter_component_definition_callback_names(&inner,
&callback_names);
return callback_names;
}
/// Returns the name of this Component as written in the .60 file
sixtyfps::SharedString name() const
{