Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP: Add 'subclass' mode #604
Based on his work in https://github.com/sdroege/gst-plugin-rs, @sdroege and I have been working on a set of traits to make subclassing glib/gtk/gst objects possible without too much boilerplate. See https://github.com/sdroege/gobject-subclass and https://github.com/sdroege/gtk-subclass.
Currently, we're generating these traits by hand, and that's a lot of (repetitive) work. In this PR, I'd like to address that by reusing parts of gir. I'm not sure if this would ever be a candidate for inclusion. If not, I'd like to kindly ask for feedback as I/we go along with this.
This is a heavy WIP, that I just started a couple of minutes ago, so there simply nothing to see here. Yet.
At this point, most big building blocks seem in place, yet it is still far from finished.
These things are currently still incomplete/lacking:
I'd like some feedback and/or help at this point. I've never really liked writing code generators, so I don't really feel like carrying this on my own :)
Thanks a lot. I'll take a look over this in the next days, but for now can you put some generated output of this somewhere?
Also my idea for manual implementations was to be able to ignore various vfuncs and then have a separate file that has those implementations only. And that file is read by GIR and inserted into the generated code (as we can't have them as separate files during compilation: parts need to be added to the same traits and impl blocks directly).
Current status of generated files:
2 times, most recently
Jul 4, 2018
3 times, most recently
Jul 6, 2018
added a commit
this pull request
Nov 17, 2018
referenced this pull request
Nov 19, 2018
@sdroege I'm willing to update this PR to the new subclassing infrastructure, but it's been a while since I first made this. Since the interface has changed quite a bit, it might also make sense to start fresh. A bit of guidance towards may be needed here in order to get this accepted quicker.