As we now use partial classes for custom code, we can put additional
interface implementation declaration in the custom code, instead of
adding it through a fix-up.
Side-note: I thought about moving to IEnumerable<T>, but ListStore is a
list of objects anyway, and Container is an array of Widgets, so there
wouldn't be much benefit from type safety.
When a C function returns an array, we need to be able to determine its
length. This is done either through a parameter to that function, or
because the array is null-terminated. If we don't know about either of
those, we print out a warning and fail the validation for the return
value. This means the corresponding method will not be generated.
This fixes a crash when trying to generate a method for which this
information is missing.
This wasn't a problem until now because the parser doesn't handle array
return values, so they were always handled through fix-ups. But now we
can get a GAPI XML converted from GIR which contains the "array"
attribute for a return value but no other information.
In a lot of places, we were only checking the presence of boolean
attributes, like "array", automatically assuming they were true. This
meant that we didn't allow setting them explicitly to false, which
apparently is needed for some bindings.
For all boolean attributes, we now use the GetAttributeAsBoolean method
added in the previous commit, to correctly check the value of the
attribute. As before, if the attribute is not present, it is considered
to be false.
Thanks to Stephan Sundermann for noticing this issue.
When accessing the static Objects collection in GLib.Object
class, a lock was held in some places but not all of them.
Brought up by Alan McGovern.
Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
This makes the code 64-bit clean (instead of assuming that a pointer
fits in a Int32) and simplifies the code.
Although the GTK doc doesn't say so, the C code shows the array is NULL
terminated, so we should be OK here.
Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
There are no real code changes in this commit, just a lot of file
renaming and boilerplate additions.
A few .custom files are just removed, because the corresponding class in
GTK is gone, so they were not really used anymore.
Some files need to be re-indented, but that will be done in a separate
commit, so that git can track the renamed files correctly and not be
confused by all the changes.
Cairo has a different API version that was hardcoded. Define it in a new
variable in configure.ac and use it in AssemblyInfo and Makefile.am.
This fixes make distcheck, as the cairo-sharp.dll assembly was not
getting uninstalled from the GAC.