Commit Graph

53 Commits

Author SHA1 Message Date
Mike Kestner
96f81cfbd4 2005-04-04 Mike Kestner <mkestner@novell.com>
* gdk/Gdk.metadata : hide some manually implemented callback methods.
	* gdk/*.custom : implement several methods containing persistent
	callback parameters.
	* generator/BoxedGen.cs : set gen_info.CurrentType in Generate.
	* generator/ClassGen.cs : set gen_info.CurrentType in Generate.
	* generator/Ctor.cs : set gen_info.CurrentMember in Generate.
	* generator/GenerationInfo.cs : add CurrentMember and CurrentType.
	* generator/Method.cs : set gen_info.CurrentMember in Generate.
	* generator/MethodBody.cs : always generate null guarding for array
	parameters, and add a nag for callback parameters without a scope attr.
	* generator/ObjectGen.cs : set gen_info.CurrentType in Generate.
	* generator/OpaqueGen.cs : set gen_info.CurrentType in Generate.
	* generator/Parameters.cs : kill NullOk. add Scope property.
	* generator/StructGen.cs : set gen_info.CurrentType in Generate.
	* gtk/Gtk.metadata : kill a few null_ok attrs.
	* pango/Pango.metadata : mark the callback params as call scope. kill
	a couple null_ok attrs.

svn path=/trunk/gtk-sharp/; revision=42529
2005-04-04 16:27:08 +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
bf9ed95944 2004-12-27 Mike Kestner <mkestner@novell.com>
* generator/EnumGen.cs : rework for a single pass thru ChildNodes.
	* generator/Parameters.cs : simplify PassAs logic.
	* generator/SimpleBase.cs : mark abstract.

svn path=/trunk/gtk-sharp/; revision=38111
2004-12-27 20:00:55 +00:00
Mike Kestner
b6b89a0633 2004-12-20 Mike Kestner <mkestner@novell.com>
* gdk/Gdk.metadata : mark a couple array params.
	* generator/Field.cs : remove the MarshalAs hack. We have to
	do something much more evil since MarshalAs can't hang.
	* generator/ImportSignature.cs : deal with out LP(U)Gen params.
	* generator/LPGen.cs : moved from SSizeTGen and generalized.
	* generator/LPUGen.cs : moved from SizeTGen and generalized.
	* generator/Makefile.am : update sources.
	* generator/MethodBody.cs : deal with out LP(U)Gen params.
	* generator/Parameters.cs : deal with out LP(U)Gen params.
	* generator/SymbolTable.cs : make all longs and size_t types LP(U)Gens.

svn path=/trunk/gtk-sharp/; revision=37999
2004-12-20 22:08:43 +00:00
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
c9f1eadc11 2004-05-07 Mike Kestner <mkestner@ximian.com>
[Derived from a patch by Ben Maurer]
	* generator/Ctor.cs : generate code to detect subclassing and handle
	GType registration and native object creation properly.
	* generator/Parameters.cs : add PropertyName accessor for param attr.
	* generator/Property.cs : use a new GLib.Value ctor.
	* glib/ObjectManager.cs : redo hash access.
	* glib/Object.cs : CreateNativeObject method to invoke g_object_newv
	and some refactoring of RegisterGType and LookupGType.
	* glib/Value.cs : make gtype field an IntPtr.
	* glib/glue/object.c : glue for g_object_newv use.
	* glib/glue/value.c : new glue for value creation.
	* gtk/Dialog.custom : fix a ctor declaration for auto-reg.
	* gtk/Gtk.metadata : mark a couple property_name attrs as examples.
	* sample/Subclass.cs : use auto-GType-registration now.

svn path=/trunk/gtk-sharp/; revision=26916
2004-05-07 13:42:59 +00:00
Mike Kestner
2dc2f1ed0f 2004-01-27 Mike Kestner <mkestner@ximian.com>
* generator/MethodBody.cs : remove unnecessary generation for
	Handle using out parameters.
	* gtk/Gtk.Metadata : make TextIter opaque
	* gtk/TextBuffer.custom : remove redundant dllimport
	* gtk/gtk-api.xml : regen

svn path=/trunk/gtk-sharp/; revision=22551
2004-01-27 19:58:59 +00:00
Mike Kestner
f61ac5c89c 2003-12-03 Mike Kestner <mkestner@speakeasy.net>
* generator/CallbackGen.cs : use new sig and isig classes.
	* generator/Ctor.cs : use new sig, isig, and body classes.
	* generator/ImportSignature.cs : isig code spun out from Parameters.
	* generator/Method.cs : use new sig, isig, and body classes.
	* generator/MethodBody.cs : spun Initialize, GetCallString,
	Finish, and Exception throwing methods from Parameters.
	* generator/Parameters.cs : Slayed the evilness that was CreateSignature.
	It is now essentially a container for Parameter classes instead of a
	tangled mess of code trying to do everything remotely related to
	parameter lists. Also completely killed the VAType/IsVarArgs stuff,
	as it can be done with the array and params attrs instead.
	* generator/Property.cs : use new sig class.
	* generator/Signature.cs : new method sig generator extracted from
	Parameters class. add "params" keyword support for tagged parameters.
	* gnome/Gnome.metadata : hide IconList.GetSearchPath (to be manual)
	* gnome/gnome-api.xml : regen
	* gtk/ListStore.custom : kill unneeded overload
	* gtk/TreeStore.custom : kill unneeded overload
	* gtk/Gtk.metadata : mark params/args on *store_newv
	* gtk/gtk-api.xml : regenerated

svn path=/trunk/gtk-sharp/; revision=20755
2003-12-03 23:08:14 +00:00
Mike Kestner
c1916a0aa0 2003-11-29 Mike Kestner <mkestner@speakeasy.net>
* generator/Parameters.cs : handle null_ok for arrays.
	* gtk/Gtk.metadata : mark a null_ok in Drag.DestSet
	* gtk/gtk-api.xml : regen

svn path=/trunk/gtk-sharp/; revision=20619
2003-11-30 03:25:35 +00:00
Mike Kestner
62a858e0cd 2003-11-16 Mike Kestner <mkestner@ximian.com>
* generator/Parameters: handle array+len param pairs.
	* gtk/Gtk.metadata : unhide DestDefaults and mark targets param of
	drag_dest_set as array.
	* gtk/gtk-api.xml : regenerate

svn path=/trunk/gtk-sharp/; revision=20096
2003-11-17 03:44:32 +00:00
Mike Kestner
5eadb9b87c 2003-10-20 Mike Kestner <mkestner@ximian.com>
* generator/Parameters.cs : treat interface out params like objects.
	* gtk/gtk-api.xml : regenerated
	* gtk/Gtk.metadata : mark TreeSelection.GetSelected params out.
	* gtk/TreeSelection.custom : emptied since it's now generated.
	* sources/Gtk.metadata : kill hide of TreeSelection.GetSelected.
	[fixes #49858]

svn path=/trunk/gtk-sharp/; revision=19229
2003-10-20 21:27:38 +00:00
Mike Kestner
0525cb807e 2003-10-20 Mike Kestner <mkestner@ximian.com>
* generator/Parameters.cs : add a cast to the call_string for Length
	params other than int.

svn path=/trunk/gtk-sharp/; revision=19202
2003-10-20 17:33:05 +00:00
Mike Kestner
c62e9ab977 2003-10-17 Mike Kestner <mkestner@ximian.com>
* generator/Parameters.cs : mark enum pointer params as out.
	need to audit if any are really arrays.  [Fixes #49779]

svn path=/trunk/gtk-sharp/; revision=19153
2003-10-17 23:06:37 +00:00
Mike Kestner
bdc5c7071f 2003-10-13 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : mark an array param on PixbufDestroyNotify
	* gdk/gdk-api.xml : regenerated
	* generator/CallbackGen.cs : Handle out params in callback sigs
	and ditch the object[] args handling for typed args.
	* generator/Parameters.cs : more proactive PassAs logic.  We now
	default all simple pointer types (uint*, int*, double*, etc...)
	to out params unless they are marked otherwise in the XML with a
	pass_as tag or an array tag.  [Fixes #32104]

svn path=/trunk/gtk-sharp/; revision=18993
2003-10-13 21:53:40 +00:00
Mike Kestner
71e9414883 2003-10-11 Mike Kestner <mkestner@ximian.com>
* generator/Parameters.cs : Properly handle out params for
	Object and Opaque types.
	* gtk/ListStore.custom: remove out on GetValue overload
	* gtk/TreeStore.custom: remove out on GetValue overload
	* gtk/gtk-api.xml : regenerated
	* sources/Gtk.metadata : remove some incorrect out tags

svn path=/trunk/gtk-sharp/; revision=18891
2003-10-11 20:53:10 +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
6a16e09541 2003-09-12 Mike Kestner <mkestner@ximian.com>
* generator/Parameters.cs (CreateSignature): begin refactoring this
	unholy mess.  Eliminated one pass thru the param list.  Eliminated
	prev/curr param refs. Switched to a for loop since lookbacks are
	required.

svn path=/trunk/gtk-sharp/; revision=18050
2003-09-12 06:38:29 +00:00
Mike Kestner
1a0892ea8b 2003-09-11 Mike Kestner <mkestner@ximian.com>
* generator/Parameters.cs : keep an ArrayList of Parameter objects
	and refactor the hell out of the joint using the new Count and this[].
	Still need to refactor a couple methods.

svn path=/trunk/gtk-sharp/; revision=18030
2003-09-11 06:10:03 +00:00
Mike Kestner
5e5a570be3 2003-09-11 Mike Kestner <mkestner@ximian.com>
* generator/Parameters.cs (IsLength): use a switch to make the
	growing list of valid len types more readable.

svn path=/trunk/gtk-sharp/; revision=18029
2003-09-11 05:11:18 +00:00
Alp Toker
9749217abf 2003-09-11 Alp Toker <alp@atoker.com>
* generator/Parameters.cs: Handle string length parameters specified
        not just as int but also signed/unsigned int, long or short

svn path=/trunk/gtk-sharp/; revision=18027
2003-09-11 03:48:25 +00:00
Martin Willemoes Hansen
f7ba4e2866 * generator/Parameters.cs:
* generator/StructBase.cs:
        * generator/SymbolTable.cs: Fixed the keyword base was not
        mangled, also did a little refactoring.

svn path=/trunk/gtk-sharp/; revision=17702
2003-08-28 16:49:29 +00:00
Mike Kestner
90705a1c98 2003-07-14 Mike Kestner <mkestner@speakeasy.net>
* api/*-api.xml : regenerated
	* gdk/Drawable.custom : DrawRectangle filled param is now bool
	* generator/Parameters.cs : studlify names ending w/ uscore
	* gtk/GtkSharp.GtkClipboardClearFuncNative : s/Opaque/Object
	* gtk/GtkSharp.GtkClipboardGetFuncNative : s/Opaque/Object
	* parser/gapi2xml.pl : put <ns>_string_* methods in Global
	* sample/Scribble.cs : update to new DrawRectangle api
	* sources/Gdk.metadata : hide some conflicting methods
	* sources/Gtk.metadata : finally fix the Progress crap and
	renames, hides and such to fix conflicts
	* sources/README : mention new gtk-2.2 reqs
	* sources/gtk-sharp.sources : update to new gtk-2.2 reqs
	* sources/makefile : update for 2.2 api

svn path=/trunk/gtk-sharp/; revision=16254
2003-07-15 05:52:09 +00:00
Mike Kestner
3ff827ed69 2003-07-10 Mike Kestner <mkestner@speakeasy.net>
* api/*-api.xml : regenerated
	* gdk/Threads.cs : killed since the methods are now gen'd
	* generator/ClassGen.cs : new, static class generatable
	* generator/Parameters.cs : mangle new and byte as param names
	* generator/Parser.cs : parse new <class> elements
	* generator/SymbolTable.cs : add GC SimpleGen
	* parser/gapi2xml.pl : static class element fixes
	* parser/GAPI/Metadata.pm : add class element
	* sources/Art.metadata: new, rename Affine.ToString method
	* sources/Atk.metadata: rename State class
	* sources/Gdk.metadata: hide Pixbuf static class for now. rename
	Event and Pango static classes to avoid collisions.
	* sources/Gnome.metadata: rename Gtk and Gdk static classes to
	avoid collisions.
	* sources/GnomeDb.metadata: rename Stock static class to
	avoid collisions.
	* sources/Gtk.metadata: rename Stock static class to
	avoid collisions. Hide Idle class.

svn path=/trunk/gtk-sharp/; revision=16115
2003-07-11 02:00:13 +00:00
Mike Kestner
bbf727c80e 2003-06-14 Mike Kestner <mkestner@speakeasy.net>
* CallbackGen.cs : rework for internal callback helpers,
	pass NS to parms ctor
	* Ctor.cs : pass NS to parms ctor
	* Method.cs : pass NS to parms ctor
	* Parameters.cs : refactoring, plus rework for internal
	callback helpers.
	* Signal.cs : pass NS to parms ctor

svn path=/trunk/gtk-sharp/; revision=15385
2003-06-14 17:30:32 +00:00
Mike Kestner
b6114fef1e 2003-05-18 Mike Kestner <mkestner@speakeasy.net>
* generator/CallbackGen.cs : use non-static symtab, kill doc comments
	* generator/ClassBase.cs : use non-static symtab
	* generator/CodeGenerator.cs : use non-static symtab
	* generator/EnumGen.cs : kill doc comments, don't gen using System here
	* generator/GenBase.cs : gen using System here for all types
	* generator/InterfaceGen.cs : don't gen using System here.
	* generator/Method.cs : use non-static symtab
	* generator/ObjectGen.cs : kill doc comments, use non-static symtab
	* generator/OpaqueGen.cs : don't gen using System here.
	* generator/Parameters.cs : use non static symtab.
	* generator/Parser.cs : use non static symtab. add SimpleGen's and
	ManualGen's
	* generator/Property.cs : use non static symtab
	* generator/SignalHandler.cs : use non static symtab
	* generator/StructBase.cs : use non static symtab
	* generator/SymbolTable.cs : major refactoring. now uses SimpleGen and
	ManualGen IGeneratables to simplify the method and prop code.  Is now
	instance based with a static prop to get the singleton instance, so that
	a this indexer can be provided to access the IGeneratables nicely. Gearing
	up to remove even more code from here by accessing IGeneratables directly.

svn path=/trunk/gtk-sharp/; revision=14687
2003-05-19 02:45:17 +00:00
Gonzalo Paniagua Javier
3821938764 2003-04-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* generator/CallbackGen.cs: the new generated wrappers have:
		-(optional) Field of the same type returned by the callback.
		-A call to RemoveIfNotAlive at the beginning. It returns true,
		return the dummy field.
		-Added an object to the ctor signature and pass it to the base
		class.

	* generator/Ctor.cs: added a Params property.

	* generator/Method.cs: set Static property in Parameters if the method
	is static.

	* generator/Parameters.cs: added Static property. The call creation of
	the delegate wrapper (if applicable) uses the new signature. Pass a null
	as object is the method is static.

	* generator/StructBase.cs: set Static for the parameters of the ctors.

	* glib/DelegateWrapper.cs: the ctor takes an object (the one creating
	the wrapper or null) and creates a weak reference to it. Store it in
	a static Hashtable (this way the wrapper itself is not garbage
	collected).
	(RemoveIfNotAlive): called from the native delegate callbacks. If the
	target of the weak reference has been garbage collected, removes itself
	from the hashtable to let the GC dispose this instance and returns true.

	* gdk/Pixbuf.custom:
	* gtk/Clipboard.custom:
	* gtk/GtkSharp.GtkClipboardClearFuncNative.cs:
	* gtk/GtkSharp.GtkClipboardGetFuncNative.cs:
	* glade/XML.custom: changed delegate wrappers to match the new
	signature.

svn path=/trunk/gtk-sharp/; revision=13237
2003-04-06 09:21:15 +00:00
Mike Kestner
0e5ab4bdea 2003-02-24 Mike Kestner <mkestner@speakeasy.net>
* generator/Parameters.cs : fix some ref/out bugs

svn path=/trunk/gtk-sharp/; revision=11922
2003-02-24 07:36:30 +00:00
Mike Kestner
554450a33a 2003-02-23 Mike Kestner <mkestner@speakeasy.net>
* generator/CallbackGen.cs : suppress len params from
	  string/len pairs.
	* generator/Parameters.cs : begin the refactoring to use
	  Parameter class. Suppress len params from string/len pairs.
	*/*.custom : remove all overrides of string/len pairs
	*/*.cs : ditto.  Thanks to Alp Toker for the foundation
	  patch that this change was built upon.

svn path=/trunk/gtk-sharp/; revision=11913
2003-02-24 03:13:08 +00:00
Mike Kestner
367de43b68 2003-02-19 Mike Kestner <mkestner@speakeasy.net>
* generator/Parameters.cs (Initialize): construct a GLib.Value
	for out params.

svn path=/trunk/gtk-sharp/; revision=11768
2003-02-20 06:17:23 +00:00
Mike Kestner
3a108845d7 2002-11-21 Mike Kestner <mkestner@speakeasy.net>
* api/*.xml : a few new attrs
	* generator/Parameters.cs : remove redundant ref keywords
	* gtk/ListStore.custom: overload SetColumnTypes
	* gtk/TreeStore.custom: overload SetColumnTypes
	* parser/GAPI/Metadata.pm : allow callback nodes at class level
	* sources/Gtk.metadata : hide ClipboardClearFunc and GetFunc,
	tag types param of SetColumnTypes as array, uncomment needs_ref
	tags on Widget methods to match the current api.xml file

svn path=/trunk/gtk-sharp/; revision=9148
2002-11-22 03:30:18 +00:00
Alp Toker
e06e2ba8dd Add GStreamer support
svn path=/trunk/gtk-sharp/; revision=8726
2002-11-01 05:01:22 +00:00
Mike Kestner
b2f04c1d80 2002-10-26 Mike Kestner <mkestner@speakeasy.net>
Much of this patch from Vlad, with substantial rework by mk.
	* */makefile.win32 : introduce mapdllnames.pl, api, and glue
	* generator/CallbackGen.cs : rework namespacing for csc compilation
	* generator/Parameters.cs : ditto
	* generator/Signal.cs : ditto
	* generator/SignalHandler.cs : ditto
	* glue/win32dll.c : new dll construction source
	* glib/Value.cs : new ushort ctor/cast operator
	* gtk/Table.custom : comment this out until we add a default ctor tag
	* gtk/ThreadNotify.cs : make ReadyEvent public
	* sources/Gdk.metadata : mark a Parse() param as ref

svn path=/trunk/gtk-sharp/; revision=8590
2002-10-27 02:30:51 +00:00
Mike Kestner
2e07bf7e87 2002-10-26 Mike Kestner <mkestner@speakeasy.net>
* api/*.xml : get libgda and libgnomedb metadata setup
	* gconf/*/Makefile.in : patch from MauricioC for -L's and /r's
	* gnomedb/Makefile.in : patch from MauricioC for -L's and /r's
	* generator/ClassBase.cs (ctor): mangle hash names for sigs and props
	* generator/Parameters.cs (MangleName): handle params, null, and ref
	* generator/Parser.cs (ParseNamespace): ignore "hidden" types
	* generator/StructBase.cs (MangleName): handle params, null, and ref
	* glib/Object.cs (Equals): kill, also kill == and !=
	* sources/Gda.metadata : new, make Gda behave without hand edits
	* sources/GnomeDb.metadata : ditto

svn path=/trunk/gtk-sharp/; revision=8577
2002-10-26 08:03:16 +00:00
Mike Kestner
3b1dd1079b 2002-10-10 Mike Kestner <mkestner@speakeasy.net>
* generator/CallbackGen.cs : some fixes
	* generator/Parameters.cs (CreateSignature): handle void params

svn path=/trunk/gtk-sharp/; revision=8156
2002-10-11 00:27:46 +00:00
Rachel Hestilow
6b6bb616b2 2002-09-12 Rachel Hestilow <hestilow@ximian.com>
* sources/Gtk.metadata: Set null_ok on the callback argument
	to Menu.Popup.

	* generator/Parameters.cs: Handle null_ok properly for callback
	arguments.

svn path=/trunk/gtk-sharp/; revision=7412
2002-09-12 20:25:29 +00:00
Rachel Hestilow
38e7bdeec5 2002-08-28 Rachel Hestilow <hestilow@ximian.com>
* generator/CallbackGen.cs: Generate wrappers to map
	from managed delegates to native ones.
	* generator/Ctor.cs: Call parms.Initialize for the static case.
	* generator/Parameters.cs: Add "CType" property. Append []
	to CSType if necessary. Add "HideData" property if a container
	wishes to hide the user_data (used in callbacks).
	(Initialize): Add case for callback.
	* generator/SymbolTable.cs: Add size_t.

	* glue/program.c: string[] marshalling is no longer broken,
	remove hack.

	* sources/Gtk.metadata: Disable
	GtkColorSelection.SetChangePaletteHook and
	GtkTreeView.GetSearchEqualFunc for now, they return delegates and
	we don't support native->managed delegate mapping yet.

svn path=/trunk/gtk-sharp/; revision=7133
2002-08-28 20:58:01 +00:00
Duncan Mak
074dcf2d4a 2002-08-15 Duncan Mak <duncan@ximian.com>
* generator/gtkapi.xml: New Libart stuff.

	* parser/build.pl:
	* gnome/Makefile.in: Added reference to atk-sharp.dll

	* generator/Parameters.cs (MangleName): Added cases for 'in' and 'out'.

svn path=/trunk/gtk-sharp/; revision=6651
2002-08-15 16:44:41 +00:00
Mike Kestner
71b46ecd41 2002-08-03 Mike Kestner <mkestner@speakeasy.net>
* generator/Method.cs : Added IsGetter, IsSetter, ReturnType. Made
	  GenerateImport, GenerateBody public.
	* generator/Parameters.cs : Added Parameter::MarshalType
	* generator/Property.cs : Added logic to use methods instead of text
	  properties wherever possible.

svn path=/trunk/gtk-sharp/; revision=6391
2002-08-04 04:23:13 +00:00
Rachel Hestilow
54838fec29 2002-08-03 Rachel Hestilow <hestilow@ximian.com>
* generator/Method.cs: Support libname overrides. Call parms.Finish.
	* generator/Parameters.cs: New method parms.Finish. Generate a temporary
	holder variable for enum out parameters.
	* generator/Property.cs: Pass a boolean to EnumWrapper indicating.
	if these are flags.
	* generator/StructBase.cs: Disable array marshalling (it is
	broken in mono.)
	* generator/SymbolTable.cs: Add methods IsEnumFlags.

	* glib/EnumWrapper.cs: New bool "flags".
	* glib/Value.cs: Call flags variant on GValue for enum props, if needed.

	* glue/Makefile.am, glue/style.c, glue/widget.c: Add widget
	and style field accessor methods.

	* gtk/Style.custom, Widget.custom: Added.

	* parser/README: Update requirements (needed for pixbuf drawable hack)
	* parser/Gdk.metadata: Fix library for pixbuf methods in gdk.
	Add Window.GetPointer "out" parameters.
	* parser/gapi2xml.pl: Remap gdk_draw_* methods to Drawable.

	* sample/Makefile.in: Add size and scribble samples.
	* sample/Scribble.cs: Added.

svn path=/trunk/gtk-sharp/; revision=6387
2002-08-03 22:24:37 +00:00
Rachel Hestilow
967e3e9c5a 2002-07-30 Rachel Hestilow <hestilow@ximian.com>
* generator/ClassBase.cs: Change hasDefaultConstructor to protected,
	adjust now that it is an attr and not a subnode. Also add virtual
	property AssignToName (for ctors).

	* generator/Ctor.cs: Add property ForceStatic.
	(Generate): Optimize return code a bit for the static case.

	* generator/Method.cs: Assign to a "raw_ret" pointer before calling
	FromNativeReturn.

	* generator/Parameters.cs: Change "out ref" to "out", not "ref".

	* generator/Property.cs: Fix to work correctly with all object and
	struct types (mostly just some if-cases added).

	* generator/SignalHandler.cs: Remove args_type and argfields (unused).
	(Generate): Initialize struct if necessary.

	* generator/StructBase.cs: Massive reworking to support methods, ctors,
	etc.

	* generator/SymbolTable.cs: Add GdkAtom and gconstpointer simple types.

	* glib/Boxed.cs: Accept both IntPtr and object ctors. Add access for both.

	* glib/Opaque.cs: Fix copy/pasted copyright notice, remove data and event
	fields. Fix docs.

	* glib/Value.cs: Work correctly with boxed properties.

	* gnome/Modules.cs: Use new struct ctors.

	* gnome/Program.custom: Remove Get, this is being generated now.

	* parser/Gdk.metadata: Fix the drawable classes to inherit correctly.

	* parser/Metadata.pm: Change per-class attributes to actually be
	attributes.

	* parser/Gtk.metadata: Add a dummy attribute value for disabledefaultctor.

	* parser/gapi2xml.pl: Add hacks for the (broken) Drawable and Bitmap
	typedefs.

	* sample/test/TestColorSelection.cs: Display color string in hex format,
	update to use IsNull instead of == null, and size dialog to look pretty.

	* sample/Size.cs: Added.

svn path=/trunk/gtk-sharp/; revision=6264
2002-07-30 23:02:12 +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
Mike Kestner
d837953e6c 2002-07-20 Mike Kestner <mkestner@speakeasy.net>
* generator/Method.cs : beef up !Validate warnings
	* generator/ObjectGen.cs : beef up !Validate warnings
	* generator/Parameters.cs (Validate): fail on ellipsis parm
	* parser/gapi2xml.pl : Handle more opaque types properly

svn path=/trunk/gtk-sharp/; revision=5965
2002-07-20 14:43:48 +00:00
Mike Kestner
8b85bf647a 2002-07-16 Mike Kestner <mkestner@speakeasy.net>
* generator/ClassBase.cs : make MarshalType virtual.
	* generator/Parameters.cs : add Parameter class and Indexer.
	* generator/Signal.cs : Now use Parameters.
	(GetHandlerName): New abstraction of name handling.
	(GenerateDecls): use GetHandlerName.
	(GenComments): make private.
	(GenHandler): New. Generate custom event handlers and args.
	(Generate): use GenHandler. Pass args type to SignalHandler.
	* generate/SignalHandler.cs : store args type. Generate handler
	  dependent args and use MulticastDelegate.DynamicInvoke.
	* generate/StructGen.cs : override MarshalType.
	* glib/SignalCallback.cs : store a MulticastDelegate and args type
	* sample/*.cs : use new DeleteEventHandler

svn path=/trunk/gtk-sharp/; revision=5834
2002-07-16 23:14:35 +00:00
Rachel Hestilow
eb38e65353 2002-07-13 Rachel Hestilow <hestilow@ximian.com>
* generator/Parameters.cs: Allow nulls if null_ok set.
	* generator/SymbolTable.cs: Add method IsStruct.
	* parser/Gtk.metadata, Gdk.metadata, Gnome.metadata: Merge in
	null_ok from *.defs. This is probably incomplete though, I've
	already found one method that wasn't listed.

	* sample/GnomeHelloWorld.cs: Remove IntPtr.Zero hack.

svn path=/trunk/gtk-sharp/; revision=5792
2002-07-14 01:32:18 +00:00
Rachel Hestilow
0fb0f3c54a 2002-07-06 Rachel Hestilow <hestilow@ximian.com>
* generator/Parameters.cs (Initialize): Initialize error
	to zero.

svn path=/trunk/gtk-sharp/; revision=5629
2002-07-06 20:57:50 +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
Mike Kestner
948bb15432 2002-06-22 Mike Kestner <mkestner@speakeasy.net>
* */makefile.win32 : add docs target
	* generator/ClassBase.cs : Make GenMethods public for interface gen
	* generator/Method.cs : Lose the CallingConvention
	* generator/Parameters.cs : fix uninitialized var
	* generator/SignalHandler.cs : Lose the CallingConvention
	* generator/StructBase.cs : Lose the CallingConvention

svn path=/trunk/gtk-sharp/; revision=5418
2002-06-22 22:12:51 +00:00
Rachel Hestilow
6857128f07 2002-06-21 Rachel Hestilow <hestilow@ximian.com>
* generator/ClassBase.cs: New base class for classes and interfaces.

	* generator/InterfaceGen.cs: Inherit from ClassBase, generate declarations.

	* generator/ObjectGen.cs: Move half of this into ClassBase.

	* generator/Method.cs: Turn all applicable Get/Set functions into .NET
	accessors. Remove redundant == overload and move into Equals, as
	it was confusing "!= null".

	* generator/Parameters.cs: Alter signature creation to accept "is_set"
	option, add support for variable arguments. Add properties "Count",
	"IsVarArgs", "VAType".

	* generator/Ctor.cs: Fixup for changes in Parameters (indenting,
	signature creation).

	* generator/Signal.cs: Support generating declarations.

	* generator/SymbolTable: Change GetObjectGen to GetClassGen.

	* glib/IWrapper.cs: Move "Handle" declaration to here, so
	both classes and interfaces can benefit from it.

	* glib/Object.cs: Inherit from IWrapper.cs

	* parser/Metadata.pm: Support attribute changes on constructors,
	methods, signals, and paramater lists.

	* parser/gapi2xml.pl: Parse init funcs for interfaces. Ignore "_"
	functions here.

	* parser/gapi_pp.pl: Remove boxed_type_register check, as it will
	be caught in the init funcs.

	* parser/Atk.metadata: Added.

	* parser/Gtk.metadata: Add all needed signal/method collision
	renames. Rename GtkEditable.Editable accessors to IsEditable,
	as .NET does not like accessors with the same name as their
	declaring type. Tag TreeStore constructor as varargs.

	* samples/ButtonApp.cs: s/EmitAdd/Add.

	* samples/Menu.cs: s/EmitAdd/Add, s/Activate/Activated.

svn path=/trunk/gtk-sharp/; revision=5394
2002-06-21 17:15:19 +00:00
Mike Kestner
dbfe6207a7 2002-06-20 Mike Kestner <mkestner@speakeasy.net>
* generator/Parameters.cs : GError handling overhaul
	* generator/SymbolTable.cs : map GError to IntPtr
	* glib/GException.cs : Refactor to use glue.
	* glue/Makefile.am : add the error.c file.
	* glue/error.c : glue for error message string access
	* gtk/makefile.win32 : ref the gdk-imaging-sharp assembly

svn path=/trunk/gtk-sharp/; revision=5351
2002-06-20 01:45:13 +00:00
Mike Kestner
2854aa2e16 2002-06-19 Mike Kestner <mkestner@speakeasy.net>
* generator/Parameters.cs : csc build error fixes

svn path=/trunk/gtk-sharp/; revision=5350
2002-06-19 23:25:12 +00:00