mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Rename ComponentDefintion::callback_names() to just callbacks()
That's consistent with properties().
This commit is contained in:
parent
855808f9b5
commit
c0511a54ea
4 changed files with 10 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue