Commit Graph

465 Commits

Author SHA1 Message Date
Mike Kestner
a948792be0 2009-11-30 Mike Kestner <mkestner@novell.com>
* */Makefile.am: standardize on - options over / options for 
	consistency.  Also assists with build on msys. [Fixes #550667]

svn path=/trunk/gtk-sharp/; revision=147125
2009-11-30 20:40:34 +00:00
Mike Kestner
536c3aca54 2009-11-30 Mike Kestner <mkestner@novell.com>
* generator/Method.cs: support win32_utf8_variant attribute on methods.
	* glib/*.cs: support win32 utf8 variant methods.
	* gtk/*.custom: support win32 utf8 variant methods.
	* gtk/Gtk.metadata: mark some win32_utf8_variant methods.
	  [Fixes #550961] Adapted from a patch by Tor Lillqvist.

svn path=/trunk/gtk-sharp/; revision=147113
2009-11-30 17:39:11 +00:00
Mike Kestner
e216baa99f 2009-11-28 Mike Kestner <mkestner@novell.com>
* glib/GException.cs: add Code and Domain props to expose the GError 
	  fields to interested users.  [Fixes #555675]

svn path=/trunk/gtk-sharp/; revision=147060
2009-11-28 18:42:36 +00:00
Mike Kestner
95a430c74d 2009-11-01 Mike Kestner <mkestner@novell.com>
* glib/Value.cs: avoid cast exceptions passing ints as objects on
	  gulong values.  [Fixes #539812]

svn path=/trunk/gtk-sharp/; revision=145169
2009-11-01 17:49:57 +00:00
Mike Kestner
95bd0d6271 2009-10-30 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: avoid another exception on bogus assm.Locations.
	  [Fixes #546045]

svn path=/trunk/gtk-sharp/; revision=145132
2009-10-31 02:18:21 +00:00
Andrés G. Aragoneses
df7e0afe5c Minor nitpick lacking in r142364
svn path=/trunk/gtk-sharp/; revision=143534
2009-10-06 17:12:53 +00:00
Mike Kestner
5de50e936f 2009-09-23 Mike Kestner <mkestner@novell.com>
* glib/Value.cs: support long and ulong gtypes. still can't construct
	generically, but can cast to long/ulong and access via Val prop.
	[Fixes #539812]

svn path=/trunk/gtk-sharp/; revision=142588
2009-09-24 17:21:16 +00:00
Brad Taylor
0eece4438f 2009-09-22 Brad Taylor <brad@getcoded.net>
* glib/Idle.cs: 
	* glib/Timeout.cs: Don't try to remove the handler from the managed
	hashtable twice, add a comment explaining the need for the else branch.


svn path=/trunk/gtk-sharp/; revision=142364
2009-09-22 02:52:41 +00:00
Brad Taylor
445fe30046 2009-09-22 Brad Taylor <brad@getcoded.net>
* glib/Idle.cs: 
	* glib/Timeout.cs: Make sure to remove the unmanaged reference to the
	delegate when we're disposed or finalized.  In particular, this fixes a
	problem where GLib.Object's PerformQueuedUnrefs was being called after
	both the object and the handler had been GC'ed, resulting in a
	segfault.


svn path=/trunk/gtk-sharp/; revision=142362
2009-09-22 02:19:50 +00:00
Mike Kestner
8c9e862d70 2009-09-11 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: add support for native instantiation of 
	managed types.
	* glib/ParamSpec.cs: add Flags ctor overload.
	* sample/NativeInstantiationTest.cs: new sample to test the
	unmanaged instantiation capability.
	Based on a patch from Sebastian Dröge [Fixes #499900]

svn path=/trunk/gtk-sharp/; revision=141819
2009-09-12 01:01:12 +00:00
Christian Hoff
7b752d233c 2009-09-03 Christian Hoff <christian_hoff@gmx.net>
* glib/Global.cs: Kill the calling convention field again.
	It breaks GLib 2.x compatibility in the generator and there is
	probably no need to make the calling convention configurable.
	* .cs, *.custom: Hardcode Cdecl calling convention instead of
	using GLib's field.

svn path=/trunk/gtk-sharp/; revision=141283
2009-09-03 19:50:53 +00:00
Christian Hoff
58e97c087a 2009-09-02 Christian Hoff <christian_hoff@gmx.net>
* glib/Global.cs: Add a public constant field specifying the
	calling convention used by GLib and depending libraries.
	By now it's hardcoded to Cdecl as every non-Win32 runtime
	should ignore this attribute.
	* *.cs, *.custom: Use GLib.Global.CallingConvention for both
	pinvokes and callbacks. Plugs a stack leak on Win32. All
	pinvokes defaulted to StdCall and thus the stack was never
	cleaned up.

svn path=/trunk/gtk-sharp/; revision=141175
2009-09-02 20:17:37 +00:00
Christian Hoff
1e97a1046f 2009-08-30 Christian Hoff <christian_hoff@gmx.net>
Complete the major version jump. Gtk# 3 and 2 are now both
	installable within the same prefix.

	* */glue/Makefile.am: Produce *sharpglue-3 gluelibs.
	* *.custom, *.cs: pinvoke the new glue library.
	* *-2.0.pc.in: Rename to *-3.0.pc.in.

svn path=/trunk/gtk-sharp/; revision=140941
2009-08-30 20:06:33 +00:00
Christian Hoff
ed804756cc 2009-08-19 Christian Hoff <christian_hoff@gmx.net>
* glib/MainContext.cs: Add API to create new MainContexts. Add a few
	missing methods.
	* glib/MainLoop.cs: Allow creating MainLoops in non-default MainContexts.
	[Fixes #526232]
	* glib/MainContext.xml, glib/MainLoop.xml: Add docs for the new API.	

svn path=/trunk/gtk-sharp/; revision=140256
2009-08-19 16:07:44 +00:00
Mike Kestner
7db633218f 2009-08-07 Mike Kestner <mkestner@novell.com>
* configure.in.in: add new dir and autofu for it.
	* Makefile.am: add new dir
	* gapi/*: a small extension method library to add generation-related
	api to GType in 2.0. Access it with -pkg:gapi-2.0-compat to pick up
	the needed refs.
	* generator/GObjectVM.cs: generate new GType getter methods.
	* generator/ObjectGen.cs: generate new GType getter methods.
	* glib/GType.cs: change a few props to methods to make them extension
	method friendly for 2.0 compat.
	* glib/Object.cs: use new GType getter methods.
	* glib/Value.cs: use new GType getter methods.
	* gtk/Widget.custom: use new GetClassPtr method.

svn path=/trunk/gtk-sharp/; revision=139609
2009-08-08 23:42:15 +00:00
Mike Kestner
10cae1b1cb 2009-08-07 Mike Kestner <mkestner@novell.com>
* generator/ObjectGen.cs: kill GType ctor generation.
	* glib/InitiallyUnowned.cs: kill obsolete GType ctor.
	* glib/Object.cs: kill obsolete GType ctor.
	* gtk/Gtk.metadata: kill disable_gtype_ctor rules.
	* gtk/Widget.cs: kill obsolete GType ctor.

svn path=/trunk/gtk-sharp/; revision=139600
2009-08-08 03:06:53 +00:00
Mike Kestner
6d885fc351 2009-08-07 Mike Kestner <mkestner@novell.com>
* glib/Log.cs: rework the LogFunc marshaling and add SetDefaultHandler
	binding to override all domains easily. [Fixes #517857]

svn path=/trunk/gtk-sharp/; revision=139599
2009-08-08 03:00:35 +00:00
Mike Kestner
b3f341768f 2009-08-01 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: lock the types hash to support threaded access and 
	type registration.  Apparently gtype access/registration is threadsafe
	in glib.  [Fixes #526229]

svn path=/trunk/gtk-sharp/; revision=139247
2009-08-01 17:20:35 +00:00
Christian Hoff
a7bebb15b1 2009-07-21 Christian Hoff <christian_hoff@gmx.net>
* glib/GInterfaceAdapter.cs: Fix a leak related to GCHandles not being freed.
	Patch from Mike Kestner with a minor tweak by me. [Fixes #523306]

svn path=/trunk/gtk-sharp/; revision=138263
2009-07-21 06:51:10 +00:00
Mike Kestner
c339d40680 2009-07-12 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: add ResolveType event and TypeResolutionHandler delegate
	declarations.  This mechanism supports the lazy registration of type mappings
	by bindings.  Patch from Sebastian with minor naming tweek.  [Fixes #497667]

svn path=/trunk/gtk-sharp/; revision=137759
2009-07-12 23:12:29 +00:00
Mike Kestner
bb2864a9a0 2009-07-12 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: fail gracefully for non-studly-case typename lookups.
	[Fixes #515453]

svn path=/trunk/gtk-sharp/; revision=137756
2009-07-12 21:34:46 +00:00
Christian Hoff
940cf88750 2009-07-02 Christian Hoff <christian_hoff@gmx.net>
* configure.in.in: Target .net 2.0 profile
	* gapi-cdecl-insert: Kill. We are now using the UnmanagedFunctionPointerAttribute
	for callbacks.
	* glib/CdeclCallback: Mark obsolete.
	* generator/*.cs:
	* *.custom: Use [UnmanagedFunctionPointer (CallingConvention.Cdecl)] instead of
	[GLib.CDeclCallback].

svn path=/trunk/gtk-sharp/; revision=137323
2009-07-02 20:18:10 +00:00
Mike Kestner
8bb550b893 2009-05-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* glib/Value.cs: return int object value for GType.Enum values if
	the explicit gtype is not found.  [Fixes #503060]

svn path=/trunk/gtk-sharp/; revision=134075
2009-05-13 19:27:39 +00:00
Mike Kestner
95c418fe40 2009-05-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* glib/ValueArray.cs: use type specific PtrToStructure marshaling to
	avoid ArgumentExceptions.  [Fixes #503467]

svn path=/trunk/gtk-sharp/; revision=134074
2009-05-13 19:04:40 +00:00
Mike Kestner
a979e2211b 2009-05-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* glib/Value.cs: Add support for ValueArrays inside GLib.Values.
	* glib/ValueArray.cs: Add GType property to get the ValueArray GType.
	[Fixes #503048]

svn path=/trunk/gtk-sharp/; revision=134073
2009-05-13 18:57:31 +00:00
Mike Kestner
bccd244a70 2009-05-12 Mike Kestner <mkestner@novell.com>
* glib/Value.cs: explicit exception for unknown props.
	[Fixes #502043] Patch by Sebastian Dröge.

svn path=/trunk/gtk-sharp/; revision=134021
2009-05-12 23:53:50 +00:00
Mike Kestner
bb08d67c7a 2009-05-12 Mike Kestner <mkestner@novell.com>
* glib/ValueArray.cs: make ctor(IntPtr) public for binding usage. 
	[Fixes #503189] Patch by Sebastian Dröge.

svn path=/trunk/gtk-sharp/; revision=134011
2009-05-12 23:10:27 +00:00
Mike Kestner
e91a71949a 2009-05-06 Mike Kestner <mkestner@novell.com>
* glib/Idle.cs: add a Remove overload for consistency.
	* glib/Timeout.cs: add a Remove overload for consistency.
	[Fixes #356138]

svn path=/trunk/gtk-sharp/; revision=133702
2009-05-07 01:22:41 +00:00
Mike Kestner
26362ced64 2009-05-05 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: ensure threading is initialized in cctor.
	* gtk/Application.cs: ditto.

svn path=/trunk/gtk-sharp/; revision=133585
2009-05-05 15:15:46 +00:00
Mike Kestner
f11bd79000 2009-05-03 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: revert to old LookupType behavior when Handle is
	not set.  [Fixes #500417]

svn path=/trunk/gtk-sharp/; revision=133451
2009-05-03 22:49:12 +00:00
Stephane Delcroix
983fb81a96 2009-05-03 Stephane Delcroix <sdelcroix@novell.com>
* glib/Idle.cs:
	* glib/Timeout.cs: add Add() overloads taking a priority
	* glib/Makefile.am:
	* glib/Property.cs: Property enum, used as argument for the new Add
	overloads

svn path=/trunk/gtk-sharp/; revision=133444
2009-05-03 19:34:22 +00:00
Mike Kestner
a3bb0c1e31 2009-05-01 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: get gtype from instance data.
	* glib/Value.cs: use instance NativeType when initing for props.
	[Fixes #500157] Patch by Sebastian Dröge.

svn path=/trunk/gtk-sharp/; revision=133282
2009-05-01 18:40:44 +00:00
Christian Hoff
643a910cd6 2009-04-21 Christian Hoff <christian_hoff@gmx.net>
* glib/Value.cs: Fixes for fundamental GType support. Patch
	provided by Sebastian Dröge.

svn path=/trunk/gtk-sharp/; revision=132225
2009-04-21 08:16:57 +00:00
Christian Hoff
37c1f46d17 2009-04-21 Christian Hoff <christian_hoff@gmx.net>
* gtk/Widget.custom: Deglued implementation of StyleGetProperty.

svn path=/trunk/gtk-sharp/; revision=132224
2009-04-21 08:11:35 +00:00
Andrés G. Aragoneses
a63841988e * atk/Makefile.am:
* glib/Makefile.am:
* Makefile.include: (Revert revision 131780) Track r131942.

svn path=/trunk/gtk-sharp/; revision=131943
2009-04-16 22:00:07 +00:00
Christian Hoff
8fda284c32 2009-04-16 Christian Hoff <christian_hoff@gmx.net>
* glib/Value.cs: Support for additional fundamental GTypes. Invoke
	constructor of corresponding managed type to convert a GValue into
	its managed representation and a SetGValue method to do that vice
	versa. Patch contributed by Sebastian Dröge.

svn path=/trunk/gtk-sharp/; revision=131931
2009-04-16 20:03:35 +00:00
Andrés G. Aragoneses
005731b75c 2009-04-15 Andrés G. Aragoneses <aaragoneses@novell.com>
* atk/Makefile.am
        * glib/Makefile.am: take advantage of the same InternalsVisibleTo
        because the moon assemblies will be monomerged.


svn path=/trunk/gtk-sharp/; revision=131835
2009-04-15 22:33:26 +00:00
Andrés G. Aragoneses
722954e799 2009-04-15 Andrés G. Aragoneses <aaragoneses@novell.com>
* atk/Makefile.am
        * glib/Makefile.am
        * Makefile.include: Added new 'moonlight' target, to build with
        smcs.


svn path=/trunk/gtk-sharp/; revision=131780
2009-04-15 15:32:41 +00:00
Christian Hoff
291ee61b2d 2009-04-13 Christian Hoff <christian_hoff@gmx.net>
Add support for virtual methods(vm) to the generator.

	* parser/gapi2xml.pl: Generate a class_struct element with
	all members of the class structure. Dump the first (instance)
	parameter for signal and vm elements. Bump up parser version.
	* generator/GObjectVM.cs: Added. Support for GObject virtual methods.
	* generator/DefaultSignalHandler.cs: Signal specific part of vm
	generation.
	* generator/InterfaceVM.cs: New class for interface vms.
	* generator/ObjectBase.cs: Parse the class struct.

svn path=/trunk/gtk-sharp/; revision=131604
2009-04-13 17:44:48 +00:00
Mike Kestner
edf5b066e1 2009-04-09 Mike Kestner <mkestner@novell.com>
* glib/ListBase.cs: fix g_object_unref dllimport lib.
	[Fixes #493128]

svn path=/trunk/gtk-sharp/; revision=131388
2009-04-09 14:38:16 +00:00
Christian Hoff
b2a4c7ee7c 2009-02-24 Christian Hoff <christian_hoff@gmx.net>
* glib/Value.cs: Change the pad fields handling again as the 
	previous approach didn't work on Win32.   [Fixes #478578]

svn path=/trunk/gtk-sharp/; revision=127892
2009-02-24 20:06:07 +00:00
Christian Hoff
e91ff2bdad 2009-02-17 Christian Hoff <christian_hoff@gmx.net>
* sample/gtk-gio/MountOperation.cs:
	* gtk/Builder.custom:
	* glib/Value.cs: Resurrect build for MS .NET Framework

svn path=/trunk/gtk-sharp/; revision=127183
2009-02-17 17:38:05 +00:00
Mike Kestner
bc188c9358 2009-01-29 Mike Kestner <mkestner@novell.com>
* generator/OpaqueGen.cs: generate a finalizer for classes which
	have free or unref methods and ensure it runs on the gui thread.
	* glib/Opaque.cs:  remove finalize handling.
	Fixes a 'resurrection' issue with the previous 419777 fix.

svn path=/trunk/gtk-sharp/; revision=124940
2009-01-29 16:26:09 +00:00
Mike Kestner
d7f231117d 2009-01-27 Mike Kestner <mkestner@novell.com>
* glib/Opaque.cs:  ensure we are running on the gui thread when we
	dispose from the finalizer.  [Fixes #419777]

svn path=/trunk/gtk-sharp/; revision=124683
2009-01-27 17:45:15 +00:00
Mike Kestner
1d9f50edb7 2009-01-26 Mike Kestner <mkestner@novell.com>
* glib/Value.cs:  make the pad fields a blink explicitly sized struct
	instead to avoid alignment issues on x86. [Fixes #469135]

svn path=/trunk/gtk-sharp/; revision=124561
2009-01-26 20:42:50 +00:00
Mike Kestner
27c413091c 2009-01-23 Mike Kestner <mkestner@novell.com>
* Makefile.include:
	* doc/Makefile.am:
	* glib/Makefile.am:
	* gtkdotnet/Makefile.am: parallel make patches from Diego Pettenò  
	and Bertrand Lorentz. [Fixes #421063]

svn path=/trunk/gtk-sharp/; revision=124400
2009-01-24 04:47:54 +00:00
Mike Kestner
33849fd085 2009-01-09 Mike Kestner <mkestner@novell.com>
* glib/Opaque.cs (GetOpaque): return null for IntPtr.Zero.

svn path=/trunk/gtk-sharp/; revision=123140
2009-01-12 22:15:47 +00:00
Mike Kestner
1a16f66803 2009-01-08 Mike Kestner <mkestner@novell.com>
* generator/ReturnValue.cs: map gfilename* list elements to type
	ListBase.FilenameString so they are marshaled correctly.
	* glib/Marshaller.cs: handle FilenameStrings in ListPtrToArray.
	* gtk/Gtk.metadata: FileChooser.GetFilenames and ListShortcutFolders
	return type mangling to avoid custom implementations.
	* gtk/FileChooser*.custom: kill manual Filenames and ShortcutFolders.

svn path=/trunk/gtk-sharp/; revision=122802
2009-01-08 18:43:00 +00:00
Andrés G. Aragoneses
8ffc1097fb revert r122505
svn path=/trunk/gtk-sharp/; revision=122553
2009-01-06 15:27:12 +00:00
Andrés G. Aragoneses
1f40330573 2009-01-05 Andrés G. Aragoneses <aaragoneses@novell.com>
* GType.cs: convert GType.Is to a non-static function.
        * Value.cs: track API.
        [Last cosmetic bit from #448009]


svn path=/trunk/gtk-sharp/; revision=122505
2009-01-06 03:36:56 +00:00
Mike Kestner
65f96d21dc 2009-01-04 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: fix incorrect null check noticed by Christian Hoff.
	[Fixes #463445]

svn path=/trunk/gtk-sharp/; revision=122390
2009-01-04 16:52:22 +00:00
Andrés G. Aragoneses
a8b28619be 2008-12-22 Andrés G. Aragoneses <aaragoneses@novell.com>
* glib/GType.cs: simplify, avoiding a static method.  
        * generator/InterfaceGen.cs: track API.
        * glib/Value.cs: reuse g_type_is_a.
        [Improves fix for #448009 in r121990]


svn path=/trunk/gtk-sharp/; revision=121991
2008-12-22 17:16:03 +00:00
Andrés G. Aragoneses
8191911b26 2008-12-22 Andrés G. Aragoneses <aaragoneses@novell.com>
* generator/InterfaceGen.cs: use the new GLib API to detect
	instances that don't implement GInterfaces.
	* glib/GType.cs: add new API for checking if an IntPtr instance
	implements a certain GType.
	[Fixes #448009]


svn path=/trunk/gtk-sharp/; revision=121990
2008-12-22 17:02:09 +00:00
Stephane Delcroix
3a87d8d650 2008-12-11 Stephane Delcroix <sdelcroix@novell.con>
* glib/Timeout.cs: map AddSeconds ().

svn path=/trunk/gtk-sharp/; revision=121925
2008-12-20 13:03:07 +00:00
Mike Kestner
89afb3f49f 2008-12-19 Mike Kestner <mkestner@novell.com>
* generator/BoxedGen.cs: don't generate glue dependencies.
	* glib/*.cs: remove glibsharpglue usage except thread.c.
	* glib/glue/*.c: kill all but thread.c. need glib 2.20 to kill
	it eventually.
	* pango/Attr*.cs: kill glue usage.
	* pango/glue/*.c: kill all but generated.c. it's next.
	* gtk/TreeIter.custom: kill a dumb glibsharpglue usage.

svn path=/trunk/gtk-sharp/; revision=121880
2008-12-19 18:57:42 +00:00
Andrés G. Aragoneses
470776ccea * glib/Signal.cs: Improve protection against invalid signals.
svn path=/trunk/gtk-sharp/; revision=121045
2008-12-08 21:54:20 +00:00
Mike Kestner
7a52b14c1c 2008-11-25 Mike Kestner <mkestner@novell.com>
* glib/Value.cs: fix for 'IntPtr as object' value construction.

svn path=/trunk/gtk-sharp/; revision=120041
2008-11-26 01:56:46 +00:00
Mike Kestner
84a63992fd remove a C.WL, oops
svn path=/trunk/gtk-sharp/; revision=119652
2008-11-21 17:47:37 +00:00
Mike Kestner
8d6e58e175 2008-11-21 Mike Kestner <mkestner@novell.com>
* glib/ManagedValue.cs: rework to ref count a ManagedValue instance
	and pass a GCHandle to it around, instead of taking out multiple
	gchandles on the managed target itself.

svn path=/trunk/gtk-sharp/; revision=119648
2008-11-21 17:42:16 +00:00
Stephane Delcroix
1d63a0e3e7 Global.ApplicationName property
2008-11-21  Stephane Delcroix  <sdelcroix@novell.com>

	* glib/Global.cs: implement Global.ApplicationName for localized
	application name.

svn path=/trunk/gtk-sharp/; revision=119633
2008-11-21 16:54:10 +00:00
Stephane Delcroix
68ec7f1ebd map g_format_size_for_display in Format.cs
2008-11-21  Stephane Delcroix  <sdelcroix@novell.com>

	* Makefile.am:
	* glib/Format.cs: new class to map the g_format methods

svn path=/trunk/gtk-sharp/; revision=119630
2008-11-21 16:42:46 +00:00
Brad Taylor
45622e1d33 2008-11-14 Brad Taylor <brad@getcoded.net>
* glib/Object.cs: Bind g_object_notify.

	* doc/en/GLib/Object.xml: Document new API.


svn path=/trunk/gtk-sharp/; revision=118864
2008-11-14 16:21:16 +00:00
Mike Gorse
c9d658f381 2008-11-04 Mike Gorse <mgorse@novell.com>
* glib/PtrArray.cs, glib/glue/ptrarray.c, glib/Makefile.am,
	  glib/glue/Makefile.am, glib/gtype.cs, generator/SymbolTable.cs,
	  generator/ReturnValue.cs: Add PtrArray.
	* glib/Marshaller.cs: Add PtrArrayToArray.

	* atk/Atk.metadata: Specify GetTarget return type.

	* atk/Object.custom, atk/glue/object.c: Support overriding
	  RefRelationSet.

svn path=/trunk/gtk-sharp/; revision=117919
2008-11-04 20:17:00 +00:00
Mike Kestner
4de7ad4914 2008-10-29 Mike Kestner <mkestner@novell.com>
* glib/Signal.cs : custom marshaling hooks
	* glib/SignalClosure.cs : support for custom marshalers.

svn path=/trunk/gtk-sharp/; revision=117424
2008-10-29 21:41:57 +00:00
Stephane Delcroix
e7a4cbea59 2008-10-27 Stephane Delcroix <sdelcroix@novell.com>
* glib/ListBase.cs: DataMarshal: create the right object for *Adapter
	list items.

svn path=/trunk/gtk-sharp/; revision=117169
2008-10-27 15:08:02 +00:00
Mike Kestner
d059903d1c 2008-10-24 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: register IntPtr.

svn path=/trunk/gtk-sharp/; revision=116997
2008-10-24 22:03:49 +00:00
Mike Kestner
51299b17bb 2008-09-24 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: kill the FindTypeInReferences recursive loading
	algorithm and instead do a name-based search through the references
	of loaded assemblies only.  Fixes the original bug #400595 and it
	hopefully will have fewer sideeffects that the recursive loading
	approach.

svn path=/trunk/gtk-sharp/; revision=114008
2008-09-24 20:06:47 +00:00
Mike Kestner
ead904c8a3 2008-09-24 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: just fail on location null or empty instead of
	checking the assembly type.  Avoids failures on the ms runtime.

svn path=/trunk/gtk-sharp/; revision=113989
2008-09-24 18:53:05 +00:00
Andrés G. Aragoneses
76c808b7cb Cosmetic: spaces to tabs and coding guidelines
svn path=/trunk/gtk-sharp/; revision=113403
2008-09-18 11:34:15 +00:00
Zoltan Varga
fc871aacca 2008-09-12 Zoltan Varga <vargaz@gmail.com>
* glib/GType.cs (FindTypeInReferences): Put a try-catch around the assembly
	loading as failure to load a referenced assembly is not really an error.

svn path=/trunk/gtk-sharp/; revision=112905
2008-09-12 20:07:13 +00:00
Zoltan Varga
b1a12cf3ec 2008-09-09 Zoltan Varga <vargaz@gmail.com>
* glib/GType.cs (FindTypeInReferences): Skip dynamic assemblies.

svn path=/trunk/gtk-sharp/; revision=112605
2008-09-09 16:50:16 +00:00
Mike Kestner
fdfff5bb60 2008-09-08 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: beef up the referenced assembly loading code to
	handle assemblies located in the same directory as the referring
	assembly.  Fixes #423450.

svn path=/trunk/gtk-sharp/; revision=112545
2008-09-08 20:52:27 +00:00
Andrés G. Aragoneses
a4bc03d66d 2008-09-05 Andrés G. Aragoneses <aaragoneses@novell.com>
Fixes BNC#387220.
        * glib/glue/signal.c: New glue file to call g_signal_query().
        * glib/glue/Makefile.am: Add signal.c.
        * glib/Signal.cs: check return type prior to emitting.


svn path=/trunk/gtk-sharp/; revision=112360
2008-09-05 07:38:11 +00:00
Mike Kestner
dee1e4f321 2008-08-27 Mike Kestner <mkestner@novell.com>
* glib/Signal.cs: multiple dispose guarding for closures.

svn path=/trunk/gtk-sharp/; revision=111710
2008-08-27 14:54:34 +00:00
Mike Kestner
47e002a7d4 2008-08-20 Mike Kestner <mkestner@novell.com>
* glib/Object.cs:
	* glib/Signal.cs: fix a couple 2.0-isms.  Patch from Christian Hoff.

svn path=/trunk/gtk-sharp/; revision=111574
2008-08-25 20:43:09 +00:00
Mike Kestner
cab2f46db5 2008-08-20 Mike Kestner <mkestner@novell.com>
* generator/ReturnValue.cs: use new ListPtrToArray marshaler for
	lists with known element types.
	* glib/Marshaller.cs: new ListPtrToArray marshaller with more
	aggressive list disposal.
	* gtk/Container.custom: remove manual Children impl.  Use Children
	in GetEnumerator instead of pinvoking directly.
	* gtk/Gtk.metadata: remove hidden attr and add element type and owned 
	for Container.GetChildren to generate it properly.

svn path=/trunk/gtk-sharp/; revision=111173
2008-08-20 19:48:26 +00:00
Mike Kestner
b2e51e9989 2008-08-20 Mike Kestner <mkestner@novell.com>
Patch from Christian Hoff fixing bug #396195.
	* generator/Property.cs: handle interface adapter values.
	* generator/InterfaceGen.cs: register the gtype so mapping occurs
	automatically for interface adapters.  New GetObject overload to
	handle already wrapped objects more efficiently.
	* glib/Value.cs: handle set_Val for interface adapter objects.

svn path=/trunk/gtk-sharp/; revision=111154
2008-08-20 15:53:03 +00:00
Brad Taylor
70b8817f12 2008-08-19 Brad Taylor <brad@getcoded.net>
* atk/Object.custom: Add method to allow emission of
	  visible-data-changed signal.

	* atk/TextChangedDetail.cs: 
	* atk/TextAdapter.custom: Add method to allow emission of text-changed
	  signal.


svn path=/trunk/gtk-sharp/; revision=111015
2008-08-19 22:00:33 +00:00
Mike Kestner
51454acbb7 2008-06-28 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs: some 64 bit fixes for time_t marshaling
	issue found by Federico.

svn path=/trunk/gtk-sharp/; revision=106828
2008-06-28 17:15:31 +00:00
Mike Kestner
04d1d00b15 2008-06-20 Mike Kestner <mkestner@novell.com>
* glib/Value.cs: Patch from Christian Hoff.  Support for byte and
	sbyte values.

svn path=/trunk/gtk-sharp/; revision=106309
2008-06-20 15:51:03 +00:00
Mike Kestner
793802f7be 2008-06-17 Mike Kestner <mkestner@novell.com>
* glib/SignalClosure.cs: post back the gvalues after the closure is
	invoked using a new Update method on GLib.Value.  This only impacts
	boxed types, since they are the only "value types" passed by ref in
	the signal marshaling environment.  We can't call set_boxed on the
	value to update it, since that allocs new memory, we need to marshal
	the updated struct out to the existing native memory address using
	g_value_get_boxed.
	* glib/Value.cs (Update): new update method for writing values to
	an existing boxed type instance instead of allocating a new native
	struct.  Fixes #398929.

svn path=/trunk/gtk-sharp/; revision=106058
2008-06-17 20:18:23 +00:00
Mike Kestner
179d4b214f 2008-06-17 Mike Kestner <mkestner@novell.com>
* glib/GType.cs (LookupType): traversed referenced assemblies to
	find types in currently unloaded assemblies.  Fixes #400595.

svn path=/trunk/gtk-sharp/; revision=106027
2008-06-17 16:36:06 +00:00
Mike Kestner
d46963e86b 2008-06-16 Mike Kestner <mkestner@novell.com>
* glib/glue/object.c: fixes for object, boxed, and gtype
	property paramspec creation. Patch provided by Christian Hoff.

svn path=/trunk/gtk-sharp/; revision=105905
2008-06-16 14:35:32 +00:00
Andrés G. Aragoneses
f006f28918 * glib/glue/thread.c: Fix a warning.
svn path=/trunk/gtk-sharp/; revision=105185
2008-06-06 17:31:34 +00:00
Mike Kestner
9864a0960d 2008-06-06 Mike Kestner <mkestner@novell.com>
Initial Patch submitted by Christian Hoff with some small
	style alterations and a round trip sample by me.  Supports the 
	registration of managed properties with the GType system, so 
	that things like custom cell renderers can be accessed via the
	native property system from treeview.

	* glib/glue/object.c : property registration related glue.
	* glib/Object.cs: implement managed property registration.
	* glib/PropertyAttribute.cs: add new props and ctor for managed
	property registration.
	* sample/PropertyRegistration.cs: little test app to test round-
	tripping of registered properties.
	* sample/Makefile.am: add new sample.

svn path=/trunk/gtk-sharp/; revision=105177
2008-06-06 16:55:00 +00:00
Mike Kestner
621b39b531 2008-05-15 Mike Kestner <mkestner@novell.com>
* kill the makefile.win32 build system.  it has been unmaintained
	for quite some time, replaced by the auto* build in cygwin.

svn path=/trunk/gtk-sharp/; revision=103308
2008-05-15 17:36:46 +00:00
Andrés G. Aragoneses
52e68fbeb6 * atk/Object.custom: Track API changes in GLib.Signal.
* glib/Signal.cs: AddEmissionHook binding (for closing #386950), and
  change API of Emit to mimic the detailed_signal pattern.
* glib/GType.cs: GType.FromName: new wrapper for native call.
* glib/ObjectManager.cs: Use the new FromName managed method.

svn path=/trunk/gtk-sharp/; revision=103198
2008-05-14 16:03:13 +00:00
Mike Kestner
22add1100a 2008-05-06 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: revert the connection optimization from r102349.
	It breaks under the current CellRenderer implementation which probably
	can't be reworked compatibly to take advantage of this code.
	* glib/SignalClosure.cs: use IntPtr.ToInt64 instead of (long) since
	the cast apparently has issues on bleeding edge mono.

svn path=/trunk/gtk-sharp/; revision=102693
2008-05-07 02:13:16 +00:00
Mike Kestner
b9d94385a6 2008-05-02 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: Don't bother hooking VM into the class field
	if another managed ancestor has already done so.  Add a LogFunc
	printing a stack trace for the GObject log domain if GTK_SHARP_DEBUG
	is set in the environment.  It's a bit noisy to do unconditionally.

svn path=/trunk/gtk-sharp/; revision=102349
2008-05-02 16:58:46 +00:00
Mike Kestner
0780ed3c0d 2008-04-30 Mike Kestner <mkestner@novell.com>
* generator/InterfaceGen.cs:
	* generator/Signal.cs: use generic signal marshaling instead of
	generating signature specific marshaling callbacks.
	* glib/glue/closure.c: glue for new closure impl.
	* glib/Object.cs: open up a couple hashes internally. 
	* glib/Signal.cs: hook in closure based connection and expose
	EmissionHook functionality for atk usage.
	* glib/SignalClosure.cs: new generic signal marshaling mechanism.
	* glib/ToggleRef.cs: null guarding in Target and let Signal remove
	itself from hash when it disposes itself.

svn path=/trunk/gtk-sharp/; revision=102241
2008-04-30 20:15:45 +00:00
Mike Kestner
4afdaf6602 2008-04-28 Mike Kestner <mkestner@novell.com>
* glib/Value.cs : Add GParam support and beef up the Boxed
	type marshaling to support types with New methods via reflection.

svn path=/trunk/gtk-sharp/; revision=102064
2008-04-28 19:00:48 +00:00
Mike Kestner
d5e5c13a1f 2008-04-28 Mike Kestner <mkestner@novell.com>
* glib/GType.cs : Add a few missing static fields.

svn path=/trunk/gtk-sharp/; revision=102063
2008-04-28 18:52:49 +00:00
Andrés G. Aragoneses
a0d608fcd2 * glib/Signal.cs: Remove unneeded cast.
svn path=/trunk/gtk-sharp/; revision=101704
2008-04-24 17:18:59 +00:00
Andrés G. Aragoneses
d0b8f4c279 * atk/Object.custom: custom protected method for firing
the ChildrenChanged signal.
* glib/Signal.cs: first implementation of a managed
method for emitting signals.

svn path=/trunk/gtk-sharp/; revision=101700
2008-04-24 17:11:11 +00:00
Mike Kestner
35bc523511 2008-04-17 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: add Harden method to reduce the reflection 
	overhead in Gnome.Program.

svn path=/trunk/gtk-sharp/; revision=101024
2008-04-17 16:32:44 +00:00
Mike Kestner
d2a74c9a37 2008-04-17 Mike Kestner <mkestner@novell.com>
* glib/ToggleRef.cs: Add a Harden method to switch to a standard
	ref and just leak it.
	* gtk/Application.cs: revert the QuitPrepare stuff since it didn't
	always work.

svn path=/trunk/gtk-sharp/; revision=101021
2008-04-17 16:17:37 +00:00
Mike Kestner
11286d19c6 2008-04-15 Mike Kestner <mkestner@novell.com>
* generator/ReturnValue.cs: use new GLib.Opaque.OwnedCopy for owned
	opaque return values.
	* glib/Opaque.cs: introduce OwnedCopy property to support returning
	owned opaque instances from native to managed callbacks. 
	[Fixes #374641]

svn path=/trunk/gtk-sharp/; revision=100762
2008-04-15 19:43:16 +00:00
Mike Kestner
772790dcb0 2008-04-15 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs: marshal null string arrays as a null IntPtr[].
	[Fixes #378514]

svn path=/trunk/gtk-sharp/; revision=100744
2008-04-15 17:43:55 +00:00
Mike Kestner
213a3b99e3 2008-04-04 Mike Kestner <mkestner@novell.com>
* glib/Global.cs: renamed from Program.cs.  Program.Name is now 
	Global.ProgramName to try to avoid clashes with existing Gnome.Program
	usage.
	* gtk/Application.cs: s/GLib.Program.Name/GLib.Global.ProgramName.

svn path=/trunk/gtk-sharp/; revision=99875
2008-04-04 18:45:13 +00:00
Mike Kestner
bdeb30bbad 2008-04-04 Mike Kestner <mkestner@novell.com>
* atk/Atk.metadata: markup all the Ref* methods to indicate owned refs.
	* generator/ReturnValue.cs: Add owned object ToNative handling.
	* generator/VirtualMethod.cs: Split ToNative call from managed method
	invocation to avoid duplicate calls in null checking scenarios.
	* glib/Object.cs: add OwnedHandle property for use by language binding
	code which needs to pass owned refs to native methods.

svn path=/trunk/gtk-sharp/; revision=99849
2008-04-04 16:10:08 +00:00