Commit Graph

509 Commits

Author SHA1 Message Date
Michael Hutchinson
d686a4d6aa Added Object.TryGetObject that gets wrapper only if already surfaced 2012-10-13 15:06:51 +02:00
Andrés G. Aragoneses
85b84f99f6 glib: Remove redundant call to ToggleRef.QueueUnref()
In slow systems this redundant call was causing the following CRITICAL:

  GLib-GObject-CRITICAL **: g_object_remove_toggle_ref:
    assertion `G_IS_OBJECT (object)' failed

The GLib.Object.Dispose(bool) method already calls this function at the
end so there is no need to check for duplicates in the PendingDestroys
static field of ToggleRef class (thanks to Alan McGorvern for helping
tracking down the root cause), the double unref call is just prevented.

Fixes BXC#4909.
2012-05-08 20:35:36 +01:00
Andres G. Aragoneses
b008a626f8 glib: don't modify Makefile.am
The new -define flag DISABLE_GTHREAD_CHECK can be added at configure time to already existing $CSFLAGS, as Mike Kestner pointed out.
2012-05-04 22:20:14 +01:00
Andres G. Aragoneses
3862bc75ec glib: do not call g_thread_ functions in GLib >= 2.31
Based on downstream patch by by Christopher James Halse Rogers <raof@ubuntu.com>
Should fix BXC#2329 reported by Sergey Litvinov.
2012-05-03 23:45:07 +01:00
Mike Kestner
0e0d0ec94d Don't release const strings in GLib.Global. 2012-04-21 17:38:10 -05:00
Mike Kestner
b107fdd7c0 Improve MissingCtorException message. 2012-03-28 22:10:47 -05:00
Mike Kestner
1ec86832dd Remove empty file. 2012-03-28 22:10:47 -05:00
Bertrand Lorentz
0de6e9869d ParamSpec: Add override modifier to the ToString method
This remove a compilation warning.
2011-12-03 16:41:21 +01:00
Bertrand Lorentz
d239b5cc4e Object: Remove some trailing whitespace, no real code change 2011-12-03 16:41:17 +01:00
Bertrand Lorentz
91dda7f5be Object: Fix registration of inherited interface properties
We need to add inherited interface properties in the Properties hash, so
we remove the DeclaredOnly flag when looking for interface properties in
the type.

We also need to use the type itself as the hash key, and not the adapter
type.
2011-12-03 16:41:16 +01:00
Andres G. Aragoneses
1215ebc770 Object: Use the type as top-level key for properties hash
Types could use same param_spec object so their PropertyInfo
objects shouldn't be mixed, otherwise we could get type
mismatch errors like the one in:

http://mail.gnome.org/archives/banshee-list/2011-November/msg00141.html

This should be the final part of:
https://bugzilla.novell.com/show_bug.cgi?id=442068
2011-12-03 16:39:05 +01:00
Mike Kestner
9d319c8033 Merge pull request #26 from dufoli/master
ginterface properties support
2011-11-20 21:42:02 -08:00
Olivier Dufour
37d15305a3 GInterface: Add properties support 2011-11-20 19:41:56 +01:00
Mike Kestner
6fbd419c1d Remove source delegates by id.
* glib/Idle.cs: use g_source_remove and id in Remove(Delegate)
* glib/Timeout.cs: use g_source_remove and id in Remove(Delegate)
[Fixes #632765]
2011-10-13 05:23:39 -05:00
Bertrand Lorentz
18d1af6907 build: Specify assembly version when uninstalling from the GAC
We need to qualify the assembly name with the version, otherwise gacutil
uninstall all versions of the assembly.
Fixes http://bugzilla.xamarin.com/show_bug.cgi?id=207
2011-08-11 18:44:58 +02:00
Mike Kestner
4f42fb77fb Improve ToggleRef release overhead.
Candidate patch provided by Andres in pull request #17.

* glib/Object.cs: use ToggleRef.Dispose.
* glib/ToggleRef.cs: implement IDisposable and expose former Free
    functionality as Dispose().  Free is now private non-lock taking
    called by Dispose and the idle queue handler.
2011-07-29 13:37:39 -05:00
Andres G. Aragoneses
228a2b3da4 glib: Fix calling to Free() twice for the same ToggleRef
Apparently the recent changes in gtk-sharp master that changed
the destroy/dispose strategy caused a bug about calling
g_object_remove_toggle_ref() twice because now Dispose(true)
could call ToggleRef.Free() directly bypassing
ToggleRef.QueueUnref(). This change makes sure that
the ref is removed from the PendingDestroys list.
2011-07-29 18:21:27 +01:00
Mike Kestner
51d5faf651 Mark calling convention on GInterface callbacks
Fixes #583901.  Adapted from fix for 2.12 from Markus Henschel.

* glib/GInterfaceAdapter.cs: add UnmanagedFunctionPointer attrs
2011-07-24 18:29:04 -05:00
Bertrand Lorentz
680dd23965 Handle floating refs in InitiallyUnowned
When Gtk.Object was removed, most of the code was moved to Gtk.Widget.
But the part that deals with floating references actually belongs in
Glib.InitiallyUnowned.

This fixes various issues, in particular crashes in the TreeModelDemo
sample.
2011-06-11 19:08:21 +02:00
Mike Kestner
c6a3bf4b73 Fix TextBufferSerializeFunc signature
* generator/CallbackGen.cs: connect return value count parameters
* generator/ManagedCallString.cs: out count params aren't special
* generator/MethodBody.cs: don't finish hidden params
* generator/Parameters.cs: explicit IsCount setting support, with
    Parameters.GetCountParameter(name) interface. Clear IsCount
    values during validation if they have no associated array. Any
    remaining count params must be associated with a retval, so
    hide them.
* generator/ReturnValue.cs: support array_length_param attribute to
    associate a return value with a "count" param.  Use new helper
    methods to marshal these array retvals to IntPtr and back.
* glib/Marshaller.cs: support for byte[] marshaling to and from
    IntPtr using a count and type in the from native direction.
* gtk/Gtk.metadata: mark TextBufferSerializeFunc return type as
    an array with the length specific in the length param.
2011-04-28 18:38:07 -05:00
Mike Kestner
2e115e2aff * glib/Value.cs: revert to "working" GValue layout from 2-12 branch.
The replaced code fails because sizeof(GValue) is 20 on 32 bit
    linux but Marshal.SizeOf(GLib.Value) reported 24.  If it aint broke,
    don't fix it, and the long works on 32 and 64 in 2.12 and earlier.
2011-04-27 19:05:11 -05:00
Mike Kestner
6fafc52670 Guard against null native names.
* glib/GType.cs: null guarding for native names
2011-04-27 19:03:02 -05:00
Mike Kestner
d3d32c8ff0 GKeyFile binding
* glib/KeyFile.cs: new pseudo-hand-binding for GKeyFile
* glib/Makefile.am: add file
* glib/Marshaller.cs: add string[] to strv marshaler
* glib/glib-api.xml: expose GKeyFile mapping
2011-04-14 14:35:47 -05:00
Mike Kestner
1c980d6e71 Switch GLib.Object to Dispose(bool) pattern.
* glib/Object.cs: move finalization queue to ToggleRef and make
    Dispose() non-virtual with a protected virtual Dispose(bool).
    Also added a WarnOnFinalize static property to produce nags for
    undisposed objects.
* glib/ToggleRef.cs: add finalization queue and QueueUnref method.
* gtk/NodeStore.cs: override Dispose(bool)
* gtk/Widget.custom: override Dispose(bool)
2011-03-25 12:22:04 -05:00
Mike Kestner
6be0718ff2 Simplified Signal handling
* gdk/Display.custom: rework signal connection
* gdk/Window.custom: rework signal connection
* generator/Signal.cs: generate for new API.
* glib/Object.cs: add (Add|Remove)SignalHandler methods and use
them for the Notify connections.  Move to generic collections for
everything but the Data hash.
* glib/Signal.cs: kill Lookup methods and add delegate fields
* glib/ToggleRef.cs: remove Signals hash, it doesn't belong here.
* gtk/Clipboard.custom: rework signal connection
* gtk/ListStore.custom: rework signal connection
* gtk/TextView.custom: remove obsolete signal
* gtk/TreeModelAdapter.custom: rework signal connection
* gtk/TreeModelFilter.custom: rework signal connection
* gtk/TreeModelSort.custom: rework signal connection
* gtk/TreeStore.custom: rework signal connection
* gtk/Widget.custom: rework signal connection
* gtk/Window.custom: remove obsolete signal
2011-03-24 18:33:24 -05:00
Mike Kestner
db738c401b Make ToggleRef.Signals a Dictionary
* glib/Object.cs: don't bother with IsAlive check on tref
* glib/Signal.cs: remove unnecessary as usage
* glib/ToggleRef.cs: make Signals a generic dictionary
2011-03-24 18:33:19 -05:00
Mike Kestner
a56feb01e3 Some warning fixage.
* glib/GType.cs:
* glib/Makefile.am:
* glib/Object.cs:
* glib/ParamSpec.cs:
* glib/PtrArray.cs:
* glib/SignalClosure.cs:
* glib/Value.cs:
mark private struct fields public to avoid 0169, and remove the nowarn
from the csc command.  fixed one real warning, exposed a bunch of
obsolete usage still to fix.
2011-03-24 18:32:54 -05:00
Mike Kestner
c283aa425b Add SeekType symbol to glib-api.xml
* gio/Gio.metadata: remove it here
* gio/Makefile.am: include glib-api.xml
* glib/glib-api.xml: add GSeekType element.
2011-02-18 21:54:15 -06:00
Mike Kestner
88af56dd68 Implement GVariantType binding.
* generator/SymbolTable.cs: add GVariantType mapping.
* glib/Makefile.am: add file
* glib/Value.cs: add cast to VariantType.
* glib/VariantType.cs: hand binding for yet another ref counted glib
type system.
2011-02-11 13:52:13 -06:00
Mike Kestner
917a4abf7a Remove Glib.Boxed usage in Value.
* glib/Value.cs: GLib.Boxed is obsolete and removed.
2011-02-11 08:41:45 -06:00
Mike Kestner
08eda8b7c2 More dead code removal.
* glib/Makefile.am: remove files
* glib/Boxed.cs: remove
* glib/DelegateWrapper.cs: remove
* glib/SignalCallback.cs: remove
* glib/TypeConverter.cs: remove
2011-02-10 21:16:05 -06:00
Mike Kestner
d33520b9c6 Kill UnwrappedObject obsolete code.
* glib/Makefile.am: remove file
* glib/UnwrappedObject.cs: remove
* glib/Value.cs: remove obsolete method
2011-02-10 21:16:05 -06:00
Mike Kestner
dc93b23acd Remove obsolete and broken code from Opaque.
* glib/Opaque.cs: remove bad ctor and noop finalizer
2011-02-10 21:16:05 -06:00
Mike Kestner
72cca1f93f Kill dead EnumWrapper type from the early days.
* glib/EnumWrapper.cs: remove
* glib/Makefile.am: remove file
* glib/Value.cs: remove obsolete EnumWrapper cast/ctor
2011-02-10 21:16:05 -06:00
Mike Kestner
22a83cc779 Move g_format_size_for_display to Global.
* glib/Format.cs: moved to Global.cs
* glib/Global.cs: moved from Format.cs
* glib/Makefile.am: update sources.
2011-02-09 10:48:19 -06:00
Mike Kestner
53fdda0f51 Kill the CDeclCallback attr.
* glib/CDeclCallbackAttribute.cs: kill, we now use UnmanagedFunctionPtr.
* glib/Makefile.am: remove file
2011-02-09 10:43:35 -06:00
Mike Kestner
3d8c4e25fd Kill some unneeded #if GTK_SHARP_N checks
* gdk/Event.cs
* glib/Format.cs
* gtk/Builder.custom
* gtk/IconTheme.custom
* pango/Attribute.cs
Remove versioned code since it's all there in 3.0.
2011-02-09 10:28:31 -06:00
Mike Kestner
7cdaf34aa2 Remove ClassInitializer attributes.
* AssemblyInfo.cs.in: remove the ignore attr from the assemblies.
* glib/ClassInitializerAttribute.cs: remove obsolete method target attr.
* glib/IgnoreClassInitializersAttribute.cs: remove.
* glib/Makefile.am: update sources and stop copying AssemblyInfo.cs around.
* glib/Object.cs: remove the obsolete ClassInitializer fallback mechanism.
2011-02-09 10:05:40 -06:00
Mike Kestner
8459ac5560 Initial support for GVariant
* generator/SymbolTable.cs : add GVariant type mapping.
* glib/Variant.cs: initial implementation of an opaque class to expose
the GVariant type from glib.  We won't make any attempt to combine managed
references since there is no "toggle" ref capability.  We'll do a one-to-one
ref_sink/unref pair on construction/dispose.
2011-01-22 12:52:38 -06:00
Mike Kestner
efefeb270c kill a couple warnings in GLib.Value
* glib/Value.cs: disable 0414 on the pad fields
2011-01-07 22:22:04 -06:00
Mike Kestner
ec77219ad5 Use -keyfile instead of deprecated attr.
* AssemblyInfo.cs.in: kill keyfile attr
* Makefile.am: moved mono.snk to cairo dir
* Makefile.include: no need to copy snk into builddir any longer.
* cairo/AssemblyInfo.cs: kill keyfile attr
* cairo/Makefile.am: snk relocated into here. use it directly.
* glib/Makefile.am: no need to copy snk into builddir any longer.
* gtkdotnet/Makefile.am: no need to copy snk into builddir any longer.
2011-01-07 22:15:04 -06:00
Mike Kestner
ea7c52bbf9 Kill libglibsharpglue.
* configure.ac: remove glib/glue/Makefile expansion
* glib/Makefile.am: remove glue SUBDIR
* glib/Thread.cs: move to non-glue supported check
* glib/glue: kill
2011-01-07 21:22:35 -06:00
Mike Kestner
fe2d4c311a Flatten the bootstrap and remove glade-sharp
2010-11-21  Mike Kestner  <mkestner@novell.com>

	* removed the glade dir from the build since libglade is
	no longer supported in gnome3.  removed the gapi2-compat stuff
	since it doesn't make much sense now.  Removed the bootstrap
	mechanism since we are unlikely to be releasing multiple API
	versions from the same tree going forward.  The build is now a
	straight autogen.sh like most autotools projects.
2010-11-21 21:18:06 -06:00
Mike Kestner
db6a3f8612 2009-12-28 Mike Kestner <mkestner@novell.com>
* glib/glue/Makefile.am: fix a copy/paste issue.
	* pango/glue/Makefile.am: move glue lib to -3 like the others.
	[Fixes #561148]

svn path=/trunk/gtk-sharp/; revision=148920
2009-12-28 17:00:58 +00:00
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