slint/api
Simon Hausmann 82ae731fcb Python: Add support for enums
Support for enums is three-fold:

- Enums are dynamically created by invoking `enum.Enum("NameOfEnum",
  [("Variant1", "Variant1"), ("Variant2", "Variant2"), ...])` and the
  exposed in the module (next to structs).
- They're converted back to `Value::EnumerationValue(enum_name,
  enum_value)` by checking if a supplied value is an instance of
  `enum.Enum` and then querying the name and `__class__.name` fields.
- When coverting a `Value::EnumerationValue` to Python, the hard work
  begins: We now pass along a TypeCollection through all phases of the
  type conversion, which knows about the enums created earlier and tries
  to locate the correct type class and then variant.

Fixes #5828
2025-07-08 14:35:44 +02:00
..
cpp Updgrade Catch2 dependency (#8846) 2025-07-05 08:54:24 +02:00
node Node.JS: Fixed panic when converting brushes to colors 2025-07-02 09:13:42 +02:00
python Python: Add support for enums 2025-07-08 14:35:44 +02:00
rs CI: fail on Slint warnings when building examples 2025-07-04 18:35:52 +02:00
wasm-interpreter Remormat all the toml file again to fix npm upload 2025-04-09 15:06:00 +02:00