Commit Graph

2068 Commits

Author SHA1 Message Date
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
Dan Winship
b59ca6cdba * pango/Scale.cs: rename the size constants to not have
underscores in their names (and add obsolete aliases for the old
	names).

	* sample/GtkDemo/DemoTextView.cs: use the new names

svn path=/trunk/gtk-sharp/; revision=42532
2005-04-04 18:50:50 +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
Dan Winship
246d4e1620 * samples/GtkDemo/*.cs: General fixup and cleanup; Remove some
gratuitous differences from the C version. Make comment and indent
	style consistent. Don't use "this." where not needed. Override
	OnDeleteEvent rather than connecting one's own DeleteEvent signal.

	* sample/GtkDemo/DemoApplicationWindow.cs (static
	DemoApplicationWindow): register the Gtk logo icon with
	StockManager so it shows up correctly in the toolbar.
	(AddActions): Register the radio items as radio items so they work
	right.

	* sample/GtkDemo/DemoHyperText.cs (EventAfter): handle
	link-clicking from Widget.WidgetEventAfter (as in the C version),
	rather than ButtonRelease, now that WidgetEventAfter is wrapped.

	* sample/GtkDemo/DemoImages.cs (DemoImages): use
	Gtk.Image.LoadFromResource (particularly to make the animation
	work right).
	(OnDestroyed): handle clean up (remove the timeout, etc)

	* sample/GtkDemo/DemoMain.cs (LoadStream): Fix handling of blank
	lines and whitespace to match the C version.

	* sample/GtkDemo/DemoPixbuf.cs (Expose): Use
	System.Runtime.InteropServices.Marshal.Copy() to copy
	pixbuf.Pixels to pass to DrawRgbImageDithalign, to make this more
	like the C version (and probably faster?)
	(timeout): Remove the FIXME since it seems to work now

	* sample/GtkDemo/DemoStockBrowser.cs: Simplify a bunch. Use
	reflection to get the C# names of the stock icons rather than
	trying to correctly re-mangle the ids. Display the Label with the
	accelerator underlined.

	* sample/GtkDemo/DemoTextView.cs (AttachWidgets): use
	Gtk.Image.LoadFromResource, so the image is properly loaded as an
	animation, not a static image. Don't set the combobox's "Active"
	property (for consistency with the C version).
	(InsertText): Fix miscellaneous differences with the C version.
	Remove some leftover cruft from earlier workarounds for gtk# bugs.

	* sample/GtkDemo/DemoTreeStore.cs (AddColumns): Make this more
	like the C version so the checkboxes are sensitized and hidden
	correctly on a per-row basis.

	* sample/GtkDemo/DemoUIManager.cs: Make the radio menu items work.

	* sample/GtkDemo/README: 
	* sample/GtkDemo/TODO: update

svn path=/trunk/gtk-sharp/; revision=42481
2005-04-01 21:08:14 +00:00
Mike Kestner
8a88e202e1 docs for TreeModelFilter updates.
svn path=/trunk/gtk-sharp/; revision=42472
2005-04-01 17:52:35 +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
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
fb6aeb35da 2005-03-30 Jeroen Zwartepoorte <jeroen@xs4all.nl>
* parser/gapi2xml.pl : parse gst type macros.

svn path=/trunk/gtk-sharp/; revision=42388
2005-03-30 20:53:46 +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
639c24e0de 2005-03-29 Mike Kestner <mkestner@novell.com>
* generator/Parser.cs : add symbol type='marshal' support.
	* gdk/Event.cs : add GetEvent method to wrap arbitrary events.
	* gdk/gdk-symbols.xml : make Event, EventAny, and EventNoExpose
	marshal symbols using Event.GetEvent (). [Fixes #74184]

svn path=/trunk/gtk-sharp/; revision=42344
2005-03-29 18:02:04 +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
4e73c0c204 oops, typo
svn path=/trunk/gtk-sharp/; revision=42320
2005-03-28 21:58:36 +00:00
Mike Kestner
e13ae8a7d7 2005-03-28 Mike Kestner <mkestner@novell.com>
* gdk/Pixbuf.custom  : add FromNative static method and obsolete
	CreateFromNative, which should've been static.  [Fixes #74155]

svn path=/trunk/gtk-sharp/; revision=42319
2005-03-28 21:57:19 +00:00
Mike Kestner
b35b48248c 2005-03-28 Mike Kestner <mkestner@novell.com>
* generator/Signal.cs  : Dispose the values passed to 
	g_signal_chain_from_overriden in base VM invocations. [Fixes #73522]

svn path=/trunk/gtk-sharp/; revision=42312
2005-03-28 18:26:00 +00:00
Mike Kestner
282924fdf1 add docs for new cdecl cb attr and doc ObjectManager
svn path=/trunk/gtk-sharp/; revision=42260
2005-03-25 21:22:18 +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
a7c49200ee 2005-03-25 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : add CDeclCallback attrs to native dels.
	* generator/Signal.cs : add CDeclCallback attrs to native dels.

svn path=/trunk/gtk-sharp/; revision=42256
2005-03-25 18:13:00 +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
John Luke
d9d19a3450 fix DemoHyperText
small sizing change for DemoExpander

svn path=/trunk/gtk-sharp/; revision=42185
2005-03-24 04:32: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
Dan Winship
415773f269 * en/Gtk/NodeStore.xml (AddNode):
* en/Gtk/TreeNode.xml (AddChild): I, for one, welcome our new
	insert overloads.

	* en/Gtk/TreeNodeRemovedHandler.xml: add "child" arg

svn path=/trunk/gtk-sharp/; revision=41846
2005-03-15 17:34:36 +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
John Luke
1b4913630b use new PersistentData instead of Data
svn path=/trunk/gtk-sharp/; revision=41844
2005-03-15 17:30:29 +00:00
Mike Kestner
35395fbfe0 oops, forgot to doc PersistentData
svn path=/trunk/gtk-sharp/; revision=41843
2005-03-15 17:16:21 +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
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
Mike Kestner
54d88f4e35 2005-03-14 Mike Kestner <mkestner@novell.com>
* configure.in : rework the gtkhtml check for 3.6.

svn path=/trunk/gtk-sharp/; revision=41822
2005-03-15 04:26:50 +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
6a6e89d67e 2005-03-12 Mike Kestner <mkestner@novell.com>
* glade/Glade.metadata : mark the XMLCustomWidgetHandler string params
	const-gchar*.  Wonder how many of these are gonna screw us?

svn path=/trunk/gtk-sharp/; revision=41745
2005-03-13 03:22:50 +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
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
320977f58f 2005-03-10 Mike Kestner <mkestner@novell.com>
* generator/SymbolTable.cs : fix gssize and gsize, they aren't 32 bit
	like the docs say they are.

svn path=/trunk/gtk-sharp/; revision=41666
2005-03-10 22:15:07 +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
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
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
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
24bbc054f2 2005-03-07 Mike Kestner <mkestner@novell.com>
* generator/MethodBody.cs : remove an unused var.
	* generator/ReturnValue.cs : privatize a couple props. Refactor the
	SymbolTable lookup logic to be generatable based.

svn path=/trunk/gtk-sharp/; revision=41528
2005-03-07 15:54:49 +00:00
Dan Winship
7dbba612c5 s/#86620/#68820/
svn path=/trunk/gtk-sharp/; revision=41522
2005-03-07 14:00:43 +00:00