Currently, builtin struct used in the .slint language are declared in many place: in the docs, in builtin.slints, in the interpreter, in the rust code. This makes it hard to add or change them. They should be declared in one place, like we do for the enums.
We should use the same thing for builtin structs as what we do with enums:
documentation generation, C++ bindings generation, rtti (interpreter) integration, and everything else can be done the same. One can just grep for for_each_enums and do the equivalent for structs.
Currently, builtin struct used in the .slint language are declared in many place: in the docs, in builtin.slints, in the interpreter, in the rust code. This makes it hard to add or change them. They should be declared in one place, like we do for the enums.
We should use the same thing for builtin structs as what we do with enums:
for_each_enums
and do the equivalent for structs.