* pango/*.raw : regen.
* sources/gtk-sharp-2.4-sources.xml : exclude some xft and fc files.
* sources/gtk-sharp-2.6-sources.xml : exclude some xft and fc files.
svn path=/trunk/gtk-sharp/; revision=47124
that are only used inside ModuleInfo, so we don't marshal the
function pointers into (incorrect) delegates.
* gnome/Modules.cs:
* gnome/Program.custom: update for ModuleInfo being a class rather
than a struct now
svn path=/trunk/gtk-sharp/; revision=47045
* 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
* generator/CallbackGen.cs : remove an old workaround that put
the native wrapper class into the implementor's *Sharp namespace.
Use new ImportSignature sig.
* generator/ImportSignature.cs : don't mangle the callback wrapper
namespace any more. Remove impl_ns ctor param and field.
* generator/MethodBase.cs : use new MethodBody and ImportSignature
ctor sigs.
* generator/MethodBody.cs : drop the impl_ns ctor param.
* generator/Signal.cs : use new ImportSignature ctor sig.
* generator/VirtualMethod.cs : use new ImportSignature ctor sig.
svn path=/trunk/gtk-sharp/; revision=46877
whether or not to allow "complex" ref/out args.
(Validate): update for that
* generator/Signal.cs: set AllowComplexRefs false on the params.
(Validate): fix the messages
(GenCallback, GenEventHandler): properly handle ref/out args, by
manually pointerifying them (except for boxed args, which are
already pointers).
* glib/Marshaller.cs (StructureToPtrAlloc): Rename from
PtrToStructureAlloc, since it wraps Marshal.StructureToPtr.
svn path=/trunk/gtk-sharp/; revision=46773
* generator/ReturnValue.cs : support owned and elements_owned for lists.
* glib/List.cs : add ctor overloads for memory mgmt.
* glib/ListBase.cs : add ctor overloads for memory mgmt. Dispose
elements if specified.
* glib/SList.cs : add ctor overloads for memory mgmt.
* gnome/Gnome.metadata : unhide and generate a List prop.
* gnomevfs/Gnomevfs.metadata : unhide and generate a List prop.
* gtk/FileChooser.custom : new. add hidden props.
* gtk/FileChooserButton.custom : new. impl hidden props.
* gtk/FileChooserDialog.custom : remove some List props and use the
GLib.Marshaller for the remaining ones..
* gtk/FileChooserWidget.custom : remove some List props and use the
GLib.Marshaller for the remaining ones..
* gtk/Gtk.metadata : unhide and let the generator do some List props.
svn path=/trunk/gtk-sharp/; revision=46457
* gconf/GConf/Client.cs : support add/remove of a single notify handle
to multiple directories. [Fixes#55877]
svn path=/trunk/gtk-sharp/; revision=46456
* sample/GladeTest.cs : add a menu item signal connect to test for the
problem described in bug#74946.
* sample/test.glade : add menubar.
svn path=/trunk/gtk-sharp/; revision=46397
* Makefile.include : add included apis as deps on the generation
target to force regen if dependency lib api changes.
* pango/Analysis.custom : new custom to implement the ExtraAttrs
property. [Fixes#74668]
* pango/Makefile.am : add new custom file.
svn path=/trunk/gtk-sharp/; revision=46166
* bootstrap : use assembly version 2.6.0.0.
* bootstrap-2.4 : use assembly version 2.4.0.0.
* configure.in.in : substitute the assembly version.
svn path=/trunk/gtk-sharp/; revision=46136
be set at construct time") and CONSTRUCT_ONLY ("can only be set at
construct time") properties, rather than marking them all
"construct-only".
* gnome/gnome-api.raw:
* gtk/gtk-api-2.4.raw:
* gtk/gtk-api-2.6.raw: Regen, causing a few formerly-read-only
properties to become writable.
svn path=/trunk/gtk-sharp/; revision=45767
* glade/XML.custom : add a try block on field autoconnect to make it
easier to catch type mismatches and such. Suggestion from Gonzalito.
svn path=/trunk/gtk-sharp/; revision=45766
* generator/SimpleBase.cs : off-by-one in namespace join.
* glib/ListBase.cs : support IntPtr element_type.
* gnomevfs/FileInfo.cs : make it ManualGen friendly.
* gnomevfs/*.cs : rework for FileInfo api changes.
* gnomevfs/Gnomevfs.metadata : make FileInfo a manual symbol.
* gnomevfs/Uri.custom : rework for FileInfo api changes.
* gnome/Makefile.am : add gnomevfs dependency to pick up some more api
symbols.
* gnome/gnome-sharp-2.0.pc.in : advertise the vfs dep.
[Fixes#71060]
svn path=/trunk/gtk-sharp/; revision=45702
* generator/ReturnValue.cs : don't write a sem in FromNative.
* glib/ListBase.cs : handle GLib.Object explicit element types.
* glib/Marshaler.cs : only copy lists if Count > 0.
* gtk/Gtk.metadata : unhide Window.ListToplevels with a proper element
type for automatic list to array marshaling.
* gtk/Window.custom : kill manual ListToplevels impl.
svn path=/trunk/gtk-sharp/; revision=45654
* Makefile.include : depend on gapi-fixup.exe for the api target.
* parser/gapi-fixup.cs : remove-node rule handling.
svn path=/trunk/gtk-sharp/; revision=45502
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
* glib/ListBase.cs : add a nested class to support filename encoded
string element marshaling.
* gtk/Gtk.metadata : mark the filenames and folders as filename
encoded.
* gtk/FileChooserDialog.custom : use new ListBase.FilenameString type
for list element type of filenames and folders.
* gtk/FileChooserWidget.custom : use new ListBase.FilenameString type
for list element type of filenames and folders.
[Fixes#72701]
svn path=/trunk/gtk-sharp/; revision=45334
* gtk/Object.custom : only connect to Destroyed for managed subclasses
and let the wrappers get disposed by the GC.
svn path=/trunk/gtk-sharp/; revision=45326
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
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
* gtk/Object.custom : hold refs for all managed subclasses. Release on
Destroy. Dispose plain wrappers on Destroy also.
* gtk/Widget.custom : remove the parent set hack since it's "handled"
on Gtk.Object now. All this will get fixed properly when we have
access to owen's toggle_refs.
svn path=/trunk/gtk-sharp/; revision=44506
* generator/MethodBody.cs : don't create a new destroy notify
delegate, just use GLib.DestroyHelper.NotifyHandler directly.
svn path=/trunk/gtk-sharp/; revision=44504
* pango/Makefile.am : add file.
* pango/Units.cs : new class to wrap PANGO_SCALE and PANGO_PIXELS.
* pango/glue/units.c : accessors for the macros.
* pango/glue/Makefile.am : build it.
* pango/glue/makefile.win32 : build it on win.
[Fixes#74837]
svn path=/trunk/gtk-sharp/; revision=44410
* gtk/Object.custom : Dispose on a Destroyed event.
* gtk/Widget.custom : rework the parent_set hack to go direct to
the native signal instead of using the event so we avoid rewrapping of
already destroyed parents.
svn path=/trunk/gtk-sharp/; revision=44388
* 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
* glib/Object.cs : add a try/catch block to g_object_unref calls to
help identify "extra unref" bugs when exceptions occur.
svn path=/trunk/gtk-sharp/; revision=44325
* pango/Makefile.am: add Matrix.custom
* pango/Matrix.custom: add Pango.Matrix.Identity field
which is the equivalent of PANGO_MATRIX_INIT
* sample/GtkDemo/DemoRotatedText.cs: use Pango.Matrix.Identity
* doc/en/Pango/Matrix.xml: add docs for Pango.Matrix.Identity
svn path=/trunk/gtk-sharp/; revision=44181
* gdk/Pixbuf.custom : move the GetCallingAssembly invocations back out
the the public methods.
* gdk/PixbufLoader.custom : ditto.
svn path=/trunk/gtk-sharp/; revision=44165
* bootstrap :
* bootstrap-2.4 : use ln instead of cp for api files so reparsing
causes rebuilds.
* sources/gtk-sharp-2.6-sources.xml : moved from gtk-sharp-sources.xml
plus fixed the pango, atk, and gdk raw filenames.
* sources/gtk-sharp-2.4-sources.xml : sources file for 2.4 api.
* sources/Makefile.am : added 2.4/2.6 targets for api and get-source
with make api/get-source-code getting/parsing both versions.
* */*.raw : regenerate
svn path=/trunk/gtk-sharp/; revision=44150
* autogen.sh : error out with bootstrap help message.
* bootstrap : replaces autogen.sh for the 2.5.x release line.
* bootstrap-2.4 : replaces autogen.sh for the 1.9.x release line.
* configure.in.in : renamed from configure.in and added substitution
for version, dependencies, CFLAGS and CSFLAGS.
* README : bootstrap docs
* */*-api.raw : moved to api-2.6.raw for bootstrapping.
* */*-api-2.4.raw : added 2.4 api files for bootstrapping.
* */glue/Makefile.am : add GTK_SHARP_VERSION_CFLAGS.
* pango/Attribute.cs : add a #if GTK_SHARP_2_6 block.
* pango/glue/attribute.c : add a couple #ifdef GTK_SHARP_2_6 blocks.
* sample/GtkDemo/* : make the 2.6 demos conditional.
svn path=/trunk/gtk-sharp/; revision=44047
* */*-api.xml: Regen, adding gtype="..." to many enum types
* generator/EnumGen.cs (Generate): if the enum has the
"gtype" property, add a GTypeAttribute pointing to an internal
FooGType class whose GType property can be used to get the enum's
GType.
* generator/ObjectGen.cs:
s/ObjectManager.RegisterType/GType.Register/
* glib/GTypeAttribute.cs: attribute for indicating a property that
will return the GType of a type (particularly for enums, which
can't have GType properties added to them).
* glib/GType.cs: renamed from Type.cs to match the type name
(public static readonly GType ...): add a few missing types.
(Register): moved from ObjectManager.RegisterType
(LookupGType): moved from TypeConverter.LookupType and extended to
handle GTypeAttribute. Also, fix mappings for sbyte/byte/char, and
return specific GTypes for Object subclasses rather than always
returning GType.Object. [Fixes#74699]
(LookupType): moved from ObjectWrapper.LookupType
(ToString): return the type name
* glib/Object.cs (RegisterGType):
s/ObjectManager.Register/GType.Register/
(LookupGType): Make this protected internal so GType can access
it.
* glib/ObjectManager.cs (RegisterType): deprecate in favor of
GType.Register.
(LookupType): moved to GType
* glib/TypeConverter.cs (LookupType): now a deprecated wrapper
around GType.LookupGType.
* glib/Value.cs: Use GType casts rather than TypeConverter
* gtk/NodeStore.cs (ScanType):
* gtk/ListStore.custom (ListStore):
* gtk/TreeStore.custom (TreeStore): Use (GType) cast rather than
TypeConverter. Remove the error check and exception, since the
cast never returns GType.Invalid. (The check probably predates
GLib.ManagedValue.)
* gnome/PanelAppletFactory.cs (Register): Use a GType cast rather
than GLib.Object.LookupGType (which is no longer accessible after
an mcs bugfix)
* sample/GtkDemo/DemoIconView.cs (CreateStore): use the Type[]
constructor rather than the GType[] constructor, since it
translates typeof(Gdk.Pixbuf) correctly now.
svn path=/trunk/gtk-sharp/; revision=44038
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
parameter should be hidden in the managed sig (eg, because it's
user_data, or it's the length of the preceding array/string, etc).
(VisibleCount): the number of parameters that will actually be
exposed in the managed signature.
(IsAccessor): test VisibleCount, not Count
(AccessorReturnType, AccessorName): deal with the fact that the
accessor parameter might not be the first one.
* generator/CallbackGen.cs:
* generator/Signature.cs: use Parameters.IsHidden.
* generator/Method.cs (Initialize): set is_set based on
VisibleCount, not Count.
(Validate): call base.Validate() before Initialize() so that
VisibleCount will be correct in Initialize.
* generator/MethodBody.cs (GetCallString, CallArrayLength,
Initialize): update to deal with accessors with multiple args.
* gtk/Clipboard.custom (SetText): implement as an Obsolete variant
of the Text property
* gtk/IconTheme.custom (SearchPath, SetSearchPath): obsolete
SetSearchPath, implement a setter on SearchPath instead.
* gtk/ListStore.custom (SetColumnTypes):
* gtk/TreeStore.custom (SetColumnTypes): implement as an Obsolete
variant of the ColumnTypes property.
* glade/XML.custom (CustomHandler): implement as a property
(SetCustomHandler): Mark this obsolete
* glade/Global.custom (SetCustomHandler): deprecate in favor of
XML.CustomHandler.
* gnomedb/Editor.custom (SetText): implement as an Obsolete
variant of the Text property
svn path=/trunk/gtk-sharp/; revision=43898
don't actually affect the generated output
* generator/PropertyBase.cs: new base class for fields and
properties (mostly containing code formerly in Property.cs).
* generator/Property.cs: derive from PropertyBase
* generator/FieldBase.cs: base class for fields (containing some
code formerly in Field.cs)
* generator/StructField.cs: class for struct fields (the rest of
what used to be Field.cs)
* generator/StructBase.cs: s/Field/StructField/
* gnome/Gnome.metadata: hide a few funky _get_ methods that the
generator is just now noticing, to preserve the old output.
svn path=/trunk/gtk-sharp/; revision=43896
* gtkdotnet/Graphics.cs: Contribution from Sebastian Faltoni
<sebastian.faltoni@gmail.com> that implements support for using
System.Drawing on Windows.
svn path=/trunk/gtk-sharp/; revision=43619
Gdk.Event
* pango/pango-symbols.xml: explain how to marshal PangoAttribute.
* pango/AttrBackground.cs:
* pango/AttrFallback.cs:
* pango/AttrFamily.cs:
* pango/AttrFontDesc.cs:
* pango/AttrForeground.cs:
* pango/AttrLanguage.cs:
* pango/AttrLetterSpacing.cs:
* pango/AttrRise.cs:
* pango/AttrScale.cs:
* pango/AttrShape.cs:
* pango/AttrSize.cs:
* pango/AttrStretch.cs:
* pango/AttrStrikethrough.cs:
* pango/AttrStrikethroughColor.cs:
* pango/AttrStyle.cs:
* pango/AttrUnderline.cs:
* pango/AttrUnderlineColor.cs:
* pango/AttrVariant.cs:
* pango/AttrWeight.cs: subclasses of Attribute, with proper
constructors. These don't actually correspond one-to-one with
the underlying types, but they're nicer this way.
* pango/Pango.metadata: Hide Attribute and its subclasses from the
generator. Also hide "Attr" (which previously contained
non-working badly-named static methods to create Attributes)
and AttrClass (which is not really useful outside of pango
itself).
* pango/AttrIterator.custom: use Pango.Attribute.GetAttribute.
* pango/glue/attribute.c: glue for Attribute and its subclasses
[Fixes#52575 and its semi-dup #46552]
svn path=/trunk/gtk-sharp/; revision=43520
param const
* glib/Marshaller.cs (Utf8PtrToString): Add an IntPtr[]->string[]
overload, since that's what we actually need in the case where
it's used (above). Leave the IntPtr[]->string[] overload of
PtrToStringGFree in case anyone is using it manually.
* gtk/Gtk.metadata: hide GtkModuleInitFunc and
GtkModuleDisplayInitFunc; they are the signatures of user-defined
methods that gtk only ever resolves via g_module_symbol(), so
they're not useful from C#. (And the marshalling was all wrong
anyway...)
svn path=/trunk/gtk-sharp/; revision=43461
* parser/gapi-parser.cs : add a directory element with child exclude
elements to simplify source version updating.
* sources/gtk-sharp-sources.xml : switch to directory elements.
svn path=/trunk/gtk-sharp/; revision=43354
* 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
and unmanaged interface declarations.
(Implements): check recursively
* generator/ObjectGen.cs (Generate): output managed interfaces
* gtk/Gtk.metadata: make Container implement IEnumerable
* gtk/Container.custom (GetEnumerator): implement (a simplified
form of Children).
(AllChildren): add this (which accumulates the results of
Forall()).
(ForAll): mark ForAll(bool,CallbackInvoker) obsolete and add a
ForAll(bool,Gtk.Callback) overload to replace it.
* sample/PolarFixed.cs: new silly but fully-functional demo of
how to subclass container.
* sample/CustomNotebook.cs: kill this, since it was really
complicated, and never fully functional.
* sample/GtkDemo/DemoImages.cs (ToggleSensitivity): Use foreach
directly on the container, rather than on its .Children.
svn path=/trunk/gtk-sharp/; revision=42805
for all of the assemblies
* Makefile.include:
* gconf/GConf/Makefile.am:
* gconf/GConf.PropertyEditors/Makefile.am:
* glib/Makefile.am:
* gtkdotnet/Makefile.am (CLEANFILES): add $(ASSEMBLY).mdb
$(ASSEMBLY): build with $(CSFLAGS). Always delete $(ASSEMBLY).mdb
before building $(ASSEMBLY), so that if you first build with
debugging enabled, then update, then rebuild without debugging
enabled, you don't end up with an out-of-date .mdb file.
svn path=/trunk/gtk-sharp/; revision=42791