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

Implement basic virtual methods support #1463

Closed bilelmoussaoui closed 1 year ago

bilelmoussaoui commented 1 year ago

The intention behind this PR is not to add code generation for subclassing code but it does a good step forward.

What the PR does currently:

Before

image

image

After

image

image

TODO:

Parts of #1319

bilelmoussaoui commented 1 year ago

In the latest commits, I went ahead and added docs support for class methods.

Before image

image

After

image

image

bilelmoussaoui commented 1 year ago

This should be ready for a proper review now. Can't do much about testing with gtk-rs-core as it is still blocked by the gir rustdoc feature changes.

bilelmoussaoui commented 1 year ago

Tested with gstreamer, works great.

sdroege commented 1 year ago

Looks good to me apart from the naming things

bilelmoussaoui commented 1 year ago

let us land this then :-)