* generator/InterfaceGen.cs: generate Adapters for consume_only ifaces
too. This seems unusual, but is primarily to produce at least one
'generic' implementation of every interface and a GetObject method
so that the marshaling code can always return an object which
implements the interface, even if no public object wrapper exists for
the underlying c GObject type.
svn path=/trunk/gtk-sharp/; revision=122814
* generator/InterfaceGen.cs: use the new GLib API to detect
instances that don't implement GInterfaces.
* glib/GType.cs: add new API for checking if an IntPtr instance
implements a certain GType.
[Fixes#448009]
svn path=/trunk/gtk-sharp/; revision=121990
* generator/InterfaceGen.cs: throw ArgumentNullException in
the Adapter's constructor that receives an implementor.
svn path=/trunk/gtk-sharp/; revision=115571
* generator/InterfaceGen.cs: use CName and mangle it. ClassFieldName
is not guaranteed to be set now.
* generator/Signal.cs: read ClassFieldName from the api xml. Move
glue writer lookup inside the block to avoid exceptions for now.
svn path=/trunk/gtk-sharp/; revision=102276
* generator/InterfaceGen.cs:
* generator/Signal.cs: use generic signal marshaling instead of
generating signature specific marshaling callbacks.
* glib/glue/closure.c: glue for new closure impl.
* glib/Object.cs: open up a couple hashes internally.
* glib/Signal.cs: hook in closure based connection and expose
EmissionHook functionality for atk usage.
* glib/SignalClosure.cs: new generic signal marshaling mechanism.
* glib/ToggleRef.cs: null guarding in Target and let Signal remove
itself from hash when it disposes itself.
svn path=/trunk/gtk-sharp/; revision=102241
* generator/InterfaceGen.cs: support "generic" interface
implementations like those exposed by gio. This is specifically for
libraries which return GTypes which are not exposed by the library
but which implement GInterfaces which are exposed by the library.
svn path=/trunk/gtk-sharp/; revision=99541
* generator/*.cs: implement the interfaces on the adapters too.
Generate an Implementor interface for users which exposes the
methods to implement. Register based on the Implementor sub-iface.
* gtk/*Adapter.custom: custom implementations for the custom
interface members.
* gtk/TreeIter.custom: make UserData public.
* sample/TreeModelDemo.cs: sample for implementing a TreeModel
interface.
svn path=/trunk/gtk-sharp/; revision=86753
* generator/VirtualMethod.cs: refactor delegate generation into
GenerateCallback and add [CDeclCallback] which was missing.
* generator/InterfaceGen.cs: kill GenerateDelegates. They are now
generated by VirtualMethod.GenerateCallback.
svn path=/trunk/gtk-sharp/; revision=86026
* gtk/Gtk.metadata: virtual_method rules for GInterface generation.
* generator/ReturnValue.cs (ToNative): new method for the virtual
method generation.
* generator/Parameters.cs (FromNative): null guarding.
* generator/ManagedCallString.cs: rework for interface method
generation including callback and error param support.
* generator/CallbackGen.cs: Invoker support. new class that deals
with persistence of native and wrapper delegates in native to managed
callback method signatures.
* generator/VirtualMethod.cs: support for generation of interface
methods, and all the funky parameters that come with that.
* generator/InterfaceGen.cs: Fill out the adapter implementation.
* generator/MethodBody.cs: Initialize overload. Extend ThrowsException
to support GError outside the last parameter slot.
* glib/GInterfaceAttribute.cs: New attribute to mark interfaces and
obtain adapter type.
* glib/Object.cs (AddInterfaces): interface registration method.
* glib/GInterfaceAdapter.cs: New abstract class for interface
adapter generation.
* glib/Makefile.am: add new files.
svn path=/trunk/gtk-sharp/; revision=85658
* generator/*.cs : switch to IntPtr marshaling for struct types
in the managed to native direction.
* gtk/*.custom : adjust to new gapi struct pinvoke sigs.
svn path=/trunk/gtk-sharp/; revision=83961
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.
svn path=/trunk/gtk-sharp/; revision=48177
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
as well as class properties
* gtk/gtk-api-2.4.raw:
* gtk/gtk-api-2.6.raw: Regen (adding properties to GtkFileChooser).
* generator/Property.cs (GenerateDecl): new method to generate
just a property declaration (for an interface).
(Generate): Add an "implementor" arg as with Method.Generate.
* generator/InterfaceGen.cs (Generate): Generate properties. Also,
validate methods *before* checking if they should be ignored,
since certain Method properties aren't set until Validate-time.
* generator/*.cs: misc minor changes/reorg for the above.
svn path=/trunk/gtk-sharp/; revision=47563
* 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/*Gen.cs : implement IGeneratable fully on GenBase
with abstract methods where necessary to refactor a ton of redundant
code.
svn path=/trunk/gtk-sharp/; revision=38091
* generator/InterfaceGen.cs : beginnings of a real
implementation for GInterfaces. Not quite ready yet,
so it's not active in generation.
svn path=/trunk/gtk-sharp/; revision=36294
* generator/InterfaceGen.cs (Generate): gen the EventHandlers for sigs
* generator/Signal.cs (GetHandlerName): kill this and split it into
EventHandlerName and EventHandlerArgsName props instead of the ugly
out param hack.
(GenEventHandler): make public void and add gen_info param. open
stream with gen_info. use new *Name props.
(Generate): only gen the EventHandler if we're genning the container,
not for implementors.
svn path=/trunk/gtk-sharp/; revision=18684
* generator/CallbackGen.cs : use non-static symtab, kill doc comments
* generator/ClassBase.cs : use non-static symtab
* generator/CodeGenerator.cs : use non-static symtab
* generator/EnumGen.cs : kill doc comments, don't gen using System here
* generator/GenBase.cs : gen using System here for all types
* generator/InterfaceGen.cs : don't gen using System here.
* generator/Method.cs : use non-static symtab
* generator/ObjectGen.cs : kill doc comments, use non-static symtab
* generator/OpaqueGen.cs : don't gen using System here.
* generator/Parameters.cs : use non static symtab.
* generator/Parser.cs : use non static symtab. add SimpleGen's and
ManualGen's
* generator/Property.cs : use non static symtab
* generator/SignalHandler.cs : use non static symtab
* generator/StructBase.cs : use non static symtab
* generator/SymbolTable.cs : major refactoring. now uses SimpleGen and
ManualGen IGeneratables to simplify the method and prop code. Is now
instance based with a static prop to get the singleton instance, so that
a this indexer can be provided to access the IGeneratables nicely. Gearing
up to remove even more code from here by accessing IGeneratables directly.
svn path=/trunk/gtk-sharp/; revision=14687
* generator/ClassBase.cs (GenSignals): remove doc comment param
* generator/GenBase.cs (CreateWriter): alter generated file comment
* generator/InterfaceGen.cs (CreateWriter): remove doc comments
* generator/ObjectGen.cs (Generate): use new GenSignals sig
* generator/Signal.cs : make signal marshalers internal and remove
doc comments.
* generator/SignalHandler.cs : make signal marshalers internal and remove
doc comments.
* gnome/CanvasProxy.cs : use Gnome.voidObjectSignal since the gtk one is
inaccessible now.
svn path=/trunk/gtk-sharp/; revision=14385
(So Miguel told me just to go ahead and commit -kris)
* gtk/TreeSelection.custom: new file, defines a working
GetSelected method (GetSelected is a bit tricky function).
* generator/InterfaceGen.cs (Generate): also call AppendCustom
* sources/Gtk.metadata: hide the autogenerated
Gtk.TreeSelection.GetSelected method.
svn path=/trunk/gtk-sharp/; revision=8071
* art/Makefile.in (clean): Change to avoid bugging out on generated/CVS.
* glib/ObjectManager.cs: Added. Used to be auto-generated, but
now it can infer names, and relies on per-namespace ObjectManager
classes to inform it of oddly-named classes.
* generator/IGeneratable.cs, GenBase.cs: New "DoGenerate" property.
* generator/*Gen.cs: Honor DoGenerate.
* generator/CodeGenerator.cs: Support including dependency files
which will not be generated.
* generator/ObjectGen.cs: Generate mapping file per-namespace, as one
that calls back to the one in glib. Only generate if the name does
not follow the normal conventions, otherwise, GtkSharp.ObjectManager
can infer the name.
* generator/Parser.cs: Accept 'generate' flag to pass on to the
IGeneratables. Parse a new toplevel element, "symbol", which adds
a type to the SymbolTable (instead of hard-coding it).
* generator/SignalHandler.cs: Do not optimize signal handler creation,
instead creating them in their own namespaces. Do not generate
if the calling Signal told us not to.
* generator/Signal.cs: Do not generate handlers if container's DoGenerate
is false. Adjust to the marshaller name being in a sub-namespace.
* generator/SymbolTable.cs (AddSimpleType, AddManualType): Used
to add simple and manually wrapped types at runtime instead of
compile-time.
(FromNative): Remove hard-coded cases for manually wrapped types, use
a generic case instead.
* api: Added. Move api files and generation targets here.
* source: Added. Move source parsing here.
* generator/makefile: Move actual generation to api/.
* glib/Makefile.in: Remove generated/* target.
* glue/Makefile.am: Fix to include canvas-marshal. Move canvas stuff
to GNOME target.
* gnome/CanvasProxy.cs: Update to work with SignalHandlers being
namespace-specific.
* parser/Metadata.pm: Moved to GAPI/Metadata.pm, renamed, etc.
* parser/gapi2xml.pl: Use GAPI::Metadata.
* parser/makefile: Install scripts, remove source parse build target.
Rename formatXML to gapi_format_xml.
svn path=/trunk/gtk-sharp/; revision=6818
* glib/EnumWrapper.cs: New class which holds an enum int.
* glib/Value.cs: Add support for glib enum types. We needed
to use EnumWrapper for this because otherwise the int operator
wouldn't know which glib function to use.
* generator/BoxedGen.cs, ClassBase.cs, Ctor.cs, EnumGen.cs,
InterfaceGen.cs, Method.cs, ObjectGen.cs, Signal.cs, StructGen.cs:
Create more doc stubs.
* generator/Property.cs: Generate enum values correctly.
* generator/Ctor.cs: Refactor generation to honor metadata-specified
collision preference.
* parser/Gtk.metadata: Added constructor collision preferences to
all known clashes.
* parse/Gdk.metadata: Added (for Pixbuf clashes).
svn path=/trunk/gtk-sharp/; revision=5437
* makefile : remove gdk.imaging from the build
* gdk.imaging/* : kill
* generated/BoxedGen.cs : XmlNode namespace handling. Use GenBase.
* generated/CallbackGen.cs : XmlNode namespace handling.
* generated/Ctor.cs : construct with libname not ns.
* generated/EnumGen.cs : XmlNode namespace handling.
* generated/GenBase.cs : XmlNode namespace handling. Make AppendCustom
an instance method so it can use the private fields instead of params.
* generated/InterfaceGen.cs : XmlNode namespace handling.
* generated/Method.cs : construct with libname not ns.
* generated/ObjectGen.cs : XmlNode namespace handling.
* generated/Parser.cs : Use new XmlNode namespace ctors.
* generated/Signal.cs : Lose the namespace field.
* generated/StructBase.cs : derive from ClassBase
* generated/StructGen.cs : XmlNode namespace handling. Use GenBase.
* generated/SymbolTable.cs : nuke GetDllName method.
* generator/gtkapi.xml : Add library name to namespace node.
* parser/build.pl : refactor for library name param
* parser/gapi2xml.pl : add libname param handling
* sample/Makefile.in : build linux on make install, but don't install.
svn path=/trunk/gtk-sharp/; revision=5400
* generator/ClassBase.cs: New base class for classes and interfaces.
* generator/InterfaceGen.cs: Inherit from ClassBase, generate declarations.
* generator/ObjectGen.cs: Move half of this into ClassBase.
* generator/Method.cs: Turn all applicable Get/Set functions into .NET
accessors. Remove redundant == overload and move into Equals, as
it was confusing "!= null".
* generator/Parameters.cs: Alter signature creation to accept "is_set"
option, add support for variable arguments. Add properties "Count",
"IsVarArgs", "VAType".
* generator/Ctor.cs: Fixup for changes in Parameters (indenting,
signature creation).
* generator/Signal.cs: Support generating declarations.
* generator/SymbolTable: Change GetObjectGen to GetClassGen.
* glib/IWrapper.cs: Move "Handle" declaration to here, so
both classes and interfaces can benefit from it.
* glib/Object.cs: Inherit from IWrapper.cs
* parser/Metadata.pm: Support attribute changes on constructors,
methods, signals, and paramater lists.
* parser/gapi2xml.pl: Parse init funcs for interfaces. Ignore "_"
functions here.
* parser/gapi_pp.pl: Remove boxed_type_register check, as it will
be caught in the init funcs.
* parser/Atk.metadata: Added.
* parser/Gtk.metadata: Add all needed signal/method collision
renames. Rename GtkEditable.Editable accessors to IsEditable,
as .NET does not like accessors with the same name as their
declaring type. Tag TreeStore constructor as varargs.
* samples/ButtonApp.cs: s/EmitAdd/Add.
* samples/Menu.cs: s/EmitAdd/Add, s/Activate/Activated.
svn path=/trunk/gtk-sharp/; revision=5394
2002-05-23 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs : Update for Static SymbolTable
* generator/CallbackGen.cs : Use GenBase and Parameters classes
* generator/CodeGenerator.cs : Update for Static SymbolTable
* generator/Ctor.cs : code from StructBase using Parameters class
* generator/EnumGen.cs : Use GenBase
* generator/GenBase.cs : Abstract Stream Writer creation, stream
boilerplate, and common *Name properties
* generator/IGeneratable.cs : Update for Static SymbolTable
* generator/InterfaceGen.cs : Use GenBase
* generator/Method.cs : code from StructBase using Parameters class
* generator/ObjectGen.cs : Major refactoring. Use GenBase. Build
tables of Member generatables at construct time to facilitate
future name collision resolution logic.
* generator/Parameters.cs : new generatable to abstract duplicated
parameter parsing logic.
* generator/Parser.cs : Update for Static SymbolTable
* generator/Property.cs : code from ObjectGen
* generator/Signal.cs : code from ObjectGen
* generator/SignalHandler.cs : Update for Static SymbolTable
* generator/StructBase.cs : Update for Static SymbolTable
* generator/StructGen.cs : Update for Static SymbolTable
* generator/SymbolTable.cs : Make all methods and private members
static. There is no reason to ever have multiple tables.
svn path=/trunk/gtk-sharp/; revision=4895
* generator/Statistics.cs : New. Gathers stats about generation.
* generator/*.cs : Hook in the stat counters.
svn path=/trunk/gtk-sharp/; revision=2491
api.xml file from CVS with this commit. It can be downloaded from
http://sf.net/projects/gtk-sharp. I will be uploading new versions of the
file, now named gtkapi.xml, to the project download area from now on.
2002-02-08 Mike Kestner <mkestner@speakeasy.net>
* README : Some updates.
* generator/BoxedGen.cs : Add FromNative method.
* generator/CallbackGen.cs : Add FromNative method.
* generator/EnumGen.cs : Add FromNative method.
* generator/IGeneratable.cs : Add FromNative method.
* generator/InterfaceGen.cs : Add FromNative method.
* generator/ObjectGen.cs : Add FromNative method. Hook in GenMethod.
* generator/StructBase.cs : Revamp param handling. Add GenMethod.
* generator/StructGen.cs : Add FromNative method.
* generator/SymbolTable.cs : Add FromNative method.
* parser/gapi2xml.pl : Detect ctors before methods. Fix method names.
* sample/HelloWorld.cs : uncomment the Show call.
svn path=/trunk/gtk-sharp/; revision=2277
* generator/CallbackGen.cs : Use name in QualName, not cname.
* generator/EnumGen.cs : Use name in QualName, not cname.
* generator/InterfaceGen.cs : Use name in QualName, not cname.
* generator/StructBase.cs (GenField): gen as public.
svn path=/trunk/gtk-sharp/; revision=1920
* generator/CallbackGen.cs : New stub for delegate generation.
* generator/InterfaceGen.cs : New stub for interface generation.
* generator/Parser.cs : Add the interface and callback element hooks.
* generator/SymbolTable.cs : Additions to simple_types hash.
svn path=/trunk/gtk-sharp/; revision=1919