Migrate subclassing infrastructure to glib-rs #392
For an example see the unit test in
This is a complete rewrite of
I have a WIP port of
I also have a minimal change to gir (gtk-rs/gir#669) to add the Rust class type to the
This is now part of the proper bindings instead of an external crate because otherwise the API can't be made as nice as it is now due to not being able to implement traits for types defined in other crates, and generally more traits for marking all the relationships are needed.
And fill it in by default with () in the macro to prevent existing code from failing to compile.
It is potentially unsafe as the object is not fully initialized yet and especially does not have its private struct created yet (we just do exactly that here!). It's better to use Object::constructed() for any initialization.