Repository navigation
Conversation
MiaKoring
marked this pull request as ready for review
November 17, 2026 15:11
stackotter
requested changes
Nov 20, 2026
stackotter
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for this, the newly-generated code all looks great. I just have a few requests for the code gen changes themselves.
Member
Author
|
I'm not entirely sure if it's more readable with the merged branches, but they're merged now 😅 and this was the first real change I did using nvim, yay I guess. It's gonna take a while to get used to it and I need to get some things like automatic closing bracket insertion,... |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #594
The changes are actually pretty simple:
GtkCodeGen
SignalReturnInformationwith 3 properties:gbooleanfor example it’s nicer to return a SwiftBoolin the closure. But for the return to be recognizable by gtk we need to convert it. so in this case, it would be.toGBoolean()selfor the handler arenilgbooleangenerateSignalRegistrationMethodandgenerateSignalHandlerPropertyFor signals with allowed return type information the return value is the specified return value, and the closure returns a default value if self or the handler are nil.
Other signals use
Voidas return value.The return value is now specified as an additional generic on SignalBoxN.
On the handler property the new return value is used if applicable or
Voidif not.I excluded
notify::propertysignals from the custom logic, as some of them had a boolean return value, which isn’t listed in the GObject notify documentation and I don’t think we need boolean return values on them.The rest:
SignalBox0 is now used just like any other signal box, as the generic return value cannot be constrained to a C compatible type, so
@convention(c)doesn’t work inside it anymore.All signal boxes got an additional generic
Ras return value.All signal registrations in the not-generated part of Gtk and Gtk3 were updated to the new signature (adding
Voidgeneric to SignalBoxes or adding a handler property and updating to the new signature forSignalBox0.The
generate.shScript for some reason removed the buildLimitedAvailability View builder function, idk what’s up with that.TODOs: