In a lot of places, we were only checking the presence of boolean
attributes, like "array", automatically assuming they were true. This
meant that we didn't allow setting them explicitly to false, which
apparently is needed for some bindings.
For all boolean attributes, we now use the GetAttributeAsBoolean method
added in the previous commit, to correctly check the value of the
attribute. As before, if the attribute is not present, it is considered
to be false.
Thanks to Stephan Sundermann for noticing this issue.
* 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.
* cairo/Context.cs: add ctor (IntPtr, bool owned)
* cairo/cairo-api.xml: expose cairo_t as new ownable symbol type
* generator/HandleBase.cs: implement IOwnable
* generator/IOwnable.cs: new interface for wrapping ownable types
* generator/Makefile.am: add new files to build
* generator/OwnableGen.cs: SimpleBase subclass to expose IOwnable
* generator/Parameters.cs: use IOwnable.FromNative instead of HandleBase
* generator/Parser.cs: parse ownable symbol type
* generator/ReturnValue.cs: use IOwnable.FromNative instead of HandleBase
* 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
* generator/*.cs: Add a LogWriter class which formats warnings
consistently on the console. Supports the concept of non-fatal
validation warnings, since it doesn't rely on the unrolling of the
validation stack to associate a warning to a given type.
Main purpose was to add a non-fatal warning for missing element_type
attributes on list return values, though it results in cleaner log
output, and also updates some warning messages to be more helpful in
how to resolve them.
* generator/InterfaceGen.cs: don't grab the StreamWriter for consume-only.
* generator/InterfaceVM.cs: don't bitch or fail validation when missing
target on consume-only.
* generator/ObjectBase.cs: support a target_method attr on vms to point the
callback invocations at when the names don't match.
* gio/Gio.metadata: marks a few more ifaces consume-only until somebody
complains they need to implement one of them.
* generator/Method.cs: interface method declarations do not support or
need an override keyword, so block the generation of it when the implementor
and container_type indicate generation of the iface itself.
* cairo/Surface.cs: expose LookupSurface
* cairo/cairo-api.xml: add surface mapping
* gdk/*: updates and hobbling to get gdk building. lots of work
to come.
* 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.
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.
* */Makefile.am: standardize on - options over / options for
consistency. Also assists with build on msys. [Fixes#550667]
svn path=/trunk/gtk-sharp/; revision=147125
* 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
* generator/Signal.cs: Return a GInterfaceAdapter in the signalargs's
accessor properties instead of trying to return the implementor as stored in
the arguments array.
svn path=/trunk/gtk-sharp/; revision=146744
* generator/ReturnValue.cs: support metadata override of default return
values. Based on a patch from Sebastian Dröge. [Fixes#541299]
svn path=/trunk/gtk-sharp/; revision=142516
* 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
* 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
* generator/IGeneratable.cs: Remove MarshalReturnType, ToNativeReturnType,
FromNativeReturn and ToNativeReturn as they never returned something else
than MarshalType, FromNative/AllocNative and CallByName, respectively.
* generator/Signal.cs: Use AllocNative for IManualMarshalers.
svn path=/trunk/gtk-sharp/; revision=139849
* 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
* generator/InterfaceGen.cs: remove var keyword usage to fix build on
.Net 2.0. fix a couple mixed line endings as well.
svn path=/trunk/gtk-sharp/; revision=139109
* generator/gapi3-codegen.in, parser/gapi3-fixup.in, parser/gapi3-parser.in:
"svn add" a few missing files to resurrect the build.
svn path=/trunk/gtk-sharp/; revision=138603
* configure.in.in, Makefile.include: Bump up GAPI version to 3.0.
* bootstrap-2.14: Renamed to bootstrap-for-the-insane, added message
of doom. [Fixes#521449]
svn path=/trunk/gtk-sharp/; revision=138572
* generator/GenBase.cs: Add AppendCustom override that you can pass the
type name in, used to include .custom for Name + Adapter and Name +
Implementor .custom files for interface gen.
* generator/InterfaceGen.cs: Use the new AppendCustom override for the
Name + Adapter.custom file, and add support for including custom file for
the Name + Implementor interface; necessary to manually implement an
interface method.
svn path=/trunk/gtk-sharp/; revision=137809
* generator/ObjectBase.cs: add CallByName overload with ownership.
* generator/Parameters.cs: support owned by callee parameters.
Adapted from a patch by Maarten Bosmans. [Fixes#513680]
svn path=/trunk/gtk-sharp/; revision=137754
* 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
* generator/Signal.cs: Fix indexing of the signal arguments array for
"out" and "ref" parameters. [Fixes#508572]
svn path=/trunk/gtk-sharp/; revision=135661
* generator/EnumGen.cs: Fix enum generator to properly parse integer
values with type modifier suffixes (UL, L, U), and not accidentally
munge named values that happen to end in one of these suffixes
svn path=/trunk/gtk-sharp/; revision=134980
* generator/ReturnValue.cs: null-term array marshaling for vms.
* generator/VirtualMethod.cs: use ToNative return type in native
callbacks.
[Fixes#501294] Patch by Sebastian Dröge.
svn path=/trunk/gtk-sharp/; revision=133670
* generator/ClassField.cs: Derive from StructField.
* generator/ObjectBase.cs: Implement validation mechanism for
class structures. If the structure contains bitfields or fields
of unknown types, we cannot generate it in managed code.
* generator/GObjectVM.cs: Fall back to glue if the class structure
cannot be generated. [Fixes#498051]
svn path=/trunk/gtk-sharp/; revision=133514
* generator/OpaqueGen.cs: support abstract opaque classes,
though I have no idea why anyone would want one.
[Fixes#494212] Revised patch from Sebastian Dröge.
svn path=/trunk/gtk-sharp/; revision=132678
* generator/OpaqueGen.cs: support declaring managed ifaces.
[Fixes#494193] Revised patch from Sebastian Dröge.
svn path=/trunk/gtk-sharp/; revision=132675
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
* parser/gapi2xml.pl: Introduce a "parser_version" attribute.
* generator/GenBase.cs: Implement a property to access the
attribute's value.
svn path=/trunk/gtk-sharp/; revision=129807
* 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
* generator/InterfaceGen.cs: generate Adapters for consume_only ifaces
too. This seems unusual, but is primarily to produce at least one
'generic' implementation of every interface and a GetObject method
so that the marshaling code can always return an object which
implements the interface, even if no public object wrapper exists for
the underlying c GObject type.
svn path=/trunk/gtk-sharp/; revision=122814
* 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
* 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
* generator/Ctor.cs:
* generator/Method.cs:
* generator/MethodBase.cs: refactor the Protection from Method to
MethodBase, generate ctors with the correct proteciton too.
svn path=/trunk/gtk-sharp/; revision=120487
* generator/Signal.cs: remove ref int workaround now that we fallback
to signal-specific marshalers for G_TYPE_POINTER using signals.
Fixes#450119.
svn path=/trunk/gtk-sharp/; revision=120254
* atk/atk-api-2.12.raw: regen
* gtk/gtk-api-2.12.raw: regen
* generator/Signal.cs: reinstate old custom marshaler generation and
generate custom marshaling when 'manual' attr is set.
* parser/gapi2xml.pl: set manual attr on sigs that have G_TYPE_POINTER
parameters since the generic closure can't cope with them.
svn path=/trunk/gtk-sharp/; revision=118068
* generator/InterfaceGen.cs: throw ArgumentNullException in
the Adapter's constructor that receives an implementor.
svn path=/trunk/gtk-sharp/; revision=115571
* bootstrap-2.12: bump svn version.
* generator/Signal.cs: add a workaround for G_TYPE_POINTER usage
in the GtkEditable::text_inserted signal. The signal parameter
received by the closure will be an IntPtr, which we then have to
use to read/write the value directly from unmanaged memory.
[Fixes#427588]
svn path=/trunk/gtk-sharp/; revision=113547
* generator/LPGen.cs: remove WIN64LONGS hackery.
* generator/LPUGen.cs: remove WIN64LONGS hackery.
* generator/SymbolTable.cs: for WIN64LONGS, map them directly to
(u)int SimpleGens instead of using the LP generatables.
svn path=/trunk/gtk-sharp/; revision=113420
* generator/Property.cs (IsDeprecated): Allow "1" or "true".
* generator/Method.cs (.ctor): Allow "1" or "true".
* generator/ClassBase.cs: Allow a value of "true" to work the same
as "1" for the deprecated and abstract attributes.
svn path=/trunk/gtk-sharp/; revision=113238
* 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/ManagedCallString.cs: fixes for data parameter hiding
in native to managed callback generation.
svn path=/trunk/gtk-sharp/; revision=111706
* 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
* generator/Method.cs (GenerateBody): when generating value type
methods, we should demarshal the 'this' memory before any ref or
out parameters in the event that someone passes 'this' as a param.
That will ensure that an updated value coming back from the native
side ends up in the memory location.
svn path=/trunk/gtk-sharp/; revision=104166
* 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
* 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
* generator/InterfaceGen.cs: use CName and mangle it. ClassFieldName
is not guaranteed to be set now.
* generator/Signal.cs: read ClassFieldName from the api xml. Move
glue writer lookup inside the block to avoid exceptions for now.
svn path=/trunk/gtk-sharp/; revision=102276
* 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
* 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
* 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
* generator/InterfaceGen.cs: support "generic" interface
implementations like those exposed by gio. This is specifically for
libraries which return GTypes which are not exposed by the library
but which implement GInterfaces which are exposed by the library.
svn path=/trunk/gtk-sharp/; revision=99541
* bootstrap-2.12: bump svn version
* generator/CallbackGen.cs: add dnotify support to invoker.
Store and respond with incoming UserData params. Start using
__prefixed private vars to avoid collisions with parameters,
like the 'result' params in gio.
* generator/ManagedCallString.cs: use new data/dnotify invoker
ctors.
* generator/MethodBody.cs:
* generator/Parameters.cs: don't link "out" length params to
preceding strings.
* generator/VMSignature.cs: don't require UserData to be last
param, since it can have things like error after it.
svn path=/trunk/gtk-sharp/; revision=98782
* generator/VirtualMethod (CName): mangle the name.
* generator/SymbolTable.cs (MangleName): add 'remove' and 'foreach'
mappings. Should probably just get a C# keyword list and map all of
them instead of onesy twoseys.
Fixes for tnymail binding generation.
svn path=/trunk/gtk-sharp/; revision=94286
* generator/Parameters.cs: fix marshaling for ArrayCount params where
casting is required, like gsize/size_t count parameters.
svn path=/trunk/gtk-sharp/; revision=91199
* generator/MethodBase.cs: move Name stuff from subclasses.
Check for (G|S)et<UpperCaseLetter> in new Has props.
* generator/Method.cs:
* generator/VirtualMethod.cs: refactor out Name stuff. Use
new Has(G|S)etterName props.
* pango/Pango.metadata: workaround Has/Hash collision with
the old broken getter check. [Fixes#344954]
svn path=/trunk/gtk-sharp/; revision=90458
* generator/Method.cs: need to use on the Base method name to
lookup complements and determine if the method is a getter or setter
when an explicit interface method name is used.
svn path=/trunk/gtk-sharp/; revision=88726
* configure.in.in: add a win64 check and a compiler define for
handling win64 32bit longs.
* generator/LPGen.cs: use int to marshal on win64.
* generator/LPUGen.cs: use uint to marshal on win64.
* generator/SymbolTable.cs: remove fixme.
svn path=/trunk/gtk-sharp/; revision=87922
* 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
* generator/*.cs: add DefaultValue prop for obtaining a
sane value when we need to return a value but something bad has
happened such that we can't get a real value. Needed for iface
signal marshaling, among other places we're partially working
around it now.
svn path=/trunk/gtk-sharp/; revision=86157
* generator/VirtualMethod.cs: refactor delegate generation into
GenerateCallback and add [CDeclCallback] which was missing.
* generator/InterfaceGen.cs: kill GenerateDelegates. They are now
generated by VirtualMethod.GenerateCallback.
svn path=/trunk/gtk-sharp/; revision=86026
* generator/CallbackGen.cs (GenInvoker): null check the sig field
and set it up. This can happen when generating the marshaling types
from dependent libraries instead of via the Generate method.
svn path=/trunk/gtk-sharp/; revision=85831
* 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
* 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
* generator/Ctor.cs : Validate before generating and adjust protection
on a couple private methods.
* generator/Parameters.cs : remove unused var to kill warning.
svn path=/trunk/gtk-sharp/; revision=83132
* generator/MethodBody.cs : refactor finish logic into parameter.
* generator/Parameters.cs : refactor finish logic into parameter and
fix some failures to marshal ref params post call.
svn path=/trunk/gtk-sharp/; revision=83020
* generator/OpaqueGen.cs : only generate Copy override for methods
with no parameters. Fixes a gnome-sharp build problem.
svn path=/trunk/gtk-sharp/; revision=82869
* 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
* generator/StructBase.cs : use typeof to pass type to PtrToStruct
to avoid an instantiation and method call. Duh.
svn path=/trunk/gtk-sharp/; revision=81907
* generator/ImportSignature.cs : use Parameter.NativeSignature
prop and refactor out some GError handling.
* generator/MethodBody.cs : Refactor logic into Parameters.
* generator/Parameters.cs : add ArrayParameter, ArrayCountPair, and
ErrorParameter subclasses to refactor spaghetti code in MethodBody.
svn path=/trunk/gtk-sharp/; revision=81721
* parser/gapi2-fixup.in:
* parser/gapi2-parser.in:
Don't use 'which' anymore, as it doesn't work in all caes (ie:
when symlinks are
in the way)
svn path=/trunk/gtk-sharp/; revision=76653
* generator/NativeCallbackSignature.cs :
* generator/Signal.cs : don't use ref IntPtr in native callback sigs
for struct parameters. Use IntPtr and StructureToPtr. Fixes the
layout issues in MD introduced by the structure marshaling rework.
svn path=/trunk/gtk-sharp/; revision=76433
* generator/CallbackGen.cs : switch to NativeCallbackSignature.
* generator/GenBase.cs : add NativeCallbackType member.
* generator/IGeneratable.cs : add NativeCallbackType member.
* generator/ManagedCallString.cs : add guarded post call struct
marshaling back to the native struct.
* generator/NativeCallbackSignature.cs : new parallel to ImportSignature
but using NativeCallbackType instead of MarshalType.
* generator/Signal.cs : switch vm and sig marshaler callbacks to
NativeCallbackSignature. Perform guarding post call struct marshaling
back to the native struct.
* generator/Parameters.cs : add NativeCallbackType member.
* generator/SimpleBase.cs : add NativeCallbackType member.
* generator/StructBase.cs : add NativeCallbackType member using IntPtr
to support NULL handling.
* gtk/NodeCellDataFunc.cs : update native marshaler sig.
svn path=/trunk/gtk-sharp/; revision=76011
* glib/Object.cs : do the Timeout switch in the finalizer
instead of in Dispose, where it can cause problems if people
override Dispose.
* generator/ObjectGen.cs : don't generate finalizers for every
subclass, just rely on the ~GLib.Object implementation.
svn path=/trunk/gtk-sharp/; revision=75657
* generator/CallbackGen.cs : generate try/catch blocks for
native to managed marshallers. [Fixes the rest of #80516]
svn path=/trunk/gtk-sharp/; revision=74425
* generator/Signal.cs : add try/catch blocks to native callback
delegates so that exceptions are not propagated across the native
boundary. Now raises GLib.ExceptionManager.UnhandledException.
* glib/ExceptionManager.cs : new class with UnhandledException
event and a static method to raise it.
* glib/Signal.cs : wrap the generic EventHandler callback delegate
with try/catch blocks and raise the UnhandledException event.
svn path=/trunk/gtk-sharp/; revision=73840
* generator/MethodBody.cs : handle set method conversion to
property for array parameters with preceding count params.
svn path=/trunk/gtk-sharp/; revision=73613
* generator/CallbackGen.cs : add PersistUntilCalled method generation
to the wrapper class. Holds a GCHandle for the wrapper which is Freed
when the delegate is invoked.
* generator/MethodBody.cs : add "async" case for delegate scope. Use
this scope to identify a callback parameter that needs to persist
until the native side calls back. Only valid for single-invoke
callbacks.
* gtk/Gtk.metadata : mark Print.RunPageSetupDialogAsync done_cb param
with the new async scope.
svn path=/trunk/gtk-sharp/; revision=71767
* generator/Signal.cs : virtual method enum retvals must be case to
Enum before casting to their ultimate type. Also dispose retval
gvalues to avoid reference leaks.
svn path=/trunk/gtk-sharp/; revision=56529
* generator/FieldBase.cs: Properly convert marshalled value
to native value.
* generator/CallbackGen.cs: Added parens to the result of ToNativeReturn,
since it may have problems with the cast.
svn path=/trunk/gtk-sharp/; revision=54671
* generator/Signal.cs : pass byte cnt for autogenerated string length
parameters. Thanks to Itamar Rogel for the report and a candidate
patch. [Fixes#76952]
svn path=/trunk/gtk-sharp/; revision=54239