gtk-rs / gir

Tool to generate rust bindings and user API for glib-based libraries
https://gtk-rs.org/gir/book/
MIT License
230 stars 102 forks source link

Builder pattern needs a manual state as well #1157

Open bilelmoussaoui opened 3 years ago

bilelmoussaoui commented 3 years ago

Currently you can either enable or disable a builder, there's no way to mark it as manual which makes it impossible to document the manual builder because gir has no way to know it's generated.

We only have two of them in gtk4-rs, see for example https://gtk-rs.org/gtk4-rs/git/docs/gtk4/struct.DirectoryListBuilder.html

this is a very low priority issue but will see if I can find the time for it before the next release

gabbyprecious commented 2 years ago

@bilelmoussaoui can I work on this?

bilelmoussaoui commented 2 years ago

Sure, go ahead. Let me know if you have any questions

gabbyprecious commented 2 years ago

The link returns a 404, I would like to know where I can set up and test the manual building, a file link.

gabbyprecious commented 2 years ago

@bilelmoussaoui please I would like to know

bilelmoussaoui commented 2 years ago

The link returns a 404, I would like to know where I can set up and test the manual building, a file link.

You could find the Builder here https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/builders/struct.DirectoryListBuilder.html but that is just an example. Currently there is a generate_builder = true/false config for each object, that has to be moved from a boolean state to a tri-state. Something like builder_status = "generate" / "manual" / "ignore"

gabbyprecious commented 2 years ago

Thank you, I'll be sending a draft PR before the end of the day