gtk-rs / gtk

DEPRECATED, use https://github.com/gtk-rs/gtk3-rs repository instead!

Home Page:https://gtk-rs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

constants GDK_BUTTON_* missing?

emmanueltouzery opened this issue · comments

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>...

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.

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

This can be closed