mirror of
https://github.com/allankoechke/slint.git
synced 2026-11-30 17:26:35 +00:00
The energy monitor declares a transition on an animated int property, for which Property<int>::set_animated_binding_for_transition is called, which in turn calls slint_property_set_animated_binding_helper. The latter is overloaded for various property types, such as float, Color, or Brush, and then calls specialized functions from ffi, such as slint_property_set_animated_binding_(int|float|etc.). slint_property_set_animated_binding_int uses i32 in Rust, which cbindgen maps to int32_t, so the slint_property_set_animated_binding_helper overload also uses int32_t. Unfortunately, with esp-idf, int32_t is a distinct type from int, and the overload resolution fails. As remedy, this change uses c_int instead of i32 in the Rust ffi, which maps to int. This seems easier than changing Property<int> to Property<int32_t> :-)