Add the accessible-size-of-set property

This commit is contained in:
Arnold Loubriat 2024-10-27 16:34:56 +01:00 committed by Simon Hausmann
parent 67166fcc2d
commit 97219c21bf
13 changed files with 44 additions and 0 deletions

View file

@ -369,6 +369,19 @@ public:
return std::nullopt;
}
/// Returns the accessible-size-of-set of that element, if any.
std::optional<uintptr_t> accessible_size_of_set() const
{
if (auto result = get_accessible_string_property(
cbindgen_private::AccessibleStringProperty::SizeOfSet)) {
uintptr_t value = 0;
if (cbindgen_private::slint_string_to_usize(&*result, &value)) {
return value;
}
}
return std::nullopt;
}
/// Sets the accessible-value of that element.
///
/// Setting the value will invoke the `accessible-action-set-value` callback.