gtk-rs / glib

DEPRECATED, use https://github.com/gtk-rs/gtk-rs-core repository instead!
http://gtk-rs.org/
MIT License
93 stars 62 forks source link

Use :ty rather than :path for ffi_name and ffi_class_name #704

Closed ids1024 closed 4 years ago

ids1024 commented 4 years ago

I believe this is more correct, and should allow more things to work without breaking anything. But it's hard to be sure with complicated macros...

This allows code like this to compile:

glib_wrapper! {
    pub struct SimpleObject(
        Object<(<SimpleObjectPrivate as ObjectSubclass>::Instance),
        (<SimpleObjectPrivate as ObjectSubclass>::Class), SimpleObjectClass>)
        @extends gtk::Widget;

    match fn {
        get_type => || SimpleObjectPrivate::get_type().to_glib(),
    }
}
sdroege commented 4 years ago

As everything apparently still compiles, let's get this in. The reason why this was needed is apparently not valid anymore :) Thanks for noticing this!