Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Subclassing refactoring #270

Merged
merged 6 commits into from
Jan 25, 2021
Merged

Subclassing refactoring #270

merged 6 commits into from
Jan 25, 2021

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented Jan 21, 2021

Supersedes #31 for now, I'll update that one to only include the Value changes once this one is merged.

TODO

  • Implement a builder and a fn signals() -> &'static [Signal] method to ObjectSubclass

And also move property installation from a manual function call to a
trait function with default implementation.

This simplifies handling of properties in subclasses.
Remove meaningless flags and add user-defined flags.
This is redundant with the GBoxed derive macro.
…aces the subclass should implement

The macro magic is adapted from nom.
This way we can ensure they're equivalent even if the function is called
multiple times.
@sdroege
Copy link
Member Author

sdroege commented Jan 21, 2021

@bilelmoussaoui @GuillaumeGomez Can you review the newest commit too? That's doing the whole thing for signals now. I think that's a much nicer API, and it also gives a way for calling signals from subclasses more nicely.

@sdroege
Copy link
Member Author

sdroege commented Jan 21, 2021

From my side this PR is ready, but before merging this I'd like to update all of GStreamer to not have it fail to build for too long. I'll probably spend Saturday or Sunday with that, it will take some time.

@sdroege
Copy link
Member Author

sdroege commented Jan 21, 2021

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/613 for the GStreamer side of things. Nice cleanup.

Now I just need to port over all the 50 or so subclasses in gst-plugins-rs 😭

@sdroege sdroege merged commit 7284c46 into gtk-rs:master Jan 25, 2021
@sdroege sdroege deleted the class-refactoring branch January 25, 2021 11:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants