* 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
params... some functions use that to mark const "out" params. In
fact, let's use it as a hint to mark them pass_as="out" too...
* pango/pango-api-2.4.raw:
* pango/pango-api-2.6.raw:
* gtk/gtk-api-2.6.raw: Regen, fixing pango_script_iter_get_range
and gtk_image_get_icon_name.
* pango/Pango.metadata:
* pango/ScriptIter.cs: Alas, exposing GetRange makes it clear that
PangoScriptIter is really weird and we weren't wrapping it
correctly before anyway, so mark the whole thing hidden and wrap
it by hand.
svn path=/trunk/gtk-sharp/; revision=47748
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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
underscores in their names (and add obsolete aliases for the old
names).
* sample/GtkDemo/DemoTextView.cs: use the new names
svn path=/trunk/gtk-sharp/; revision=42532
* 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
* */*.cs : scrub for StringToPtrAnsi and string usage in DllImports.
* */*.custom : begin the scrub here too.
* generator/ConstStringGen.cs : implement IManualMarshaler and move to
100% IntPtr marshaling.
* generator/Ctor.cs : call Body.Finish too.
* generator/IManualMarshaler.cs : new interface for generatables that
marshal manually and need cleanup.
* generator/Makefile.am : new file.
* generator/MethodBody.cs : use IManualMarshaler if applicable.
svn path=/trunk/gtk-sharp/; revision=41579
* configure.in : kill a ton of redundant stuff.
* AssemblyInfo.cs.in : moved here, only need one.
* Makefile.include : rules for building generated assemblies.
* Makefile.am : removed gtk-sharp-2.0.pc handling.
* */AssemblyInfo.cs.in : killed
* */Makefile.am : refactored out a ton of rules to an include.
* */*-pc.in : added Cflags entries pointing to the gapi files.
* generator/CodeGenerator.cs : add -I: synonym --include.
* gnomevfs/gnome-vfs-api.raw : remamed from gnomevfs-api.raw.
* gtk/gtk-sharp-2.0.pc.in : moved here from top.
* parser/gapi-fixup.cs : add --symbol arg to merge sym files.
* sources/gtk-sharp-sources.xml : remamed gnome-vfs-api.raw.
svn path=/trunk/gtk-sharp/; revision=38551
/*< private >*/ comments.
* parser/gapi2xml.pl: Use those comments to determine the
accessibility of struct/object fields, and set the "access"
attribute on fields with non-default accessibiliy (private for
structs, public for objects). Also, output a StudlyName for each
field as well as a c_name.
* */*-api.raw: Regen
* generator/Field.cs (StudlyName): Use the parser-generated studly
name rather than studlifying Name, which might have been mangled
to avoid conflicts with an all-lowercase keyword.
(Generate): Respect the access property on all field types rather
than always making certain types public. Don't bother outputting
wrapper properties for private fields, since the only code that
could use them is the generated code, which won't.
See doc/ChangeLog for the (very minimal) fallout from these
changes.
* en/Art/AlphaGamma.xml:
* en/Gtk/TextAttributes.xml (Refcount):
* en/Pango/GlyphString.xml (Space): these are now private
* en/Gda/XqlItem.xml:
* en/Glade/SignalInfo.xml:
* en/Gnome.Vfs/ModuleCallbackSaveAuthenticationIn.xml:
* en/Gnome.Vfs/ModuleCallbackFullAuthenticationIn.xml:
* en/Gnome.Vfs/ModuleCallbackFillAuthenticationIn.xml: rename
Objekt to Object.
* en/Atk/KeyEventStruct.xml: rename Str1ng to String
svn path=/trunk/gtk-sharp/; revision=37853
* */*-api.raw : rerun the parser for new vm-age and cleanups.
* parser/gapi_pp.pl : suppress union types, since we can't generate
them. smarter get_type regex. ignore #errors.
* parser/gapi2xml.pl : generate vm elements for GInterfaces. Deal
with G_CONST_RETURN in vms. deal with "struct _foo" types in method
prototypes.
svn path=/trunk/gtk-sharp/; revision=36088
* pango/Pango.metadata : metadata for the pango audit.
* pango/*.custom : customizations to fix audited API.
* doc/en/* : docs for some api changes and additions.
* glib/Marshaller.cs : some gunichar marshal-fu.
* glib/glue/unichar.c : a new glue method.
svn path=/trunk/gtk-sharp/; revision=32462
* */*.cs : add lgpl license blurb and clean up (c)'s.
* */*.custom : add lgpl license blurb and clean up (c)'s.
* */glue/*.c : add lgpl license blurb and clean up (c)'s.
file adds without license from now on are punishable by wedgie.
svn path=/trunk/gtk-sharp/; revision=30401
* configure.in : deal with a csc-ism in source paths.
* */Makefile.am : use the GENERATED_SOURCES var.
* */glue/Makefile.am : add -no-undefined for win32 dll builds.
svn path=/trunk/gtk-sharp/; revision=29367
* configure.in : lookup gacutil and error out if not found.
* */Makefile.am : add install-data-local and uninstall-local targets
for GAC installation. Add gtk-sharp.pub target to cp the key in for
distcheck.
* */AssemblyInfo.cs.in : remove ../ from key path for VPATH build.
svn path=/trunk/gtk-sharp/; revision=26485
* */Makefile.am : automakify the build
* */Makefile.in : kill
* *.custom : remove System.Drawing dependencies
* *.cs : remove System.Drawing dependencies
* *-api.xml : mv to *-api.raw
* glue/* : mv to lib specific gluelibs for glib, gdk, gtk, and glade.
* gtk/gtk-symbols : alias GtkType to GType
* sources/gtk-sharp-sources.xml : create .raw files. They are now
transformed to .xml files by the metadata compilation step.
svn path=/trunk/gtk-sharp/; revision=23967
* generator/ObjectGen.cs : ignore virtual_method elems for now.
* parser/gapi2xml.pl : parse the non-signal class methods and add as
virtual_method elements in the API xml
* */*-api.xml : regen
svn path=/trunk/gtk-sharp/; revision=23809
* art/Art.metadata : mark a field private
* art/art-api.xml : regen
* gda/Gda.metadata : mark a few structs opaque
* gda/gda-api.xml : regen
* gdk/*.custom : fix changed field names
* gdk/gdk-api.xml : regen
* generator/Field.cs : StudlyCase simple typed field names.
* gnome/Gnome.metadata : mark FontEntry.weight private to
avoid collision with Weight field. s|//|/api/namespace|g
* gnome/gnome-api.xml : regen
* gtk/Gtk.metadata : rename AccelKey.accel_key to key to
avoid collision with type name.
* gtk/*.custom : fix changed field names
* gtk/gtk-api.xml : regen
* pango/pango-api.xml : regen
* parser/gapi_pp.pl : add a private_regex to hide BACKEND
and ENGINE apis, which are by convention private.
* sample/* : make compile
* sample/GtkDemo/* : make compile
* sample/test/* : make compile
* sources/gtk-sharp-sources.xml : exclude a bunch of pango
source files.
svn path=/trunk/gtk-sharp/; revision=22947
* art/Art.metadata : new xpath metadata rules
* art/Makefile.in : apply metadata before generation
* atk/Atk.metadata : new xpath metadata rules
* atk/Makefile.in : apply metadata before generation
* gda/Gda.metadata : new xpath metadata rules
* gda/Makefile.in : apply metadata before generation
* gdk/Gdk.metadata : new xpath metadata rules
* gdk/Makefile.in : apply metadata before generation
* gnomedb/GnomeDb.metadata : new xpath metadata rules
* gnomedb/Makefile.in : apply metadata before generation
* pango/Pango.metadata : new xpath metadata rules
* pango/Makefile.in : apply metadata before generation
* parser/Makefile.in : build and install new gapi-fixup
* parser/gapi-fixup.cs : new xpath based metadata engine
* sources/*.metadata : remove most of the old metadata,
still have to convert Gtk and Gnome to xpaths.
svn path=/trunk/gtk-sharp/; revision=18947
* generator/CallbackGen.cs : suppress len params from
string/len pairs.
* generator/Parameters.cs : begin the refactoring to use
Parameter class. Suppress len params from string/len pairs.
*/*.custom : remove all overrides of string/len pairs
*/*.cs : ditto. Thanks to Alp Toker for the foundation
patch that this change was built upon.
svn path=/trunk/gtk-sharp/; revision=11913
* pango/Layout.custom: Add Size get property and add some nicer overloads
to avoid explicit passing in the string length
svn path=/trunk/gtk-sharp/; revision=10231
* makefile: when doing distclean, attempt distclean on all the
C# subdirs too
* gconf/Makefile.in: added distclean target to rm the Makefiles
in the subdirs of gconf/
* glue/Makefile.am: build libgtksharpglue as an unversioned
module to avoid so -> so.0 -> so.0.0 symlink mess
* */Makefile.in: call mkinstalldirs before installing any files
so that subdirs can be installed seperately or in any sequence
(eg binding dirs before native dirs)
svn path=/trunk/gtk-sharp/; revision=9828
Much of this patch from Vlad, with substantial rework by mk.
* */makefile.win32 : introduce mapdllnames.pl, api, and glue
* generator/CallbackGen.cs : rework namespacing for csc compilation
* generator/Parameters.cs : ditto
* generator/Signal.cs : ditto
* generator/SignalHandler.cs : ditto
* glue/win32dll.c : new dll construction source
* glib/Value.cs : new ushort ctor/cast operator
* gtk/Table.custom : comment this out until we add a default ctor tag
* gtk/ThreadNotify.cs : make ReadyEvent public
* sources/Gdk.metadata : mark a Parse() param as ref
svn path=/trunk/gtk-sharp/; revision=8590
* */Makefile.in: Don't allow the shell to do file globbing; makes
--recurse work.
* generator/ObjectGen.cs (GenProperty): We need to cast a GLib.Value
to a GLib.Object and then to whatever it is, because explicit casts
don't work to child classes.
(GenSignal): Append "EventHandler" when generating signal handlers
so we don't get symbol conflicts.
svn path=/trunk/gtk-sharp/; revision=4414
* README : Describe the new make procedure.
* configure.in : Add the new Makefile generation.
* makefile : add the glue dir, make linux the default build,
add an install target
* */makefile.win32 : temp build files for win32
* */Makefile.in : new configurable make system
* */makefile : killed
* generator/BoxedGen.cs : Now uses GLib.Boxed
* generator/ObjectGen.cs : Use Values for Props.
* generator/SymbolTable.cs : Add IsEnum method.
* glib/Boxed.cs : Major overhaul.
* glib/Object.cs : Remove type specific (Get|Set)Property. Now
use GValue based property accessors.
* glib/TypeFundamentals.cs : Update to current values.
* glib/Value.cs : Refactor to use glue.
svn path=/trunk/gtk-sharp/; revision=4236
* */makefile : Add atk to the build.
* generator/EnumGen.cs : Create the generated dir if necessary.
* generator/ObjectGen.cs : Create the generated dir if necessary.
* generator/StructGen.cs : Create the generated dir if necessary.
* parser/gapi2xml.pl : Squash bug in comma separated field defs.
svn path=/trunk/gtk-sharp/; revision=1882