Commit Graph

420 Commits

Author SHA1 Message Date
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
Mike Kestner
3e5b480903 2005-02-03 Mike Kestner <mkestner@novell.com>
* gtk/NodeStore.cs : use CreateNativeObject to allow subclassing.
	[Fixes #71749]

svn path=/trunk/gtk-sharp/; revision=40065
2005-02-03 15:03:17 +00:00
Mike Kestner
6d888d8689 2005-01-31 Mike Kestner <mkestner@novell.com>
* gtk/FileChooserDialog.custom : move backend to first param to
	avoid conflicts with button names in overloaded ctor.

svn path=/trunk/gtk-sharp/; revision=39856
2005-01-31 15:49:56 +00:00
Mike Kestner
289b127b10 2005-01-28 Mike Kestner <mkestner@novell.com>
* gtk/Dialog.custom : add a params array for button info to the ctor.
	* gtk/FileChooserDialog.custom : add a params array for button info to 
	both ctors.  Chain them to IntPtr.Zero.
	* gtk/Gtk.metadata : hide the ellipsis ctors for the dialog types.
	[Fixes #71818]
	* sample/GtkDemo/DemoDialog.cs : make the InteractiveDialog use the
	new Dialog ctor as it does in the c version.

svn path=/trunk/gtk-sharp/; revision=39713
2005-01-28 16:03:27 +00:00
Mike Kestner
ccd3cebf9d 2005-01-27 Mike Kestner <mkestner@novell.com>
* gtk/NodeSelection.cs : use new GetSelectedRows() overload.
	* gtk/TreeSelection.custom : add a GetSelectedRows overload without the
	out model param. [Fixes #71814]

svn path=/trunk/gtk-sharp/; revision=39654
2005-01-27 16:56:54 +00:00
Mike Kestner
7ecf198bc9 2005-01-27 Mike Kestner <mkestner@novell.com>
* gtk/NodeView.cs : fix the value creation in the ctor.

svn path=/trunk/gtk-sharp/; revision=39649
2005-01-27 15:30:19 +00:00
Mike Kestner
be5138c90b 2005-01-26 Mike Kestner <mkestner@novell.com>
* gtk/NodeView.cs : always use CreateNativeObject.

svn path=/trunk/gtk-sharp/; revision=39604
2005-01-26 22:46:24 +00:00
Mike Kestner
e601006aa3 2005-01-26 Mike Kestner <mkestner@novell.com>
* gtk/NodeView.cs : always use CreateNativeObject.

svn path=/trunk/gtk-sharp/; revision=39603
2005-01-26 22:41:20 +00:00
Mike Kestner
fb12bb5f61 2005-01-25 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : hide all the SignalFunc using Toolbar methods.
	* gtk/Makefile.am : add the new custom.
	* gtk/Toolbar.custom : implement the SignalFunc methods. Deal with
	null for Widget params in *Element.

svn path=/trunk/gtk-sharp/; revision=39509
2005-01-25 15:28:42 +00:00
Mike Kestner
ea489c2353 2005-01-24 Mike Kestner <mkestner@novell.com>
* gda/Makefile.am : add new custom.
	* gda/XmlConnection.custom : add backcompat static ctor.
	* generator/ClassBase.cs : refactor lookup logic to here from Ctor
	and improve the collision resolution.
	* generator/Ctor.cs : refactor to use MethodBase.
	* generator/Makefile.am : add new file.
	* generator/MethodBase.cs : new base class for ctors and methods.
	* generator/Method.cs : refactor to use MethodBase.
	* generator/StructBase.cs : move some logic from here to Ctor.
	* gnome/CanvasPathDef.custom : add backcompat static ctor.
	* gnome/GPPath.custom : add backcompat static ctor.
	* gnome/Makefile.am : add new custom.
	* gtk/Gtk.metadata : mark a colliding Button ctor shared.

svn path=/trunk/gtk-sharp/; revision=39431
2005-01-24 18:25:02 +00:00