* 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
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
* 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/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
* 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: 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
parent class and interfaces (because we don't want to see the
warnings about certain GtkWidget methods in every single library
that defines a widget, etc). Instead, use the new
ValidateForSubclass() method.
(ValidateForSubclass): only validate the signals
* generator/InterfaceGen.cs (ValidateForSubclass): for interfaces
we need to validate the methods too.
* generator/ObjectGen.cs (Generate): Check for interface method
collisions against the class's own methods too, not just its other
interfaces. Also, it's only a collision if the methods' signatures
have the same types.
* generator/Signal.cs (GenDefaultHandlerDelegate): Use
"{0}_managed" rather than "obj" for the internal variable name, to
avoid compile problems with signals that have a parameter named
"obj".
* generator/SymbolTable.cs (MangleName): mangle "internal" to
"_internal".
svn path=/trunk/gtk-sharp/; revision=48184
properties can't be set until Validate-time (eg, Method.IsGetter),
but it's annoying for every potential user of those properties to
have to make sure it has Validated the generatable first. So now
we add an explicit Validate() step after everything is loaded but
before anything is Generated, so that at Generation time,
everything can be assumed to have been Validated.
* generator/IGeneratable.cs: add "bool Validate()"
* generator/CodeGenerator.cs (Main): after loading all of the
generatables, DeAlias the SymbolTable, Validate() all the
generatables, and discard any invalid ones.
* generator/*.cs: Implement Validate() trivially in generatables
that didn't implement it before. Move Validate() calls from
Generate() to Validate(). Remove non-hierarchical Validate()
calls.
* generator/SymbolTable.cs: GPtrArray is IntPtr, not IntPtr[]
svn path=/trunk/gtk-sharp/; revision=48046
string[] (using a G_TYPE_STRV boxed value).
* generator/SymbolTable.cs (SymbolTable): Map GStrv to string[].
(The mapping relies on the above GLib.Value magic, so it only
works correctly for properties, but that's ok, because GStrv isn't
a real type anyway and only shows up in the api files for
G_TYPE_STRV properties.) Makes the Gtk.AboutDialog Artists,
Authors, and Documenters properties show up.
* gtk/Gtk.metadata: hide
AboutDialog.Get/SetArtists/Authors/Documenters, which can't be
used to implement the Artists/Authors/Documenters properties,
because the generated code doesn't know to NULL-terminate the
arrays.
svn path=/trunk/gtk-sharp/; revision=45301
end with "callback, gpointer, GDestroyNotify", then mark the
callback as having "notified" Scope.
(Parameters.IsHidden): Hide user_data and GDestroyNotify after a
callback.
(Parameter.Scope): make this settable
(Parameter.IsDestroyNotify): new test
* generator/MethodBody.cs (Initialize): Handle "notified" callback
scope (using a GCHandle and GLib.DestroyHelper.NotifyHandler)
* generator/CallbackGen.cs (GenWrapper): Add a static
"GetManagedDelegate" method to the wrapper type, to translate a
native delegate back to its corresponding managed delegate.
(FromNative): use GetManagedDelegate.
* generator/ReturnValue.cs (Validate): We handle callback return
values now
* generator/SymbolTable.cs: marshal GDestroyNotify as
GLib.DestroyNotify
* glib/DestroyNotify.cs: Moved from gtk
* gtk/Gtk.metadata: globally change GtkDestroyNotify to
GDestroyNotify, but then change back the ones that are exposed in
the API. Un-hide lots of methods we can correctly autogenerate
now.
* gtk/DestroyHelper.cs: moved to glib
* gtk/*.custom: remove methods that are autogenerated now, add
Obsolete wrappers where needed, replace Gtk.DestroyHelper usage
with GLib.DestroyHelper.
* gdk/Gdk.metadata:
* gnome/Gnome.metadata: Turn Gdk.Drawable.SetData and
Gnome.IconList.SetIconDataFull's GDestroyNotify args into
gpointers so the generated API stays the same as it used to be.
* rsvg/Handle.custom: implement deprecated SetSizeCallback
* sample/GtkDemo/DemoIconView.cs (CreateSort): update for API
changes
svn path=/trunk/gtk-sharp/; revision=44020
* generator/ImportSignature.cs : out param handling fix.
* generator/Makefile.am : kill StringGen.cs.
* generator/MethodBody.cs : simplify out param handling.
* generator/StringGen.cs : kill it, now using MarshalGen.
* generator/SymbolTable.cs : make non-const strings use an appropriate
MarshalGen. Non-const strings are now correctly marshaled as Utf8.
* glib/Marshaller.cs : add some utf8-fu for strdup/free marshaling.
Add a method to alloc/copy structs to native memory, unused yet.
* gtk/Gtk.metadata : partially fix a broken delegate.
svn path=/trunk/gtk-sharp/; revision=41459
* gnomevfs/gnomevfs-symbols.xml : FileSize is a long long.
* generator/SymbolTable.cs : map longlong to C# long.
svn path=/trunk/gtk-sharp/; revision=38434
* generator/AliasGen.cs : derive from SimpleBase.
* generator/ConstStringGen.cs : derive from SimpleBase.
* generator/GObjectGen.cs : kill. now uses ManualGen.
* generator/GStringGen.cs : kill. now uses MarshalGen.
* generator/GUnicharGen.cs : kill. now uses MarshalGen.
* generator/LPGen.cs : derive from SimpleGen.
* generator/Makefile.am : update source files.
* generator/ManualGen : make this general for handle types.
* generator/MarshalGen : new CallByName/FromNative formatter class.
* generator/SymbolTable.cs : needed some reorganizing and some
restructuring of types to use MarshalGen.
* generator/TimeTGen.cs : kill. now uses MarshalGen.
svn path=/trunk/gtk-sharp/; revision=38109
* gdk/Gdk.metadata : mark a couple array params.
* generator/Field.cs : remove the MarshalAs hack. We have to
do something much more evil since MarshalAs can't hang.
* generator/ImportSignature.cs : deal with out LP(U)Gen params.
* generator/LPGen.cs : moved from SSizeTGen and generalized.
* generator/LPUGen.cs : moved from SizeTGen and generalized.
* generator/Makefile.am : update sources.
* generator/MethodBody.cs : deal with out LP(U)Gen params.
* generator/Parameters.cs : deal with out LP(U)Gen params.
* generator/SymbolTable.cs : make all longs and size_t types LP(U)Gens.
svn path=/trunk/gtk-sharp/; revision=37999
GLib.Marshaller.CharToGUnichar and .GUnicharToChar [#70704]
* generator/SymbolTable.cs (SymbolTable): add a GUnicharGen.
* generator/Makefile.am (sources): add GUnicharGen.cs
* parser/gapi2xml.pl (addPropElem): g_param_spec_unichar() has
type "gunichar" not "unichar".
* gtk/gtk-api.raw: Regen
* glib/Marshaller.cs: Import CharToGUnichar's glue method by the
right name
svn path=/trunk/gtk-sharp/; revision=37998
* doc/en/*/*.xml : docs for new GValue members and size_t changes.
* generator/SymbolTable.cs : add ssize_t and make size_t a UIntPtr
instead of the current broken int mapping on 64 bit platforms.
* gtkhtml/HTMLStream.custom : fix size_t related overload.
[fixes#69574]
svn path=/trunk/gtk-sharp/; revision=37223
* generator/*Gen.cs : add ToNativeReturnType to deal with
the g_free string nonsense in the virtual method case.
svn path=/trunk/gtk-sharp/; revision=36289
* generator/SymbolTable.cs: Add support for GDestroyNotify, so
that `gtk_cell_layout_set_cell_data_func' will be generated in
Gtk.ComboBox.
svn path=/trunk/gtk-sharp/; revision=36095
* generator/GObjectGen.cs: Added new generatable to handle
plain GObjects the same way we do subclasses.
* generator/ManualGen.cs: Make FromNative/FromNativeReturn virtual
to allow overriding.
* generator/SymbolTable.cs: Use GObjectGen instead of
ManualGen for GObject.
* generator/Makefile.am: Add GObjectGen.cs.
svn path=/trunk/gtk-sharp/; revision=25651
* generator/CustomMarshalerGen.cs : beginnings of a new generatable.
* generator/SymbolTable.cs : mangle interface keyword to iface.
svn path=/trunk/gtk-sharp/; revision=22712
* generator/SymbolTable.cs (MangleName): Add "lock" and "callback"
to the list of names that need to be mangled. The former is a C#
reserved keyword and the latter is already used as an argument to
methods which marshal callbacks.
svn path=/trunk/gtk-sharp/; revision=21276
* generator/BoxedGen.cs : s/uint/GLib.GType
* generator/ManualGen.cs : add a ctor to pass ToNative handle name
* generator/ObjectGen.cs : s/uint/GLib.GType
* generator/Signal.cs : use GLib.GType and call OverrideVirtualMethod
* generator/SymbolTable.cs : make GType a ManualGen and update a few
ManualGens to the new signatures.
* glib/DefaultSignalHandler.cs : s/Type/System.Type
* glib/ManagedValue.cs : s/uint/GLib.GType
* glib/Object.cs : s/uint/GLib.GType, add OverrideVirtualMethod.
* glib/Type.cs : s/uint/IntPtr, add static fields for fundamentals.
make it a value type and add ==, !=, Equals, and GetHashCode.
* glib/TypeConverter.cs : use new GType statics, not fundamentals.
* glib/Value.cs : use new GType statics, not fundamentals.
* gnome/*.custom : s/uint/GLib.GType
* gtk/*Store.custom : use GType statics, not fundamentals.
* sample/Subclass.cs : s/uint/GLib.GType.
svn path=/trunk/gtk-sharp/; revision=21181