diamondburned / gotk4

Autogenerated GTK4 bindings for Go
GNU Affero General Public License v3.0
525 stars 20 forks source link

Add a definition for GTK_INVALID_LIST_POSITION #132

Closed nsw42 closed 8 months ago

nsw42 commented 8 months ago

gotk4 v0.2.2

The docs for Gtk.DropDown.set_selected says to pass in GTK_INVALID_LIST_POSITION to deselect any previous selection. This constant doesn't appear to be included in the generated bindings.

If I manually define a const in my application with the value glib.MAXUINT32 (which is, in effect, how glib defines the constant) it works as expected, so this should be as simple as adding an appropriately named constant. (Based on other glib constants, I assume this would be gtk.INVALID_LIST_POSITION, to mirror e.g. gtk.LEVEL_BAR_OFFSET_FULL)

diamondburned commented 8 months ago

Added this in 748122820. I chose InvalidListPosition instead since it's more idiomatic.

nsw42 commented 8 months ago

Perfect. Thanks. (And, agreed about idiomatic. That's what I looked for first, before finding the LEVEL_BAR... constants)