Commit Graph

541 Commits

Author SHA1 Message Date
Dan Winship
900b14290c * parser/gapi2xml.pl: make note of _get_type methods for enums
* */*-api.xml: Regen, adding gtype="..." to many enum types

	* generator/EnumGen.cs (Generate): if the enum has the
	"gtype" property, add a GTypeAttribute pointing to an internal
	FooGType class whose GType property can be used to get the enum's
	GType.

	* generator/ObjectGen.cs:
	s/ObjectManager.RegisterType/GType.Register/

	* glib/GTypeAttribute.cs: attribute for indicating a property that
	will return the GType of a type (particularly for enums, which
	can't have GType properties added to them).

	* glib/GType.cs: renamed from Type.cs to match the type name
	(public static readonly GType ...): add a few missing types.
	(Register): moved from ObjectManager.RegisterType
	(LookupGType): moved from TypeConverter.LookupType and extended to
	handle GTypeAttribute. Also, fix mappings for sbyte/byte/char, and
	return specific GTypes for Object subclasses rather than always
	returning GType.Object.	[Fixes #74699]
	(LookupType): moved from ObjectWrapper.LookupType
	(ToString): return the type name
	
	* glib/Object.cs (RegisterGType):
	s/ObjectManager.Register/GType.Register/
	(LookupGType): Make this protected internal so GType can access
	it.

	* glib/ObjectManager.cs (RegisterType): deprecate in favor of
	GType.Register.
	(LookupType): moved to GType
	
	* glib/TypeConverter.cs (LookupType): now a deprecated wrapper
	around GType.LookupGType.

	* glib/Value.cs: Use GType casts rather than TypeConverter

	* gtk/NodeStore.cs (ScanType):
	* gtk/ListStore.custom (ListStore): 
	* gtk/TreeStore.custom (TreeStore): Use (GType) cast rather than
	TypeConverter. Remove the error check and exception, since the
	cast never returns GType.Invalid. (The check probably predates
	GLib.ManagedValue.)

	* gnome/PanelAppletFactory.cs (Register): Use a GType cast rather
	than GLib.Object.LookupGType (which is no longer accessible after
	an mcs bugfix)

	* sample/GtkDemo/DemoIconView.cs (CreateStore): use the Type[]
	constructor rather than the GType[] constructor, since it
	translates typeof(Gdk.Pixbuf) correctly now.

svn path=/trunk/gtk-sharp/; revision=44038
2005-05-04 16:54:24 +00:00
Dan Winship
a7d8b64f7a * generator/Parameters.cs (Parameters.Validate): If the parameters
end with "callback, gpointer, GDestroyNotify", then mark the
	callback as having "notified" Scope.
	(Parameters.IsHidden): Hide user_data and GDestroyNotify after a
	callback.
	(Parameter.Scope): make this settable
	(Parameter.IsDestroyNotify): new test

	* generator/MethodBody.cs (Initialize): Handle "notified" callback
	scope (using a GCHandle and GLib.DestroyHelper.NotifyHandler)

	* generator/CallbackGen.cs (GenWrapper): Add a static
	"GetManagedDelegate" method to the wrapper type, to translate a
	native delegate back to its corresponding managed delegate.
	(FromNative): use GetManagedDelegate.

	* generator/ReturnValue.cs (Validate): We handle callback return
	values now

	* generator/SymbolTable.cs: marshal GDestroyNotify as
	GLib.DestroyNotify

	* glib/DestroyNotify.cs: Moved from gtk

	* gtk/Gtk.metadata: globally change GtkDestroyNotify to
	GDestroyNotify, but then change back the ones that are exposed in
	the API. Un-hide lots of methods we can correctly autogenerate
	now.

	* gtk/DestroyHelper.cs: moved to glib

	* gtk/*.custom: remove methods that are autogenerated now, add
	Obsolete wrappers where needed, replace Gtk.DestroyHelper usage
	with GLib.DestroyHelper.

	* gdk/Gdk.metadata: 
	* gnome/Gnome.metadata: Turn Gdk.Drawable.SetData and
	Gnome.IconList.SetIconDataFull's GDestroyNotify args into
	gpointers so the generated API stays the same as it used to be.

	* rsvg/Handle.custom: implement deprecated SetSizeCallback

	* sample/GtkDemo/DemoIconView.cs (CreateSort): update for API
	changes

svn path=/trunk/gtk-sharp/; revision=44020
2005-05-04 11:47:25 +00:00
Dan Winship
faa783fba7 * gnome/Gnome.metadata: mark GnomeTriggerActionFunction's char**
param const

        * glib/Marshaller.cs (Utf8PtrToString): Add an IntPtr[]->string[]
        overload, since that's what we actually need in the case where
        it's used (above). Leave the IntPtr[]->string[] overload of
        PtrToStringGFree in case anyone is using it manually.

        * gtk/Gtk.metadata: hide GtkModuleInitFunc and
        GtkModuleDisplayInitFunc; they are the signatures of user-defined
        methods that gtk only ever resolves via g_module_symbol(), so
        they're not useful from C#. (And the marshalling was all wrong
        anyway...)

svn path=/trunk/gtk-sharp/; revision=43461
2005-04-22 19:43:46 +00:00
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
e56d2feafc kill useless .cvsignore files
svn path=/trunk/gtk-sharp/; revision=43355
2005-04-20 20:11:00 +00:00
Dan Winship
abbec2b649 * configure.in: Add an --enable-debug flag, to build .mdb files
for all of the assemblies

	* Makefile.include:
	* gconf/GConf/Makefile.am:
	* gconf/GConf.PropertyEditors/Makefile.am:
	* glib/Makefile.am:
	* gtkdotnet/Makefile.am (CLEANFILES): add $(ASSEMBLY).mdb
	$(ASSEMBLY): build with $(CSFLAGS). Always delete $(ASSEMBLY).mdb
	before building $(ASSEMBLY), so that if you first build with
	debugging enabled, then update, then rebuild without debugging
	enabled, you don't end up with an out-of-date .mdb file.

svn path=/trunk/gtk-sharp/; revision=42791
2005-04-11 14:56:29 +00:00
Mike Kestner
e3a26238b6 2005-03-31 Mike Kestner <mkestner@novell.com>
* glib/ManagedValue.cs : add null/NULL guarding to Copy, Free, 
	WrapObject, and ObjectForWrapper.  [Fixes #74197]

svn path=/trunk/gtk-sharp/; revision=42434
2005-03-31 16:31:31 +00:00
Mike Kestner
9001c6fa25 2005-03-29 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs : special case ucs4 "0" conversion.
	[Fixes #74175]

svn path=/trunk/gtk-sharp/; revision=42337
2005-03-29 15:28:02 +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
d4af78e347 2005-03-24 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : don't create native delegates for nulls.
	* generator/ObjectGen.cs : revamp the ObjectManager code.
	* glib/Object.cs : use new ObjectManager.RegisterType overload.
	* glib/ObjectManager.cs : rewrite to kill the lameass LoadWithPartial
	hack and keep a GType to Type mapping for quicker lookup/activation.

svn path=/trunk/gtk-sharp/; revision=42241
2005-03-24 22:47:50 +00:00
Mike Kestner
17dc787956 remove some c.wls
svn path=/trunk/gtk-sharp/; revision=42222
2005-03-24 16:22:49 +00:00
Mike Kestner
c14d107865 2005-03-23 Mike Kestner <mkestner@novell.com>
* glib/Makefile.am : add new file.

svn path=/trunk/gtk-sharp/; revision=42169
2005-03-23 20:39:18 +00:00
Mike Kestner
ac4cc59206 2005-03-23 Mike Kestner <mkestner@novell.com>
* gapi-cdecl-insert : a little perl script to insert modopts
	* Makefile.am : dist the new script.
	for cdecl callback delegates on win32.
	* glade/makefile.win32 : use gapi-cdecl-insert
	* glade/XML.custom : add [GLib.CDeclCallback] to RawXMLConnectFunc.
	* glib/makefile.win32 : use gapi-cdecl-insert
	* glib/CDeclCallbackAttribute.cs : new attr to tag delegates with
	that will be invoked from native code. We have to mangle the il
	with a modopt otherwise they are stdcall'd.
	* glib/ManagedValue.cs : add [GLib.CDeclCallback] to Copy/Free.
	switch to using GCHandles instead of the current IntPtr hack.

svn path=/trunk/gtk-sharp/; revision=42168
2005-03-23 20:35:15 +00:00
John Luke
b9831cc33e 2005-03-15 John Luke <john.luke@gmail.com>
* glib/Object.cs: use IsDefined to check for ClassInitializer
        attribute, fixes a warning and is supposedly better for performance


svn path=/trunk/gtk-sharp/; revision=41839
2005-03-15 16:40:24 +00:00
Mike Kestner
64073ff268 2005-03-12 Mike Kestner <mkestner@novell.com>
* glib/Makefile.am : add new file.
	* glib/Object.cs : add protected PersistentData hash to hold data
	across GC cycles.
	* glib/WeakObject.cs : new object to hold managed refs weakly against
	the native object.
	* gtk/ListStore.custom : hold refs for DefaultSortFuncs.
	* gtk/TreeModelSort.custom : hold refs for DefaultSortFuncs.
	* gtk/TreeStore.custom : hold refs for DefaultSortFuncs.

svn path=/trunk/gtk-sharp/; revision=41740
2005-03-12 22:19:44 +00:00
Mike Kestner
bd50999b1b 2005-03-12 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : don't derive Wrappers from DelegateWrapper
	any more.  It leaks delegates like crazy. We effectively now use call
	scope as the default for delegate parameters.
	* generator/MethodBody.cs : use new simpler Wrapper ctor.
	* glib/DelegateWrapper.cs : mark the ctor obsolete so people know to
	update any manually coded wrappers out there.
	* */*.custom : use new simpler Callback Wrapper ctors.

svn path=/trunk/gtk-sharp/; revision=41738
2005-03-12 18:54:53 +00:00
Mike Kestner
8983ea960c 2005-03-11 Mike Kestner <mkestner@novell.com>
* glib/DelegateWrapper.cs : call g_object_set_data_full since we are
	using its sig, not set_data.

svn path=/trunk/gtk-sharp/; revision=41711
2005-03-11 18:01:47 +00:00
Mike Kestner
ac91f1c8b1 2005-03-10 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs : don't use g_utf8_strlen to determine the byte
	count to be copied, it returns chars, not bytes.
	* glib/glue/unichar.c : implement a quick and dirty strlen glue func.

svn path=/trunk/gtk-sharp/; revision=41661
2005-03-10 20:33:57 +00:00
Mike Kestner
ae7d9dfbf9 2005-03-09 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs : add IntPtr.Zero guarding.

svn path=/trunk/gtk-sharp/; revision=41607
2005-03-09 17:01:35 +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
0b0700bae6 2005-03-04 Mike Kestner <mkestner@novell.com>
* generator/ImportSignature.cs : out param handling fix.
	* generator/Makefile.am : kill StringGen.cs.
	* generator/MethodBody.cs : simplify out param handling.
	* generator/StringGen.cs : kill it, now using MarshalGen.
	* generator/SymbolTable.cs : make non-const strings use an appropriate
	MarshalGen.  Non-const strings are now correctly marshaled as Utf8.
	* glib/Marshaller.cs : add some utf8-fu for strdup/free marshaling.
	Add a method to alloc/copy structs to native memory, unused yet.
	* gtk/Gtk.metadata : partially fix a broken delegate.

svn path=/trunk/gtk-sharp/; revision=41459
2005-03-04 18:59:09 +00:00
Mike Kestner
0677e5ac75 2005-03-03 Mike Kestner <mkestner@novell.com>
* generator/ClassBase.cs : use "as" instead of a cast in FromNative.
	* generator/Method.cs : remove the if/else checks for Object retvals.
	* glib/Object.cs : return null immediately for NULL in GetObject.

svn path=/trunk/gtk-sharp/; revision=41409
2005-03-03 20:50:46 +00:00
Mike Kestner
57972ab070 2005-02-28 Mike Kestner <mkestner@novell.com>
* glib/Idle.cs : add locking on the source_handlers.
	* glib/Source.cs : add locking on the source_handlers.
	* glib/Timeout.cs : add locking on the source_handlers.

svn path=/trunk/gtk-sharp/; revision=41290
2005-02-28 18:11:24 +00:00
Mike Kestner
6d70444302 2005-02-25 Mike Kestner <mkestner@novell.com>
* glib/Source.cs : remove from the hash by key.
	* glib/Idle.cs : remove from the hash by key.

svn path=/trunk/gtk-sharp/; revision=41208
2005-02-25 18:18:10 +00:00
Mike Kestner
f120479d88 2005-02-03 Mike Kestner <mkestner@novell.com>
* glib/ObjectManager.cs (GetValidParentType): return null if
	G_TYPE_INVALID is returned from glue. [Fixes #72150]

svn path=/trunk/gtk-sharp/; revision=40063
2005-02-03 14:27:24 +00:00
Mike Kestner
6590388024 2005-02-02 Mike Kestner <mkestner@novell.com>
* generator/Makefile.am : remove source file.
	* generator/Signal.cs : generate marshaling callbacks and use new
	GLib.Signal marshaling class for events.
	* generator/SignalHandler.cs : kill. byebye SignalCallback subclasses.
	* glib/Makefile.am : update source files.
	* glib/GLibSharp.voidObjectIntPtrSignal.cs : kill.
	* glib/Object.cs : mark the old Before/After props Obsolete. Use
	GLib.Signal for the notify prop methods.
	* glib/Signal.cs : new signal marshaling class.  It manages all the 
	ConnectBefore/After stuff internally and connects itself to the native
	object using GCHandles and DestroyNotify lifecycle management.
	* glib/SignalCallback.cs : mark Obsolete.
	[Fixes #72018 and #69847]

svn path=/trunk/gtk-sharp/; revision=40007
2005-02-02 21:57:15 +00:00
Mike Kestner
a8f16beaa7 2005-02-01 Fredrik Nilsson <jymdman@home.se>
* glib/Marshaller.cs : DateTime marshaling fix.

svn path=/trunk/gtk-sharp/; revision=39952
2005-02-01 22:35:48 +00:00
Dan Winship
de70fff09f * glib/Object.cs (AddNotification, RemoveNotification): methods to
subscribe to the "notify" signal (with property details). [#71684]

	* glib/GLibSharp.voidObjectIntPtrSignal.cs: autogenerated, for
	notifications

	* glib/NotifyHandler.cs: sort of autogenerated

svn path=/trunk/gtk-sharp/; revision=39717
2005-01-28 16:44:30 +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
Dan Winship
67e7fc486b * glib/Marshaller.cs (StringFormat): Calls String.Format and makes
sure the output has no unescaped "%"s. (For wrapping printf-style
	unmanaged methods with String.Format-style managed ones.)

	* gtk/MessageDialog.custom (MessageDialog): use it. #71405. Also,
	use gtk_message_dialog_new_with_markup by default, and add an
	overloaded ctor that lets you use the non-markup version.

	* gtk/Gtk.metadata: hide the GtkMessageDialog ctors so we don't
	get ellipsis warnings about them.

	* sample/GtkDemo/DemoApplicationWindow.cs:
	* sample/GtkDemo/DemoDialog.cs: simplify the MessageDialog usage;
	don't need to call String.Format separately now.

svn path=/trunk/gtk-sharp/; revision=39256
2005-01-20 15:45:13 +00:00
Dan Winship
7a30d17a4d * glib/Object.cs (ConnectDefaultHandlers): Don't call a signal's
ConnectionMethod if it's already been called for a superclass of
	the current class. #71278

svn path=/trunk/gtk-sharp/; revision=38957
2005-01-14 19:54:07 +00:00
Mike Kestner
b6b39dbbfe 2005-01-11 Mike Kestner <mkestner@novell.com>
* glib/Argv.cs : add automatic progname handling.
	* gdk/Global.custom : kill obsolete warnings by using GLib.Argv.

svn path=/trunk/gtk-sharp/; revision=38729
2005-01-11 20:49:50 +00:00
Mike Kestner
8fd87b2e0a 2005-01-08 Mike Kestner <mkestner@novell.com>
* configure.in : kill a ton of redundant stuff.
	* AssemblyInfo.cs.in : moved here, only need one.
	* Makefile.include : rules for building generated assemblies.
	* Makefile.am : removed gtk-sharp-2.0.pc handling.
	* */AssemblyInfo.cs.in : killed
	* */Makefile.am : refactored out a ton of rules to an include.
	* */*-pc.in : added Cflags entries pointing to the gapi files.
	* generator/CodeGenerator.cs : add -I: synonym --include.
	* gnomevfs/gnome-vfs-api.raw : remamed from gnomevfs-api.raw.
	* gtk/gtk-sharp-2.0.pc.in : moved here from top.
	* parser/gapi-fixup.cs : add --symbol arg to merge sym files.
	* sources/gtk-sharp-sources.xml : remamed gnome-vfs-api.raw.

svn path=/trunk/gtk-sharp/; revision=38551
2005-01-09 00:26:45 +00:00
Mike Kestner
56a0288b7b 2004-12-30 Mike Kestner <mkestner@novell.com>
* glib/Object.cs : mark the Data hashtable obsolete.

svn path=/trunk/gtk-sharp/; revision=38201
2004-12-30 18:59:09 +00:00
Mike Kestner
adef5f7bbd 2004-12-23 Mike Kestner <mkestner@novell.com>
* glib/ClassInitializerAttribute.cs : new attr for identifying type.
	inialization methods to be run by RegisterGType.
	* glib/Makefile.am : add file.
	* glib/Object.cs : add private method to invoke ClassInitializers.
	* gtk/glue/widget.c : some new glue for binding registration.
	* gtk/BindingAttribute.cs : new attr for registering key bindings.
	* gtk/Makefile.am : add file.
	* gtk/Widget.custom : add ClassInitializer method to scan types
	for [Binding] and register key bindings.

svn path=/trunk/gtk-sharp/; revision=38074
2004-12-23 22:59:59 +00:00
Mike Kestner
e38ece1fdb 2004-12-21 Mike Kestner <mkestner@novell.com>
* glib/Argv.cs : argv marshaling class.
	* glib/Makefile.am : add file.
	* glib/Marshaller.cs : mark the argv methods obsolete.
	* gtk/Application.cs : use GLib.Argv. [Fixes #68812]

svn path=/trunk/gtk-sharp/; revision=38046
2004-12-21 19:47:55 +00:00
Dan Winship
a610fb9a79 * generator/GUnicharGen.cs: generatable for gunichar, using
GLib.Marshaller.CharToGUnichar and .GUnicharToChar [#70704]

        * generator/SymbolTable.cs (SymbolTable): add a GUnicharGen.

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

        * parser/gapi2xml.pl (addPropElem): g_param_spec_unichar() has
        type "gunichar" not "unichar".

        * gtk/gtk-api.raw: Regen

        * glib/Marshaller.cs: Import CharToGUnichar's glue method by the
        right name

svn path=/trunk/gtk-sharp/; revision=37998
2004-12-20 22:05:21 +00:00
Mike Kestner
256bc09aee 2004-12-16 Tambet Ingo <tambet@ximian.com>
* glib/Opaque.cs : hold a weakref in the hash, not a strong ref.

svn path=/trunk/gtk-sharp/; revision=37840
2004-12-16 17:09:58 +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
Todd Berman
6d9785c7f7 2004-12-01 Todd Berman <tberman@off.net>
* generator/StructGen.cs: Check to see if a GType is going to be
        generated. If not, generate a GType.Pointer. This fixes bug
        #70017.
        * glib/TypeConverter.cs: Remove the .IsValueType check, as those
        now have GType properties.
        * gda/Gda.metadata: Change GdaValue.GType to GdaValue.GdaType.
        * doc/en/Gda/Value.xml: Regenerated to reflect new API.

svn path=/trunk/gtk-sharp/; revision=36912
2004-12-01 21:41:10 +00:00
Mike Kestner
70d245e7fe 2004-11-30 Mike Kestner <mkestner@novell.com>
* glib/glue/value.c : add back some code lost in the merge of
	2-4-branch. [Fixes #70045]


svn path=/trunk/gtk-sharp/; revision=36845
2004-11-30 14:36:10 +00:00
Dan Winship
9d04b4dd06 Redo child property handling; now we generate classes to hold
the
        child properties for a given widget in a container, and generate
        the child properties as properties on those classes.
        
        * parser/gapi2xml.pl (addPropElem): don't prepend "child_" to
        child prop names any more

        * generator/ClassBase.cs (ClassBase): keep childprops separate
        from properties
        (GenChildProperties): create a subclass of Gtk.ContainerChild
        containing the container type's child properties, and override
the
        Container indexer to return that type.

        * generator/ObjectGen.cs (Generate): call GenChildProperties

        * generator/Property.cs:
        * generator/ChildProperty.cs: Simplify these a bunch, since
        * child
        properties are now represented as C# properties as well. Also
add
        [GLib.Property(cname)] and [Gtk.ChildProperty(cname)]
attributes.

        * glib/Makefile.am (sources): add PropertyAttribute.cs

        * glib/PropertyAttribute.cs: attribute used to label
        GObject properties

        * gtk/Makefile.am (sources): add ChildPropertyAttribute.cs

        * gtk/gtk-api.raw: regenerate for parser changes (remove
        "Child"/"child_" from child property names).

        * gtk/ChildPropertyAttribute.cs: attribute used to label
        GtkContainer child properties

        * gtk/Container.custom: define the ContainerChild class, and an
        indexer to return instances of it.

        * doc/en/Gtk/: update for container child property change

svn path=/trunk/gtk-sharp/; revision=36284
2004-11-18 20:31:22 +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
Mike Kestner
cd10436742 2004-11-09 Mike Kestner <mkestner@novell.com>
* */Makefile.am : make the Obsolete warnings shaddup.

svn path=/trunk/gtk-sharp/; revision=35999
2004-11-11 03:58:14 +00:00
Dan Winship
e1dc10e4c8 * glib/Object.cs (CreateNativeObject): virtualize
(Object(GType)): Mark this ctor Obsolete

	* gtk/Gtk.metadata: disable the generated GType ctor on Gtk.Widget

	* gtk/Widget.custom (Widget, CreateNativeObject,
	Widget_ParentSet): Connect to our own ParentSet event from
	CreateNativeObject and the GType ctor, and keep a static Hashtable
	of parented widgets, so that adding a managed widget to a
	container keeps both the GObject and the managed object alive.

	* generator/ObjectGen.cs (GenCtors): handle the disable_gtype_ctor
	flag. Also, mark GType ctors [Obsolete]

svn path=/trunk/gtk-sharp/; revision=35885
2004-11-09 14:22:39 +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
Todd Berman
532947448e 2004-11-04 Todd Berman <tberman@off.net>
* glib/ListBase.cs: In Empty, call FreeList, not Dispose.

svn path=/trunk/gtk-sharp/; revision=35665
2004-11-04 20:01:40 +00:00
Todd Berman
838882b81a 2004-11-04 Todd Berman <tberman@off.net>
* glib/ListBase.cs: Make sure to properly check if it is a
        GLib.Object subclass.

svn path=/trunk/gtk-sharp/; revision=35654
2004-11-04 19:43:10 +00:00
Todd Berman
cac3c4a368 2004-11-04 Todd Berman <tberman@off.net>
* doc/en/GLib/ListBase.xml: Add documentation for ListBase.Empty
        * glib/ListBase.cs: Add ListBase.Empty, frees the children and the
        list.
        * glib/Markup.cs: Fix Alex's tomboy crash, sending -1 instead of
        Length.
        * gtk/FileChooserDialog.custom:
        * gtk/FileChooserWidget.custom: properly free the list.

svn path=/trunk/gtk-sharp/; revision=35650
2004-11-04 19:29:01 +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
a5ee1fee3b mark Boxed [Obsolete]
svn path=/trunk/gtk-sharp/; revision=35191
2004-10-21 01:08:10 +00:00
Mike Kestner
cd85c4b3de 2004-09-29 Mike Kestner <mkestner@ximian.com>
* glib/GString.cs : new marshaling class for GStrings.  Used by
	generator to map GString params and returns onto managed strings.
	* glib/Makefile.am : add new file.

svn path=/trunk/gtk-sharp/; revision=34523
2004-09-29 17:47:51 +00:00
Mike Kestner
d75f4ef6ca 2004-09-26 Mike Kestner <mkestner@ximian.com>
* glib/Idle.cs : proxy hash keys are uints, not ints.

svn path=/trunk/gtk-sharp/; revision=34420
2004-09-27 00:28:16 +00:00
Miguel de Icaza
95978e0ce7 2004-09-18 Miguel de Icaza <miguel@ximian.com>
* glib/Source.cs: Add new base class to hold the method to be
	called, and the proxy handler we use to keep references to them
	and avoid a collection.

	Exposes a new variables that references all the active Timeouts
	and Idle handlers to avoid collection/

	* glib/Timeout.cs: Implement TimeoutProxy that acts as a filter to
	remove the proxy when the timeout is removed.

	Register a TimeoutProxy when we create a timeout.

	* glib/Idle.cs: Implement IdleProxy that acts as a filter to
	remove the proxy when the idle handler is removed.

	Register an IdleProxy when we create a timeout.

svn path=/trunk/gtk-sharp/; revision=34094
2004-09-20 16:43:16 +00:00
Mike Kestner
0d9c6b74e2 kill a C.WL
svn path=/trunk/gtk-sharp/; revision=33124
2004-08-31 19:18:28 +00:00
Mike Kestner
da322c565f 2004-08-31 Mike Kestner <mkestner@ximian.com>
* glib/Marshaller.cs : fix utc offseting for time_tToDateTime.
	[Fixes #60960]

svn path=/trunk/gtk-sharp/; revision=33107
2004-08-31 16:36:32 +00:00
Mike Kestner
b6bd5a901a 2004-08-30 Tambet Ingo <tambet@ximian.com>
* glib/ListBase.cs : indexing bugfix for CopyTo.

svn path=/trunk/gtk-sharp/; revision=33038
2004-08-30 13:10:44 +00:00
Mike Kestner
7a395905ac 2004-08-25 Mike Kestner <mkestner@ximian.com>
* generator/Signal.cs : use typeof instead of Type.GetType to
	specify the event args type.
	* glib/ObjectManager.cs : beef up the type lookup code using
	Assembly.LoadWithPartialName to fix a very popular win32 bug.
	[Fixes #61139 and friends]  Thanks to John Luke for expert
	patch testing on win32.

svn path=/trunk/gtk-sharp/; revision=32831
2004-08-25 18:16:17 +00:00
John Luke
0343bf93e6 2004-08-25 John Luke <john.luke@gmail.com>
* glib/MainLoop.cs: MainLoop implementation by Jeroen
        [Fixes #61493]

svn path=/trunk/gtk-sharp/; revision=32830
2004-08-25 18:11:41 +00:00
Mike Kestner
fdcc41a70b 2004-08-17 Mike Kestner <mkestner@ximian.com>
* pango/Pango.metadata : metadata for the pango audit.
	* pango/*.custom : customizations to fix audited API.
	* doc/en/* : docs for some api changes and additions.
	* glib/Marshaller.cs : some gunichar marshal-fu.
	* glib/glue/unichar.c : a new glue method.

svn path=/trunk/gtk-sharp/; revision=32462
2004-08-17 20:43:49 +00:00
Mike Kestner
5c0078ec1c 2004-07-24 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide Window.Destroy.
	* gdk/Window.custom : manually impl Destroy since it releases our ref.
	* glib/Object.cs : support unset of Raw values.

svn path=/trunk/gtk-sharp/; revision=31448
2004-07-24 23:36:39 +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
652b7fc82f remove a bunch of doc comments
svn path=/trunk/gtk-sharp/; revision=30951
2004-07-09 15:25:39 +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
Todd Berman
80726b6454 2004-06-12 Todd Berman <tberman@sevenl.net>
* glib/ObjectManager.cs: change CreateInstance overload being used
        to properly pick up protected ctors.

svn path=/trunk/gtk-sharp/; revision=29412
2004-06-12 17:48:58 +00:00
Mike Kestner
112f066abf 2004-06-11 Mike Kestner <mkestner@ximian.com>
* configure.in : deal with a csc-ism in source paths.
	* */Makefile.am : use the GENERATED_SOURCES var.
	* */glue/Makefile.am : add -no-undefined for win32 dll builds.

svn path=/trunk/gtk-sharp/; revision=29367
2004-06-11 18:19:41 +00:00
Mike Kestner
c1440d52d1 2004-06-10 Mike Kestner <mkestner@ximian.com>
* configure.in : AC_SUBST GACUTIL_FLAGS. require mono-0.95 (though
	it's really cvs bleeding edge.)
	* * AssemblyInfo.cs.in : s/pub/snk.  delaysign=no.
	* * Makefile.am : s/pub/snk.  portability fixes to csc from John
	Luke.  Switch to GACUTIL_FLAGS.
	* doc/Makefile.am : don't build docs, install raw xml to the prefix.

svn path=/trunk/gtk-sharp/; revision=29227
2004-06-10 19:45:20 +00:00
Todd Berman
32116e27c7 2004-06-09 Todd Berman <tberman@sevenl.net>
* gdk/Gdk.metadata: mark Window.SetBackPixmap as null_ok.
        * glib/Object.cs: in set_Raw, if value == IntPtr.Zero, dont put that
        in the weakref hashtable, as it creates later issues with gtk+
        returning null and gtk# mistaking if for an object.

svn path=/trunk/gtk-sharp/; revision=29126
2004-06-09 17:53: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
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
2eada8c950 2004-05-27 Mike Kestner <mkestner@ximian.com>
* glib/Object.cs: mark GType property public.

svn path=/trunk/gtk-sharp/; revision=28286
2004-05-27 16:35:21 +00:00
Mike Kestner
7a518421ab 2004-05-25 Mike Kestner <mkestner@ximian.com>
* configure.in : don't expand the GAPI Makefile.
	* parser/Makefile.am : remove SUBDIRS.
	* parser/gapi2xml.pl : remove GAPI::Metadata usage.
	* parser/GAPI/* : kill. long live gapi-fixup.

svn path=/trunk/gtk-sharp/; revision=28085
2004-05-25 21:27:41 +00:00
Mike Kestner
9f54a63375 2004-05-19 Mike Kestner <mkestner@ximian.com>
* gtk/Container.custom : add CallbackInvoke and use it in OnForall.

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

	* generator/Makefile.am : add TimeTGen.cs
	* generator/SymbolTable.cs : use new TimeTGen.
	* generator/StringGen.cs : s/GLibSharp/GLib
	* generator/TimeTGen.cs : generatable to marshal time_t.
	* glib/time_t_CustomMarshaler.cs : kill
	* glib/Makefile.am : remove time_t_CustomMarshaler.cs
	* glib/Markup.cs : s/GLibSharp/GLib
	* glib/Marshaller.cs : move to GLib namespace. Add methods to
	marshal time_t to and from DateTime.
	* glib/glue/time_t.c : kill
	* glib/glue/Makefile.am : remove time_t.c
	* glib/glue/makefile.win32 : remove time_t.o
	* gnome/*.custom : use GLib.Marshaller instead of the time_t custom
	marshaler.
	* gtk/*.custom : s/GLibSharp/GLib

svn path=/trunk/gtk-sharp/; revision=27704
2004-05-19 18:57:28 +00:00
Zoltan Varga
fed2de1fe7 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
* glib/time_t_CustomMarshaler.cs: Fix custom marshalling after runtime
	changes.

svn path=/trunk/gtk-sharp/; revision=27621
2004-05-18 19:19:37 +00:00
Mike Kestner
0d052516f1 2004-05-18 Mike Kestner <mkestner@ximian.com>
* glib/MissingIntPtrCtorException.cs : new exception to throw if
	unable to access an IntPtr ctor on a GLib.Object subclass.  We need
	an IntPtr ctor to be able to wrap arbitrary object handles.
	* glib/Object.cs : have NativeType call LookupGType.
	* glib/ObjectManager.cs : throw the new exception in a try/catch.

svn path=/trunk/gtk-sharp/; revision=27563
2004-05-18 05:06:10 +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
Todd Berman
e474eaca89 2004-05-14 Todd Berman <tberman@sevenl.net>
* glib/Object.cs: make static GLib.Object.LookupGType protected for now.        * gtk/CellRenderer.custom: code to allow for subclassing and
        implementing a custom cell renderer.
        * gtk/Makefile.am: add custom to build.
        * gtk/glue/Makefile.am: add glue to build.
        * gtk/glue/cellrenderer.c: glue code to override get_size and render
        from cellrenderer.
        * sample/CustomCellRenderer.cs: new sample to show how to implement a
        custom cell renderer.
        * sample/Makefile.am: add CustomCellRenderer sample.

svn path=/trunk/gtk-sharp/; revision=27426
2004-05-14 20:25:57 +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
01acd7f576 2004-05-05 Mike Kestner <mkestner@ximian.com>
* generator/Signal.cs : rmv Handle param to SignalCallback ctor calls.
	s/GtkSharp.Signal*/GLib.Signal*.
	* generator/SignalHandler.cs : rmv Handle param to ctors as it's
	redundant.  s/GtkSharp.Signal*/GLib.Signal*. Use new Connect/Disconnect
	instead of generating DllImports into libgobject directly.
	* glib/SignalArgs.cs : move the the GLib namespace.
	* glib/SignalCallback.cs : expose Connect and Disconnect methods to
	hide some pinvokes that were previously generated. Also move to the
	GLib namespace.
	gnome/*Handler.cs : update to new SignalHandler API.
	gnome/CanvasProxy.cs : ditto
	gnome/void*Signal.cs : ditto

svn path=/trunk/gtk-sharp/; revision=26778
2004-05-05 18:24:04 +00:00
Mike Kestner
57f06abbfe 2004-05-03 Mike Kestner <mkestner@ximian.com>
* */Makefile.am : fix gacutil for new package switch
	* */*.pc.in : fix -libs var for new dll path

svn path=/trunk/gtk-sharp/; revision=26644
2004-05-03 21:05:51 +00:00
Mike Kestner
866254b519 hush
svn path=/trunk/gtk-sharp/; revision=26602
2004-05-03 16:26:00 +00:00
Mike Kestner
01ef68965d 2004-04-30 Mike Kestner <mkestner@ximian.com>
* configure.in : lookup gacutil and error out if not found.
	* */Makefile.am : add install-data-local and uninstall-local targets
	for GAC installation.  Add gtk-sharp.pub target to cp the key in for
	distcheck.
	* */AssemblyInfo.cs.in : remove ../ from key path for VPATH build.

svn path=/trunk/gtk-sharp/; revision=26485
2004-05-01 03:38:54 +00:00
Mike Kestner
14e3877005 2004-04-30 Mike Kestner <mkestner@ximian.com>
* configure.in : remove BASE_DEPENDENCIES LIBS and CFLAGS and
	expose more specific versions for glue building.
	* */glue/Makefile.am : use more specific versions of LIBS and CFLAGS
	to reduce the ldd footprint.

svn path=/trunk/gtk-sharp/; revision=26438
2004-04-30 19:08:16 +00:00
Mike Kestner
5f80b97227 2004-04-30 Mike Kestner <mkestner@ximian.com>
* configure.in : AC_SUBST an API_VERSION=1.0.0.0 for the
	AssemblyVersionAttributes.
	* */AssemblyInfo.cs.in : s/@VERSION@/@API_VERSION@/

svn path=/trunk/gtk-sharp/; revision=26435
2004-04-30 18:24:16 +00:00
Mike Kestner
687219d656 2004-04-30 Mike Kestner <mkestner@ximian.com>
* */AssemblyInfo.cs.in : s/@VERSION@.0.0/@VERSION@/

svn path=/trunk/gtk-sharp/; revision=26431
2004-04-30 16:55:15 +00:00
Mike Kestner
e4c7f28e66 2004-04-29 Mike Kestner <mkestner@ximian.com>
* configure.in : expand the AssemblyInfo.cs files.
	* */AssemblyInfo.cs.in : new assembly info files.
	* */Makefile.am : dist, make, and clean assmbly info files.

svn path=/trunk/gtk-sharp/; revision=26356
2004-04-29 22:19:30 +00:00
Owen Fraser-Green
ce55d821aa Minor fixed to get gstreamer working.
svn path=/trunk/gtk-sharp/; revision=26341
2004-04-29 21:21:57 +00:00
Mike Kestner
9bc8928f88 2004-04-29 Mike Kestner <mkestner@ximian.com>
* configure.in : expand the new config files.
	* */*config.in : the per-assembly config files.
	* */Makefile.am : dist, clean, and install the configs.
	* gnome/*.c* : fix some errant DllImports.

svn path=/trunk/gtk-sharp/; revision=26301
2004-04-29 15:00:24 +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
Mike Kestner
e7bf3a279f 2004-04-07 Mike Kestner <mkestner@ximian.com>
* generator/ClassBase.cs : remove default ctor generation and
	hasDefaultConstructor field.
	* generator/Ctor.cs : chain to base (IntPtr.Zero).
	* generator/StructBase.cs : remove hasDefaultConstructor usage.
	* glib/Object.cs : remove Object () ctor.  Add Ben's GetGType
	method, although nothing uses it yet.  Still working on integrating
	the remainder of Ben's patch.
	* gtk/Gtk.metadata : remove all the disabledefaultctor rules.
	* */*.custom : add base (IntPtr.Zero) or this (...) chaining for
	all ctors.

svn path=/trunk/gtk-sharp/; revision=25184
2004-04-07 19:15:01 +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
05e4e0b9d3 2004-04-04 Mike Kestner <mkestner@ximian.com>
* generator/SymbolTable.cs : don't use StringGen for gunichar.
	* glib/glue/unichar.c : glue to fetch a gunichar as a utf8 string.
	* glib/glue/Makefile.am : add unichar.c
	* glib/glue/makefile.win32 : add unichar.c
	* gtk/Gtk.metadata : hide TextIter.GetChar
	* gtk/TextIter.custom : manually impl Char prop. [fixes #53425]

svn path=/trunk/gtk-sharp/; revision=25054
2004-04-05 18:31:34 +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
1a1f5e1702 2004-03-16 Mike Kestner <mkestner@ximian.com>
* generator/ObjectGen.cs : don't gen a Signals hash per class.
	* generator/Signal.cs : gen checks for [ConnectBefore].
	* generator/SignalHandler.cs : add connect_flags param to ctor.
	* glib/ConnectBeforeAttribute.cs : new attr
	* glib/Makefile.am : add new file
	* glib/Object.cs : add before/after hashes and EventLists
	* gnome/CanvasProxy.cs : use AfterSignals and AfterHandlers.

svn path=/trunk/gtk-sharp/; revision=24157
2004-03-16 19:43:04 +00:00
Mike Kestner
5e03bca76f hush
svn path=/trunk/gtk-sharp/; revision=24156
2004-03-16 19:24:53 +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
Zoltan Varga
d39ef22678 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
* glib/time_t_CustomMarshaler.cs: Update after custom marshaling
	changes.

svn path=/trunk/gtk-sharp/; revision=23018
2004-02-12 12:26:25 +00:00
Mike Kestner
cbd7afb761 2004-02-06 Mike Kestner <mkestner@ximian.com>
* glib/time_t_CustomMarshaler.cs : use TimeSpan.TotalSeconds, not
	TimeSpan.Seconds.

svn path=/trunk/gtk-sharp/; revision=22842
2004-02-06 19:49:02 +00:00
Mike Kestner
4251d47fe9 2004-02-04 Mike Kestner <mkestner@ximian.com>
* generator/CustomMarshalerGen.cs : impl MarshalReturnType.
	* generator/Method.cs : add CustomMarshalerGen return type handling.
	* generator/Property.cs : rework property type selection.
	* generator/SymbolTable.cs : add time_t mapping
	* glib/time_t_CustomMarshaler.cs : impl native to managed methods.
	* glue/time_t.c : remove debugging code.

svn path=/trunk/gtk-sharp/; revision=22772
2004-02-04 19:54:46 +00:00
Mike Kestner
1a679f2356 2004-02-03 Mike Kestner <mkestner@ximian.com>
* glib/List.cs : add a ctor overload to create empty lists with
	a specific element_type.
	* glib/SList.cs : ditto

svn path=/trunk/gtk-sharp/; revision=22765
2004-02-04 17:21:22 +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
ae5ab001be 2004-01-29 Mike Kestner <mkestner@ximian.com>
* glib/time_t_CustomMarshaler.cs : new custom marshaler form time_t.
	* glue/time_t.c : glue for time_t.
	* glue/Makefile.am : add time_t.c
	* glue/makefile.win32 : ditto

svn path=/trunk/gtk-sharp/; revision=22595
2004-01-29 21:20:59 +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
Peter Williams
4feed7bb77 2004-01-18 Peter Williams <peter@newton.cx>
* glib/Marshaller.cs (ArrayPtrToArgv, ArgvToArrayPtr): new
	functions for marshalling and unmarshalling string arrays
	to/from char **. Not pretty, but lets us call gtk_init()
	in Gtk.

	* gtk/Application.cs (do_init): New helper function to handle
	passing args to Gtk. Uses above functions.
	(Init): Use do_init, take a new progname parameter.
	(InitCheck): Same.

doc/:

2003-01-13  Peter Williams  <peter@newton.cx>

	* en/Gtk/Application.xml: Update Init, InitCheck functions
	for new progname argument. Fix a paste-o in the docs for InitCheck.

svn path=/trunk/gtk-sharp/; revision=22237
2004-01-19 03:24:25 +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
6e3879ca4b 2003-12-30 Mike Kestner <mkestner@ximian.com>
* glib/Object.cs (ConnectDefaultHandlers): reflection code to
	hook up overridden default signal handlers.
	* glue/type.c  (gtksharp_override_virtual_method): peek the gtype
	and ref the class if it isn't created yet.
	* sample/Subclass.cs : update to override Button.OnClicked.

svn path=/trunk/gtk-sharp/; revision=21559
2003-12-30 22:09:42 +00:00
John Luke
7e9700901f add Idle.Remove method
svn path=/trunk/gtk-sharp/; revision=21483
2003-12-24 19:37:41 +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
ba1d3996a4 2003-12-10 Mike Kestner <mkestner@ximian.com>
* generator/CallbackGen.cs : kill ref_owned generation
	* generator/ClassBase.cs : use simple GetObject w/o ref_owned
	* generator/ManagedCallString.cs : new class to generate native
	to managed method calls.
	* generator/Method.cs : kill ref_owned generation
	* generator/MethodBody.cs : kill ref_owned generation
	* generator/Property.cs : kill ref_owned generation
	* generator/Signal.cs : generate delegates and vtable connect
	methods for all signals. Mark VMs with new attr.
	* generator/StructBase.cs : kill ref_owned generation
	* glib/DefaultSignalHandlerAttribute.cs : new attr to mark
	virtual methods.
	* glib/Object.cs : add overload for GetObject that defaults
	to ref_owned=false. Add extern for VM override glue.

svn path=/trunk/gtk-sharp/; revision=21005
2003-12-10 22:56:49 +00:00
Mike Kestner
bc37b4ff76 2003-12-08 Mike Kestner <mkestner@ximian.com>
* generator/Signal.cs : add virtual method generation for the
	default signal handlers.
	* glib/Object.cs : add g_signal_chain_from_overridden extern

svn path=/trunk/gtk-sharp/; revision=20920
2003-12-09 05:01:22 +00:00
Mike Kestner
4ff326786d 2003-12-04 Mike Kestner <mkestner@ximian.com>
* glib/Object.cs : kill unused WrapperClassAttribute. [#51458]

svn path=/trunk/gtk-sharp/; revision=20781
2003-12-04 17:59:31 +00:00
Ettore Perazzoli
7a10147c5c * sample/TestDnd.cs: New.
* gtk/TargetEntry.custom: New.

* glue/dragcontext.c: New.

* glib/Object.cs: New public property TypeName in class Object.

* gdk/DragContext.custom: New.

svn path=/trunk/gtk-sharp/; revision=20754
2003-12-03 20:23:25 +00:00
Miguel de Icaza
f1e095a87b 2003-11-27 Miguel de Icaza <miguel@ximian.com>
* glib/Log.cs: Make LogLevelFlags CLS compliant.

	* glib/SignalCallback.cs: Set the constructor protection level to
	protected, since it can not be instantiate.d

	* glib/Marshaller.cs: Do not allow instances of this class as it
	only exposes static methods.

	* glib/Source.cs, glib/FileUtils.cs, glib/Timeout.cs,
	glib/Thread.cs, glib/Markup.cs, glib/TypeConverter.cs: Ditto.

svn path=/trunk/gtk-sharp/; revision=20573
2003-11-28 05:29:34 +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
Daniel Kornhauser Eisenberg
737717e5a5 2003-10-27 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* glib/ListBase.cs : Added Indexer to allow [] based adressing
        * glib/List.cs : Added DllImport for Indexer
        * glib/SList.cs : Added DllImport for Indexer

svn path=/trunk/gtk-sharp/; revision=19420
2003-10-27 04:58:42 +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
3f0273bece 2003-10-10 Mike Kestner <mkestner@ximian.com>
* */makefile.win32 : remove api dir from build and fix clean target

svn path=/trunk/gtk-sharp/; revision=18864
2003-10-10 18:58:19 +00:00
Mike Kestner
732cdf7729 2003-10-08 Mike Kestner <mkestner@ximian.com>
* */Makefile.in : rework the prefix handling for duncan's packaging.

svn path=/trunk/gtk-sharp/; revision=18778
2003-10-08 22:13:47 +00:00
Mike Kestner
9eeca84abe 2003-10-07 Mike Kestner <mkestner@ximian.com>
* glib/ListBase.cs : assume ref_owned=false for GObject lists.
	[Fixes #49145]

svn path=/trunk/gtk-sharp/; revision=18710
2003-10-07 18:08:32 +00:00
Rachel Hestilow
69e51261af 2003-09-17 Rachel Hestilow <rachel@nullenvoid.com>
* glib/DelegateWrapper.cs: Remove 'RemoveIfNotAlive'
	and revamp the memory management to use destroy
	notification.

	* generator/CallbackGen.cs: Do not generate the call to
	RemoveIfNotAlive.

	* gtk/GtkSharp.GtkClipboardGetFuncNative,
	GtkSharp.GtkClipboardClearFuncNative: Do not call
	RemoveIfNotAlive.

svn path=/trunk/gtk-sharp/; revision=18163
2003-09-18 03:49:18 +00:00
Gonzalo Paniagua Javier
0663cb37ba 2003-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* gdk/Pixbuf.custom: use windows dll name. Removed DllImport that is
	already in the generated file.

	* glib/Thread.cs: use windows dll name.

	* gtk/ThreadNotify.cs: close <remark> comment.

svn path=/trunk/gtk-sharp/; revision=17731
2003-08-30 00:26:38 +00:00
Gonzalo Paniagua Javier
0996f5f7fd 2003-08-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* gconf/GConf/Value.cs: implemented support for lists.

	* glib/ListBase.cs: implemented the IDisposable stuff and created a
	new method, FreeList, to free the list when needed.

	* glade/HandlerNotFoundException.cs: make it derive from
	SystemException. Don't override Message, the message is created in the
	.ctor.

svn path=/trunk/gtk-sharp/; revision=17646
2003-08-26 21:26:30 +00:00
John Luke
350fd53fa7 2003-08-19 John Luke <jluke@cfl.rr.com>
* glib/ListBase.cs:  Add convenience .Append (string) method

svn path=/trunk/gtk-sharp/; revision=17416
2003-08-19 21:07:24 +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
Martin Willemoes Hansen
55683e5118 * glib/Object.cs: Changed getData, setData to a single Data property
Different keys are allowed now.

svn path=/trunk/gtk-sharp/; revision=15915
2003-07-04 07:13:19 +00:00
Martin Willemoes Hansen
34f971ceb1 glib/Type.cs: Added ToString
svn path=/trunk/gtk-sharp/; revision=15589
2003-06-23 21:46:31 +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
Gonzalo Paniagua Javier
1840bd7ef1 2003-04-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* glib/Object.cs:
	(GetObject): check that the target of the WeakReference is still there. Otherwise,
	create a new wrapper for the IntPtr.

	This fixes the random nullrefs when running nunit-gtk.

svn path=/trunk/gtk-sharp/; revision=13450
2003-04-09 17:50:51 +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
Martin Baulig
73ae9d533f 2003-03-23 Martin Baulig <martin@ximian.com>
* glib/Object.cs (Dispose): Call `Objects.Remove (_obj)' here
	instead of in PerformQueuedUnrefs().

svn path=/trunk/gtk-sharp/; revision=12764
2003-03-23 18:05:36 +00:00
Miguel de Icaza
215133d780 2003-03-15 Miguel de Icaza <miguel@ximian.com>
* sample: Update samples to new Glade.Widget.

	* glade/WidgetAttribute.cs: Moved the old GladeWidgetattribute
	here.   Now its called `Glade.WidgetAttribute'.

	* glade/GladeWidgetAttribute.cs: Removed

	* glib/Idle.cs: Do not allow Idle class to be instantiated.

svn path=/trunk/gtk-sharp/; revision=12554
2003-03-15 21:02:25 +00:00
Miguel de Icaza
1c5b25f9a1 2003-03-11 Miguel de Icaza <miguel@ximian.com>
* gtk/Application.cs (CurrentEvent): Property implementing the
	suggestion from Paolo.

	* glib/Object.cs (Dispose): Destructor might be invoked in a
	thread, queue the object for destruction using the Gtk idle
	handler.   We perform the real destruction of the object in the
	same thread as the Gtk+ main thread.

svn path=/trunk/gtk-sharp/; revision=12551
2003-03-15 20:49:37 +00:00
petr
9d2efb1474 RegisterGType can handle deeper namespace levels now
svn path=/trunk/gtk-sharp/; revision=12420
2003-03-11 08:33:24 +00:00
Miguel de Icaza
e547fa0e3f 2003-03-02 Miguel de Icaza <miguel@ximian.com>
* glib/Markup.cs: Add new file.

svn path=/trunk/gtk-sharp/; revision=12114
2003-03-03 01:42:26 +00:00
Gonzalo Paniagua Javier
4a6b18ee0f 2003-02-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* generator/Parser.cs: use XmlDocument.Load (Stream). The one using
	(String) expects an uri.

	* generator/Signal.cs: always remove the delegate from the signal
	callback (prior to this, the last handler was not being removed).
	Dispose the callback (ie, disconnect from the signal) when there are
	no registered delegates to handle it.

	* generator/SignalHandler.cs: added 2 new fields to hold the instance
	and the handler ID. The finalization is now done in Dispose and
	disconnects the signal handler when no delegate will handle the signal.
	Changed gobject-2.0 to libgobject-2.0-0.dll.

	* glib/SignalCallback.cs: implemented IDisposable interface.

svn path=/trunk/gtk-sharp/; revision=11976
2003-02-26 02:16:38 +00:00
Mike Kestner
470c852770 oops forgot a cvs add
svn path=/trunk/gtk-sharp/; revision=11921
2003-02-24 06:44:54 +00:00
Mike Kestner
95fc33f785 2003-02-24 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs : gen GLib.Value ctor, not uint
	* glib/Object.cs : use GLib.Type in RegisterGType and
	  make the g_object_new ctor use GLib.Type.
	* glib/Type.cs : new thin wrapper for GValue type
	* glib/*.cs : s/Type/System.Type

svn path=/trunk/gtk-sharp/; revision=11920
2003-02-24 06:39:30 +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
Mike Kestner
2c3cae3be8 2003-02-13 Mike Kestner <mkestner@speakeasy.net>
* glib/Boxed.cs : fix a ctor bug reported to the list by
	u900842@oz.nthu.edu.tw.

svn path=/trunk/gtk-sharp/; revision=11564
2003-02-14 01:16:05 +00:00
Radek Doulik
395c0cdf6f 2003-02-08 Radek Doulik <rodo@ximian.com>
* glib/MainContext.cs: beginning of MainContext class, just
	Iteration and Pending methods to be able to refresh Gtk in the
	middle of time consuming function where it's not worth while to
	use threads

	* glue/style.c (gtksharp_gtk_style_get_font_description): new
	function to access style's font_description field

	* gtk/Style.custom: added font description property

svn path=/trunk/gtk-sharp/; revision=11358
2003-02-08 17:33:17 +00:00
Gonzalo Paniagua Javier
97fec24e46 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* glib/SignalCallback.cs: new methods AddDelegate and RemoveDelegate.

	* generator/Signal.cs: add/remove signal handlers from the delegate used
	to invoke them.

	* generator/SignalHandler.cs: use Delegate instead of MulticastDelegate.

svn path=/trunk/gtk-sharp/; revision=11255
2003-02-06 00:58:02 +00:00
Radek Doulik
0d2387f900 make Unref method public, it's needed for reparenting widgets
svn path=/trunk/gtk-sharp/; revision=10792
2003-01-21 21:43:12 +00:00
Johannes Roith
01f0577b8c remove console printings
svn path=/trunk/gtk-sharp/; revision=10364
2003-01-10 22:23:19 +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
Alp Toker
0098411b00 2002-12-23 Alp Toker <alp@atoker.com>
* glib/Thread.cs: Add a class for thread awareness
        * gdk/Threads.cs: ditto

svn path=/trunk/gtk-sharp/; revision=9839
2002-12-23 04:35:44 +00:00
Robert McQueen
5c87903756 2002-12-22 Robert McQueen <robot101@debian.org>
* makefile: when doing distclean, attempt distclean on all the
        C# subdirs too
        * gconf/Makefile.in: added distclean target to rm the Makefiles
        in the subdirs of gconf/
        * glue/Makefile.am: build libgtksharpglue as an unversioned
        module to avoid so -> so.0 -> so.0.0 symlink mess
        * */Makefile.in: call mkinstalldirs before installing any files
        so that subdirs can be installed seperately or in any sequence
        (eg binding dirs before native dirs)

svn path=/trunk/gtk-sharp/; revision=9828
2002-12-22 05:08:52 +00:00
Gonzalo Paniagua Javier
41ed17399e 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* glib/Log.cs: removed the IntPtr argument and keep a reference to
	the delegate passed to unmanaged world as suggested by rachel.

svn path=/trunk/gtk-sharp/; revision=9586
2002-12-12 06:51:47 +00:00
Gonzalo Paniagua Javier
3b3535767f Fixed build with csc. Thanks Mike!
svn path=/trunk/gtk-sharp/; revision=9520
2002-12-10 07:00:48 +00:00
Gonzalo Paniagua Javier
f88c5e2603 2002-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* glib/Log.cs: New file. Wraps a few logging functions. Useful for
	debugging.

svn path=/trunk/gtk-sharp/; revision=9517
2002-12-10 05:41: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
Vladimir Vukicevic
58f6f01d45 * glib/Object.cs: add needs_ref boolean that controls whether
we need to ref this object once we have a pointer to it or not.
By default this is set to true -- constructors and other functions
where we do own the object need to set this to false before setting
the "Raw" property.  Also added Unref and RefCount methods.

* glue/object.c, glue/type.c: some utility functions for
refcounting support

* gdk/Pixbuf.custom: manually wrap a few functions so that
the refcount ends up being correct at the end (need an extra Unref)

* api/gdk-api.xml, sources/Gdk.metadata: metadata updates for
hiding manually-wrapped Pixbuf stuff

svn path=/trunk/gtk-sharp/; revision=8913
2002-11-10 10:09:05 +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
Ettore Perazzoli
cf139575c2 Changed so that Objects is a hash of
WeakReferences instead of hashing the real objects.  Without this
change, GObjects were never collected.
(Raw, set): Put a WeakReference to the object in Objects.
(Object.GetObject): Get the WeakReference from Objects, and from
there the actual object.
(Object.DisposeNative): Remove the Raw pointer from Objects.

svn path=/trunk/gtk-sharp/; revision=8578
2002-10-26 08:37:48 +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
Miguel de Icaza
f95bf9dbbd 2002-10-20 Miguel de Icaza <miguel@ximian.com>
* glib/Object.cs: Avoid recursive calls with the previous operator
	!= and operator ==

svn path=/trunk/gtk-sharp/; revision=8418
2002-10-20 07:16:22 +00:00
Duncan Mak
f94df39a18 2002-10-19 Duncan Mak <duncan@ximian.com>
* glib/Source.cs: Added.

svn path=/trunk/gtk-sharp/; revision=8412
2002-10-19 23:18:59 +00:00
Miguel de Icaza
39885119ee Am very sorry, very sorry
svn path=/trunk/gtk-sharp/; revision=8411
2002-10-19 23:15:05 +00:00
Miguel de Icaza
88d38246f5 2002-10-19 Miguel de Icaza <miguel@ximian.com>
* glib/Object.cs: Added operator != and operator == overloads.

svn path=/trunk/gtk-sharp/; revision=8400
2002-10-19 20:03:51 +00:00
Mike Kestner
58b5241e6f 2002-10-14 Mike Kestner <mkestner@speakeasy.net>
* glib/Object.cs (GetObject): remove (int) cast

svn path=/trunk/gtk-sharp/; revision=8277
2002-10-15 04:07:24 +00:00
Martin Baulig
604034053a 2002-10-11 Martin Baulig <martin@gnome.org>
* glib/ListBase.cs (ListBase.Append): New public method.
	(ListBase.Prepend): New public method.

svn path=/trunk/gtk-sharp/; revision=8168
2002-10-11 15:43:52 +00:00
Martin Baulig
52f04d5a61 2002-10-11 Martin Baulig <martin@gnome.org>
* glib/FileUtils.cs: New file.  Wrapped g_file_get_contents() here.

svn path=/trunk/gtk-sharp/; revision=8167
2002-10-11 15:41:49 +00:00
Vladimir Vukicevic
f0f44bf010 * glib/GException.cs: g_clear_error takes
a GError **, not a GError *.  Added refs to get the **.

svn path=/trunk/gtk-sharp/; revision=8026
2002-10-06 02:12:04 +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
Ricardo Fernández Pascual
f1011f687e 2002-09-13 Ricardo Fernndez Pascual <ric@users.sourceforge.net>
* glade/HandlerNotFoundExeception.cs: Added.
	* glade/Makefile.in
	* glade/XML.custom: Support for autoconnecting signals using
	reflection.
	* glib/SignalAttribute.cs: Added.
	* generator/Signal.cs: Mark events generated from glib signals
	with the "Signal" attribute.
	* sample/GladeTest.cs
	* sample/Makefile.in
	* sample/test.glade: Test of signal autoconnection.

svn path=/trunk/gtk-sharp/; revision=7430
2002-09-13 11:38:36 +00:00
Miguel de Icaza
c9434076c5 2002-09-11 Miguel de Icaza <miguel@ximian.com>
* glib/Object.cs (DisposeNative): Call GC.SuppressFinalize, and
	set the obj to null.

svn path=/trunk/gtk-sharp/; revision=7411
2002-09-12 19:21:46 +00:00
Rachel Hestilow
32ae593a0e 2002-09-11 Rachel Hestilow <hestilow@ximian.com>
* glib/Object.cs (Ref): Added.

	* gtk/Object.custom (Ref): Overload. Note that we were reffed.
	(DisposeNative): Unref if we were explicitly reffed.

	* generator/Method.cs: Call Ref if needs_ret is set.
	* generator/StructBase.cs: Call Ref on all object accessors.

	* glue/style.c: Ref returned GCs.

	* sources/Gtk.metadata: Set needs_ret on various gdk-related
	accessors in GtkWidget. Hide Ref/Unref methods on Widget and
	RcStyle as these ought to be deprecated anyway.

svn path=/trunk/gtk-sharp/; revision=7380
2002-09-12 05:21:16 +00:00
Mike Kestner
ab081f8358 2002-09-04 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs : generate dtors.
	* glib/Object.cs : Implement IDisposable. Add a new DisposeNative
	method. Implement default dtor.
	* glue/object.c : new gtksharp_object_unref_if_floating method.
	* gtk/Object.custom : override DisposeNative to check float bit.

svn path=/trunk/gtk-sharp/; revision=7235
2002-09-04 05:25:58 +00:00
Gonzalo Paniagua Javier
31fe10076e 2002-09-01 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
* glib/ListBase.cs: fixed compilation (the base class must be at least
	as accesible as the derived ones).

svn path=/trunk/gtk-sharp/; revision=7169
2002-09-01 10:40:24 +00:00
Rachel Hestilow
c8d090f62f 2002-08-31 Rachel Hestilow <hestilow@ximian.com>
Proper GList, GSList support. Read-only for now.

	* glue/list.c: Added.
	* glue/Makefile.am: Add list.c
	* glue/type.c: Add function gtksharp_is_object.

	* glib/ListBase.cs, List.cs: Added.
	* glib/SList.cs: Inherit from ListBase.
	* glib/Object.cs: Add static method "IsObject".

	* generator/Method.cs: Pass on element_type to constructor
	if specified.
	* generator/SymbolTable.cs: Move GList to manual types.

	* sample/GladeViewer.cs: Remove list hacks.

	* sources/Gnome.metadata: Specify element types for
	CanvasPathDef.Split and IconList.GetSelection. Rename
	CanvasPathDef *to methods to properly capitalized *To.
	* sources/Gtk.metadata: Hide Widget.ListAccelClosures until
	GClosure is handled properly.
	* sources/Pango.metadata: Added.

	* sample/test/TestToolbar.cs: Compile with recent delegate changes.

svn path=/trunk/gtk-sharp/; revision=7166
2002-09-01 04:46:38 +00:00
Rachel Hestilow
a502336ccf 2002-08-31 Rachel Hestilow <hestilow@ximian.com>
* glib/Idle.cs: Added.
	* gtk/Application.cs: Add EventsPending, RunIteration.

	* sample/TreeViewDemo.cs: Add a status dialog while
	populating tree.

svn path=/trunk/gtk-sharp/; revision=7164
2002-08-31 20:37:52 +00:00
Rachel Hestilow
8f1c4ce766 2002-08-29 Rachel Hestilow <hestilow@ximian.com>
* glib/DelegateWrapper.cs: Forgot to add this.

svn path=/trunk/gtk-sharp/; revision=7141
2002-08-29 21:45:07 +00:00
Mike Kestner
15432372a6 2002-08-22 Mike Kestner <mkestner@speakeasy.net>
* glib/IWrapper.cs : remove set_Handle
	* glib/Object.cs : ditto
	* glib/Opaque.cs : ditto

svn path=/trunk/gtk-sharp/; revision=6835
2002-08-21 00:22:24 +00:00
Mike Kestner
3f76288572 2002-08-22 Mike Kestner <mkestner@speakeasy.net>
* glib/Makefile.in : rm -rf generated on make clean target
	* gnome/CanvasProxy.cs : add missing Signals hash.

svn path=/trunk/gtk-sharp/; revision=6833
2002-08-20 23:43:16 +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
Mike Kestner
903349cd37 2002-08-08 Mike Kestner <mkestner@speakeasy.net>
* generator/Method.cs : s/GetType/GetGType. Don't generated static
	  methods for interfaces.
	* glib/Object.cs : add GType prop
	* gnome/*.custom : s/Type/GType
	* parser/Gtk.metadata : rule to make TreeIter opaque
	* parser/gapi2xml.pl : handle interface methods properly
	* sample/Fifteen.cs : s/Type/GType

svn path=/trunk/gtk-sharp/; revision=6556
2002-08-09 03:56:27 +00:00
Mike Kestner
66c0ec1d43 2002-08-07 Mike Kestner <mkestner@speakeasy.net>
* generator/CodeGenerator.cs : call ObjectGen.GenerateMapper
	* generator/Method.cs : Remove the if null workaround
	* generator/ObjectGen.cs : build a hash of object types.
	(GenerateMapper): generate the GtkSharp.ObjectManager class.
	* glib/Object.cs : use ObjectManager.CreateObject.
	* glue/type.c : helper for typename lookup.

svn path=/trunk/gtk-sharp/; revision=6526
2002-08-08 04:48:41 +00:00
Rachel Hestilow
d60309616b 2002-08-05 Rachel Hestilow <hestilow@ximian.com>
* makefile, */Makefile.in: Packaging fix from
	Robert McQueen (a.k.a. Robot101).

svn path=/trunk/gtk-sharp/; revision=6455
2002-08-06 02:07:10 +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
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
Mike Kestner
65cf81eade 2002-07-11 Mike Kestner <mkestner@speakeasy.net>
* glib/SList.cs : fix a couple DllImports

svn path=/trunk/gtk-sharp/; revision=5708
2002-07-11 17:58:49 +00:00
Rachel Hestilow
02c9fb725c 2002-06-26 Rachel Hestilow <hestilow@ximian.com>
* configure.in, makefile, makefile.win32: add gnome.

	* doc/index.html, netdoc.xsl: Add gnome.

	* gdk/Event.cs: New manual wrap for GdkEvent.

	* generator/ClassBase.cs: Add methods GetProperty,
	GetPropertyRecursively, GetMethodRecursively.
	Move Parent property here from ObjectGen.cs. Pass this pointer
	into Property.

	* generator/Ctor.cs: Generate docs.

	* generator/Method.cs, Property.cs: Tag method as "new" if a
	Method/Property with the same name is found in the class hierarchy.

	* generator/SignalHandler.cs: Correctly wrap complex signal argument
	types. Add gnome directory.

	* generator/SymbolTable.cs: Add manually wrapped types hash
	(contains GLib.GSList and Gdk.Event). Add method IsManuallyWrapped.

	* glib/SList.cs: Add constructor from IntPtr.

	* glue/slist.c, glue/event.c: Added (field accessor glue).

	* glue/Makefile.am: Update.

	* parser/Gtk.metadata: Add new signal renames for new signals
	exposed by GdkEvent changes.

	* parser/README, parser/build.pl: Add libgnome, libgnomecanvas,
	libgnomeui.

	* parser/gapi2xml.pl: Handle literal-length array parameters,
	and NULL property doc strings.

	* sample/: Add new test GnomeHelloWorld.cs.

	* gnome/: Added.

	* parser/Gnome.metadata: Added.

svn path=/trunk/gtk-sharp/; revision=5461
2002-06-26 08:36:05 +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
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
f8c7fff45e 2002-06-21 Mike Kestner <mkestner@speakeasy.net>
* */makefile.win32 : add /doc flags
	* */.cvsignore : ignore .xml files

svn path=/trunk/gtk-sharp/; revision=5391
2002-06-21 12:29:04 +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
Rachel Hestilow
3bb3c5e4ff 2002-06-14 Rachel Hestilow <hestilow@ximian.com>
* glib/GException.cs: Added.

	* generator/Ctor.cs, Method.cs: Tag function as unsafe if it throws
	an exception. Call parms.HandleException.

	* generator/Paramaters.cs: Add property ThrowsException (based
	on a trailing GError**). If ThrowsException, mask GError in the
	signature, initialize a GError in Initialize, and add new method
	HandleException to throw an exception if error != null.

	* generator/SymbolTable.cs: Add gdk-pixbuf DLL, and GError type.

	* gdk.imaging, gdk.imaging/Makefile.in, gdk.imaging/makefile.win32:
	Added.

	* configure.in, Makefile, makefile.win32: Build gdk.imaging.

	* gtk/Makefile.in, gtk/makefile.win32: Link against gdk.imaging.

	* parser/gapi2xml.pl: Support namespace renaming.

	* parser/build.pl: Build gdk-pixbuf as gdk.imaging.

svn path=/trunk/gtk-sharp/; revision=5281
2002-06-14 18:27:04 +00:00
Mike Kestner
63624a886d 2002-06-06 Mike Kestner <mkestner@speakeasy.net>
* glib/Timeout.cs : new Timeout class with Add() and
	  TimeoutHandler delegate.

svn path=/trunk/gtk-sharp/; revision=5144
2002-06-06 23:17:10 +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
1129bd2e78 2002-05-29 Mike Kestner <mkestner@speakeasy.net>
* */Makefile.in : remove generated source in clean target.

svn path=/trunk/gtk-sharp/; revision=5004
2002-05-29 10:40:15 +00:00
Joe Shaw
3fec7ca60a 2002-05-08 Joe Shaw <joe@assbarn.com>
* */Makefile.in: Don't allow the shell to do file globbing; makes
	--recurse work.

	* generator/ObjectGen.cs (GenProperty): We need to cast a GLib.Value
	to a GLib.Object and then to whatever it is, because explicit casts
	don't work to child classes.
	(GenSignal): Append "EventHandler" when generating signal handlers
	so we don't get symbol conflicts.

svn path=/trunk/gtk-sharp/; revision=4414
2002-05-08 11:52:21 +00:00
Mike Kestner
07f41ef1c3 2002-05-07 Mike Kestner <mkestner@speakeasy.net>
* */Makefile.in : Add clean targets. Add -L parms.

svn path=/trunk/gtk-sharp/; revision=4400
2002-05-08 00:29:51 +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
fa98aa165a 2002-04-25 Mike Kestner <mkestner@speakeasy.net>
* autogen.sh : simple config for the glue build
	* configure.in : simple config for the glue build
	* makefile : add glue dir to build
	* glib/SList.cs : Fix some leakage.
	* glue/value.c : a helper function for heap alloc of GValues
	* glue/Makefile.am : build for libgtksharpglue

svn path=/trunk/gtk-sharp/; revision=4042
2002-04-25 09:17:54 +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
Joe Shaw
e966ffb7f7 2002-04-18 Joe Shaw <joe@assbarn.com>
* */makefile: Allow a different MCS to be passed in on the make
	command line.

svn path=/trunk/gtk-sharp/; revision=3902
2002-04-18 21:46:56 +00:00
Mike Kestner
356c9920ed 2002-03-29 Mike Kestner <mkestner@speakeasy.net>
* */makefile : add make linux target.

svn path=/trunk/gtk-sharp/; revision=3505
2002-03-30 00:18:41 +00:00
Mike Kestner
28049f1c2b 2002-03-28 Mike Kestner <mkestner@speakeasy.net>
* generator/SignalHandler.cs : switch to 2.0 libs
	* generator/SymbolTable.cs : switch to 2.0 libs
	* glib/Object.cs : switch to 2.0 libs
	* glib/SList.cs : switch to 2.0 libs
	* glib/Value.cs : switch to 2.0 libs
	* gtk/Application.cs : switch to 2.0 libs

svn path=/trunk/gtk-sharp/; revision=3468
2002-03-28 21:16:43 +00:00
Mike Kestner
f3a997ca6f 2002-03-25 Mike Kestner <mkestner@speakeasy.net>
* generator/StructBase.cs : Throttle _gtk methods.
	* generator/SymbolTable.cs : tweak dll names.
	* glib/Object.cs : restructure DllImports and prop code.
	* glib/SList.cs : restructure DllImports.
	* glib/Value.cs : restructure DllImports.
	* gtk/Application.cs : overload Init() to get past the string[]
	  marshaling crash on linux.
	* sample/HelloWorld.cs : Use App::Init() since no args are needed.

svn path=/trunk/gtk-sharp/; revision=3341
2002-03-26 01:29:43 +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
2918e60a50 2002-02-02 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs : Add IntPtr constructor generation. Pass a
	  ctor signature hash around to use in clash resolution. Generate a
	  void ctor if none is present which just calls the parent ctor.
	* generator/StructBase.cs : Add non-void signature ctor generation,
	  including collision handling logic. Collisions are implemented as
	  static methods.
	* generator/SymbolTable.cs : Map GSList to GLib.SList. Add type
	  trimming to remove trailing *'s.  Need to suppress leading const yet.
	* glib/Object.cs : Add default ctor for void and IntPtr ctors.
	* glib/SList.cs : Implementation of a wrapper class for GSLists.  Lots
	  of FIXMEs.
	* parser/gapi2xml.pl : Handle ** and array params.

svn path=/trunk/gtk-sharp/; revision=2232
2002-02-03 03:44:10 +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
Mike Kestner
9fcf82d28e 2002-01-11 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs : Add property generation.
	* generator/SymbolTable.cs : More fixage to simple_types. Add
	  GetMarshalType and IsObject methods.
	* glib/Object.cs : Rename Events prop to EventList to avoid name
	  collision. Add float, double, uint, and IntPtr GetProp and SetProp
	  methods.
	* parser/TODO : Add a couple prop related bugs to come back for.
	* parser/gapi2xml.pl (addPropElems): Restructure.  It was thoroughly
	  broken.  It's better now.

svn path=/trunk/gtk-sharp/; revision=1960
2002-01-12 02:08:16 +00:00
Mike Kestner
8648757e19 2002-01-06 Mike Kestner <mkestner@speakeasy.net>
* */makefile : Add atk to the build.
	* generator/EnumGen.cs : Create the generated dir if necessary.
	* generator/ObjectGen.cs : Create the generated dir if necessary.
	* generator/StructGen.cs : Create the generated dir if necessary.
	* parser/gapi2xml.pl : Squash bug in comma separated field defs.

svn path=/trunk/gtk-sharp/; revision=1882
2002-01-07 00:25:51 +00:00
Mike Kestner
30e653825c This is an enormous commit of stuff that I've been working on for several
weeks.  I'll be posting an update to gtk-sharp-list in a bit to describe my
latest psychosis.

svn path=/trunk/gtk-sharp/; revision=1797
2002-01-04 02:02:28 +00:00
Mike Kestner
372e7ef7de 2001-11-25 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl (get_sighandler): gen the helper class. arg
	  passing and return value handling need beefing up still.
	* glib/SignalArgs.cs : New arg passing/ return value handling class.
	* glib/SignalCallback.cs (dtor): kill, this will be gen'd in the
	  subclasses. (ctor): prune down to two params.

svn path=/trunk/gtk-sharp/; revision=1438
2001-11-25 17:06:27 +00:00
Mike Kestner
bb8d2c4ee9 2001-11-24 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : mkdir the glib/generated dir.
	(gen_signal): Call new get_sighandler sub. Doesn't use the returned
	  value yet.  s/event/ev3nt on arg names.
	(get_sighandler): new sub to lookup or gen a signal helper/delegate.
	  Only generates the delegate so far.
	* codegen/hardcoded.defs : Added a stub for Gdk.Event.
	* gdk/Event.cs : Killed, now a generated struct.
	* gdk/SimpleEvent.cs (SimpleEventCallback): Use Marshal.PtrToStructure
	  to create the Event, not a ctor(IntPtr).
	* glib/SignalCallback.cs : New abstract base class for signal helpers.

svn path=/trunk/gtk-sharp/; revision=1437
2001-11-25 00:25:47 +00:00
Mike Kestner
c3b0ed58d9 2001-10-30 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : streamline mkdir stuff.  Prune the object
	list back to just Window for now. Suppress generation of the Prop
	get/set accessor methods.
	* codegen/gdk-types.defs : Updated the 2button/3button event types
	since I don't feel like automangling them now.
	* gdk/Event.cs : Killed the now redundant EventType declaration.
	* glib/Object.cs : Override the Equals and GetHashCode methods.

svn path=/trunk/gtk-sharp/; revision=1231
2001-10-31 01:31:05 +00:00
Mike Kestner
bdec55ab35 2001-10-25 Mike Kestner <mkestner@speakeasy.net>
* glib/Object.cs : Added Get|SetProperty methods for Object
	properties.

svn path=/trunk/gtk-sharp/; revision=1204
2001-10-25 22:44:49 +00:00
Mike Kestner
aa1077bbb1 2001-10-07 Mike Kestner <mkestner@speakeasy.net>
* glib/Object.cs : Added public Handle property.  It would be nice
	if I could make the RawObject public for get and protected for set,
	but that doesn't appear to be possible with C# properties.
	* gtk/Container.cs : New class with 2 of the 3 props and the Add/Remove
	methods only implemented.
	* gtk/Widget.cs : Added SizeRequest prop which is a combination of
	HeightRequest and SizeRequest. Embrace and extend gtk...
	* gtk/Window.cs : Derive from newly added Container subclass.
	* sample/ButtonApp.cs : Simple tire-kicking app.

svn path=/trunk/gtk-sharp/; revision=1112
2001-10-07 00:41:52 +00:00
Mike Kestner
26142a99ca 2001-10-04 Mike Kestner <mkestner@speakeasy.net>
* glib/SimpleSignal.cs : Reworked to parallel SimpleEvent.

svn path=/trunk/gtk-sharp/; revision=1084
2001-10-04 23:27:19 +00:00
Mike Kestner
bda62ac3b7 2001-10-02 Mike Kestner <mkestner@speakeasy.net>
* glib/Value.cs : Tried adding CallingConvention.Cdecl to all the
	DllImports, but still couldn't get reliable Propery setting without
	periodic NullReference exceptions.  When all else fails, drop back
	and punt.
	* glib/Object.cs : Rewrote Set|GetProperty methods.  Now they use
	g_object_get|set and don't rely on GValues. The int, bool, and string
	prop types are now working reliably.
	* gtk/Window.cs : Update all Properties to use new GLib.Object
	signatures.
	* sample/HelloWorld.cs : added some more property usage for testing
	purposes.

svn path=/trunk/gtk-sharp/; revision=1048
2001-10-02 01:27:44 +00:00
Mike Kestner
14cf53f336 2001-09-29 Mike Kestner <mkestner@speakeasy.net>
* glib/Value.cs (int ctor): New constructor for int-based values.
	(int exp cast): New explicit cast operator for Val to int conversion.
	* gtk/Window.cs (DefaultHeight): New prop.
	(DefaultWidth): New prop.

svn path=/trunk/gtk-sharp/; revision=1034
2001-09-29 20:08:30 +00:00
Mike Kestner
e6979f31de 2001-09-28 Mike Kestner <mkestner@speakeasy.net>
* glib/Object.cs (GetProperty): New, gets props from the raw obj.
	(SetProperty): New, for setting props on the raw obj.
	* glib/Value.cs (type ctor): New needed for get accessors.
	*gtk/Window.cs (AllowGrow): Uncommented and filled out.
	(AllowShrink): Uncommented and filled out.
	(DestroyWithParent): Uncommented and filled out.
	(Modal): Uncommented and filled out.
	(Resizable): Added. All the bool Props work now.

svn path=/trunk/gtk-sharp/; revision=1030
2001-09-28 18:23:14 +00:00
Mike Kestner
f193cf3efe 2001-09-28 Mike Kestner <mkestner@speakeasy.net>
* glib/Value.cs (~Value): New destructor to release g_malloc'd space.
	(default ctor): New default ctor just mallocs without init.
	(String ctor): call default
	(bool ctor): call default
	(Init): New post construct initializer.
	(String exp cast): Replaces ToString method.
	(bool exp cast): New for bool extraction.
	(MarshalAs): Renamed prop was RawValue.

svn path=/trunk/gtk-sharp/; revision=1017
2001-09-28 00:28:30 +00:00
Mike Kestner
4a2fa05bee 2001-09-27 Mike Kestner <mkestner@speakeasy.net>
* glib/Object.cs : Docs for everything. Made Objects hash private.
	Some coding style cleanup.  Pruned some of the TODO methods from the
	commented header listing to make a more relistic picture of the
	remaining effort. Some GSignal stuff probly belongs here too.
	([Get|Set]Data): Killed some DllImports and set up methods to store
	arbitrary data in a managed hash table.

svn path=/trunk/gtk-sharp/; revision=1012
2001-09-27 18:39:53 +00:00
Mike Kestner
25000abee7 2001-09-27 Mike Kestner <mkestner@speakeasy.net>
*.cs : Added .dll extension to a load of DllImports.
	* makefile : now can make the project with one make windows and on
	both NT and Win98.
	* gdk/Event.cs : Fixed some invalid symbol names and commented out a
	load of stuff.
	* gdk/SimpleEvent.cs : Relocated file from unnecessary subdir and fixed
	several event keyword clashing bugs. Need to relocate the EventArgs
	class out of here into its own file. Fixed loads of typos.
	* glib/Object.cs : Killed the Constructor, this should be a purely
	abstract class. made Events property public until I can fix the Signal
	proxying system's broken reliance on it.
	* glib/SimpleSignal.cs : Relocated, namespaces, and named this Class.
	Loads of bugfixes. Still doesn't work worth a damn, but it builds.
	* glib/TypeFundamentals.cs : New enum for use in the Value code.
	* glib/Value.cs : Implemented a more opaque approach with heap allocated
	memory and g_value_init and friends.  Still doesn't work.  Will probably
	switch to a more C# like approach and avoid GValues altogether.
	* gtk/Button.cs : Commented out some brokeness until I can get around
	to fixing it later.
	* gtk/Widget.cs : Commented out a bunch of the new signal stuff until
	I get around to it.
	* gtk/Window.cs (Title): using g_object_set until I work out the
	details of the new Value/SetProperty system.  It looks like g_object_set
	will end up being easier to use via PInvoke.

svn path=/trunk/gtk-sharp/; revision=1008
2001-09-27 17:17:33 +00:00
Bob Smith
699238daad Added refcounts to delegates to make sure they can be unpined when not needed.
svn path=/trunk/gtk-sharp/; revision=962
2001-09-25 15:56:50 +00:00
Bob Smith
5056f3e4b3 glib/Object.cs: Rewrote the way the wrapper is kept track of.
svn path=/trunk/gtk-sharp/; revision=921
2001-09-21 16:24:46 +00:00
Bob Smith
33533985d0 Totally reworked the signal system. Should be much more flexable.
svn path=/trunk/gtk-sharp/; revision=919
2001-09-21 14:03:17 +00:00
Bob Smith
3d40a27630 ObjectManager.cs nuked, Glib.Object now keeps track of the wrapper class, and Gtk.Object should have a better signal handling system.
svn path=/trunk/gtk-sharp/; revision=894
2001-09-20 04:03:27 +00:00
Mike Kestner
91c58501fa 2001-09-19 Mike Kestner <mkestner@speakeasy.net>
* HACKING : New rulez.
	* NOTES: Killed.  We have a mailing list now for this kind of stuff.
	* glib/makefile : New, to build the new glib-sharp.dll target.
	* glib/Object.cs : (GetObject): Commented out. Design problems here.
	IntPtr's can't be used in the manner this code attempts to use them.
	(Data prop): Commented out.  Apparently keyed properties are not
	supported.
	(Object prop): Renamed RawObject, and made it protected.
	(Events): Fixed to cause list to be initialized if null and then
	return the list.
	* glib/ObjectManager.cs : commented out entirely.  Not sure what this
	code is trying to accomplish and it doesn't compile.
	* glib/Value.cs : New attempt at implementing GValues. Doesn't work
	yet.
	* gtk/Button.cs : Updated to use RawObject.
	(Clicked event): s/EmitDeleteEvent/EmitClickedEvent.
	(Button(String)): s/gtk_label_new_with_lable/gtk_button_new_with_label.
	* gtk/Label.cs : Fixed some yank and paste errors where 2 value params
	were getting passed to all the set_* property methods.
	* gtk/Window.cs : Fixed hanging GTK namespace ref.
	* sample/HelloWorld.cs : Fixed hanging GTK namespace ref.

svn path=/trunk/gtk-sharp/; revision=884
2001-09-19 11:37:15 +00:00
Bob Smith
b4c11b3210 GObject fixes.
svn path=/trunk/gtk-sharp/; revision=878
2001-09-19 04:47:48 +00:00
Bob Smith
22b77037ed More implementation
svn path=/trunk/gtk-sharp/; revision=876
2001-09-19 02:04:57 +00:00