jeremyletang / rgtk

GTK+ bindings and wrappers for Rust (DEPRECATED SEE https://github.com/rust-gnome )
GNU Lesser General Public License v3.0
120 stars 22 forks source link

Use GType as an enum #221

Closed oakes closed 9 years ago

oakes commented 9 years ago

As discussed in #213, this replaces the GType constants brought in via FFI with the gtk::GType enum.

GuillaumeGomez commented 9 years ago

Perfect, thanks !

gkoz commented 9 years ago

It's wrong to put this type in gtk3-sys. It has nothing to do with GTK. It isn't a part of the FFI layer, but a higher level Rust abstraction.

As discussed in #213, the enum needs to provide a variant to store other types with values we don't know in advance. You will not get from_primitive and as u64 for free then.

GuillaumeGomez commented 9 years ago

I thought GType was part of GTK. I revert it then.