In callbacks, convert inputs and outputs between pointers and objects #45
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.
In callbacks (not signal handlers, these are function inputs to methods that get called by the C libraries) we have had to convert pointer arguments to GObjects and return pointers rather than the GObjects. This modifies the GI-generated callback functions to do that automatically, which makes the user-supplied callbacks shorter and cleaner. This also automatically adds a reference to GObject pointers on the output where appropriate. The lack of this extra reference was causing segfaults for me in GtkListViews that used GtkTreeListModel. I'm thinking for consistency this should be done in the
@cfunction
based signal handlers too. This is a breaking change since it affects how callbacks should be written.Also adds some crude documentation for GtkListView, GtkColumnView, GtkCustomFilter, and GtkCustomSorter and miscellaneous other fixes.