Commit Graph

26 Commits

Author SHA1 Message Date
Mike Kestner
f96454a364 2004-06-25 Mike Kestner <mkestner@ximian.com>
* generator/*.cs : add gpl license blurb and clean up (c)'s.
	* parser/* : ditto
	* doc/*.cs : ditto
	* doc/gen-handlerargs-docs.cs : add little scripty.

svn path=/trunk/gtk-sharp/; revision=30398
2004-06-25 16:35:15 +00:00
Mike Kestner
31ef54a54a 2004-05-05 Mike Kestner <mkestner@ximian.com>
* generator/BoxedGen.cs : remove g_value_init DllImport and change
	(g|s)et_boxed to use a glue method to simplify dllmapping.
	* glib/Value.cs : add Init method.
	* glib/glue/value.cs : add get/set_boxed glue methods.
	* */*.config.in : remove libgobject mappings for dlls that no longer
	need them.

svn path=/trunk/gtk-sharp/; revision=26787
2004-05-05 20:14:14 +00:00
Mike Kestner
1ac00ff205 2004-04-12 Mike Kestner <mkestner@ximian.com>
[Rework of a patch from Ben Maurer to turn GLib.Value
	into a valuetype.]
	* generator/BoxedGen.cs : fix operators for new valuetype GValues.
	* generator/ByRefGen.cs : new generatable for byref value types.
	* generator/Makefile.am : add ByRefGen.cs.
	* generator/MethodBody.cs : remove GValue special casing.
	* generator/Property.cs : rework value handling.
	* generator/Signal.cs : fix base virtual method value passing.
	* generator/SymbolTable.cs : map GValue to ByRefGen.
	* glib/Object.cs : rework GetProperty and SetProperty.
	* glib/Value.cs : make it a value type.
	* glib/ValueArray.cs : fix GValue passing.
	* glib/glue/value.c : rework for valuetype GValues.
	* gnome/Program.custom : fix GValue passing
	* gtk/Gtk.metadata : make TreeModel.GetValue value param pass_as=ref.
	* gtk/ListStore.custom : fix GValue passing
	* gtk/NodeStore.cs : fix GValue passing
	* gtk/TextTag.custom : fix GValue passing
	* gtk/TreeModelSort.custom : fix GValue passing
	* gtk/TreeStore.custom : fix GValue passing

svn path=/trunk/gtk-sharp/; revision=25368
2004-04-12 15:54:57 +00:00
Mike Kestner
7b15abe5fd 2004-04-04 Mike Kestner <mkestner@ximian.com>
* generator/BoxedGen.cs : DllImport glibsharpglue for value_create.

svn path=/trunk/gtk-sharp/; revision=25045
2004-04-05 16:06:49 +00:00
Mike Kestner
1742a837c1 2004-01-27 Mike Kestner <mkestner@ximian.com>
* generator/BoxedGen.cs : gen a Value to Boxed explicit cast op.
	* generator/Property.cs : use new cast in Boxed getters.
	[Fixes #53414]

svn path=/trunk/gtk-sharp/; revision=22553
2004-01-27 22:06:24 +00:00
Mike Kestner
ff263164e3 2003-12-15 Mike Kestner <mkestner@ximian.com>
* generator/BoxedGen.cs : s/uint/GLib.GType
	* generator/ManualGen.cs : add a ctor to pass ToNative handle name
	* generator/ObjectGen.cs : s/uint/GLib.GType
	* generator/Signal.cs : use GLib.GType and call OverrideVirtualMethod
	* generator/SymbolTable.cs : make GType a ManualGen and update a few
	ManualGens to the new signatures.
	* glib/DefaultSignalHandler.cs : s/Type/System.Type
	* glib/ManagedValue.cs : s/uint/GLib.GType
	* glib/Object.cs : s/uint/GLib.GType, add OverrideVirtualMethod.
	* glib/Type.cs : s/uint/IntPtr, add static fields for fundamentals.
	make it a value type and add ==, !=, Equals, and GetHashCode.
	* glib/TypeConverter.cs : use new GType statics, not fundamentals.
	* glib/Value.cs : use new GType statics, not fundamentals.
	* gnome/*.custom : s/uint/GLib.GType
	* gtk/*Store.custom : use GType statics, not fundamentals.
	* sample/Subclass.cs : s/uint/GLib.GType.

svn path=/trunk/gtk-sharp/; revision=21181
2003-12-15 16:59:25 +00:00
Mike Kestner
0cdee479e2 2003-10-28 Mike Kestner <mkestner@ximian.com>
* generator/BoxedGen.cs : generate GLib.Value ctors. [fixes #47168]
	* generator/Property.cs : use new Boxed value ctors.
	* generator/StructBase.cs : use existing Writer if available.

svn path=/trunk/gtk-sharp/; revision=19433
2003-10-28 15:45:35 +00:00
Mike Kestner
460b3e5623 2003-10-04 Mike Kestner <mkestner@ximian.com>
* generator/AliasGen.cs : stub new Generate overload.
	* generator/BoxedGen.cs : implement new Generate overload.
	* generator/CallbackGen.cs (Generate):implement new overload.
	* generator/ClassBase.cs : implement new Generate overload and
	pass around the gen_info.
	* generator/ClassGen.cs : implement new Generate overload.
	* generator/Ctor.cs (Generate): s/sw/gen_info.
	* generator/EnumGen.cs : implement new Generate overload.
	* generator/GenBase.cs : expose NSElem, add gen_info param to
	AppendCustom. kill CreateWriter.
	(GenWrapper): add gen_info param and use it to open stream.
	* generator/GenerationInfo.cs : new class to pass around generation
	related information and perform tasks like opening streams.
	* generator/IGeneratable.cs : add Generate(gen_info) overload.
	* generator/InterfaceGen.cs : implement new Generate overload.
	* generator/ManualGen.cs : stub new Generate overload.
	* generator/Method.cs (Generate): accept gen_info. kill GenerateComments.
	* generator/ObjectGen.cs : implement new Generate overload.
	* generator/OpaqueGen.cs : implement new Generate overload.
	* generator/Parameters.cs (Initialize): s/sw/gen_info.
	* generator/Property.cs (Generate): accept gen_info.
	* generator/Signal.cs (Generate): accept gen_info.
	* generator/SimpleGen.cs : stub new Generate overload.
	* generator/StructBase.cs : s/sw/gen_info
	* generator/StructGen.cs : implement new Generate overload.

svn path=/trunk/gtk-sharp/; revision=18615
2003-10-05 00:20:17 +00:00
Mike Kestner
5b7aaf1c4f 2003-10-03 Mike Kestner <mkestner@ximian.com>
* generator/*.cs : Kill DoGenerate.

svn path=/trunk/gtk-sharp/; revision=18572
2003-10-03 22:20:40 +00:00
Rachel Hestilow
e9d1e0b6dc 2002-08-19 Rachel Hestilow <hestilow@ximian.com>
* art/Makefile.in (clean): Change to avoid bugging out on generated/CVS.

	* glib/ObjectManager.cs: Added. Used to be auto-generated, but
	now it can infer names, and relies on per-namespace ObjectManager
	classes to inform it of oddly-named classes.

	* generator/IGeneratable.cs, GenBase.cs: New "DoGenerate" property.
	* generator/*Gen.cs: Honor DoGenerate.
	* generator/CodeGenerator.cs: Support including dependency files
	which will not be generated.
	* generator/ObjectGen.cs: Generate mapping file per-namespace, as one
	that calls back to the one in glib. Only generate if the name does
	not follow the normal conventions, otherwise, GtkSharp.ObjectManager
	can infer the name.
	* generator/Parser.cs: Accept 'generate' flag to pass on to the
	IGeneratables. Parse a new toplevel element, "symbol", which adds
	a type to the SymbolTable (instead of hard-coding it).
	* generator/SignalHandler.cs: Do not optimize signal handler creation,
   instead creating them in their own namespaces. Do not generate
	if the calling Signal told us not to.
	* generator/Signal.cs: Do not generate handlers if container's DoGenerate
	is false. Adjust to the marshaller name being in a sub-namespace.
	* generator/SymbolTable.cs (AddSimpleType, AddManualType): Used
	to add simple and manually wrapped types at runtime instead of
	compile-time.
	(FromNative): Remove hard-coded cases for manually wrapped types, use
	a generic case instead.

	* api: Added. Move api files and generation targets here.
	* source: Added. Move source parsing here.

	* generator/makefile: Move actual generation to api/.
	* glib/Makefile.in: Remove generated/* target.
	* glue/Makefile.am: Fix to include canvas-marshal. Move canvas stuff
	to GNOME target.

	* gnome/CanvasProxy.cs: Update to work with SignalHandlers being
	namespace-specific.

	* parser/Metadata.pm: Moved to GAPI/Metadata.pm, renamed, etc.
	* parser/gapi2xml.pl: Use GAPI::Metadata.
	* parser/makefile: Install scripts, remove source parse build target.
	Rename formatXML to gapi_format_xml.

svn path=/trunk/gtk-sharp/; revision=6818
2002-08-20 19:56:18 +00:00
Rachel Hestilow
4d92d54b3f 2002-07-25 Rachel Hestilow <hestilow@ximian.com>
[about 60% of the marshalling patch that I lost.
	 The rest to come tomorrow.]

	* generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase,
	delete large chunks duplicated from ClassBase.

	* generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn.

	* generator/ClassBase.cs: Move ctor stuff here. Add a CallByName
	overload with no parameters for the "self" reference.

	* generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType,
	  FromNativeReturn.

   * generator/Method.cs: Use container_type.MarshalType, CallByName, and
	  SymbolTable.FromNativeReturn when generating call and import sigs.

	* generator/OpaqueGen.cs: Added.

	* generator/Property.cs: Handle boxed and opaques differently.

	* generator/SymbolTable.cs: Update for the opaque stuff and the new Return
	methods. Also change GetClassGen to simply call the as operator.

	* glib/Boxed.cs: Update for struct usage -- this is now a wrapper for
	  the purposes of using with Value.

   * glib/Opaque.cs: Added. New base class for opaque structs.

	* glue/textiter.c, gtk/TextIter.custom: Remove.

	* gnome/Program.cs: Update for new struct marshalling.

	* parser/Metadata.pm: Use our own getChildrenByTagName.

	* parser/README: Update for new requirements (was out of sync with
	  build.pl)

	* parser/gapi2xml.pl: Hide struct like const in field elements.

	* parser/gapi_pp.pl: Handle embedded union fields (poorly).

	* sample/test/TestColorSelection.cs: Comment out null color tests
     for now.

svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 06:08:52 +00:00
Rachel Hestilow
fb1256d2f3 2002-07-13 Rachel Hestilow <hestilow@ximian.com>
* parser/Gnome.metadata, Gtk.metadata: More conflict
	fixes.
	* parser/build.pl: Fully qualify all lib names. (Gtk+ packages
	are now LFS-compliant in Debian...)
	* parser/gapi2xml.pl: Fix for whitespace in fields, defines,
	and docs.

	* generator/BoxedGen.cs: Remove extraneous CallByName definition,
	add "override" keyword to FromNative.
	(Generate): Generate methods after fields.
	* generator/ClassBase.cs: Change CallByName, FromNative to virtual.
	(.ctor): Ignore "hidden" nodes. Set container on signal.
	(GenSignals, GenMethods): Add "implementor" argument for interface
	use.
	(Get(Method|Signal|Property)Recursively): Rework to correctly
	recurse interfaces.
	(Implements): Added.
	* generator/Ctor.cs (Initialize): Move clash initialization completely
	out of Generate, so we can check for collisions.
	* generator/Method.cs (GenerateDeclCommon): Check for duplicates,
	for "new" keyword.
	(Generate): Add "implementor" argument.
	* generator/ObjectGen.cs (Generate): Initialize ctor clashes on
	this and all parents, before generating.
	(Ctors, InitializeCtors): Added.
	* generator/Signal.cs: Store the container_type, check for
	collisions.
	* generator/StructGen.cs: Add "override" keyword to overriden methods.

	* gtk/FileSelection.custom (ActionArea): Add "new" keyword.

svn path=/trunk/gtk-sharp/; revision=5782
2002-07-13 20:31:23 +00:00
Rachel Hestilow
b203c33bb7 2002-06-26 Rachel Hestilow <hestilow@ximian.com>
* generator/*.cs: Deal with whitespace XmlNodes.

	* parser/build.pl: Dump non-indented file to local directory.

	* parser/makefile, parser/formatXml.c: Added.

	* generator/gtkapi.xml: Nicely indented now. woo!

svn path=/trunk/gtk-sharp/; revision=5465
2002-06-26 13:10:48 +00:00
Rachel Hestilow
1f4ff5bb86 2002-06-24 Rachel Hestilow <hestilow@ximian.com>
* glib/EnumWrapper.cs: New class which holds an enum int.

	* glib/Value.cs: Add support for glib enum types. We needed
	to use EnumWrapper for this because otherwise the int operator
	wouldn't know which glib function to use.

	* generator/BoxedGen.cs, ClassBase.cs, Ctor.cs, EnumGen.cs,
	InterfaceGen.cs, Method.cs, ObjectGen.cs, Signal.cs, StructGen.cs:
	Create more doc stubs.

	* generator/Property.cs: Generate enum values correctly.

	* generator/Ctor.cs: Refactor generation to honor metadata-specified
	collision preference.

	* parser/Gtk.metadata: Added constructor collision preferences to
	all known clashes.

	* parse/Gdk.metadata: Added (for Pixbuf clashes).

svn path=/trunk/gtk-sharp/; revision=5437
2002-06-24 22:04:10 +00:00
Mike Kestner
5d67982de9 2002-06-21 Mike Kestner <mkestner@speakeasy.net>
* makefile : remove gdk.imaging from the build
	* gdk.imaging/* : kill
	* generated/BoxedGen.cs : XmlNode namespace handling. Use GenBase.
	* generated/CallbackGen.cs : XmlNode namespace handling.
	* generated/Ctor.cs : construct with libname not ns.
	* generated/EnumGen.cs : XmlNode namespace handling.
	* generated/GenBase.cs : XmlNode namespace handling. Make AppendCustom
	  an instance method so it can use the private fields instead of params.
	* generated/InterfaceGen.cs : XmlNode namespace handling.
	* generated/Method.cs : construct with libname not ns.
	* generated/ObjectGen.cs : XmlNode namespace handling.
	* generated/Parser.cs : Use new XmlNode namespace ctors.
	* generated/Signal.cs : Lose the namespace field.
	* generated/StructBase.cs : derive from ClassBase
	* generated/StructGen.cs : XmlNode namespace handling. Use GenBase.
	* generated/SymbolTable.cs : nuke GetDllName method.
	* generator/gtkapi.xml : Add library name to namespace node.
	* parser/build.pl : refactor for library name param
	* parser/gapi2xml.pl : add libname param handling
	* sample/Makefile.in : build linux on make install, but don't install.

svn path=/trunk/gtk-sharp/; revision=5400
2002-06-21 20:25:43 +00:00
Rachel Hestilow
eea6465cf2 2002-06-09 Rachel Hestilow <hestilow@ximian.com>
* generator/GenBase.cs: new method AppendCustom, moved from ObjectGen.
	* generator/BoxedGen.cs, ObjectGen.cs, StructGen.cs:
	Call AppendCustom in Generate ();
	* generator/Method.cs, Parameters.cs: Add support for "out"
	parameters. Additionally, output an accessor instead of a
	regular method if it is an accessor-style function (ie GetStartIter).
	* generator/Property.cs: Add additional cast to Boxed, if necessary.
	* glue/textiter.c: New constructor for GtkTextIter.
	* glue/Makefile.am: Add textiter.c, build with Gtk+ cflags.
	* configure.in: Check for Gtk+ cflags.
	* parser/Metadata.pm, Gtk.metadata: Added.
	* parser/gapi2xml.pl: Call Metadata::fixup on the document.
	Also work around gtk's screwy boxed type name registration
	(GtkFoo -> GtkTypeFoo).
	* gtk/TextIter.custom: Added.

svn path=/trunk/gtk-sharp/; revision=5205
2002-06-10 12:34:09 +00:00
Mike Kestner
6d30cf0c3e refactoring to remove substantial code duplication thoughout the generator
2002-05-23  Mike Kestner <mkestner@speakeasy.net>

	* generator/BoxedGen.cs : Update for Static SymbolTable
	* generator/CallbackGen.cs : Use GenBase and Parameters classes
	* generator/CodeGenerator.cs : Update for Static SymbolTable
	* generator/Ctor.cs : code from StructBase using Parameters class
	* generator/EnumGen.cs : Use GenBase
	* generator/GenBase.cs : Abstract Stream Writer creation, stream
	  boilerplate, and common *Name properties
	* generator/IGeneratable.cs : Update for Static SymbolTable
	* generator/InterfaceGen.cs : Use GenBase
	* generator/Method.cs : code from StructBase using Parameters class
	* generator/ObjectGen.cs : Major refactoring. Use GenBase. Build
	  tables of Member generatables at construct time to facilitate
	  future name collision resolution logic.
	* generator/Parameters.cs : new generatable to abstract duplicated
	  parameter parsing logic.
	* generator/Parser.cs : Update for Static SymbolTable
	* generator/Property.cs : code from ObjectGen
	* generator/Signal.cs : code from ObjectGen
	* generator/SignalHandler.cs : Update for Static SymbolTable
	* generator/StructBase.cs : Update for Static SymbolTable
	* generator/StructGen.cs : Update for Static SymbolTable
	* generator/SymbolTable.cs : Make all methods and private members
	  static.  There is no reason to ever have multiple tables.

svn path=/trunk/gtk-sharp/; revision=4895
2002-05-23 23:43:25 +00:00
Mike Kestner
cd73a17587 2002-05-02 Mike Kestner <mkestner@speakeasy.net>
* README : Describe the new make procedure.
	* configure.in : Add the new Makefile generation.
	* makefile : add the glue dir, make linux the default build,
	  add an install target
	* */makefile.win32 : temp build files for win32
	* */Makefile.in : new configurable make system
	* */makefile : killed
	* generator/BoxedGen.cs : Now uses GLib.Boxed
	* generator/ObjectGen.cs : Use Values for Props.
	* generator/SymbolTable.cs : Add IsEnum method.
	* glib/Boxed.cs : Major overhaul.
	* glib/Object.cs : Remove type specific (Get|Set)Property. Now
	  use GValue based property accessors.
	* glib/TypeFundamentals.cs : Update to current values.
	* glib/Value.cs : Refactor to use glue.

svn path=/trunk/gtk-sharp/; revision=4236
2002-05-02 21:57:41 +00:00
Mike Kestner
12acb7ff05 2002-03-24 Mike Kestner <mkestner@speakeasy.net>
* generator/*Gen.cs : Use Path.DirectorySeparatorChar.
	* generator/Parser.cs : better debug for unexpected types.
	* generator/SymbolTable.cs : Use linux library names.

svn path=/trunk/gtk-sharp/; revision=3308
2002-03-24 17:04:25 +00:00
Mike Kestner
d5d3baa601 2002-02-19 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs : Add ctor and method generation.
	* generator/StructBase.cs : Switch to Raw syntax.
	* glib/Boxed.cs : Add Handle prop, make Raw protected, and add ctors.
	* glib/Object.cs : s/RawObject/Raw to simplify generation.

svn path=/trunk/gtk-sharp/; revision=2518
2002-02-19 19:46:44 +00:00
Mike Kestner
ede9016e25 2002-02-19 Mike Kestner <mkestner@speakeasy.net>
* generator/Statistics.cs : New. Gathers stats about generation.
	* generator/*.cs : Hook in the stat counters.

svn path=/trunk/gtk-sharp/; revision=2491
2002-02-19 03:12:47 +00:00
Mike Kestner
123557fb68 2002-02-10 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs (FromNative): Add explicit cast.
	* generator/ObjectGen.cs (FromNative): Add explicit cast.
	(GenSignal): New.  Partial.  Not hooked in yet.
	* generator/StructBase.cs (GenMethod): return-type is a sub-element,
	  not an attribute.

svn path=/trunk/gtk-sharp/; revision=2304
2002-02-10 23:11:25 +00:00
Mike Kestner
4966896f1e This should be the last enormo-diff on mono-patches. I have removed the
api.xml file from CVS with this commit.  It can be downloaded from
http://sf.net/projects/gtk-sharp.  I will be uploading new versions of the
file, now named gtkapi.xml, to the project download area from now on.

2002-02-08  Mike Kestner <mkestner@speakeasy.net>

	* README : Some updates.
	* generator/BoxedGen.cs : Add FromNative method.
	* generator/CallbackGen.cs : Add FromNative method.
	* generator/EnumGen.cs : Add FromNative method.
	* generator/IGeneratable.cs : Add FromNative method.
	* generator/InterfaceGen.cs : Add FromNative method.
	* generator/ObjectGen.cs : Add FromNative method. Hook in GenMethod.
	* generator/StructBase.cs : Revamp param handling. Add GenMethod.
	* generator/StructGen.cs : Add FromNative method.
	* generator/SymbolTable.cs : Add FromNative method.
	* parser/gapi2xml.pl : Detect ctors before methods. Fix method names.
	* sample/HelloWorld.cs : uncomment the Show call.

svn path=/trunk/gtk-sharp/; revision=2277
2002-02-08 23:56:27 +00:00
Mike Kestner
e99a131e6a 2002-02-06 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs : Marshal as IntPtr using Raw prop.
	* generator/ObjectGen.cs : Use Handle for marshaling.
	* generator/StructBase.cs (CallByName): Fill out the stub.
	(GetImportSig): Fill out the stub.
	* generator/StructGen.cs (MarshalType): Use QualifiedName.
	* generator/SymbolTable.cs (GetMarshalType): Trim type.
	(CallByName): New. Provides calling syntax.
	* sample/HelloWorld.cs : Make it compile.

svn path=/trunk/gtk-sharp/; revision=2253
2002-02-06 20:09:14 +00:00
Mike Kestner
2a29390caf 2002-01-17 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs : Removed Name, CName, and QualifiedName.
	* generator/ObjectGen.cs : Removed Name, CName, and QualifiedName.
	* generator/StructBase.cs : Add Name, CName, and QualifiedName. Add
	  GenCtor method. Stub GetCallString, GetImportSig, and GetSignature
	  methods.
	* generator/StructGen.cs : Removed Name, CName, and QualifiedName.
	* generator/SymbolTable.cs : Add GetDllName method.
	* parser/gapi2xml.pl : Fix a couple <parameters> bugs.

svn path=/trunk/gtk-sharp/; revision=2030
2002-01-17 23:44:56 +00:00
Mike Kestner
88175147cf 2002-01-16 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs : New boxed type generatable.
	* generator/ObjectGen.cs : Add boxed type property generation and stub
	  off interface properties for now.
	* generator/Parser.cs : Add boxed element parsing.
	* generator/SymbolTable.cs : Add IsBoxed and IsInterface methods.
	* glib/Boxed.cs : New base class for deriving boxed types.
	* glib/Object.cs : Add boxed GetProp/SetProp methods.
	* parser/gapi2xml.pl : Add boxed type element formatting.
	* parser/gapi_pp.pl : Add preprocessing of the generated sourcefiles.
	  Handle the builtins and make them identifiable to the xml generator.

svn path=/trunk/gtk-sharp/; revision=2012
2002-01-17 00:26:46 +00:00