glib_wrapper missing ancestors
Accounding to the glib_wrapper
-documentation [1], all the parent needs to be specified. Current, only then parent class is specified. Furthermore, if the ancestor is from a different crate, it is neccesairy to also specify the ffi-type [2].
I propose the following changes:
- All ancestors need to be specified by an impl-block.
- The impl-block can contain an optional associated type which is used as ffi-type in the glib_wrapper invocation.
The first change might be avoided in the future by processing gir-files. I don't see currently through how to obtain the rust-type and ffi-type from gir-files.
It also means that the class-definition only need to contain the parent type. Because the parent is an ancestor, an impl-block must exists. It is still neccesairy to know which ancestor is the parent and which are deeper in the type structure.
What are your thoughts about resolving the glib_wrapper
requirements?
[1] https://docs.rs/glib/0.6.0/glib/macro.glib_wrapper.html
[2] https://users.rust-lang.org/t/compiler-error-conflicting-type-with-associated-types/21069 https://github.com/rust-lang/rust/issues/51445