Commit Graph

19 Commits

Author SHA1 Message Date
Dan Winship
b6d7f14268 * generator/StructBase.cs: update field-generation logic a bit
* generator/CodeGenerator.cs: add a --glue-includes flag

	* generator/GenerationInfo.cs: Accept glue_includes value from
	Main and output it to the glue_filename.

	* generator/FieldBase.cs (Ignored): handle more ignorable cases.
	(CheckGlue): New method to figure out what kind of glue we'll need
	for a field.
	(GenerateImports): generate appropriate imports per CheckGlue.
	(GenerateGlue): Generate C glue for accessing a struct field;
	either a fully-C-based accessor, or a method to just return the
	field's offset in the struct.
	(Generate): Use the generated glue to read the field.

	* generator/PropertyBase.cs (CType): if the field is a single bit,
	set its type to gboolean.

	* generator/ObjectGen.cs (Generate):
	* generator/OpaqueGen.cs (Generate): Call GenFields.

	* generator/StructField.cs: Use FieldBase's glue-generation code
	to handle bitfields. [#54489]

	* generator/ObjectField.cs: Generates accessors for public fields
	of objects and opaque structs. [#69514]

	* generator/ClassBase.cs (ClassBase): Parse <fields> nodes and
	create ObjectField objects.
	(GenFields): Output field properties
	(IgnoreMethod): Ignore Get/Set methods that duplicate fields

	* generator/Makefile.am (sources): update

	* {gdk,gnome,gtk,pango}/*.metadata: Mark some additional fields as
	public. Rename/retype some fields for consistency with earlier
	hand-coded bindings.

	* {gdk,gnome,gtk,pango}/*.custom: Remove custom methods that can
	now be autogenerated.

	* {gdk,gnome,gtk,pango}/glue/*.c: Remove glue methods that can now
	be autogenerated
	
	* {gdk,glade,gnome,gtk,pango,vte}/Makefile.am
	* {gdk,glade,gnome,gtk,pango,vte}/glue/Makefile.am
	* {gdk,gnome,gtk,pango}/glue/makefile.win32: Update

svn path=/trunk/gtk-sharp/; revision=44563
2005-05-16 14:28:55 +00:00
Mike Kestner
4caefdec00 2005-03-25 Mike Kestner <mkestner@novell.com>
* */*.cs : tag native callback delegates with [CDeclCallback].
	* */*.custom : tag native callback delegates with [CDeclCallback].

svn path=/trunk/gtk-sharp/; revision=42253
2005-03-25 17:57:15 +00:00
Mike Kestner
993d91fa31 2004-12-07 Mike Kestner <mkestner@novell.com>
* */*.cs : s/glue-2.0/glue-2 so that dllimport works on win32.
	* */*.custom : s/glue-2.0/glue-2
	* */glue/makefile.win32 : s/glue-2.0/glue-2
	* */glue/Makefile.am : s/glue-2.0/glue-2

svn path=/trunk/gtk-sharp/; revision=37324
2004-12-07 19:03:55 +00:00
Mike Kestner
7f3171c814 merge to HEAD of jeroen and friends' work on the 2-4 branch. HEAD
is now tracking Gnome 2.6.

svn path=/trunk/gtk-sharp/; revision=35479
2004-10-29 20:33:07 +00:00
Mike Kestner
7a6d6b2128 2004-06-25 Mike Kestner <mkestner@ximian.com>
* */*.cs : add lgpl license blurb and clean up (c)'s.
	* */*.custom : add lgpl license blurb and clean up (c)'s.
	* */glue/*.c : add lgpl license blurb and clean up (c)'s.
	file adds without license from now on are punishable by wedgie.

svn path=/trunk/gtk-sharp/; revision=30401
2004-06-25 18:42:19 +00:00
Larry Ewing
b39bc105e6 2004-06-17 Larry Ewing <lewing@ximian.com>
* gdk/Makefile.am (sources): add Pixdata.custom

	* gdk/Pixdata.custom: add new file to fix Serialize.

	* gnome/CanvasItem.custom: remove the incorrect custom bindings.

	* gnome/Gnome.metadata: stop hiding the AffineRelative and
	AffineAbsolute the generator gets them right they are not out
	params.

	* gdk/Gdk.metadata: mark the Pixdata byte stream as and array hide
	the broken serialize method.

svn path=/trunk/gtk-sharp/; revision=29941
2004-06-19 14:46:11 +00:00
Todd Berman
9f492c794b 2004-06-11 Todd Berman <tberman@sevenl.net>
* gtk/Container.custom:
        * gtk/CellRenderer.custom:
        * gnome/CanvasItem.custom: mark Override* private.
        * doc/en/*/*.xml: update to remove Override* methods.

svn path=/trunk/gtk-sharp/; revision=29394
2004-06-12 00:18:05 +00:00
Todd Berman
01e3962bc8 2004-06-04 Todd Berman <tberman@sevenl.net>
* glib/Object.cs: ConnectDefaultHandlers needs to look at public api
        as well for virtual methods.
        * gtk/CellRenderer.custom:
        * gtk/Container.custom:
        * gnome/CanvasItem.custom: Add DefaultSignalHandler to remove the need
        for the static ctor.

svn path=/trunk/gtk-sharp/; revision=28851
2004-06-05 01:01:07 +00:00
Todd Berman
12bc3b0550 2004-06-04 Todd Berman <tberman@sevenl.net>
* gnome/CanvasItem.custom: Changed from OnXXX vmethods to XXX vmethods
        * gnome/CanvasProxy.cs: removed, unused code
        * gnome/GtkSharp.BoundsHandler.cs: removed
        * gnome/GtkSharp.DrawHandler.cs: removed
        * gnome/GtkSharp.PointHandler.cs: removed
        * gnome/GtkSharp.RenderHandler.cs: removed
        * gnome/GtkSharp.UpdateHandler.cs: removed
        * gnome/Makefile.am: updated to reflect removing of old files.
        * gtk/CellRenderer.custom: Changed from OnXXX vmethods to XXX vmethods,
        and added StartEditing vmethod
        * gtk/Container.custom: Changed from OnForall to ForAll
        * gtk/Gtk.metadata: hide CellRenderer.GetSize and StartEditing
        * gtk/glue/cellrenderer.c: new glue for CellRenderer.StartEditing
        override.
        * sample/CustomCellRenderer.cs: updated signatures to reflect new
        code.

svn path=/trunk/gtk-sharp/; revision=28815
2004-06-04 04:55:48 +00:00
Mike Kestner
14168176c2 2004-05-29 Mike Kestner <mkestner@ximian.com>
* gnome/CanvasItem.custom : for OnUpdate, Art.SVP can be NULL
	so treat it as an IntPtr with Zero checks and manual marshaling.

svn path=/trunk/gtk-sharp/; revision=28442
2004-05-29 15:32:34 +00:00
Mike Kestner
9e64b802b5 2004-04-04 Mike Kestner <mkestner@ximian.com>
* gnome/glue/canvasitem.c : add glue to override VMs.
	* gnome/CanvasItem.cs : expose virtual methods for update, point,
	realize, draw, and render.

svn path=/trunk/gtk-sharp/; revision=25040
2004-04-05 15:11:37 +00:00
Mike Kestner
e83c55a242 2004-03-12 Mike Kestner <mkestner@ximian.com>
* */Makefile.am : automakify the build
	* */Makefile.in : kill
	* *.custom : remove System.Drawing dependencies
	* *.cs : remove System.Drawing dependencies
	* *-api.xml : mv to *-api.raw
	* glue/* : mv to lib specific gluelibs for glib, gdk, gtk, and glade.
	* gtk/gtk-symbols : alias GtkType to GType
	* sources/gtk-sharp-sources.xml : create .raw files. They are now
	transformed to .xml files by the metadata compilation step.

svn path=/trunk/gtk-sharp/; revision=23967
2004-03-12 21:18:11 +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
Duncan Mak
4d5ffe430c * sources/Gnome.metadata:
(CanvasItem.SetValist):
(CanvasItem.Construct): Hidden, because we don't support va_list
params.
	(CanvasItem): Hid the constructor, as each subclass has their own
contsructor and we don't support va_list params.
	(CanvasItem.W2i):
(CanvasItem.I2w): Marked parameters as ref, so they can be used as
in/out parameters.
	(Canvas.GetMiterPoints):
(Canvas.GetColor): Fixed return type to be 'bool' instead of 'int'.
	(CanvasClipgroup.Wind): Fixed property type. It should be an
Art.WindRule enum, not a UInt.
	(Canvas.W2cAffine):
(CanvasItem.AffineAbsolute):
(CanvasItem.AffineRelative):
(CanvasItem.I2wAffine):
(CanvasItem.I2cAffine): Hidden, use the impl. in the custom file
instead.
	* gnome/Canvas.custom: Added for W2cAffine.
* gnome/CanvasItem.custom: Reformatted. Added AffineRelative,
AffineAbsolute, I2wAffine, I2cAffine. These are needed because of
the 'const double affine[6]' parameter.

svn path=/trunk/gtk-sharp/; revision=16876
2003-07-30 06:36:18 +00:00
Mike Kestner
23464e6514 2003-07-23 Mike Kestner <mkestner@ximian.com>
[Equal credit to Ettore Perazzoli <ettore@ximian.com> for fixing
	all the bugs in the initial patch]
	* */*.custom : fix incorrect usage of new Object (IntPtr) where
	Glib.Object.GetObject should've been used.  add ref_owned param
	to GetObject calls.
	* generator/CallbackGen.cs : setup ref_owned in bodies
	* generator/ClassBase.cs : add ref_owned to GetObject FromNative call
	* generator/Method.cs : setup ref_owned in bodies
	* generator/Property.cs : setup ref_owned in bodies
	* generator/SignalHandler.cs : pass ref_owned to GetObject
	* generator/StructBase.cs : setup ref_owned in bodies
	* glib/Object.cs : kill Ref/Unref methods.  Don't want it to be
	easy for users to screw with ref counts, or make it look like they
	should need to.
	(GetObject): add ref_owned param and ref/unref to remain at 1
	* glib/Value.cs : pass ref_owned to GetObject

svn path=/trunk/gtk-sharp/; revision=16581
2003-07-23 17:19:21 +00:00
Mike Kestner
f750d78d6a 2002-12-24 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs : generate protected GType ctors
	* generator/SymbolTable.cs : map GType to uint
	* glib/Object.cs : add GType ctor. add RegisterGType.
	* glue/type.c (gtksharp_register_type): new GType registrar
	* */*.custom : make GType params uints
	* sample/Subclass.cs : a simple type registration example

svn path=/trunk/gtk-sharp/; revision=9870
2002-12-25 00:36:00 +00:00
Vladimir Vukicevic
79f298f823 * gtk/CanvasItem.custom: use base() to set Raw in constructor, so
that the ref counting semantics get correctly set up

svn path=/trunk/gtk-sharp/; revision=8978
2002-11-14 01:44:23 +00:00
Duncan Mak
bfb00c4e7a 2002-08-06 Duncan Mak <duncan@ximian.com>
* gnome/CanvasItem.custom: Added accessor to get the 'canvas' field.

svn path=/trunk/gtk-sharp/; revision=6467
2002-08-06 15:52:32 +00:00
Rachel Hestilow
ab115875e4 2002-08-05 Rachel Hestilow <hestilow@ximian.com>
* gnome/Canvas*.custom, IconTextItem.custom: Added.

	* sample/CanvasExample.cs: Added.
	* sample/Makefile.in: Build canvas example in gnome build.

svn path=/trunk/gtk-sharp/; revision=6451
2002-08-06 00:15:18 +00:00