* 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
* 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
* 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
* 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
* 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
* 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
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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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
* 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
* 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
* 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
* 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
* 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
* 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
the ChildrenChanged signal.
* glib/Signal.cs: first implementation of a managed
method for emitting signals.
svn path=/trunk/gtk-sharp/; revision=101700
* 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
* 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
* 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
* 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
the code to call g_set_prgname() from gtk/Application.cs to here,
and changing return value of g_set_program_name from bool to void.
* gtk/Application.cs: Use Program.Name as a replacement of
calling the native function g_set_prgname().
* glib/Makefile.am: add Program.cs.
(Patch reviewed by mkestner)
svn path=/trunk/gtk-sharp/; revision=99134
* glib/Source.cs: rework proxy removal to avoid boxing profile.
* glib/Idle.cs: save src_id in proxy to facilitate removal.
* glib/Timeout.cs: save src_id in proxy to facilitate removal.
[Fixes#359561]
svn path=/trunk/gtk-sharp/; revision=96363
* glib/Object.cs: expose an internal ToggleRef prop.
* glib/Signal.cs: use ToggleRef for lookups instead of Object. Add
a Free method and release connections and gchandles.
* glib/ToggleRef.cs: add signal hash and release signals on free.
svn path=/trunk/gtk-sharp/; revision=93548
* glib/Object.cs: remove ref from Objects hash prior to releasing it.
2008-01-17 Mike Kestner <mkestner@novell.com>
* glib/ToggleRef.cs: check for null reference in IsAlive.
svn path=/trunk/gtk-sharp/; revision=93204
* bootstrap-2.12: update version to 2.11.90.
* configure.in.in: incorporate build service patch.
* glib/glib-sharp-2.0.pc.in: add cflags for new api.xml.
* glib/Makefile.am: install api.xml to correct dir.
svn path=/trunk/gtk-sharp/; revision=92686
* glib/Signal.cs: ignore GCHandles with null targets since
their object has been collected. [Fixes#344250 again]
svn path=/trunk/gtk-sharp/; revision=90428
* glib/IOChannel.cs: IOChannel wrapper implementation.
* glib/Makefile.am: build new files.
* glib/Marshaller.cs: new string array marshaling methods.
* glib/Spawn.cs: g_spawn* wrapper implementation.
* sample/SpawnTests.cs: tests for the new GLib.Process class
and a cursory exercise of IOChannel for SpawnAsyncWithPipes.
svn path=/trunk/gtk-sharp/; revision=89477
* glib/Marshaller.cs: new null-terminated string[] marshaler from
Mono.Unix with adaptations by Michael Hutchinson.
svn path=/trunk/gtk-sharp/; revision=89218
* glib/SList.cs:
* glib/List.cs: add Array dup of object[] ctor since we
are passing typed arrays from generated code.
svn path=/trunk/gtk-sharp/; revision=88730
* glib/DestroyNotify.cs: add CDeclCallback to the delegate.
* glib/Signal.cs: use DestroyHelper.
* gdk/Input.custom: use DestroyHelper.
* gtk/Quit.custom: remove new on DestroyHelper handler.
* gtk/TreeModelFilter.custom: remove new on DestroyHelper handler.
* gtk/TreeViewColumn.custom: remove new on DestroyHelper handler.
svn path=/trunk/gtk-sharp/; revision=86897
* glib/Object.cs: add ctor (), which invokes CreateNativeObject
to allow direct subclasses that do all the registration automatically.
svn path=/trunk/gtk-sharp/; revision=86730
* gtk/Gtk.metadata: virtual_method rules for GInterface generation.
* generator/ReturnValue.cs (ToNative): new method for the virtual
method generation.
* generator/Parameters.cs (FromNative): null guarding.
* generator/ManagedCallString.cs: rework for interface method
generation including callback and error param support.
* generator/CallbackGen.cs: Invoker support. new class that deals
with persistence of native and wrapper delegates in native to managed
callback method signatures.
* generator/VirtualMethod.cs: support for generation of interface
methods, and all the funky parameters that come with that.
* generator/InterfaceGen.cs: Fill out the adapter implementation.
* generator/MethodBody.cs: Initialize overload. Extend ThrowsException
to support GError outside the last parameter slot.
* glib/GInterfaceAttribute.cs: New attribute to mark interfaces and
obtain adapter type.
* glib/Object.cs (AddInterfaces): interface registration method.
* glib/GInterfaceAdapter.cs: New abstract class for interface
adapter generation.
* glib/Makefile.am: add new files.
svn path=/trunk/gtk-sharp/; revision=85658
* AssemblyInfo.cs.in : add IgnoreClassInitializers attr to all.
* generator/ObjectGen.cs : add custom-attr generation for objects.
* glib/ClassInitializerAttribute.cs : obsolete
* glib/IgnoreClassInitializersAttribute.cs : new assembly attr
to avoid a blind GetMethods reflection.
* glib/Makefile.am : add files
* glib/TypeInitializerAttribute.cs : new attr to specify init
method to be run at type registration.
* gtk/Widget.custom : remove the ClassInitializerAttr.
* gtk/Gtk.metadata : add a custom-attr node to GtkWidget.
* sample/Subclass.cs : use the IgnoreClassInitializers attr.
svn path=/trunk/gtk-sharp/; revision=85480
* glib/ListBase.cs : add AllocNativeElement method and an
Append (object) method that uses it.
* glib/List.cs : add object[] ctor using new append method.
* glib/SList.cs : add object[] ctor using new append method.
These are needed to return G(S)List* values as virtual method
return values.
svn path=/trunk/gtk-sharp/; revision=84112
* generator/OpaqueGen.cs : override the new Copy vm if a Copy method
exists for the type.
* glib/Opaque.cs : add a virtual method to allow subclasses with
Copy methods to override. Use the method in GetOpaque for unowned
instantiations to try to obtain an owned instance. [Fixes#82037]
svn path=/trunk/gtk-sharp/; revision=82293