Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

constants GDK_BUTTON_* missing? #1044

Closed
emmanueltouzery opened this issue Aug 8, 2020 · 3 comments
Closed

constants GDK_BUTTON_* missing? #1044

emmanueltouzery opened this issue Aug 8, 2020 · 3 comments

Comments

@emmanueltouzery
Copy link

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
Copy link
Member

EPashkin commented Aug 8, 2020

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
Copy link
Author

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

GuillaumeGomez added a commit to gtk-rs/gdk that referenced this issue Aug 10, 2020
@bilelmoussaoui
Copy link
Member

This can be closed

GuillaumeGomez pushed a commit to gtk-rs/gtk3-rs that referenced this issue Oct 23, 2020
GuillaumeGomez added a commit to gtk-rs/gtk3-rs that referenced this issue Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants