Commit Graph

629 Commits

Author SHA1 Message Date
Mike Kestner
c2230278b3 2007-09-06 Mike Kestner <mkestner@novell.com>
* AssemblyInfo.cs.in : add IgnoreClassInitializers attr to all.
 	* generator/ObjectGen.cs : add custom-attr generation for objects.
 	* glib/ClassInitializerAttribute.cs : obsolete
 	* glib/IgnoreClassInitializersAttribute.cs : new assembly attr
 	to avoid a blind GetMethods reflection.
 	* glib/Makefile.am : add files
 	* glib/TypeInitializerAttribute.cs : new attr to specify init
 	method to be run at type registration.
 	* gtk/Widget.custom : remove the ClassInitializerAttr.
 	* gtk/Gtk.metadata : add a custom-attr node to GtkWidget.
 	* sample/Subclass.cs : use the IgnoreClassInitializers attr.

svn path=/trunk/gtk-sharp/; revision=85480
2007-09-07 14:40:46 +00:00
Mike Kestner
2a423bd228 2007-08-14 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : kill a few "new" warnings in FileChooser 
	implementors.

svn path=/trunk/gtk-sharp/; revision=84122
2007-08-14 21:41:06 +00:00
Mike Kestner
fc06f3829a 2007-08-13 Mike Kestner <mkestner@novell.com>
* generator/*.cs : switch to IntPtr marshaling for struct types
	in the managed to native direction.
	* gtk/*.custom : adjust to new gapi struct pinvoke sigs.

svn path=/trunk/gtk-sharp/; revision=83961
2007-08-13 14:29:06 +00:00
Mike Kestner
6501e5e0ba 2007-07-20 Mike Kestner <mkestner@novell.com>
* gtk/Calendar.custom : workaround invalid states in widget when
	raising month_changed signals.  [Fixes #78524]

svn path=/trunk/gtk-sharp/; revision=82387
2007-07-20 20:25:49 +00:00
Mike Kestner
cdf0658754 2007-07-20 Mike Kestner <mkestner@novell.com>
* gtk/gtk-api-2.10.raw : refresh.
	* parser/gapi_pp.pl : combine lines that end in '\' before sending
	them through the pattern matching.  [Fixes #79214]

svn path=/trunk/gtk-sharp/; revision=82359
2007-07-20 15:32:38 +00:00
Mike Kestner
6e56090cfc 2007-07-17 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : map TreeModelFilter ctor param to prop to
	avoid subclass ctor exception. [Fixes #82115]

svn path=/trunk/gtk-sharp/; revision=82109
2007-07-17 15:46:56 +00:00
Mike Kestner
6e25e8d543 2007-06-25 Mike Kestner <mkestner@novell.com>
* gtk/StatusIcon.custom : present_icon is in the glue lib.

svn path=/trunk/gtk-sharp/; revision=80713
2007-06-25 18:35:26 +00:00
Aaron Bockover
f89698d3b3 2007-04-24 Aaron Bockover <abockover@novell.com>
* gtk/Widget.custom (StyleGetProperty): return null if
    gtksharp_widget_style_get_property returns FALSE (property
    doesn't exist) [Fixes #81445]

    * gtk/glue/widget.c (gtksharp_widget_style_get_property): check
    return of gtk_widget_class_find_style_property for NULL; function now
    returns TRUE if spec is not NULL, FALSE otherwise



svn path=/trunk/gtk-sharp/; revision=76217
2007-04-24 19:40:27 +00:00
Brad Taylor
d802b53549 2007-04-23 Brad Taylor <brad@getcoded.net>
* gtk/TreePath.custom: Override Equals and compare based upon the
	  underlying indicies, instead of the object reference.
	  [Fixes #81398]


svn path=/trunk/gtk-sharp/; revision=76131
2007-04-23 16:26:13 +00:00
Mike Kestner
d8fb820b89 2007-04-20 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : switch to NativeCallbackSignature.
	* generator/GenBase.cs : add NativeCallbackType member.
	* generator/IGeneratable.cs : add NativeCallbackType member.
	* generator/ManagedCallString.cs : add guarded post call struct
	marshaling back to the native struct.
	* generator/NativeCallbackSignature.cs : new parallel to ImportSignature
	but using NativeCallbackType instead of MarshalType.
	* generator/Signal.cs : switch vm and sig marshaler callbacks to 
	NativeCallbackSignature. Perform guarding post call struct marshaling
	back to the native struct.
	* generator/Parameters.cs : add NativeCallbackType member.
	* generator/SimpleBase.cs : add NativeCallbackType member.
	* generator/StructBase.cs : add NativeCallbackType member using IntPtr
	to support NULL handling.
	* gtk/NodeCellDataFunc.cs : update native marshaler sig.

svn path=/trunk/gtk-sharp/; revision=76011
2007-04-20 15:38:47 +00:00
Mike Kestner
b108f0142e 2007-04-17 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : hide TreeModel.RowsReordered signal so we can do
	a correct implementation while maintaining compat with the existing 
	broken "NewOrder" parameter.
	* gtk/ListStore.custom : manual RowsReordered signal implementation.
	* gtk/RowsReorderedHandler.cs : manual implementation for preserve compat
	in the Args class. Adds NewChildOrder to replace the broken ChildOrder.
	* gtk/TreeModel.custom : manual RowsReordered signal declaration.
	* gtk/TreeModelFilter.custom : manual RowsReordered signal implementation.
	* gtk/TreeModelSort.custom : manual RowsReordered signal implementation.
	* gtk/TreeStore.custom : manual RowsReordered signal implementation.
	[Fixes #78512]

svn path=/trunk/gtk-sharp/; revision=75837
2007-04-17 17:42:58 +00:00
Ben Motmans
dfa98a3ea2 2007-04-17 Ben Motmans <ben.motmans@gmail.com>
* gtk/Widget.custom:
	StyleGetPropertyValue that returns a GLib.Value when StyleGetProperty cannot automatically cast the GLib.Value (eg: Gdk.Color)
	[Fixes #81253]
	* doc/en/Gtk/Widget.xml:
	Documentation for the new StyleGetPropertyValue method and improved documentation for StyleGetProperty
	* gtk/TreeView.custom:
	OddRowColor and EvenRowColor properties
	* doc/en/Gtk/TreeView.xml:
	documentation for OddRowColor and EvenRowColor properties

svn path=/trunk/gtk-sharp/; revision=75816
2007-04-17 12:16:58 +00:00
Brad Taylor
7142444f6c 2007-04-09 Brad Taylor <brad@getcoded.net>
* gtk/glue/widget.c:
	* gtk/Widget.custom: Bind activate_signal in GtkWidgetClass.


svn path=/trunk/gtk-sharp/; revision=75653
2007-04-12 17:17:09 +00:00
Mike Kestner
fd01afc12b 2007-03-08 Mike Kestner <mkestner@novell.com>
* glib/Signal.cs : guard against NULL gchandles.
	* gdk/Input.custom : add try/catch blocks to native callbacks.
	* gtk/*.custom : ditto
	* gtk/NodeStore.cs : ditto

svn path=/trunk/gtk-sharp/; revision=74004
2007-03-09 14:22:43 +00:00
Mike Kestner
6a00328dd1 2007-03-05 Mike Kestner <mkestner@novell.com>
* gtk/Application.custom : set prgname in Init methods so
	that WM_CLASS is more appropriate.  Programs using Gnome.Program
	already get a nice prgname, but Gtk.Application.Init apps were
	getting a path instead of a filename without extension.

svn path=/trunk/gtk-sharp/; revision=73766
2007-03-05 22:33:19 +00:00
Mike Kestner
d90a1ff3f5 mark an internal win32 api obsolete
svn path=/trunk/gtk-sharp/; revision=73647
2007-03-02 18:08:38 +00:00
Brad Taylor
90e207c45b 2007-03-01 Brad Taylor <brad@getcoded.net>
* gtk/Dialog.custom: obsolete old, improperly bound
	  SetAlternateButtonOrderFromArray.
	* gtk/Gtk.metadata: fix binding of the
	  gtk_dialog_set_alternate_button_order_from_array. [Fixes #80706]


svn path=/trunk/gtk-sharp/; revision=73614
2007-03-01 18:49:32 +00:00
Mike Kestner
6698da1e41 2007-02-21 Peter Johanson <peter@peterjohanson.com>
* gtk/glue/cellrenderer.c: revert to previous implementation of
	_base_ functions to maintain backward-stability. [Fixes #77949]

svn path=/trunk/gtk-sharp/; revision=73271
2007-02-21 19:19:09 +00:00
Mike Kestner
4183bad5cc 2007-02-16 Peter Johanson <peter@peterjohanson.com>
* gtk/CellRenderer*.custom: new custom overrides for VMs.
	* gtk/glue/cellrenderer.c: add GType parameters to the invoke methods
	so we can identify the correct vtable to invoke from.

svn path=/trunk/gtk-sharp/; revision=73037
2007-02-16 18:28:37 +00:00
Mike Kestner
2469ba16ef 2007-02-16 Mike Kestner <mkestner@novell.com>
* glib/Object.cs : switch to ToggleRefs for all items created with
	CreateNativeObject.  This gets all managed subclasses, with a little
	overhang into simple wrappers.
	* glib/ToggleRef.cs : new class to manage the weak to strong ref 
	transitions as a native object flips between shared and unshared
	ownership.
	* gtk/Object.custom : revamp of the Destroyed signal handling. 
	* gtk/Gtk.metadata : hide destroy signal so we can deal with it 
	manually. [Fixes the reopen note of #72018.]

svn path=/trunk/gtk-sharp/; revision=73023
2007-02-16 16:18:59 +00:00
Mike Kestner
d224dd1cbc 2007-02-03 Mike Kestner <mkestner@novell.com>
* gtk/StatusIcon.custom : obsolete overload for backcompat on
	GetGeometry, and custom PresentMenu method to invoke new glue.
	* gtk/glue/statusicon.c : glue method to connect to gtk_menu_popup
	without having to go across the native/managed boundary multiple
	times using gtk_status_icon_position_menu wrapper.
	[Fixes #79500]

svn path=/trunk/gtk-sharp/; revision=72236
2007-02-03 17:55:23 +00:00
Mike Kestner
1d105a960b 2007-01-09 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : add PersistUntilCalled method generation
	to the wrapper class.  Holds a GCHandle for the wrapper which is Freed
	when the delegate is invoked.
	* generator/MethodBody.cs : add "async" case for delegate scope.  Use
	this scope to identify a callback parameter that needs to persist 
	until the native side calls back.  Only valid for single-invoke
	callbacks.
	* gtk/Gtk.metadata : mark Print.RunPageSetupDialogAsync done_cb param
	with the new async scope.

svn path=/trunk/gtk-sharp/; revision=71767
2007-01-26 20:46:09 +00:00
Mike Kestner
7c0a6a4f9b 2006-08-07 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : remainder of new API massaging for existing 
	types.
	* gtk/Printer.custom : new static method.
	* gtk/TextBuffer.custom : serialization API implementations.

svn path=/trunk/gtk-sharp/; revision=63448
2006-08-07 20:45:47 +00:00
Mike Kestner
6898b3b5d5 2006-08-07 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : mark an out param in Style.LookupColor. 
	Some tweaks to duplicated label api.

svn path=/trunk/gtk-sharp/; revision=63440
2006-08-07 17:16:18 +00:00
Mike Kestner
64bddb3e2a 2006-08-07 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : mark an out param in Style.LookupColor. 

svn path=/trunk/gtk-sharp/; revision=63432
2006-08-07 15:35:27 +00:00
Mike Kestner
9ad00bd861 2006-08-07 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : markup for new Clipboard Rich text funcs. 
	* gtk/Clipboard.custom : manually implement RequestRichText and
	WaitForRichText methods to deal with array marshaling and delegate
	persistence.

svn path=/trunk/gtk-sharp/; revision=63430
2006-08-07 15:00:16 +00:00
Mike Kestner
98cf4082be 2006-08-04 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : a few tweaks to the 2.10 API found in doc/
	audit pass.

svn path=/trunk/gtk-sharp/; revision=63378
2006-08-04 23:24:29 +00:00
Mike Kestner
636ff0bc8a 2006-08-01 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : fix a couple of compat breaks against 2.8.
	* gtk/TreeModelFilter.cs : hand implement ConvertChildIterToIter
	to match the 2.8 version of the method.

svn path=/trunk/gtk-sharp/; revision=63271
2006-08-02 20:37:23 +00:00
Mike Kestner
a5d696a8b0 2006-08-01 Mike Kestner <mkestner@novell.com>
* gtk/gtk-api-2.10.raw : reparsed
	* parser/gapi_pp.pl : put a newline after G_DEFINE_TYPE macros
	on the output and do a next if we shouldn't fall out of the 
	branch.

svn path=/trunk/gtk-sharp/; revision=63232
2006-08-01 22:20:54 +00:00
Mike Kestner
d09ebd1d3b indentation whitespace changes from eno's nice XmlWriter patch
svn path=/trunk/gtk-sharp/; revision=63080
2006-07-28 15:58:03 +00:00
Mike Kestner
b912bb6afb 2006-07-14 Mike Kestner <mkestner@novell.com>
* sources/gtk-sharp-2.10-sources.xml : update to gtk+-2.10.0 
	and pango-1.13.3
	* sources/Makefile.am : ditto.
	* gtk/Gtk.metadata : some hides and renames to fix build.
	* gdk/gdk-api-2.10.raw : refresh.
	* gtk/gtk-api-2.10.raw : refresh.
	* pango/pango-api-2.10.raw : refresh.

svn path=/trunk/gtk-sharp/; revision=62598
2006-07-14 13:45:17 +00:00
Mike Kestner
2ac6bb5457 2006-05-10 Mike Kestner <mkestner@novell.com>
* bootstrap-2.10 : strap for the new 2.9.0 API.
	* generator/SymbolTable.cs : add GLib.InitiallyUnowned mapping.
	* glib/InitiallyUnowned.cs : new floating class "stub".
	* glib/Makefile.am : build new class.
	* gdk/gdk-api-2.10.raw: parse from 2.9.0
	* gtk/Gtk.metadata: cleanup conflicts in 2.10 API.
	* gtk/gtk-api-2.10.raw: parse from 2.9.0
	* pango/pango-api-2.10.raw: parse from 1.11.99
	* sources/Makefile.am : 2.10 parse setup and api-2.10 
	* sources/gtk_tree_model_signal_fix-2.10.patch : 2.10 patch.
	* sources/gtk-sharp-2.10-sources.xml : parse rules for 2.10

svn path=/trunk/gtk-sharp/; revision=60521
2006-05-10 17:13:30 +00:00
Mike Kestner
c588660a96 copy 2.8 file to 2.10
svn path=/trunk/gtk-sharp/; revision=60512
2006-05-10 14:22:10 +00:00
Pete Johanson
8385036760 2006-05-04 Peter Johanson <peter@peterjohanson.com>
* gtk/glue/cellrenderer.c: Revert r59683, as it causes issues for
        overrides calling base.GetSize (), etc.


svn path=/trunk/gtk-sharp/; revision=60291
2006-05-05 03:13:17 +00:00
Pete Johanson
4cd47a3512 2006-04-20 Peter Johanson <peter@peterjohanson.com>
* gtk/glue/cellrenderer.c: Make GetSize, Render, etc behave correctly
        for all cases. Fixes #77949.

svn path=/trunk/gtk-sharp/; revision=59683
2006-04-20 07:55:08 +00:00
Mike Kestner
f47b4880f1 2005-01-31 Mike Kestner <mkestner@novell.com>
* gtk/Dialog.custom : null check a parent arg.  [Fixes #77400]

svn path=/trunk/gtk-sharp/; revision=56339
2006-01-31 16:02:18 +00:00
Mike Kestner
5bac7a6c8d 2005-01-21 Mike Kestner <mkestner@novell.com>
* gtk/RadioToolButton.custom : manually implement the GLib.List group
	ctors.  [Fixes #76992]

svn path=/trunk/gtk-sharp/; revision=55886
2006-01-21 15:52:50 +00:00
Mike Kestner
6f612e3fff 2005-12-13 Mike Kestner <mkestner@novell.com>
* sources/Makefile.am : move to stable gtk 2.8 versions.
	* sources/gtk-sharp-2.8-sources.xml : move to stable gtk 2.8 versions.
	* */*.raw : regenerate.
	* gdk/Gdk.metadata : hide a few gtk+ internal methods.
	* gtk/Gtk.metadata : hide a win32 internal enum.

svn path=/trunk/gtk-sharp/; revision=54308
2005-12-13 17:11:31 +00:00
Mike Kestner
c37cd06fc5 2005-12-12 Itamar Rogel <chastamar@yahoo.com>
* NodeView.cs : add default ctor and NodeStore setter.
	[Fixes #76827]

svn path=/trunk/gtk-sharp/; revision=54243
2005-12-12 15:31:54 +00:00
Mike Kestner
98b4307aba 2005-12-10 Mike Kestner <mkestner@novell.com>
* gtk/gtk-api-2.8.raw : regenerated.
	* gtk/IconView.custom : manually implement a new interface method.
	* parser/gapi_pp.pl : more general G_DEFINE_TYPE_WITH_CODE parsing
	implementation.
	[Fixes #76266]

svn path=/trunk/gtk-sharp/; revision=54192
2005-12-10 13:17:47 +00:00
Mike Kestner
6dc561853a 2005-12-09 Mike Kestner <mkestner@novell.com>
* pango/Pango.metadata : 2.8 API tweaks
	* gdk/Gdk.metadata : 2.8 API tweaks
	* gtk/Gtk.metadata : 2.8 API tweaks
	* gtk/IconView.custom : overloads for the weird ScrollToPath.
	* gtk/Makefile.am : add custom

svn path=/trunk/gtk-sharp/; revision=54176
2005-12-09 23:16:42 +00:00
Wade Berrier
a36a3d4c0e * .pc and wrapper scripts: Use relative paths so gtk-sharp is
relocatable


svn path=/trunk/gtk-sharp/; revision=52437
2005-11-01 05:12:12 +00:00
Mike Kestner
05526600ae 2005-10-19 Mike Kestner <mkestner@novell.com>
* gtk/TextBuffer.custom : add some obsolete overloads for backward
	compat with some not-completely-unusable 1.0.x methods.

svn path=/trunk/gtk-sharp/; revision=52131
2005-10-24 17:08:40 +00:00
Miguel de Icaza
c6ab638191 2005-10-08 Miguel de Icaza <miguel@novell.com>
* gtk/Application.cs (Invoke): Use Timeout instead of Idle add to
	trigger the event on the Gtk thread.

svn path=/trunk/gtk-sharp/; revision=51851
2005-10-18 02:46:31 +00:00
Mike Kestner
880b1ff3e9 2005-10-08 Mike Kestner <mkestner@novell.com>
* generator/Signal.cs : handle enum return values GTypes.
	* gtk/TextBuffer.custom : mark Text prop !GTK_SHARP_2_8.
	[Fixes #75885]

svn path=/trunk/gtk-sharp/; revision=51484
2005-10-09 01:50:37 +00:00
Mike Kestner
fede690a37 2005-09-27 Mike Kestner <mkestner@novell.com>
* glib/Opaque.cs : remove the Opaques hash.  As f-spot demonstrated,
	we cannot rely on a pointer continuing to point at the same type in
	memory, since there is no destroy notification for most opaques.
	* glib/Value.cs : use more explicit GetOpaque overload.
	* gtk/Style.custom : use more explicit GetOpaque overload.

svn path=/trunk/gtk-sharp/; revision=50884
2005-09-27 19:12:43 +00:00
Mike Kestner
0435b45895 2005-09-23 Mike Kestner <mkestner@novell.com>
* configure.in.in : expand glib-sharp-2.0.pc.
	* glib/glib-sharp-2.0.pc.in : new pc file template.
	* glib/Makefile.am : dist and install pc file.
	* gtk/gtk-sharp-2.0.pc.in : Require glib-sharp-2.0.

svn path=/trunk/gtk-sharp/; revision=50641
2005-09-23 22:36:33 +00:00
Dan Winship
6a4b03d57f * gtk/Gtk.metadata: Hide Gtk.Drag.SetIconDefault. Mark
Gtk.TreeView.GetVisibleRect's arg as "out".

	* gtk/Drag.custom: gtk_drag_set_icon_default(ctx) should translate
	to Gtk.Drag.SetIconDefault(ctx), not Gtk.Drag.IconDefault = ctx.

	* gtk/TreeView.custom: add obsolete GetVisibleRect()

svn path=/trunk/gtk-sharp/; revision=49723
2005-09-08 19:01:01 +00:00
Eric Butler
bc2d3e81e0 2005-09-07 Eric Butler <eric@extremeboredom.net>
* gtk/NodeStore.cs : Add Clear() method
	* doc/en/Gtk/NodeStore.xml : Add documentation for above method


svn path=/trunk/gtk-sharp/; revision=49648
2005-09-07 17:34:58 +00:00
Mike Kestner
7b265e1f84 2005-09-06 Mike Kestner <mkestner@novell.com>
* gtk/NodeStore.cs : fix recursive emit of row_inserted.

svn path=/trunk/gtk-sharp/; revision=49566
2005-09-06 18:32:18 +00:00
Mike Kestner
2a61d6e9d9 2005-09-06 Mike Kestner <mkestner@novell.com>
* gtk/NodeStore.cs : fix recursive emit of row_inserted.

svn path=/trunk/gtk-sharp/; revision=49563
2005-09-06 18:09:40 +00:00
Miguel de Icaza
86fcf4e74a Thanks to Peter Williams for pointing out this bug
svn path=/trunk/gtk-sharp/; revision=49390
2005-09-03 04:14:10 +00:00
Miguel de Icaza
95a22dd13b i2005-09-02 Miguel de Icaza <miguel@novell.com>
* gtk/Application.cs (Invoke): Add new overloads to easily invoke
	methods on the executing thread.



svn path=/trunk/gtk-sharp/; revision=49379
2005-09-02 22:39:17 +00:00
Ben Maurer
e4682de9cf by mk's request
svn path=/trunk/gtk-sharp/; revision=49376
2005-09-02 22:11:06 +00:00
Ben Maurer
85eee0cb43 2005-09-02 Ben Maurer <bmaurer@ximian.com>
* sample/NodeViewDemo.cs: take advantage of the stuff below

	* gtk/TreeNodeValueAttribute.cs: Allow on props

	* gtk/TreeNodeAttribute.cs: Obsolete column count

	* gtk/NodeStore.cs: Change this to not need the TreeNodeAttribute
	column count. Handle fields as well as properties.


svn path=/trunk/gtk-sharp/; revision=49374
2005-09-02 22:04:05 +00:00
Mike Kestner
376b8f42ac 2005-08-30 Mike Kestner <mkestner@novell.com>
* parser/gapi_pp.pl : ignore ifndef *_H_ lines like in 1.0.x.
	[Fixes #75938]

svn path=/trunk/gtk-sharp/; revision=49151
2005-08-30 20:12:43 +00:00
Mike Kestner
e7e8c9e80b 2005-08-30 Mike Kestner <mkestner@novell.com>
* gtk/NodeStore.custom : recursively emit row_inserted for AddNode.
	[Fixes #75853]

svn path=/trunk/gtk-sharp/; revision=49146
2005-08-30 19:38:04 +00:00
Mike Kestner
e916350eff 2005-08-29 Mike Kestner <mkestner@novell.com>
* gtk/Widget.custom : add overloads for Modify* without a Gdk.Color
	param to reset color to default.  [Fixes #75913]


svn path=/trunk/gtk-sharp/; revision=49085
2005-08-29 19:22:23 +00:00
Ben Maurer
327a28442e In doc:
2005-08-28  Ben Maurer  <bmaurer@ximian.com>

	* en/Gtk/NodeSelection.xml: Docs

In .:
2005-08-28  Ben Maurer  <bmaurer@ximian.com>

	* gtk/NodeSelection.cs: helper api


svn path=/trunk/gtk-sharp/; revision=49040
2005-08-28 21:18:39 +00:00
Ben Maurer
c9eaab1cf3 * gtk/TreeNode.cs: Add Interlocked.Increment rather than ++. This
makes it safe to create tree nodes in a worker thread as long as
	you reparent them into the tree with another thread. Thanks to mk
	for allowing a bit of threadedness in :-).
	

svn path=/trunk/gtk-sharp/; revision=48683
2005-08-22 17:11:37 +00:00
Ben Maurer
3fb0631c4e 2005-08-22 Ben Maurer <bmaurer@novell.com>
* gtk/NodeView.cs: Fix leak here. r=mkestner


svn path=/trunk/gtk-sharp/; revision=48682
2005-08-22 17:06:01 +00:00
Dan Winship
ba1eeecbfb * generator/Property.cs (Generate): Mark properties [Obsolete] if
they or their accessors are marked deprecated. (Affects
	Gtk.Entry.Editable, Gtk.FontSelection.Font,
	Gtk.Notebook.*TabBorder, Gtk.Object.UserData, and a bunch of old
	Gtk.ProgressBar properties).

	* gtk/Gtk.metadata: Hide Entry.Editable. Mark Notebook.Homogeneous
	deprecated.

	* gtk/Entry.custom: Implement Editable property with an Obsolete
	pointing to IsEditable.

svn path=/trunk/gtk-sharp/; revision=48680
2005-08-22 16:55:20 +00:00
Mike Kestner
904a3e5857 2005-08-15 Mike Kestner <mkestner@novell.com>
* gtk/glue/makefile.win32 : s/.c/.o typo.

svn path=/trunk/gtk-sharp/; revision=48399
2005-08-15 18:01:28 +00:00
Mike Kestner
b5964c52d0 2005-08-15 Mike Kestner <mkestner@novell.com>
* glib/Object.cs : hold strong refs for managed subclasses and
	weakrefs for wrappers.
	* gtk/Object.custom : don't hold managed refs here, they are now held
	in GLib.Object.

svn path=/trunk/gtk-sharp/; revision=48389
2005-08-15 15:56:16 +00:00
Dan Winship
622c360576 * parser/gapi2xml.pl (addFuncElems): if a struct or boxed type has
a constructor or a ref, unref, or destroy method, then it must be
	a reference type, so mark it "opaque" but then also mark all of
	its fields public and writable.

	* */*-api*.raw: Regen

	* generator/Parser.cs (ParseNamespace): make the opaque attribute
	check actually look at the value of the attribute rather than just
	checking if it's there, so that you can change a struct's opaque
	attribute from "true" to "false" via metadata and have that work.

	* generator/BoxedGen.cs (Generate): do not generate the boxed's
	"Free" method (since it's guaranteed to crash when we pass it a
	stack pointer). If "Copy" is marked deprecated, create a
	deprecated no-op for it, otherwise just skip it (since otherwise
	it will just leak memory when we copy its result onto the stack).

	* pango/Pango.metadata: deprecate Pango.Color.Copy and
	Pango.Matrix.Copy. Hide some array fields in Pango.GlyphString
	that we've never generated correctly. Tweak Pango.LayoutLine
	fields to be the same as they used to be.

	* pango/GlyphItem.custom (glyphs, item):
	* pango/GlyphString.custom (Zero, New):
	* pango/Item.custom (Zero, New):
	* pango/LayoutRun.custom (glyphs, item): add deprecated API compat

	* gdk/Gdk.metadata: undo the parser's new opaquification of
	Gdk.Font; it's been deprecated since pre-gtk# times, and no one
	should be using it, so there's no point in fixing it now. Fix up a
	few other things to match how they used to be. Fix RgbCmap's
	constructor args.

	* gdk/RgbCmap.custom (Zero, New): deprecated API compat

	* gdk/PangoAttrEmbossed.custom:
	* gdk/PangoAttrStipple.custom (Zero, New, Attr): deprecated API
	compat
	(explicit operator ...): allow casting back and forth between
	Pango.Attribute. (We can't usefully make them real subclasses of
	Pango.Attribute, because there's no way for
	Pango.Attribute.GetAttribute() to be able to dtrt with them.)

	* gtk/Gtk.metadata: deprecate Gtk.Requisition.Copy,
	Gtk.TextIter.Copy, and Gtk.TreeIter.Copy. Mark the return value of
	TextView.DefaultAttributes as "owned". Mark TargetList's fields
	private so it stays how it used to be.

	* gtk/TextAttributes.custom (Zero, New): deprecated API compat

	* gnomevfs/Gnomevfs.metadata: remove a bunch of opaque
	declarations that the parser figures out on its own now.

	* art/Art.metadata:
	* glade/Glade.metadata:
	* rsvg/Rsvg.metadata: un-mark everything the parser marked opaque
	in these libraries, because all of the structs in question would
	still be unusably broken, so the API churn would be pointless.

svn path=/trunk/gtk-sharp/; revision=48387
2005-08-15 15:15:57 +00:00
Dan Winship
12cd8d0d17 * generator/OpaqueGen.cs (Generate): Tweak the generated Ref/Unref
a bit; only Ref the pointer if Owned is false (and then set it to
	true), and vice versa for Unref.

	* glib/Opaque.cs (Opaque): set owned before setting Raw, so
	that Raw will be reffed properly.
	(GetOpaque): Fix this up to dtrt in all cases with refcounted
	opaques.
	
	* gtk/TreeView.custom (GetPathAtPos): Use "GetOpaque(...)" rather
	than "new TreePath()"

	* sample/opaquetest/*: regression test for opaque free/ref/unref
	handling

	* sample/Makefile.am (SUBDIRS): add opaquetest

	* configure.in.in (AC_OUTPUT): add opaquetest files

svn path=/trunk/gtk-sharp/; revision=48168
2005-08-09 14:44:32 +00:00
Dan Winship
a2b058160b oops, add targetlist.c here too
svn path=/trunk/gtk-sharp/; revision=48007
2005-08-04 18:03:51 +00:00
Dan Winship
dc9046526c * gtk/TargetList.custom: add an operator for casting to
TargetEntry[], so you can use methods like
	TargetList.AddTextTargets() in situations where you need a
	TargetEntry[] rather than a TargetList.

	* gtk/glue/targetlist.c: glue for that

svn path=/trunk/gtk-sharp/; revision=48006
2005-08-04 18:03:21 +00:00
Dan Winship
155f8352a0 oops, regenerate these after the parser changes to marked the return-type
of "Copy" methods as "owned"

svn path=/trunk/gtk-sharp/; revision=47930
2005-08-02 19:22:23 +00:00
Dan Winship
eb4fdee774 Automatic memory management for opaque types [#49565]
* glib/Opaque.cs (Owned): new property saying whether or not gtk#
	owns the memory.
	(Opaque): Set Owned to true in the void ctor and false in the
	IntPtr one.
	(GetOpaque): add a new overload that can also create opaques, a la
	GLib.Object.GetObject.
	(Ref, Unref, Free): empty virtual methods to be overridden by
	subclasses.
	(set_Raw): Unref() and possibly Free() the old value, Ref() the
	new one.
	(~Opaque, Dispose): set Raw to IntPtr.Zero (triggering Free/Unref
	if needed)

	* parser/gapi2xml.pl (addReturnElem): if the method is named Copy
	and returns a pointer, set the "owned" attribute on the
	return-type.

	* */*-api.raw: Regen
	
	* generator/HandleBase.cs (FromNative): Add new
	FromNative/FromNativeReturn overloads that takes a "bool owned"
	param. Implement the 1-arg FromNative and FromNativeReturn in
	terms of that.

	* generator/ObjectBase.cs (FromNative): Implement HandleBase's new
	overload. Use the two-arg version of GLib.Object.GetObject when
	"owned" is true.

	* generator/OpaqueGen.cs (Generate): Pull out Ref, Unref, and
	Free/Destroy/Dispose methods and handle them specially by
	overriding Opaque.Ref, .Unref, and .Free appropriately. (If any
	of the methods are marked deprecated, output a deprecated
	do-nothing method as well, to save us from having to write all
	those deprecated methods by hand.)
	(FromNative): use GetOpaque, passing "owned".

	* generator/ReturnValue.cs (FromNative): if the value is a
	HandleBase, pass Owned to its FromNative().

	* generator/Parameters.cs (Owned): new property (for use on out
	params)
	(FromNative): Call FromNative() on the generatable, handling Owned
	in the case of HandleBase.

	* generator/ManagedCallString.cs:
	* generator/MethodBody.cs:
	* generator/Signal.cs: use param.FromNative() rather than
	param.Generatable.FromNative(), to get ownership right.

	* */*.metadata: Mark opaque ref/unref/free methods deprecated
	(except where we were hiding them before). Add "owned" attributes
	to return values and out params as needed.

	* pango/AttrIterator.custom (GetFont): work around a
	memory-management oddity of the underlying method.

	* pango/AttrFontDesc.cs (AttrFontDesc): copy the passed-in
	FontDescriptor, since the attribute will assume ownership of it.

	* gtk/TreeView.custom (GetPathAtPos): set the "owned" flag on the
	returned TreePaths.

	* gtk/TargetList.custom: Remove refcounting stuff, which is
	now handled automatically

	* gtk/NodeStore.cs (GetPath): clear the Owned flag on the created
	TreePath so that the underlying structure doesn't get freed when
	the function returns

	* gtkhtml/HTMLStream.custom (Destroy): hide this and then
	reimplement it by hand to keep OpaqueGen from using it in
	Dispose(), since calling it after an HTMLStream.Close() will
	result in a crash.

svn path=/trunk/gtk-sharp/; revision=47928
2005-08-02 18:45:21 +00:00
Todd Berman
4b3bdf71ce 2005-08-01 Todd Berman <tberman@off.net>
* gtk/Gtk.metadata: Change the Gtk.Style.Paint* methods to use a
	Gdk.Drawable instead of a Gdk.Window
	* doc/en/Gtk/Style.xml: Update the documentation for the above
	change.


svn path=/trunk/gtk-sharp/; revision=47895
2005-08-01 18:32:19 +00:00
Mike Kestner
6c67e4ffb6 2005-07-28 Mike Kestner <mkestner@novell.com>
* bootstrap-for-the-insane : beginnings of 2.8 binding.
	* */*-api-2.8.raw : 2.8 api files.
	* gdk/Gdk.metadata : work around #define used in Pixbuf props in 2.7.
	* parser/gapi2xml.pl : collision guarding for privatestruct defs.
	* sources/gtk-sharp-2.8-sources.xml : parse for 2.8.
	* sources/Makefile.am : api-2.8, get-2.8-sources, etc...

svn path=/trunk/gtk-sharp/; revision=47820
2005-07-28 21:24:55 +00:00
Dan Winship
45ebde9387 * gtk/ComboBoxEntry.custom: add an "Entry" property to cleanly
fetch the ComboBoxEntry's Gtk.Entry

svn path=/trunk/gtk-sharp/; revision=47750
2005-07-27 13:52:51 +00:00
Dan Winship
0fa85fccbd * parser/gapi2xml.pl (addParamsElem): deal with G_CONST_RETURN in
params... some functions use that to mark const "out" params. In
	fact, let's use it as a hint to mark them pass_as="out" too...

	* pango/pango-api-2.4.raw: 
	* pango/pango-api-2.6.raw: 
	* gtk/gtk-api-2.6.raw: Regen, fixing pango_script_iter_get_range
	and gtk_image_get_icon_name.

	* pango/Pango.metadata: 
	* pango/ScriptIter.cs: Alas, exposing GetRange makes it clear that
	PangoScriptIter is really weird and we weren't wrapping it
	correctly before anyway, so mark the whole thing hidden and wrap
	it by hand.

svn path=/trunk/gtk-sharp/; revision=47748
2005-07-27 13:21:15 +00:00
Dan Winship
6bf7376094 * parser/gapi2xml.pl (addParamsElem): change the handling of
anonymous function pointer types in method signatures. Before, we
	added a <callback> child to the <parameters> node, but the
	generator just ignored it. Now we add the callback (with a made-up
	name) to the toplevel node, and add an ordinary <param> node
	referencing it to the <parameters> node. Also, if the last param
	of the callback is a gpointer, rename it from "arg#" to "data" so
	it will be treated correctly (as the user data passed from the
	calling method). [Fixes #66241]

	* art/art-api.raw: 
	* gdk/gdk-api-2.4.raw: 
	* gdk/gdk-api-2.6.raw: Regen

	* generator/Parameters.cs (IsHidden): loosen the definition of
	hideable user_data; it doesn't have to occur at the end of the
	parameter list, as long as there's a callback arg before it.

	* generator/MethodBody.cs (GetCallString): Use Parameters.IsHidden
	to decide whether or not to squash user_data params, rather than
	trying to duplicate its logic. As a side effect, this also causes
	a handful of methods that take non-hidden IntPtr arguments to
	start actually passing those arguments to C rather than always
	passing IntPtr.Zero.

	* generator/Method.cs (Equals, GetHashCode): Remove unnecessary
	and possibly erroneous hashing overrides.

	* gtk/Gtk.metadata: Hide Gtk.Container.ForeachFull, since it's
	useless and wasn't in gtk# 1.0

	* gtk/Menu.custom (Popup):
	* gtk/TextIter.custom (ForwardFindChar, BackwardFindChar):
	* gnome/App.custom (CreateMenusInterp, InsertMenusInterp,
	CreateToolbarInterp):
	* gnome/Client.custom (RequestInteractionInterp):
	* gnome/Popup.custom (MenuDoPopupModal, MenuDoPopup): Add
	[Obsolete] compat overloads for methods that have now lost a
	useless IntPtr.

svn path=/trunk/gtk-sharp/; revision=47566
2005-07-22 19:10:04 +00:00
Dan Winship
d37d940eb8 * parser/gapi2xml.pl (parseInitFunc): handle interface properties
as well as class properties

	* gtk/gtk-api-2.4.raw: 
	* gtk/gtk-api-2.6.raw: Regen (adding properties to GtkFileChooser).

	* generator/Property.cs (GenerateDecl): new method to generate
	just a property declaration (for an interface).
	(Generate): Add an "implementor" arg as with Method.Generate.

	* generator/InterfaceGen.cs (Generate): Generate properties. Also,
	validate methods *before* checking if they should be ignored,
	since certain Method properties aren't set until Validate-time.

	* generator/*.cs: misc minor changes/reorg for the above.

svn path=/trunk/gtk-sharp/; revision=47563
2005-07-22 18:35:37 +00:00
Todd Berman
455d319d34 2005-07-19 Todd Berman <tberman@off.net>
* gtk/TreeSelection.custom: Add an overload for GetSelected to remove
        the need to always pass in that damn TreeModel.
        * doc/en/Gtk/TreeSelection.xml: Add documentation for the new
        overload.


svn path=/trunk/gtk-sharp/; revision=47475
2005-07-20 17:08:28 +00:00
Mike Kestner
f1a8c00732 2005-07-08 Mike Kestner <mkestner@novell.com>
* */*.raw : regen.
	* parser/gapi2xml.pl : access comment doesn't have to start at
	beginning of line.

svn path=/trunk/gtk-sharp/; revision=47126
2005-07-08 22:04:50 +00:00
Mike Kestner
144a0f9d20 2005-07-02 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : implement new IAccessor iface so that
	callback fields on structs can now be accessed.
	* generator/ClassBase.cs : remove/abstract some methods incorrectly
	located here.
	* generator/ClassGen.cs : implement methods previously inherited from
	ClassBase incorrectly.
	* generator/HandleBase.cs : new base class for native ptr wrappers.
	Implements new IAccessor interface and code moved from ClassBase.
	* generator/IAccessor.cs : new iface to generate field/prop accessors.
	* generator/InterfaceGen.cs : derive from new ObjectBase.
	* generator/LPGen.cs : implement IAccessor.
	* generator/LPUGen.cs : implement IAccessor.
	* generator/ObjectBase.cs : new base class for Object/Iface types.
	* generator/ObjectGen.cs : derive from new ObjectBase.
	* generator/OpaqueGen.cs : derive from HandleBase.
	* generator/StructField.cs : refactor Generate method using new
	IAccessor interface.
	* */*.custom : add obsolete impls for some existing c_cased struct
	field accessors that are now StudlyNamed.

svn path=/trunk/gtk-sharp/; revision=46878
2005-07-02 15:23:27 +00:00
Mike Kestner
a0912263e2 2005-06-28 Mike Kestner <mkestner@novell.com>
* gtk/ComboBox.custom : add ctor (string[]).
	* gtk/ComboBoxEntry.custom : add ctor (string[]).
	* sample/test/TestComboBox.cs : simple new ComboBox tester.
	* sample/test/WidgetViewer.cs : button for simple new ComboBox tester.

svn path=/trunk/gtk-sharp/; revision=46657
2005-06-28 16:35:36 +00:00
Mike Kestner
34ee46aec1 2005-06-24 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : remove the one reference to FileChooserEmbed.
	* gtk/gtk-api-2.*.raw : regen.
	* sources/gtk-sharp-2.*-sources.xml : exclude FileChooserEmbed files.

svn path=/trunk/gtk-sharp/; revision=46479
2005-06-24 19:27:01 +00:00
Mike Kestner
eddfdc7910 2005-06-23 Mike Kestner <mkestner@novell.com>
* generator/ReturnValue.cs : support owned and elements_owned for lists.
	* glib/List.cs : add ctor overloads for memory mgmt.
	* glib/ListBase.cs : add ctor overloads for memory mgmt. Dispose
	elements if specified.
	* glib/SList.cs : add ctor overloads for memory mgmt.
	* gnome/Gnome.metadata : unhide and generate a List prop.
	* gnomevfs/Gnomevfs.metadata : unhide and generate a List prop.
	* gtk/FileChooser.custom : new. add hidden props.
	* gtk/FileChooserButton.custom : new. impl hidden props.
	* gtk/FileChooserDialog.custom : remove some List props and use the
	GLib.Marshaller for the remaining ones..
	* gtk/FileChooserWidget.custom : remove some List props and use the
	GLib.Marshaller for the remaining ones..
	* gtk/Gtk.metadata : unhide and let the generator do some List props.

svn path=/trunk/gtk-sharp/; revision=46457
2005-06-23 22:28:06 +00:00
Mike Kestner
7f1265e3aa 2005-06-14 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : add nodes for all the *Set props on TextTag.
	[Fixes #75219]

svn path=/trunk/gtk-sharp/; revision=45976
2005-06-14 15:45:06 +00:00
Dan Winship
cb427b5747 * parser/gapi2xml.pl (addPropElem): Distinguish CONSTRUCT ("must
be set at construct time") and CONSTRUCT_ONLY ("can only be set at
	construct time") properties, rather than marking them all
	"construct-only".

	* gnome/gnome-api.raw: 
	* gtk/gtk-api-2.4.raw: 
	* gtk/gtk-api-2.6.raw: Regen, causing a few formerly-read-only
	properties to become writable.

svn path=/trunk/gtk-sharp/; revision=45767
2005-06-10 15:46:24 +00:00
Mike Kestner
e24d72317a 2005-06-08 Mike Kestner <mkestner@novell.com>
* generator/ReturnValue.cs : don't write a sem in FromNative.
	* glib/ListBase.cs : handle GLib.Object explicit element types.
	* glib/Marshaler.cs : only copy lists if Count > 0.
	* gtk/Gtk.metadata : unhide Window.ListToplevels with a proper element
	type for automatic list to array marshaling.
	* gtk/Window.custom : kill manual ListToplevels impl.

svn path=/trunk/gtk-sharp/; revision=45654
2005-06-08 17:29:48 +00:00
Mike Kestner
0ceb4ccbca 2005-06-02 Mike Kestner <mkestner@novell.com>
* gtk/gtk-api-2.6.raw : regen.
	* parser/gapi_pp.pl : add G_DEFINE_TYPE_WITH_CODE handling.
	* parser/gapi2xml.pl : add G_DEFINE_TYPE_WITH_CODE parsing.
	[Fixes #74833]

svn path=/trunk/gtk-sharp/; revision=45338
2005-06-02 19:18:44 +00:00
Mike Kestner
ff096ac998 2005-06-02 Mike Kestner <mkestner@novell.com>
* glib/ListBase.cs : add a nested class to support filename encoded
	string element marshaling.
	* gtk/Gtk.metadata : mark the filenames and folders as filename
	encoded.
	* gtk/FileChooserDialog.custom : use new ListBase.FilenameString type
	for list element type of filenames and folders.
	* gtk/FileChooserWidget.custom : use new ListBase.FilenameString type
	for list element type of filenames and folders.
	[Fixes #72701]

svn path=/trunk/gtk-sharp/; revision=45334
2005-06-02 16:16:28 +00:00
Mike Kestner
fee353d525 2005-06-02 Mike Kestner <mkestner@novell.com>
* generator/ConstFilenameGen.cs : new generatable for filename encoded
	const string marshaling
	* generator/Makefile.am : add new file
	* generator/SymbolTable.cs : add new gfilename types.
	* glib/Marshaller.cs : add new filename-encoded string marshalers.
	* gtk/FileSelection.custom : use FilenamePtrToString to marshal.
	* gtk/Gtk.metadata : map the FileSelector filename types to my new
	imaginary gfilename type.  [Fixes #74963]

svn path=/trunk/gtk-sharp/; revision=45328
2005-06-02 14:16:52 +00:00
Mike Kestner
dfa84ee168 2005-06-02 Mike Kestner <mkestner@novell.com>
* gtk/Object.custom : only connect to Destroyed for managed subclasses
	and let the wrappers get disposed by the GC.

svn path=/trunk/gtk-sharp/; revision=45326
2005-06-02 14:01:04 +00:00
Dan Winship
f6f9fd0c79 * glib/Value.cs: Add a constructor and an explicit cast for
string[] (using a G_TYPE_STRV boxed value).

	* generator/SymbolTable.cs (SymbolTable): Map GStrv to string[].
	(The mapping relies on the above GLib.Value magic, so it only
	works correctly for properties, but that's ok, because GStrv isn't
	a real type anyway and only shows up in the api files for
	G_TYPE_STRV properties.) Makes the Gtk.AboutDialog Artists,
	Authors, and Documenters properties show up.

	* gtk/Gtk.metadata: hide
	AboutDialog.Get/SetArtists/Authors/Documenters, which can't be
	used to implement the Artists/Authors/Documenters properties,
	because the generated code doesn't know to NULL-terminate the
	arrays.

svn path=/trunk/gtk-sharp/; revision=45301
2005-06-01 17:58:28 +00:00
Dan Winship
40c4db88a4 * parser/gapi2xml.pl: Make the enum value parser do the right
thing with parenthesized values ("FOO = (1 << 2)") and within-type
	aliases ("GTK_ANCHOR_N = GTK_ANCHOR_NORTH"). Make it intentionally
	do the wrong thing with unparsable values (outputting them as-is
	into the api file) so that we are forced to fix them with metadata
	rather than silently getting incorrect values.

	* gdk/gdk-api-2.4.raw: 
	* gdk/gdk-api-2.6.raw (PixdataType): Now recognized as flags,
	not enum

	* gtk/Gtk.metadata: hide the enums ArgFlags and RcTokenType (which
	are not used by any wrapped API, and which formerly contained
	entirely wrong values).

	* gtk/gtk-api-2.4.raw: 
	* gtk/gtk-api-2.6.raw (AnchorType, SelectionMode): update with
	values for aliases

	* gnome/Gnome.metadata: fix value of Gnome.PrintButtons.Cancel

	* gnome/gnome-api.raw (PrintUnitBase, PaperSelectorFlags,
	PrintDialogFlags, PrintDialogRangeFlags): Now recognized as flags,
	with values.

svn path=/trunk/gtk-sharp/; revision=44937
2005-05-24 18:11:33 +00:00
Mike Kestner
bd5af2ca78 2005-05-16 Mike Kestner <mkestner@novell.com>
* makefile.win32 : remove 1.0 csc, default to 1.1.
	* gtk/TreeEnumerator.cs : remove C# 2.0 usage.
	* gtk/glue/makefile.win32 : remove duplicated cellrenderer.o.
	* vte/glue/Makefile.am : use VTE_DEPENDENCIES_CFLAGS.
	* */makefile.win32 : add glue args to generation target.

svn path=/trunk/gtk-sharp/; revision=44580
2005-05-16 19:07:27 +00:00
Dan Winship
b6d7f14268 * generator/StructBase.cs: update field-generation logic a bit
* generator/CodeGenerator.cs: add a --glue-includes flag

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

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

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

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

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

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

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

	* generator/Makefile.am (sources): update

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

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

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

svn path=/trunk/gtk-sharp/; revision=44563
2005-05-16 14:28:55 +00:00
Mike Kestner
afa17eacee 2005-05-13 Mike Kestner <mkestner@novell.com>
* gtk/Object.custom : hold refs for all managed subclasses. Release on
	Destroy. Dispose plain wrappers on Destroy also.
	* gtk/Widget.custom : remove the parent set hack since it's "handled"
	on Gtk.Object now.  All this will get fixed properly when we have
	access to owen's toggle_refs.

svn path=/trunk/gtk-sharp/; revision=44506
2005-05-13 17:38:51 +00:00
Mike Kestner
7c3ae396d0 reverting to a less broken state for now
svn path=/trunk/gtk-sharp/; revision=44421
2005-05-12 02:49:26 +00:00
Mike Kestner
551b1d3fd7 2005-05-11 Mike Kestner <mkestner@novell.com>
* glib/Object.cs : mark Dispose virtual.
	* gtk/Object.cs : release the Destroy handler in Dispose.

svn path=/trunk/gtk-sharp/; revision=44420
2005-05-12 00:42:21 +00:00
Mike Kestner
ef52ff2b33 2005-05-11 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : hide IconTheme.GetIconSizes.
	* gtk/IconTheme.custom : implement GetIconSizes because of its zero
	terminated array return value. 2.6 only.  [Fixes #74844]

svn path=/trunk/gtk-sharp/; revision=44414
2005-05-11 22:43:04 +00:00
Mike Kestner
caec90e311 2005-05-11 Eric Butler <eric@extremeboredom.net>
* gtk/Gtk.metadata : add IEnumerable iface to ListStore.
	* gtk/ListStore.cs : add GetEnumerator.
	* gtk/Makefile.am : add file.
	* gtk/TreeEnumerator.cs : root node enumerator for a TreeModel.

svn path=/trunk/gtk-sharp/; revision=44409
2005-05-11 19:41:45 +00:00
Mike Kestner
a900916eab remove a cwl
svn path=/trunk/gtk-sharp/; revision=44407
2005-05-11 18:24:31 +00:00
Mike Kestner
8ccfd329dc 2005-05-11 Mike Kestner <mkestner@novell.com>
* gtk/Widget.custom : manual ListMnemonicLabels implementation to
	return a Widget[].  [Fixes #74786]

svn path=/trunk/gtk-sharp/; revision=44404
2005-05-11 18:04:52 +00:00
Mike Kestner
c1564a1288 2005-05-10 Mike Kestner <mkestner@novell.com>
* gtk/Object.custom : Dispose on a Destroyed event.
	* gtk/Widget.custom : rework the parent_set hack to go direct to
	the native signal instead of using the event so we avoid rewrapping of
	already destroyed parents.

svn path=/trunk/gtk-sharp/; revision=44388
2005-05-11 13:12:09 +00:00
Mike Kestner
9e8e450e35 2005-05-06 Mike Kestner <mkestner@novell.com>
* bootstrap :
	* bootstrap-2.4 : use ln instead of cp for api files so reparsing
	causes rebuilds.
	* sources/gtk-sharp-2.6-sources.xml : moved from gtk-sharp-sources.xml
	plus fixed the pango, atk, and gdk raw filenames.
	* sources/gtk-sharp-2.4-sources.xml : sources file for 2.4 api.
	* sources/Makefile.am : added 2.4/2.6 targets for api and get-source
	with make api/get-source-code getting/parsing both versions.
	* */*.raw : regenerate

svn path=/trunk/gtk-sharp/; revision=44150
2005-05-06 17:10:48 +00:00
Mike Kestner
09c61ee026 2005-05-04 Mike Kestner <mkestner@novell.com>
* autogen.sh : error out with bootstrap help message.
	* bootstrap : replaces autogen.sh for the 2.5.x release line.
	* bootstrap-2.4 : replaces autogen.sh for the 1.9.x release line.
	* configure.in.in : renamed from configure.in and added substitution
	for version, dependencies, CFLAGS and CSFLAGS.
	* README : bootstrap docs
	* */*-api.raw : moved to api-2.6.raw for bootstrapping.
	* */*-api-2.4.raw : added 2.4 api files for bootstrapping.
	* */glue/Makefile.am : add GTK_SHARP_VERSION_CFLAGS.
	* pango/Attribute.cs : add a #if GTK_SHARP_2_6 block.
	* pango/glue/attribute.c : add a couple #ifdef GTK_SHARP_2_6 blocks.
	* sample/GtkDemo/* : make the 2.6 demos conditional.

svn path=/trunk/gtk-sharp/; revision=44047
2005-05-04 20:53:02 +00:00
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
9367bf618d remove one more method that should have gone away with yesterday's commit
svn path=/trunk/gtk-sharp/; revision=44033
2005-05-04 15:51:23 +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
Mike Kestner
f0f47bf078 2005-05-03 Mike Kestner <mkestner@novell.com>
* parser/gapi2xml.pl : parse const * const * Foo () properly.
	[Fixes #74710]

svn path=/trunk/gtk-sharp/; revision=43925
2005-05-03 13:59:25 +00:00
Dan Winship
b7e4cc507e * generator/Parameters.cs (IsHidden): method to check if a
parameter should be hidden in the managed sig (eg, because it's
	user_data, or it's the length of the preceding array/string, etc).
	(VisibleCount): the number of parameters that will actually be
	exposed in the managed signature.
	(IsAccessor): test VisibleCount, not Count
	(AccessorReturnType, AccessorName): deal with the fact that the
	accessor parameter might not be the first one.

	* generator/CallbackGen.cs:
	* generator/Signature.cs: use Parameters.IsHidden.

	* generator/Method.cs (Initialize): set is_set based on
	VisibleCount, not Count.
	(Validate): call base.Validate() before Initialize() so that
	VisibleCount will be correct in Initialize.

	* generator/MethodBody.cs (GetCallString, CallArrayLength,
	Initialize): update to deal with accessors with multiple args.

	* gtk/Clipboard.custom (SetText): implement as an Obsolete variant
	of the Text property

	* gtk/IconTheme.custom (SearchPath, SetSearchPath): obsolete
	SetSearchPath, implement a setter on SearchPath instead.

	* gtk/ListStore.custom (SetColumnTypes):
	* gtk/TreeStore.custom (SetColumnTypes): implement as an Obsolete
	variant of the ColumnTypes property.

	* glade/XML.custom (CustomHandler): implement as a property
	(SetCustomHandler): Mark this obsolete

	* glade/Global.custom (SetCustomHandler): deprecate in favor of
	XML.CustomHandler.

	* gnomedb/Editor.custom (SetText): implement as an Obsolete
	variant of the Text property

svn path=/trunk/gtk-sharp/; revision=43898
2005-05-02 20:10:03 +00:00
Mike Kestner
bb023fe221 2005-04-26 Mike Kestner <mkestner@novell.com>
* gtk/NodeStore.cs : implement IEnumerable.

svn path=/trunk/gtk-sharp/; revision=43594
2005-04-26 13:45:27 +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
Mike Kestner
1f555ab568 2005-04-21 Mike Kestner <mkestner@novell.com>
* configure.in : require gtk+ 2.6.
	* generator/ReturnValue.cs : invalidate Callback returns for now.
	* gtk/Gtk.metadata : some renames for conflicting new API.
	* parser/gapi2xml.pl : whitespace tweak for class VM regexen.
	* sources/Makefile.am : add new patch, kill atk patch, revise dirs.
	* sources/atkhyperlink.patch : kill unnecessary patch.
	* sources/gtkclipboard.patch : add new clipboard patch.
	* sources/gtk-sharp-sources.xml : parse gtk+-2.6.
	* */*-api.raw : regen pango, atk, gdk, and gtk for new versions.

svn path=/trunk/gtk-sharp/; revision=43412
2005-04-21 17:10:54 +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
Mike Kestner
8f9d1cb15d 2005-04-15 Mike Kestner <mkestner@novell.com>
* configure.in : remove unnecessary libxml check.
	* parser/gapi-parser.cs : use a System.Xml to kill gapi_format_xml.
	* parser/formatXml.c : kill.
	* parser/Makefile.am : kill gapi_format_xml
	* */*-api.raw : enormous whitespace diff. sorry dawgs on mono-patches.

svn path=/trunk/gtk-sharp/; revision=43080
2005-04-15 21:29:56 +00:00
Dan Winship
b8126ce3af * generator/ClassBase.cs (ParseImplements): record both managed
and unmanaged interface declarations.
	(Implements): check recursively

	* generator/ObjectGen.cs (Generate): output managed interfaces

	* gtk/Gtk.metadata: make Container implement IEnumerable

	* gtk/Container.custom (GetEnumerator): implement (a simplified
	form of Children).
	(AllChildren): add this (which accumulates the results of
	Forall()).
	(ForAll): mark ForAll(bool,CallbackInvoker) obsolete and add a
	ForAll(bool,Gtk.Callback) overload to replace it.

	* sample/PolarFixed.cs: new silly but fully-functional demo of
	how to subclass container.

	* sample/CustomNotebook.cs: kill this, since it was really
	complicated, and never fully functional.

	* sample/GtkDemo/DemoImages.cs (ToggleSensitivity): Use foreach
	directly on the container, rather than on its .Children.

svn path=/trunk/gtk-sharp/; revision=42805
2005-04-11 20:35:56 +00:00
Mike Kestner
c7b382782e 2005-04-11 Mike Kestner <mkestner@novell.com>
* gtk/Quit.custom : obsolete AddFull and implement Add properly.
	* gtk/TreePath.custom : add ctor (int[] indices).
	* gtk/Gtk.metadata : hide Quit.Add* and some ellipsis methods that are
	implemented manually already.

svn path=/trunk/gtk-sharp/; revision=42793
2005-04-11 17:15:38 +00:00
Dan Winship
7c80282cfd * gtk/Object.custom (Raw): Always ref the object, even if it's not
floating when we get it, since GLib assumes we hold a ref on it.
        [Fixes #74468]

        * gtk/Window.custom: remove refcount special-handling here

svn path=/trunk/gtk-sharp/; revision=42653
2005-04-07 20:05:52 +00:00
Mike Kestner
ec96098612 2005-04-06 Mike Kestner <mkestner@novell.com>
* gtk/FileFilter.custom : AddCustom delegate is destroy notified.
	* gtk/Gtk.metadata : hide FileFilter.AddCustom.  hide gtk_object_get|set.

svn path=/trunk/gtk-sharp/; revision=42611
2005-04-06 15:47:17 +00:00
Mike Kestner
f695e74bd6 2005-04-05 Mike Kestner <mkestner@novell.com>
* gtk/*.custom : persistent delegates for most of the remaining 
	"interesting" methods.

svn path=/trunk/gtk-sharp/; revision=42581
2005-04-05 20:14:02 +00:00
Mike Kestner
23ec73d6f9 2005-04-05 Mike Kestner <mkestner@novell.com>
* gtk/DestroyHelper.cs : implement an internal DestroyNotify handler 
	to release GCHandles.
	* gtk/*.custom : rework existing persistent delegate implementations
	to use destroy notify or PersistentData.

svn path=/trunk/gtk-sharp/; revision=42571
2005-04-05 14:48:49 +00:00
Alp Toker
35c2cf0086 2005-04-05 Alp Toker <alp@atoker.com>
* gtk/Menu.custom: don't re-implement the Screen getter in Gtk.Menu.
        Instead just return base.Screen, which is implemented by Widget.

svn path=/trunk/gtk-sharp/; revision=42546
2005-04-05 04:35:03 +00:00
Mike Kestner
a0519cac4d 2005-04-04 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : mark all the call scope callback params to quiet
	the warnings.

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

svn path=/trunk/gtk-sharp/; revision=42529
2005-04-04 16:27:08 +00:00
Mike Kestner
75509454d5 2005-04-01 Mike Kestner <mkestner@novell.com>
* gtk/TreeModelFilter.custom : manually implement SetVisibleFunc and
	SetModifyFunc to handle delegate persistence.
	* gtk/Gtk.metadata : hide methods.

svn path=/trunk/gtk-sharp/; revision=42471
2005-04-01 17:38:51 +00:00
Mike Kestner
3b333bf2b5 2005-04-01 Mike Kestner <mkestner@novell.com>
* gtk/Clipboard.custom : manually implement SetWithData and
	SetWithOwner to handle delegate persistence.
	* gtk/Gtk.metadata : hide methods.

svn path=/trunk/gtk-sharp/; revision=42465
2005-04-01 16:46:43 +00:00
Dan Winship
475b44e7ba * gdk/PixbufLoader.custom: Implement System.IO.Stream and
resource-file constructors (using code formerly in Pixbuf.custom)

	* gdk/Pixbuf.custom: Redo the stream and resource ctors in terms
	of the PixbufLoader ones.

	* gdk/PixbufAnimation.custom: Add stream and resource ctors

	* gtk/Image.custom: Add stream and resource ctors

svn path=/trunk/gtk-sharp/; revision=42463
2005-04-01 14:54:12 +00:00
Mike Kestner
7a37a4ed34 2005-03-30 Anthony Taranto <voltron@emptyrhetoric.com>
* gtk/Widget.custom : cause Allocation.Set to call SizeUpdate().
	* gtk/glue/widget.c : remove gtksharp_gtk_widget_set_allocation().

svn path=/trunk/gtk-sharp/; revision=42387
2005-03-30 20:47:56 +00:00
Mike Kestner
1256fdb2c1 2005-03-29 Mike Kestner <mkestner@novell.com>
* gtk/TreeStore.custom : fix a CLS incompliance in the Append
	Prepend, Insert, InsertBefore, and InsertAfter methods by obsoleting
	them and adding new *Node methods that are CLS compliant.
	[Fixes #73876]

svn path=/trunk/gtk-sharp/; revision=42355
2005-03-29 21:12:32 +00:00
Mike Kestner
2811fb74f8 2005-03-25 Mike Kestner <mkestner@novell.com>
* */makefile.win32 : add gapi-cdecl-insert to assembly target.

svn path=/trunk/gtk-sharp/; revision=42258
2005-03-25 18:31:10 +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
113a9460c4 2005-03-15 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : hide TreeSortable.SetSortFunc.
	* gtk/ListStore.custom : implement SetSortFunc for persistence.
	* gtk/Makefile.am : add custom file.
	* gtk/TreeModelSort.custom : implement SetSortFunc for persistence.
	* gtk/TreeSortable.custom : new file, add hidden method decls.
	* gtk/TreeStore.custom : implement SetSortFunc for persistence.

svn path=/trunk/gtk-sharp/; revision=41845
2005-03-15 17:30:59 +00:00
Dan Winship
d33153086e Re-fix for yesterday's fix that didn't actually work.
* gtk/ITreeNode.cs: add a "child" arg to TreeNodeRemovedHandler

	* gtk/TreeNode.cs (RemoveChild, OnChildRemoved): update for that

	* gtk/NodeStore.cs (child_deleted_cb): use the passed-in child;
	GetNodeAtPath won't work because the parent node already removed
	the child from its list

svn path=/trunk/gtk-sharp/; revision=41837
2005-03-15 15:49:30 +00:00
Dan Winship
e957a84316 * gtk/TreeNode.cs (AddNode): add an overload that takes a position
* gtk/NodeStore.cs (AddNode): likewise
	(AddNode, child_added_cb): when adding a node, recursively connect
	to the node signals on its children
	(RemoveNode, child_deleted_cb): when removing a node, recursively
	remove its children from node_hash.

svn path=/trunk/gtk-sharp/; revision=41805
2005-03-14 21:38:27 +00:00
Mike Kestner
49f8fb470d 2005-03-12 Mike Kestner <mkestner@novell.com>
* gtk/TreeViewColumn.custom : use PersistentData to hold the 
	CellDataFuncs.

svn path=/trunk/gtk-sharp/; revision=41744
2005-03-13 02:43:27 +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
b394413480 2005-03-10 Mike Kestner <mkestner@novell.com>
* gtk/Style.custom : add bg_pixmap accessors. remove IntPtr[] vars
	and s/6/5 for array sizes.
	* gtk/glue/style.c : add bg_pixmap field glue.
	[Fixes #73532]

svn path=/trunk/gtk-sharp/; revision=41648
2005-03-10 16:06:59 +00:00
Mike Kestner
d8ecc52b5e 2005-03-09 Mike Kestner <mkestner@novell.com>
* */*.custom : scrub for string usage in DllImports.
	* gnome/Makefile.am : remove IconTheme.custom, it's not generated.

svn path=/trunk/gtk-sharp/; revision=41615
2005-03-09 20:32:24 +00:00
Mike Kestner
9160dec10e 2005-03-09 Alexandre Gomes <alexmipego@hotmail.com>
* gtk/Gtk.metadata: Set GetVisibleRect param to be passed as out.

svn path=/trunk/gtk-sharp/; revision=41601
2005-03-09 15:06:38 +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
8b6cf6e5ea 2005-03-03 Mike Kestner <mkestner@novell.com>
* gdk/Gdk.metadata : remove unnecessary null_ok rules.
	* generator/Ctor.cs : don't add null params to CreateNativeObject call
	for InterfaceGen or OpaqueGen in addition to ObjectGen.
	* generator/Field.cs : simplify Object/Opaque gen.
	* generator/Method.cs : remove OpaqueGen special casing.
	* generator/OpaqueGen.cs : make FromNative null_ok robust.
	* generator/Signal.cs : remove arg marshaling ClassBase special case.
	* gtk/Gtk.metadata : remove unnecessary null_ok rules.

svn path=/trunk/gtk-sharp/; revision=41416
2005-03-03 22:40:32 +00:00
Mike Kestner
801cbb7e65 2005-03-03 Mike Kestner <mkestner@novell.com>
* gdk/Gdk.metadata : remove unnecessary null_ok rules.
	* generator/Ctor.cs : remove NullOk check.
	* gnome/Gnome.metadata : remove unnecessary null_ok rules.
	* gtk/Gtk.metadata : remove unnecessary null_ok rules.

svn path=/trunk/gtk-sharp/; revision=41413
2005-03-03 21:25:26 +00:00
Dan Winship
c47f1eb8d8 * gtk/Container.custom (ChildType): fix this to just call
gtk_container_child_type().

	* gtk/glue/container.c (gtksharp_container_base_child_type): kill

svn path=/trunk/gtk-sharp/; revision=41330
2005-03-01 18:02:16 +00:00
Dan Winship
05ddfae8dc * parser/gapi2xml.pl (parseTypeToken): don't parse punctuation
into the type name

	* gtk/gtk-api.raw: Regen, exposing the previously-broken
	AccelGroup.AccelActivate, AccelMap.Changed,
	ActionGroup.ConnectProxy, ActionGroup.DisconnectProxy,
	ActionGroup.PreActivate, ActionGroup.PostActivate, and
	Widget.EventAfter.

	* gtk/Gtk.metadata: Give proper names to the parameters of those
	signals

svn path=/trunk/gtk-sharp/; revision=41111
2005-02-23 20:16:40 +00:00
Dan Winship
eb4269562f * generator/Field.cs (Validate): new, to check that a field has a
valid type (or is hidden).

	* generator/StructBase.cs (Validate): new, to check that all of
	the struct fields have valid types

	* generator/BoxedGen.cs (Generate):
	* generator/StructGen.cs: (Generate): Call Validate() and bail out
	if it fails; it's no good to generate a struct with the wrong
	layout.

	* gdk/gdk-symbols.xml: add a line for GdkKey -> Gdk.Key. (There's
	no actual C type GdkKey, but we can use metadata to change uints
	to GdkKeys, which will then become Gdk.Keys.)

	* gtk/AccelKey.custom: remove the "Key" field (which was being
	added in the wrong place in the struct), since it's properly
	generated now.

	* gtk/Gtk.metadata: Fix the line that renames AccelKey.AccelKey
	to AccelKey.Key

	* gnomevfs/Gnomevfs.metadata: hide the (mis-parsed) "action" field
	in MimeAction, leaving the struct in the same broken state it was
	in with the old generator code

svn path=/trunk/gtk-sharp/; revision=41104
2005-02-23 17:37:33 +00:00
Mike Kestner
2dfc6f0d5e 2005-02-18 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : remove an incorrect and harmful rule on 
	ClipboardGetFunc.  [Fixes #69013]

svn path=/trunk/gtk-sharp/; revision=40874
2005-02-18 18:34:39 +00:00
Mike Kestner
86535bb201 2005-02-11 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : hide Menu.SetScreen.
	* gtk/Menu.custom : manually implement Screen prop.

svn path=/trunk/gtk-sharp/; revision=40529
2005-02-12 06:30:56 +00:00
Dan Winship
311cda7be0 * gtk/Gtk.metadata: Hide StyleGetProperty and StyleGetValist since
they're generated wrong, and StyleGet to avoid an ellipsis
	warning. (Also hide the deprecated ellipsis method "Set".)

	* gtk/Widget.custom (StyleGetProperty): implement manually, a la
	Gtk.Container.ChildGetProperty.

	* gtk/glue/widget.c (gtksharp_widget_style_get_property): glue for that

svn path=/trunk/gtk-sharp/; revision=40481
2005-02-11 15:59:22 +00:00
Mike Kestner
40f7e04616 2005-02-09 Mike Kestner <mkestner@novell.com>
* gtk/Widget.custom : use a static method for the ParentSet hack
	so we don't leak objects because the delegate holds an object ref.

svn path=/trunk/gtk-sharp/; revision=40346
2005-02-09 18:11:31 +00:00