-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Looking at the docs for GObject, it appears that all init are simple wrappers around the C constructors, except for its most convenient one, the variadic g_object_new function. The closest match seems to be GLibObject.Object.new, which takes a GType, but unfortunately no property arguments. The remaining init all appear to take UnsafeMutablePointer to C strings or GValue which are pretty inconvenient to use from Swift.
Python solves this by taking keyword arguments and passing those as the properties. I don't think that that would be possible in Swift's form of variadic arguments.
Lua solves this by taking a table as first argument with property name/values. I guess that might work for Swift by taking a [String: Any].
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels