jeremyletang / rgtk

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

changed ModifierType to bitflags, more rust-like, and added a usage exam... #160

Closed buster closed 9 years ago

buster commented 9 years ago

I've changed the keys to be "const" instead of static, because matching on the key didn't work with that. Also i've changed the ModifierType enum to bitflags!(), so it can be easily used. I couldn't figure out how to use the ModifierType with the enum...

Could you please review? Especially gtktest.rs shows that now it needs another "use".

Key can not be matched like this:

        match keyval {
            key::Escape => gtk::main_quit(),
buster commented 9 years ago

the gtktest example seems running.. i don't know where modifierintent is acutally used, but modifiertype seems to work fine.

GuillaumeGomez commented 9 years ago

I'm not sure if it has been used somewhere in rgtk or in one of the examples... You have something on this @jeremyletang ?

jeremyletang commented 9 years ago

Hey, this seems good for me, is it ready to merge @buster ?

buster commented 9 years ago

Yes, please merge @jeremyletang :)

jeremyletang commented 9 years ago

Thanks @buster !