* generator/ManagedCallString.cs: revert last change. There are a
lot of "broken" callback sigs out there which expose user data because
it's not in the last parameter in the list. I don't think we can
reasonably make a change to hide all those at this point. This change
at least hides all the user_data which comes right before a GError
param at the end of the list. I need to follow up with a change which
handles data parameters in any parameter position, but allows the user
to mark "exposed" data params for compatibility reasons.
* generator/Parameters.cs: hide data params which are at the end of a
list behind an error param.
* gtk/Gtk.metadata: mark an array parameter on
TextBufferDeserializeFunc.
svn path=/trunk/gtk-sharp/; revision=111716
* 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
Patch from Christian Hoff with a few minor tweaks.
* generator/CallbackGen.cs: refactor to use ManagedCallString
and drop a ton of redundant, half-baked code.
* generator/ManagedCallString.cs: add Unconditional setup
method for stuff that has to happen before the try block.
Add "drop_first" concept so it can be reused by CallbackGen
which doesn't drop first params.
* generator/Signal.cs: use Unconditional method for prep.
* generator/VirtualMethod.cs: use Unconditional method for prep.
* gtk/Gtk.metadata: mark a ref param. [Fixes#394352]
svn path=/trunk/gtk-sharp/; revision=107494
* gtk/Gtk.metadata: mark ListStore.Reorder array param.
* gtk/ListStore.cs: compat obsolete method, though the old one
was useless.
svn path=/trunk/gtk-sharp/; revision=106853
* gtk/Object.custom: move Dispose call to a vm override so that
it runs after all signals and native overrides have run.
* gtk/glue/object.c: destroy override implementation.
svn path=/trunk/gtk-sharp/; revision=104315
* gtk/Object.custom: If all destroy handlers have been
unregistered, remove the hashtable entry since it is
not needed anymore.
svn path=/trunk/gtk-sharp/; revision=104287
* gtk/Widget.custom: guard against MissingIntPtrCtorException in
the Activate and SetScrollAdjustments funky signal VM impl. Can't
use SignalClosure easily. Could be reworked more cleanly at some
point. Or not.
svn path=/trunk/gtk-sharp/; revision=103827
* 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
* atk/atk-api-2.12.raw: reparsed.
* gdk/gdk-api-2.12.raw: reparsed.
* gtk/gtk-api-2.12.raw: reparsed.
* parser/gapi2xml.pl: fixes for signal and vm order needed for
proper interface struct layout. [Fixes#386802]
svn path=/trunk/gtk-sharp/; revision=102848
* generator/GenerationInfo.cs: refactor glue writer implementation
so that GlueEnabled means there is a valid glue writer available.
Avoids crashes in scenarios where an unwriteable glue path is provided
to the generator. Generate a glue function which scans the type
hierarchy of an object for the most-derived unmanaged ancestor so
that we can invoke class methods on it, avoiding infinite recursions.
* generator/Signal.cs: revamp the default handler vm overriding
mechanism. When class fields exist which can be directly hooked into,
we now generate glue to override and chain up to unmanaged base funcs.
This avoids some strangeness in the g_signal_override_class_closure
and g_signal_chain_from_overridden reported in #332300 and also lays
the groundwork for automated generation of non-signal VMs.
* gtk/Gtk.metadata: block signal glue generation for a few types which
don't seem to install headers.
svn path=/trunk/gtk-sharp/; revision=102350
* parser/gapi2xml.pl: put class struct field in the signal elems.
* atk/atk-api-2.12.raw:
* gdk/gdk-api-2.12.raw:
* gtk/gtk-api-2.12.raw:
svn path=/trunk/gtk-sharp/; revision=102238
* 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
* gtk/TreeModelAdapter.custom:
* gtk/TreeModelFilter.custom:
* gtk/TreeModelSort.custom: reworked patch from Christian Hoff to
throw NotImplementedException for SetValue methods. Those should
never have been added to the interface, and it's better to throw
an exception than have infinite recursion kill the program.
[Fixes#379542]
svn path=/trunk/gtk-sharp/; revision=100996
* gtk/Gtk.metadata: hide PrintContext.get_CairoContext.
* gtk/PrintContext.custom: manual get_cairo_context implementation.
Mono.Cairo assumes it is wrapping owned references, so we need to
take a ref out on the returned cairo_t pointer.
* sample/GtkDemo/DemoPrinting.cs: dispose the CairoContext in
to be a good citizen and avoid warnings.
svn path=/trunk/gtk-sharp/; revision=100942
* 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
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/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
* generator/*.cs: implement the interfaces on the adapters too.
Generate an Implementor interface for users which exposes the
methods to implement. Register based on the Implementor sub-iface.
* gtk/*Adapter.custom: custom implementations for the custom
interface members.
* gtk/TreeIter.custom: make UserData public.
* sample/TreeModelDemo.cs: sample for implementing a TreeModel
interface.
svn path=/trunk/gtk-sharp/; revision=86753
* 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
* gtk/Object.custom (Destroy): add a null check to avoid
Gtk criticals. The destroy case seems to be problematic with
a bunch of existing code, so this turns it into a noop.
svn path=/trunk/gtk-sharp/; revision=85657
* 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
* generator/*.cs : switch to IntPtr marshaling for struct types
in the managed to native direction.
* gtk/*.custom : adjust to new gapi struct pinvoke sigs.
svn path=/trunk/gtk-sharp/; revision=83961
* gtk/gtk-api-2.10.raw : refresh.
* parser/gapi_pp.pl : combine lines that end in '\' before sending
them through the pattern matching. [Fixes#79214]
svn path=/trunk/gtk-sharp/; revision=82359