Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement basic virtual methods support #1463

Merged
merged 8 commits into from
May 3, 2023

Conversation

bilelmoussaoui
Copy link
Member

@bilelmoussaoui bilelmoussaoui commented Apr 29, 2023

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:

  • Parse virtual-methods from the gir file
  • Add configuration options for [object.virtual_method]
  • Embed the docs for virtual methods
  • Working docs links witth gi-docgen

Before

image

image

After

image

image

TODO:

  • Add more tests for parsing config options
  • Document the new config options
  • Test it with gtk-rs-core/gstreamer-rs

Parts of #1319

@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/vfunc-docs branch from 8d60ed6 to ab08e60 Compare April 30, 2023 01:08
@bilelmoussaoui
Copy link
Member Author

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

Before
image

image

After

image

image

@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/vfunc-docs branch from ab08e60 to 57dea4f Compare April 30, 2023 22:24
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/vfunc-docs branch 2 times, most recently from 4f7fe4c to 5197e38 Compare April 30, 2023 22:49
@bilelmoussaoui
Copy link
Member Author

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

Tested with gstreamer, works great.

src/analysis/object.rs Outdated Show resolved Hide resolved
src/codegen/doc/mod.rs Outdated Show resolved Hide resolved
@sdroege
Copy link
Member

sdroege commented May 3, 2023

Looks good to me apart from the naming things

@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/vfunc-docs branch from 5197e38 to a111bb9 Compare May 3, 2023 16:53
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/vfunc-docs branch from a111bb9 to 9c0e96a Compare May 3, 2023 16:54
@bilelmoussaoui
Copy link
Member Author

let us land this then :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants