gtk-rs / gtk

DEPRECATED, use https://github.com/gtk-rs/gtk3-rs repository instead!
https://gtk-rs.org/
MIT License
1.25k stars 82 forks source link

constants GDK_BUTTON_* missing? #1044

Closed emmanueltouzery closed 4 years ago

emmanueltouzery commented 4 years ago

I can't find the constants GDK_BUTTON_PRIMARY, GDK_BUTTON_SECONDARY, and GDK_BUTTON_MIDDLE in the bindings?

https://developer.gnome.org/gdk3/stable/gdk3-Events.html#GDK-BUTTON-PRIMARY:CAPS

If they're missing we'd probably need to add them? Maybe three new u32 values, like gdk::Button::Primary? They're compared with https://gtk-rs.org/docs/gdk/struct.Event.html#method.get_button which is Option<u32>. Unless we make an enum and then get_button returns Option<gdk::Button>...

EPashkin commented 4 years ago

Yes it only in gdk sys without safe usage https://docs.rs/gdk-sys/0.10.0/gdk_sys/constant.GDK_BUTTON_PRIMARY.html I almost sure that this function can return 4 or more if mouse has many buttons. So + for constant rexporting, -+ for enum.

emmanueltouzery commented 4 years ago

I should have opened this bug against gdk not gtk. I've now opened a PR against gdk: https://github.com/gtk-rs/gdk/pull/352

bilelmoussaoui commented 4 years ago

This can be closed