Commit Graph

14 Commits

Author SHA1 Message Date
Bertrand Lorentz
b8b1cfa5d7 generator: Convert all .cs files to Unix line endings
There are no real code changes in this commit.
2012-11-03 15:20:06 +01:00
Bertrand Lorentz
4d19e5ac2a generator: Properly handle boolean attributes when parsing the XML
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.
2012-10-21 18:22:13 +02:00
Mike Kestner
2ba496479f Restructure log warnings in validation.
* generator/*.cs: Add a LogWriter class which formats warnings
consistently on the console.  Supports the concept of non-fatal
validation warnings, since it doesn't rely on the unrolling of the
validation stack to associate a warning to a given type.

Main purpose was to add a non-fatal warning for missing element_type
attributes on list return values, though it results in cleaner log
output, and also updates some warning messages to be more helpful in
how to resolve them.
2011-02-20 12:11:08 -06:00
Christian Hoff
291ee61b2d 2009-04-13 Christian Hoff <christian_hoff@gmx.net>
Add support for virtual methods(vm) to the generator.

	* parser/gapi2xml.pl: Generate a class_struct element with
	all members of the class structure. Dump the first (instance)
	parameter for signal and vm elements. Bump up parser version.
	* generator/GObjectVM.cs: Added. Support for GObject virtual methods.
	* generator/DefaultSignalHandler.cs: Signal specific part of vm
	generation.
	* generator/InterfaceVM.cs: New class for interface vms.
	* generator/ObjectBase.cs: Parse the class struct.

svn path=/trunk/gtk-sharp/; revision=131604
2009-04-13 17:44:48 +00:00
Mike Kestner
3030c6d535 fix inconsistent line endings
svn path=/trunk/gtk-sharp/; revision=122798
2009-01-08 18:00:47 +00:00
Stephane Delcroix
66be12eebe 2008-12-02 Stephane Delcroix <sdelcroix@novell.com>
* generator/Ctor.cs:
	* generator/Method.cs:
	* generator/MethodBase.cs: refactor the Protection from Method to
	MethodBase, generate ctors with the correct proteciton too.

svn path=/trunk/gtk-sharp/; revision=120487
2008-12-02 15:03:02 +00:00
Mike Kestner
6a668a2cc8 2008-01-29 Mike Kestner <mkestner@novell.com>
* generator/VirtualMethod (CName): mangle the name.
	* generator/SymbolTable.cs (MangleName): add 'remove' and 'foreach'
	mappings.  Should probably just get a C# keyword list and map all of
	them instead of onesy twoseys.
	Fixes for tnymail binding generation.

svn path=/trunk/gtk-sharp/; revision=94286
2008-01-29 18:48:04 +00:00
Mike Kestner
75d2981d82 2007-11-29 Mike Kestner <mkestner@novell.com>
* generator/MethodBase.cs: move Name stuff from subclasses.
	Check for (G|S)et<UpperCaseLetter> in new Has props.
	* generator/Method.cs:
	* generator/VirtualMethod.cs: refactor out Name stuff. Use
	new Has(G|S)etterName props.
	* pango/Pango.metadata: workaround Has/Hash collision with
	the old broken getter check. [Fixes #344954]

svn path=/trunk/gtk-sharp/; revision=90458
2007-11-29 20:01:28 +00:00
Mike Kestner
d24e54974d 2007-08-01 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : use Parameters.NativeCallbackSignature.
	* generator/Ctor.cs : use Parameters.ImportSignature prop.
	* generator/ImportSignature.cs : kill
	* generator/MethodBase.cs : kill ImportSignature prop.
	* generator/Method.cs : use Parameters.ImportSignature prop.
	* generator/NativeCallbackSignature.cs : kill
	* generator/Parameters.cs : add ImportSig and NativeCallbackSig.
	* generator/Signal.cs : use Parameters.NativeCallbackSignature prop.
	* generator/VirtualMethod.cs : use Parameters.ImportSignature prop.

svn path=/trunk/gtk-sharp/; revision=83214
2007-08-01 17:30:47 +00:00
Mike Kestner
4bbe8a8faf 2007-07-27 Mike Kestner <mkestner@novell.com>
* generator/OpaqueGen.cs : only generate Copy override for methods
	with no parameters.  Fixes a gnome-sharp build problem.

svn path=/trunk/gtk-sharp/; revision=82869
2007-07-27 16:16:16 +00:00
Mike Kestner
f1336f2f2b 2005-07-02 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : remove an old workaround that put
	the native wrapper class into the implementor's *Sharp namespace.
	Use new ImportSignature sig.
	* generator/ImportSignature.cs : don't mangle the callback wrapper
	namespace any more. Remove impl_ns ctor param and field.
	* generator/MethodBase.cs : use new MethodBody and ImportSignature
	ctor sigs.
	* generator/MethodBody.cs : drop the impl_ns ctor param.
	* generator/Signal.cs : use new ImportSignature ctor sig.
	* generator/VirtualMethod.cs : use new ImportSignature ctor sig.

svn path=/trunk/gtk-sharp/; revision=46877
2005-07-02 14:55:08 +00:00
Dan Winship
053248d566 * generator/MethodBase.cs (Validate): use CName rather than always
saying "in ctor"

svn path=/trunk/gtk-sharp/; revision=40475
2005-02-11 15:07:22 +00:00
Mike Kestner
33cb5d82b4 2005-01-26 Mike Kestner <mkestner@novell.com>
* generator/*.cs : refactoring of Parameters class. Added IEnumerable
	to Parameters and gracefully handle elem == null instead of special
	casing parms == null all over the place. Parameter logic is now Count
	driven. [Fixes #71750]

svn path=/trunk/gtk-sharp/; revision=39594
2005-01-26 19:17:07 +00:00
Mike Kestner
ea489c2353 2005-01-24 Mike Kestner <mkestner@novell.com>
* gda/Makefile.am : add new custom.
	* gda/XmlConnection.custom : add backcompat static ctor.
	* generator/ClassBase.cs : refactor lookup logic to here from Ctor
	and improve the collision resolution.
	* generator/Ctor.cs : refactor to use MethodBase.
	* generator/Makefile.am : add new file.
	* generator/MethodBase.cs : new base class for ctors and methods.
	* generator/Method.cs : refactor to use MethodBase.
	* generator/StructBase.cs : move some logic from here to Ctor.
	* gnome/CanvasPathDef.custom : add backcompat static ctor.
	* gnome/GPPath.custom : add backcompat static ctor.
	* gnome/Makefile.am : add new custom.
	* gtk/Gtk.metadata : mark a colliding Button ctor shared.

svn path=/trunk/gtk-sharp/; revision=39431
2005-01-24 18:25:02 +00:00