This makes the $rust_class_name argument in glib_wrapper! optional. If specified, it defines a type alias for the class.
This removes the ObjectType::RustClassType associated type, since it can't be enforced/assumed by the type system that that is an instance of this generic struct.
The IsClassFor trait is also removed, superseded by this generic type.
This also changes the IsSubclassable trait to be implemented on the object struct rather than the class struct, since there otherwise would be foreign trait on foreign type errors.
TODO: I still need to determine the naming and where this should be exported (should Class be called something else? should it be in the prelude?). I'll also have to try updating gtk to use this (if nothing else, the IsSubclassable implementations will need to be changed).
This makes the
$rust_class_name
argument inglib_wrapper!
optional. If specified, it defines atype
alias for the class.This removes the
ObjectType::RustClassType
associated type, since it can't be enforced/assumed by the type system that that is an instance of this generic struct.The
IsClassFor
trait is also removed, superseded by this generic type.This also changes the
IsSubclassable
trait to be implemented on the object struct rather than the class struct, since there otherwise would be foreign trait on foreign type errors.TODO: I still need to determine the naming and where this should be exported (should
Class
be called something else? should it be in the prelude?). I'll also have to try updating gtk to use this (if nothing else, theIsSubclassable
implementations will need to be changed).Fixes https://github.com/gtk-rs/glib/issues/707.