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
* glib/Opaque.cs (Owned): new property saying whether or not gtk#
owns the memory.
(Opaque): Set Owned to true in the void ctor and false in the
IntPtr one.
(GetOpaque): add a new overload that can also create opaques, a la
GLib.Object.GetObject.
(Ref, Unref, Free): empty virtual methods to be overridden by
subclasses.
(set_Raw): Unref() and possibly Free() the old value, Ref() the
new one.
(~Opaque, Dispose): set Raw to IntPtr.Zero (triggering Free/Unref
if needed)
* parser/gapi2xml.pl (addReturnElem): if the method is named Copy
and returns a pointer, set the "owned" attribute on the
return-type.
* */*-api.raw: Regen
* generator/HandleBase.cs (FromNative): Add new
FromNative/FromNativeReturn overloads that takes a "bool owned"
param. Implement the 1-arg FromNative and FromNativeReturn in
terms of that.
* generator/ObjectBase.cs (FromNative): Implement HandleBase's new
overload. Use the two-arg version of GLib.Object.GetObject when
"owned" is true.
* generator/OpaqueGen.cs (Generate): Pull out Ref, Unref, and
Free/Destroy/Dispose methods and handle them specially by
overriding Opaque.Ref, .Unref, and .Free appropriately. (If any
of the methods are marked deprecated, output a deprecated
do-nothing method as well, to save us from having to write all
those deprecated methods by hand.)
(FromNative): use GetOpaque, passing "owned".
* generator/ReturnValue.cs (FromNative): if the value is a
HandleBase, pass Owned to its FromNative().
* generator/Parameters.cs (Owned): new property (for use on out
params)
(FromNative): Call FromNative() on the generatable, handling Owned
in the case of HandleBase.
* generator/ManagedCallString.cs:
* generator/MethodBody.cs:
* generator/Signal.cs: use param.FromNative() rather than
param.Generatable.FromNative(), to get ownership right.
* */*.metadata: Mark opaque ref/unref/free methods deprecated
(except where we were hiding them before). Add "owned" attributes
to return values and out params as needed.
* pango/AttrIterator.custom (GetFont): work around a
memory-management oddity of the underlying method.
* pango/AttrFontDesc.cs (AttrFontDesc): copy the passed-in
FontDescriptor, since the attribute will assume ownership of it.
* gtk/TreeView.custom (GetPathAtPos): set the "owned" flag on the
returned TreePaths.
* gtk/TargetList.custom: Remove refcounting stuff, which is
now handled automatically
* gtk/NodeStore.cs (GetPath): clear the Owned flag on the created
TreePath so that the underlying structure doesn't get freed when
the function returns
* gtkhtml/HTMLStream.custom (Destroy): hide this and then
reimplement it by hand to keep OpaqueGen from using it in
Dispose(), since calling it after an HTMLStream.Close() will
result in a crash.
svn path=/trunk/gtk-sharp/; revision=47928
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
* 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
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
* 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
* 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
* gdk/Gdk.metadata : mark out param on Window.GetFrameExtents.
* gdk/WindowAttr.custom : new typed Mask prop.
* gtk/Widget.custom : new typed WidgetFlags prop. mark Flags obsolete.
svn path=/trunk/gtk-sharp/; revision=37909
* #68824]
* gdk/Gdk.metadata: Remove the earlier GdkBitmap hack now that
it's aliased. Also move Gdk.Bitmap.CreateFromData to
Gdk.Pixmap.CreateBitmapFromData
* gdk/Pixbuf.custom (RenderPixmapAndMask,
RenderPixmapAndMaskForColormap, RenderThresholdAlpha):
s/Bitmap/Pixmap/
* sample/GtkDemo/DemoTextView.cs: uncomment the fg/bg stipple
code, since that works now
* parser/gapi-fixup.cs: Add an "add-node" rule. This turned out
* to
not actually be needed for this fix, but we know we'll need it
later, so here it is.
svn path=/trunk/gtk-sharp/; revision=37055
Gdk.Pixmaps instead, because the former will crash. Also fix the
"data" param to Pixmap.CreateFromXpmD and
Pixmap.ColormapCreateFromXpmD
* gtk/Style.custom (TextAAGC, SetTextAAGC, LightGC, SetLightGC,
DarkGC, SetDarkGC, MidGC, SetMidGC): add these to go along with
BaseGC, SetBaseGC, etc.
* gtk/glue/style.c: add the glue methods needed for the above
svn path=/trunk/gtk-sharp/; revision=35409
* gdk/Gdk.metadata: change Gdk.KeyVal name return-type from
gchar* to const-gchar*, so we do not try to modify it (call gfree).
[Fixes#64421]
svn path=/trunk/gtk-sharp/; revision=32968
* gdk/Makefile.am (sources): add Pixdata.custom
* gdk/Pixdata.custom: add new file to fix Serialize.
* gnome/CanvasItem.custom: remove the incorrect custom bindings.
* gnome/Gnome.metadata: stop hiding the AffineRelative and
AffineAbsolute the generator gets them right they are not out
params.
* gdk/Gdk.metadata: mark the Pixdata byte stream as and array hide
the broken serialize method.
svn path=/trunk/gtk-sharp/; revision=29941
* configure.in : another "really frozen this time" release.
* gdk/Gdk.metadata : mark a couple array params on Pixbuf.Savev.
* gdk/Pixbuf.custom : add a Save implementation.
svn path=/trunk/gtk-sharp/; revision=29546
* gdk/Gdk.metadata: mark Window.SetBackPixmap as null_ok.
* glib/Object.cs: in set_Raw, if value == IntPtr.Zero, dont put that
in the weakref hashtable, as it creates later issues with gtk+
returning null and gtk# mistaking if for an object.
svn path=/trunk/gtk-sharp/; revision=29126
* gtk/Widget.custom: expose some easy bool properties for checking
certain WidgetFlags. Make Allocation a settable property.
* gtk/glue/widget.c: bit of glue to make Allocation settable.
* gdk/Window.custom: expose UserData as a usable IntPtr property.
* gdk/Gdk.metadata: hide old GetUserData/SetUserData methods.
* doc/*: ran the updater.
svn path=/trunk/gtk-sharp/; revision=28974
* gdk/Gdk.metadata: fix membler names in WindowClass.
[Fixes#59336]
2004-05-31 Mike Kestner <mkestner@ximian.com>
* en/Gdk/WindowClass.xml : move existing docs to new member names.
svn path=/trunk/gtk-sharp/; revision=28563
[Expanded from patch by John Luke attached to bug.]
* gdk/Gdk.metadata : rename Atom.Name to GetName so it props.
* gdk/Atom.custom : new string cast operator.
* sample/TestDnd.cs : fix Atom.Name reference
* sample/GtkDemo/DemoEditableCell.cs : fix a ListStore.Remove
ref broken by last commit.
[Fixes#57721]
svn path=/trunk/gtk-sharp/; revision=26208