* gdk/Screen.custom : manually implement FontOptions property so
we can use reflection to access the internal Mono.Cairo ctor.
* gdk/Gdk.metadata : list marshaling, method-to-property renames,
and some hides form manual implementation. Hide
gdk_atom_intern_static_string wrapper since it is pointless outside
the context of C code.
svn path=/trunk/gtk-sharp/; revision=63366
a constructor or a ref, unref, or destroy method, then it must be
a reference type, so mark it "opaque" but then also mark all of
its fields public and writable.
* */*-api*.raw: Regen
* generator/Parser.cs (ParseNamespace): make the opaque attribute
check actually look at the value of the attribute rather than just
checking if it's there, so that you can change a struct's opaque
attribute from "true" to "false" via metadata and have that work.
* generator/BoxedGen.cs (Generate): do not generate the boxed's
"Free" method (since it's guaranteed to crash when we pass it a
stack pointer). If "Copy" is marked deprecated, create a
deprecated no-op for it, otherwise just skip it (since otherwise
it will just leak memory when we copy its result onto the stack).
* pango/Pango.metadata: deprecate Pango.Color.Copy and
Pango.Matrix.Copy. Hide some array fields in Pango.GlyphString
that we've never generated correctly. Tweak Pango.LayoutLine
fields to be the same as they used to be.
* pango/GlyphItem.custom (glyphs, item):
* pango/GlyphString.custom (Zero, New):
* pango/Item.custom (Zero, New):
* pango/LayoutRun.custom (glyphs, item): add deprecated API compat
* gdk/Gdk.metadata: undo the parser's new opaquification of
Gdk.Font; it's been deprecated since pre-gtk# times, and no one
should be using it, so there's no point in fixing it now. Fix up a
few other things to match how they used to be. Fix RgbCmap's
constructor args.
* gdk/RgbCmap.custom (Zero, New): deprecated API compat
* gdk/PangoAttrEmbossed.custom:
* gdk/PangoAttrStipple.custom (Zero, New, Attr): deprecated API
compat
(explicit operator ...): allow casting back and forth between
Pango.Attribute. (We can't usefully make them real subclasses of
Pango.Attribute, because there's no way for
Pango.Attribute.GetAttribute() to be able to dtrt with them.)
* gtk/Gtk.metadata: deprecate Gtk.Requisition.Copy,
Gtk.TextIter.Copy, and Gtk.TreeIter.Copy. Mark the return value of
TextView.DefaultAttributes as "owned". Mark TargetList's fields
private so it stays how it used to be.
* gtk/TextAttributes.custom (Zero, New): deprecated API compat
* gnomevfs/Gnomevfs.metadata: remove a bunch of opaque
declarations that the parser figures out on its own now.
* art/Art.metadata:
* glade/Glade.metadata:
* rsvg/Rsvg.metadata: un-mark everything the parser marked opaque
in these libraries, because all of the structs in question would
still be unusably broken, so the API churn would be pointless.
svn path=/trunk/gtk-sharp/; revision=48387
anonymous function pointer types in method signatures. Before, we
added a <callback> child to the <parameters> node, but the
generator just ignored it. Now we add the callback (with a made-up
name) to the toplevel node, and add an ordinary <param> node
referencing it to the <parameters> node. Also, if the last param
of the callback is a gpointer, rename it from "arg#" to "data" so
it will be treated correctly (as the user data passed from the
calling method). [Fixes#66241]
* art/art-api.raw:
* gdk/gdk-api-2.4.raw:
* gdk/gdk-api-2.6.raw: Regen
* generator/Parameters.cs (IsHidden): loosen the definition of
hideable user_data; it doesn't have to occur at the end of the
parameter list, as long as there's a callback arg before it.
* generator/MethodBody.cs (GetCallString): Use Parameters.IsHidden
to decide whether or not to squash user_data params, rather than
trying to duplicate its logic. As a side effect, this also causes
a handful of methods that take non-hidden IntPtr arguments to
start actually passing those arguments to C rather than always
passing IntPtr.Zero.
* generator/Method.cs (Equals, GetHashCode): Remove unnecessary
and possibly erroneous hashing overrides.
* gtk/Gtk.metadata: Hide Gtk.Container.ForeachFull, since it's
useless and wasn't in gtk# 1.0
* gtk/Menu.custom (Popup):
* gtk/TextIter.custom (ForwardFindChar, BackwardFindChar):
* gnome/App.custom (CreateMenusInterp, InsertMenusInterp,
CreateToolbarInterp):
* gnome/Client.custom (RequestInteractionInterp):
* gnome/Popup.custom (MenuDoPopupModal, MenuDoPopup): Add
[Obsolete] compat overloads for methods that have now lost a
useless IntPtr.
svn path=/trunk/gtk-sharp/; revision=47566
* generator/CallbackGen.cs : implement new IAccessor iface so that
callback fields on structs can now be accessed.
* generator/ClassBase.cs : remove/abstract some methods incorrectly
located here.
* generator/ClassGen.cs : implement methods previously inherited from
ClassBase incorrectly.
* generator/HandleBase.cs : new base class for native ptr wrappers.
Implements new IAccessor interface and code moved from ClassBase.
* generator/IAccessor.cs : new iface to generate field/prop accessors.
* generator/InterfaceGen.cs : derive from new ObjectBase.
* generator/LPGen.cs : implement IAccessor.
* generator/LPUGen.cs : implement IAccessor.
* generator/ObjectBase.cs : new base class for Object/Iface types.
* generator/ObjectGen.cs : derive from new ObjectBase.
* generator/OpaqueGen.cs : derive from HandleBase.
* generator/StructField.cs : refactor Generate method using new
IAccessor interface.
* */*.custom : add obsolete impls for some existing c_cased struct
field accessors that are now StudlyNamed.
svn path=/trunk/gtk-sharp/; revision=46878
Gdk.PangoRenderer.GetDefault() like the C gtk-demo rather than
creating a new Gdk.PangoRenderer. [Fixes#74865]
* gdk/Gdk.metadata: fix return type of Gdk.PangoRenderer.GetDefault
svn path=/trunk/gtk-sharp/; revision=45494
thing with parenthesized values ("FOO = (1 << 2)") and within-type
aliases ("GTK_ANCHOR_N = GTK_ANCHOR_NORTH"). Make it intentionally
do the wrong thing with unparsable values (outputting them as-is
into the api file) so that we are forced to fix them with metadata
rather than silently getting incorrect values.
* gdk/gdk-api-2.4.raw:
* gdk/gdk-api-2.6.raw (PixdataType): Now recognized as flags,
not enum
* gtk/Gtk.metadata: hide the enums ArgFlags and RcTokenType (which
are not used by any wrapped API, and which formerly contained
entirely wrong values).
* gtk/gtk-api-2.4.raw:
* gtk/gtk-api-2.6.raw (AnchorType, SelectionMode): update with
values for aliases
* gnome/Gnome.metadata: fix value of Gnome.PrintButtons.Cancel
* gnome/gnome-api.raw (PrintUnitBase, PaperSelectorFlags,
PrintDialogFlags, PrintDialogRangeFlags): Now recognized as flags,
with values.
svn path=/trunk/gtk-sharp/; revision=44937
* generator/CodeGenerator.cs: add a --glue-includes flag
* generator/GenerationInfo.cs: Accept glue_includes value from
Main and output it to the glue_filename.
* generator/FieldBase.cs (Ignored): handle more ignorable cases.
(CheckGlue): New method to figure out what kind of glue we'll need
for a field.
(GenerateImports): generate appropriate imports per CheckGlue.
(GenerateGlue): Generate C glue for accessing a struct field;
either a fully-C-based accessor, or a method to just return the
field's offset in the struct.
(Generate): Use the generated glue to read the field.
* generator/PropertyBase.cs (CType): if the field is a single bit,
set its type to gboolean.
* generator/ObjectGen.cs (Generate):
* generator/OpaqueGen.cs (Generate): Call GenFields.
* generator/StructField.cs: Use FieldBase's glue-generation code
to handle bitfields. [#54489]
* generator/ObjectField.cs: Generates accessors for public fields
of objects and opaque structs. [#69514]
* generator/ClassBase.cs (ClassBase): Parse <fields> nodes and
create ObjectField objects.
(GenFields): Output field properties
(IgnoreMethod): Ignore Get/Set methods that duplicate fields
* generator/Makefile.am (sources): update
* {gdk,gnome,gtk,pango}/*.metadata: Mark some additional fields as
public. Rename/retype some fields for consistency with earlier
hand-coded bindings.
* {gdk,gnome,gtk,pango}/*.custom: Remove custom methods that can
now be autogenerated.
* {gdk,gnome,gtk,pango}/glue/*.c: Remove glue methods that can now
be autogenerated
* {gdk,glade,gnome,gtk,pango,vte}/Makefile.am
* {gdk,glade,gnome,gtk,pango,vte}/glue/Makefile.am
* {gdk,gnome,gtk,pango}/glue/makefile.win32: Update
svn path=/trunk/gtk-sharp/; revision=44563
* gdk/Pixbuf.custom : use non-obsolete PixbufLoader.Write overload.
* gdk/PixbufLoader.custom : add obsolete PixbufLoader.Write overload
for the uint case for backcompat. Update other uses to the new ulong
overload.
* sample/GtkDemo/DemoImage.cs : use PixbufLoader.Write (byte[])
overload.
svn path=/trunk/gtk-sharp/; revision=44332
* gdk/Gdk.metadata : add a None member to ModifierType and fix the
definition for ModifierMask since the parser barfs on it.
[Fixes#74594]
svn path=/trunk/gtk-sharp/; revision=43265
* gdk/Gdk.metadata : hide some manually implemented callback methods.
* gdk/*.custom : implement several methods containing persistent
callback parameters.
* generator/BoxedGen.cs : set gen_info.CurrentType in Generate.
* generator/ClassGen.cs : set gen_info.CurrentType in Generate.
* generator/Ctor.cs : set gen_info.CurrentMember in Generate.
* generator/GenerationInfo.cs : add CurrentMember and CurrentType.
* generator/Method.cs : set gen_info.CurrentMember in Generate.
* generator/MethodBody.cs : always generate null guarding for array
parameters, and add a nag for callback parameters without a scope attr.
* generator/ObjectGen.cs : set gen_info.CurrentType in Generate.
* generator/OpaqueGen.cs : set gen_info.CurrentType in Generate.
* generator/Parameters.cs : kill NullOk. add Scope property.
* generator/StructGen.cs : set gen_info.CurrentType in Generate.
* gtk/Gtk.metadata : kill a few null_ok attrs.
* pango/Pango.metadata : mark the callback params as call scope. kill
a couple null_ok attrs.
svn path=/trunk/gtk-sharp/; revision=42529
resource-file constructors (using code formerly in Pixbuf.custom)
* gdk/Pixbuf.custom: Redo the stream and resource ctors in terms
of the PixbufLoader ones.
* gdk/PixbufAnimation.custom: Add stream and resource ctors
* gtk/Image.custom: Add stream and resource ctors
svn path=/trunk/gtk-sharp/; revision=42463