Commit Graph

58 Commits

Author SHA1 Message Date
Dan Winship
7ebae92199 * glib/Type.cs:
* glib/TypeConverter.cs: 
	* glib/Value.cs: sort lists of GTypes into TypeFundamental order

svn path=/trunk/gtk-sharp/; revision=43457
2005-04-22 19:10:47 +00:00
Dan Winship
e1306617e5 * gdk/EventClient.cs (gtksharp_gdk_event_client_get_time):
* glib/Object.cs (gtksharp_get_type_id):
	* glib/Value.cs (gtksharp_object_get_ref_count,
	g_value_take_boxed): 
	* gnome/PrintContext.custom (gnome_print_concat,
	gnome_print_glyphlist, gnome_print_setdash):
	* gtk/NodeStore.cs (gtksharp_node_store_new, stamp):
	* gtk/NodeView.cs (gtk_tree_view_new_with_model):
	* gtk/Widget.custom (gtksharp_gtk_widget_set_allocation):
	* pango/LayoutLine.custom (g_free): Remove unused
	prototypes/fields

svn path=/trunk/gtk-sharp/; revision=43406
2005-04-21 15:12:12 +00:00
Mike Kestner
90a870e2de 2005-03-08 Mike Kestner <mkestner@novell.com>
* */*.cs : scrub for StringToPtrAnsi and string usage in DllImports.
	* */*.custom : begin the scrub here too.
	* generator/ConstStringGen.cs : implement IManualMarshaler and move to
	100% IntPtr marshaling.
	* generator/Ctor.cs : call Body.Finish too.
	* generator/IManualMarshaler.cs : new interface for generatables that
	marshal manually and need cleanup.
	* generator/Makefile.am : new file.
	* generator/MethodBody.cs : use IManualMarshaler if applicable.

svn path=/trunk/gtk-sharp/; revision=41579
2005-03-08 21:28:08 +00:00
Mike Kestner
8152f4899e 2005-01-26 Mike Kestner <mkestner@novell.com>
* glib/Value.cs : add a private debugging DllImport for ref_counts
	since the glue is there already.  g_value_get_object returns an
	unowned ref, so don't pretend like we own it. Make get_Val work for
	GObject subclasses. [Fixes #71125]

svn path=/trunk/gtk-sharp/; revision=39615
2005-01-27 00:50:46 +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
3d6cb09562 2004-12-03 Jorge Garcia <jgarcia@ac.upc.es>
* glib/Type.cs:          add Int64 and UInt64 support.
	* glib/TypeConverter.cs: add Int64 and UInt64 support.
	* glib/Value.cs:         add Int64 and UInt64 support.

svn path=/trunk/gtk-sharp/; revision=37049
2004-12-03 20:04:18 +00:00
Dan Winship
598f8e28e5 * glib/Value.cs: add new constructors for enum and boxed values
that take the name of the type rather than an object/property
        name pair; this way they work for both GObject properties and
        GtkContainer child properties.

        * glib/glue/value.c (gtksharp_value_create_from_type_name): glue
        for that

        * glib/Opaque.cs (GetOpaque): Fix this.

        * generator/Property.cs (Generate): Use the new GLib.Value
        constructors. (Fixes setting of enum-valued child properties.)

svn path=/trunk/gtk-sharp/; revision=36174
2004-11-16 18:03:58 +00:00
Dan Winship
df41dcc177 * parser/gapi2xml.pl (parseInitFunc, addPropElem): handle
GtkContainer child properties

	* generator/Property.cs:
	* generator/ChildProperty.cs: make Property subclassable and add a
	"ChildProperty" subclass.

	* generator/Makefile.am (sources): add ChildProperty.cs

	* generator/ClassBase.cs: handle "childprop" nodes by creating
	ChildProperty objects.

	* glib/Value.cs (explicit operator EnumWrapper): use
	g_value_get_flags() rather than g_value_get_enum() when
	appropriate.

	* glib/glue/value.c (glibsharp_value_holds_flags): glue for that

	* gtk/gtk-api.raw: regen to pick up child properties

	* gtk/Gtk.metadata:
	* gtk/Container.custom: hide the auto-generated
	Gtk.Container.ChildGetProperty and implement a nicer one by hand.

	* gtk/glue/container.c (gtksharp_container_child_get_property):
	utility function to set up an appropriate GValue for us

svn path=/trunk/gtk-sharp/; revision=35702
2004-11-05 16:47:15 +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
d9f518cd57 2004-07-09 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : allow null for ctor(GLib.Object).

svn path=/trunk/gtk-sharp/; revision=31408
2004-07-23 14:54:48 +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
Mike Kestner
73632b2747 2004-05-28 Mike Kestner <mkestner@ximian.com>
* generator/ObjectGen.cs : adjust to ObjectManager ns change.
	* glib/ManagedValue.cs : move to GLib and internalize.
	* glib/Object.cs : adjust to ObjectManager ns change.
	* glib/ObjectManager.cs : move to GLib.
	* glib/TypeConverter.cs : move to GLib.  return ManagedValue.GType
	when we can't match a type instead of GType.None.
	* gtk/*.custom: adjust for new TypeConverter ns and behavior.

2004-05-28  Mike Kestner  <mkestner@ximian.com>

	* en/* : run updater. fix a few *Sharp copy/pastisms.

svn path=/trunk/gtk-sharp/; revision=28362
2004-05-28 16:59:21 +00:00
Mike Kestner
ffe268c415 2004-05-17 Mike Kestner <mkestner@ximian.com>
* generator/SignalHandler.cs : fix some broken/redundant generation in
	the Object/Struct wrapping for sig params.
	* glib/Object.cs : internalize/protect lots of API that shouldn't need
	to be used by non-subclass/non-glib code. Return GType.Object as GType.
	* glib/Value.cs : use internal GLib.Object.NativeType prop.
	* sample/TestDnd.cs : use ToString instead of TypeName.

svn path=/trunk/gtk-sharp/; revision=27530
2004-05-17 17:52:00 +00:00
Mike Kestner
27a3f69caf 2004-05-10 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : fix GBoxed GLib.Value setting.
	[fixes #58229]

svn path=/trunk/gtk-sharp/; revision=27045
2004-05-10 18:54:14 +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
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
3595f79bc3 2004-04-13 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : fix a csc-breaker.

svn path=/trunk/gtk-sharp/; revision=25437
2004-04-13 20:54:49 +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
Gonzalo Paniagua Javier
7cdacd91af 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* glib/Value.cs: added StructLayout attribute as requested by the
	runtime. Now --aot works again.

svn path=/trunk/gtk-sharp/; revision=25128
2004-04-07 03:41:13 +00:00
Mike Kestner
f445ce3b19 2004-04-01 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : NULL check for g_value_get_string Thanks to Jeroen
	Zwartepoorte for the bug report with patch [fixes #54979].

svn path=/trunk/gtk-sharp/; revision=24910
2004-04-01 17:10:27 +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
Radek Doulik
21ddf92108 2004-02-17 Radek Doulik <rodo@ximian.com>
* glib/Value.cs: use g_value_set_pointer for
	GType.Pointer/IWrapper objects

	* glib/TypeConverter.cs: return GType.Pointer for Opaque objects
	which do not have GType property

svn path=/trunk/gtk-sharp/; revision=23197
2004-02-17 21:49:24 +00:00
Mike Kestner
46b9b156a4 2004-02-16 Mike Kestner <mkestner@ximian.com>
* glib/TypeConverter.cs : check for GType prop on all types,
	not just value types, before we fall back to managed values.
	* glib/Value.cs : use handle to set_boxed for IWrappers.

svn path=/trunk/gtk-sharp/; revision=23158
2004-02-17 05:09:13 +00:00
Mike Kestner
75f7d1226d 2004-02-03 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : remove double free of ManagedValues. Fixes the
	unfiled (cough, tberman, cough) bug in managed types as tree
	store values.

svn path=/trunk/gtk-sharp/; revision=22745
2004-02-03 15:42:58 +00:00
Mike Kestner
d723bf3cef 2004-02-03 Mike Kestner <mkestner@ximian.com>
* glib/ManagedValue.cs : null check on Free.
	* glib/Value.cs : some ManagedValue rework because we unset now.

svn path=/trunk/gtk-sharp/; revision=22728
2004-02-03 06:24:42 +00:00
Mike Kestner
84781a4d74 2004-02-02 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : add dispose queue and idle handler so we can
	unset GValues that are created by the binding ctors.
	[Fixes #53490]

svn path=/trunk/gtk-sharp/; revision=22709
2004-02-02 18:21:02 +00:00
Mike Kestner
d4f6f6e928 2004-01-27 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : only g_free values we allocate.
	[Fixes #51180]

svn path=/trunk/gtk-sharp/; revision=22559
2004-01-28 03:59:14 +00:00
Mike Kestner
fc42fa2c04 2004-01-27 Mike Kestner <mkestner@ximian.com>
* glib/TypeConverter.cs : lookup GTypes for boxed value types.
	* glib/Value.cs : fix boxed type handling in object ctor.
	[Fixes #51043]

svn path=/trunk/gtk-sharp/; revision=22555
2004-01-27 23:55:13 +00:00
Mike Kestner
6ec923833e 2004-01-13 Mike Kestner <mkestner@ximian.com>
* generator/Signal.cs : use ValueArray to assemble parms arg for
	g_signal_chain_from_overriden call.  Initialize retval GValue for
	above.
	* glib/Object.cs : g_signal_chain_from_overridden parms are IntPtrs.
	* glib/TypeConverter.cs : handle unboxed ValueTypes.
	* glib/Value.cs : handle unboxed struct types.  add ctor for init'd
	unset Values.
	* glib/ValueArray.cs : new binding for GValueArray used by VMs.
	* glue/valuearray.c : field accessors
	* glue/Makefile.am : add new glue file
	* glue/makefile.win32 : add new glue file
	[Fixes #52680]

svn path=/trunk/gtk-sharp/; revision=22069
2004-01-14 18:05:50 +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
912980c396 2003-11-04 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : add set to Val prop
	* glue/Makefile.am : build nodestore.c
	* glue/makefile.win32 : link nodestore.o
	* glue/nodestore.c : new, glue for TreeModel implementation
	* gtk/NodeStore.cs : new tree store implementation
	* gtk/ITreeNode.cs : new interface for nodestore node types
	* gtk/TreeNode.cs : abstract class for deriving nodestore nodes
	* gtk/TreeNodeAttribute.cs : tree node marking attr
	* gtk/TreeNodeValueAttribute.cs : node column marking attr
	* gtk/TreeView.custom : add ctor(NodeStore)

svn path=/trunk/gtk-sharp/; revision=19630
2003-11-04 23:20:15 +00:00
Mike Kestner
686688d760 2003-10-15 Mike Kestner <mkestner@ximian.com>
* generator/Property.cs : use new Opaque value ctor and
	rework get/set blocks for Opaque types. [Fixes #47959]
	* glib/Opaque.cs : kill explicit IntPtr operator.
	* glib/Value.cs : rework Opaque value ctor.

svn path=/trunk/gtk-sharp/; revision=19088
2003-10-15 20:13:50 +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
3353e2d35e 2003-06-14 Mike Kestner <mkestner@speakeasy.net>
* glib/Value.cs : cast uint to TypeFundamentals

svn path=/trunk/gtk-sharp/; revision=15386
2003-06-14 17:40:51 +00:00
Rachel Hestilow
fe699e9fbb 2003-05-29 Rachel Hestilow <rachel@nullenvoid.com>
* gconf/Value.cs: Update to use new string marshalling.

	* generator/StringGen.cs, ConstStringGen.cs: Added.
	* generator/IGeneratable.cs: Add new method ToNativeReturn.
	* generator/CallbackGen.cs: Implement ToNativeReturn. Call
	ToNativeReturn for the return statement. Fix a couple of
	places where s_ret was being used incorrectly for m_ret.
	* generator/ClassGen.cs, EnumGen.cs, ManualGen.cs,
	SimpleGen.cs, StructBase.cs: Implement ToNativeReturn.
	* generator/SignalHandler.cs: Call ToNativeReturn for the
	return statement, instead of CallByName.
	* generator/SymbolTable.cs: Use StringGen for gchar, char,
	and gunichar, and ConstStringGen for their const variants.
	Add a new method wrapper for ToNativeReturn.
	(Trim): Add a special-case for const strings so that the
	const is not stripped. Otherwise there is no way of
	resolving the const case.

	* glade/XML.custom: Update to use new string marshalling.

	* glib/Marshaller.cs: Added.
	* glib/GException.cs, Markup.cs, ObjectManager.cs,
	Value.cs: Update to use new string marshalling.
	* glib/Object.cs: Remove old g_type_name DllImport
	as it is no longer used.

	* glue/fileselection.c (gtksharp_file_selection_get_fileop_entry):
	Mark this as const return.

	* gtk/ColorSelection.custom, FileSelection.custom,
	SelectionData.custom: Update to use new string marshalling.

svn path=/trunk/gtk-sharp/; revision=15286
2003-06-10 18:09:47 +00:00
Rachel Hestilow
4faf8b6b74 2003-05-22 Rachel Hestilow <rachel@nullenvoid.com>
* glib/ManagedValue.cs, glib/Value.cs: A few old-style
	DllImports snuck in during my last commit; update them
	to use Win32 dll names.

svn path=/trunk/gtk-sharp/; revision=14819
2003-05-22 23:39:04 +00:00
Rachel Hestilow
f1a77c0e62 2003-05-19 Rachel Hestilow <rachel@nullenvoid.com>
* glib/ManagedValue.cs, TypeConverter.cs: Added.
	* glib/Value.cs: Make Value inherit from IDisposable, and
	move dtor to Dispose. Add generic object constructor
	with support for ManagedValue. Add a new Val property
	which will call the appropriate explicit cast.

	* glue/value.c: Add new glue function
	gtksharp_value_get_value_type.

	* gtk/TreeViewColumn.custom: Added.
	* gtk/ListStore.custom, TreeStore.custom: Add a number
	of SetValue overloads. Add convenience functtion
	AppendValues. Add new ctor that takes System.Type instead
	of GLib.TypeFundamentals. Add a GetValue convenience wrapper.
	* gtk/TreeView.custom: Add AppendColumn convenience
	functions.

	* sample/ManagedTreeViewDemo.cs: Added.
	* sample/Makefile.in: Update.
	* sample/TreeViewDemo.cs: Update to use new convenience
	APIs.

svn path=/trunk/gtk-sharp/; revision=14691
2003-05-19 07:18:52 +00:00
Mike Kestner
c0b574a686 2003-02-21 Mike Kestner <mkestner@speakeasy.net>
* mapdllnames.pl : a little whitespace action
	* api/*-api.xml : move to win32 dllnames
	* */makefile.win32 : remove the mapdllnames step
	* */*.cs : move to win32 dllnames
	* */*.custom : move to win32 dllnames
	* sources/gtk-sharp.sources : move to win32 dllnames

svn path=/trunk/gtk-sharp/; revision=11823
2003-02-22 04:34:56 +00:00
Radek Doulik
07b8de88cc 2002-11-17 Radek Doulik <rodo@ximian.com>
* glib/Value.cs: cast Typefundamentals.* to uint (GType is
	unsigned int), fix Value (GLib.Object) - use new GetGType method

	* glib/Object.cs: new GetGType method, returns _obj GType

svn path=/trunk/gtk-sharp/; revision=9063
2002-11-18 18:55:39 +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
Vladimir Vukicevic
dd061f70b1 * glib/ObjectManager.cs, glue/type.c: If there isn't
an exact match for a C GObject class (i.e. BluecurveStyle),
walk up the gobject type hierarchy until we find a type
that we do have a wrapper for, and return that.  This means
that you'll always, worst-case, end up with a GObject.

* glib/Value.cs, glue/value.c: Added default constructor
to GLib.Value() that creates a new value with a type of
INVALID, and changed the glue function to not call
gtk_type_init if INVALID is passed.

svn path=/trunk/gtk-sharp/; revision=7994
2002-10-05 05:12:00 +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
Rachel Hestilow
414a14d93e 2002-06-24 Rachel Hestilow <hestilow@ximian.com>
* glib/UnwrappedObject.cs: New class which holds an IntPtr.
	This is used in Value so that we can retrieve the IntPtr itself
	for an object property.

	* glib/Value.cs: Add UnwrappedObject cast operator.

	* glib/Property.cs: If the retrieved value is an object,
	and there is no wrapper object, create a new one.

svn path=/trunk/gtk-sharp/; revision=5440
2002-06-24 23:38:51 +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
Rachel Hestilow
acc160cd01 2002-06-23 Rachel Hestilow <hestilow@ximian.com>
* glib/Object.cs, glib/SList.cs, glib/Value.cs, gtk/Application.cs:
	Move documentation to right before their actual methods, rather
	than the DllImported ones.

	* generator/Method.cs: Generate documentation before the actual
	method and not the DllImport.

svn path=/trunk/gtk-sharp/; revision=5423
2002-06-23 18:49:33 +00:00
Mike Kestner
e1b9f7343a 2002-06-05 Mike Kestner <mkestner@speakeasy.net>
* generator/Property.cs : Fix get{} GLib.Value passing.
	* glib/Object.cs : GetProperty passes the GLib.Value now.
	* glib/Value.cs : Add a ctor to create Values for props.
	* glue/value.c : add gtksharp_value_create_from_property.

svn path=/trunk/gtk-sharp/; revision=5133
2002-06-05 21:59:10 +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
b5c0054787 2002-04-19 Mike Kestner <mkestner@speakeasy.net>
* glib/SList.cs : A more sane approach.
	* glib/Value.cs : Marshal strings directly with pinvoke

svn path=/trunk/gtk-sharp/; revision=3913
2002-04-19 16:17:47 +00:00