Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GObject constructor that takes a Java class as first argument #185

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

jwharm
Copy link
Owner

@jwharm jwharm commented Jan 9, 2025

Generate a GObject constructor that takes a Java class as first argument instead of a GType, followed by varargs for (optionally) specifying property names and values.

A new utility class VarargsUtil was created that simplifies splitting the varargs into a "first" and "rest" component like g_object_new expects, and also adds a null at the end, in case the user forgets it.

This was a missing piece from #164.

…ent instead of a GType, followed by varargs for (optionally) specifying property names and values.

A new utility class `VarargsUtil` was created that simplifies splitting the varargs into a "first" and "rest" component like `g_object_new` expects, and also adds a `null` at the end, in case the user forgets it.
@jwharm jwharm merged commit dad6749 into main Jan 11, 2025
@jwharm jwharm deleted the gobject-new-from-java-class branch January 11, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant