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.
This also adds some additional wrapper code for
Cairo.RectangleInt
in order to implement the unit tests (e.g. constructing a rectangle, comparing equality, and field accessors) - this is the main thing I'd like to discuss since it's a more general topic on the generator side of things!The extra level of indirection to access the fields (
RectangleInt
vsRectangleIntData
) feels kind of awkward - my current changes have some rough code that attempts to hide this. I feel like it would be more natural if the generator could just directly emit astruct
type here, since on the C side this is a plain struct rather than an opaque / handle typeI think it might also make something like cairo_region_create_rectangles() simpler to wrap as well since the memory layout would match
The old cairo bindings from Mono / GtkSharp also made this a struct type, so changing from value to reference semantics would also make it tricky to port existing code correctly