Rename ComponentDefintion::callback_names() to just callbacks()

That's consistent with properties().
This commit is contained in:
Simon Hausmann 2021-06-07 12:08:35 +02:00
parent 855808f9b5
commit c0511a54ea
4 changed files with 10 additions and 12 deletions

View file

@ -712,12 +712,11 @@ public:
/// 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> callbacks() const
{
sixtyfps::SharedVector<sixtyfps::SharedString> callback_names;
cbindgen_private::sixtyfps_interpreter_component_definition_callback_names(&inner,
&callback_names);
return callback_names;
sixtyfps::SharedVector<sixtyfps::SharedString> callbacks;
cbindgen_private::sixtyfps_interpreter_component_definition_callbacks(&inner, &callbacks);
return callbacks;
}
/// Returns the name of this Component as written in the .60 file

View file

@ -313,7 +313,7 @@ SCENARIO("Component Definition Properties")
REQUIRE(properties[0].property_name == "test");
REQUIRE(properties[0].property_type == Value::Type::String);
auto callback_names = comp_def.callback_names();
auto callback_names = comp_def.callbacks();
REQUIRE(callback_names.size() == 1);
REQUIRE(callback_names[0] == "dummy");
}