* generator/ObjectGen.cs : gen GLib.Value ctor, not uint
* glib/Object.cs : use GLib.Type in RegisterGType and
make the g_object_new ctor use GLib.Type.
* glib/Type.cs : new thin wrapper for GValue type
* glib/*.cs : s/Type/System.Type
svn path=/trunk/gtk-sharp/; revision=11920
* 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
* glib/SignalCallback.cs: new methods AddDelegate and RemoveDelegate.
* generator/Signal.cs: add/remove signal handlers from the delegate used
to invoke them.
* generator/SignalHandler.cs: use Delegate instead of MulticastDelegate.
svn path=/trunk/gtk-sharp/; revision=11255
* api/*.xml : a few new attrs
* generator/Parameters.cs : remove redundant ref keywords
* gtk/ListStore.custom: overload SetColumnTypes
* gtk/TreeStore.custom: overload SetColumnTypes
* parser/GAPI/Metadata.pm : allow callback nodes at class level
* sources/Gtk.metadata : hide ClipboardClearFunc and GetFunc,
tag types param of SetColumnTypes as array, uncomment needs_ref
tags on Widget methods to match the current api.xml file
svn path=/trunk/gtk-sharp/; revision=9148
use when the IntPtr is NULL.
* generator/SignalHandler.cs, generator/CallbackGen.cs: removed
call to Initialize for structs
* gtk/Clipboard.custom, gtk/ClipboardClearFunc.cs,
gtk/ClipboardGetFunc.cs,
gtk/GtkSharp.GtkClipboardClearFuncNative.cs,
gtk/GtkSharp.ClipboardGetFuncNative.cs, SelectionData.custom:
Hand-wrapped selection handling stuff, along with relevant
signals and the like.
* gnome/voidObjectAffineSVPintSignal.cs: removed Initialize
for hand-wrapped signal
* sample/GnomeHelloWorld.cs, sample/Size.cs: compare against
.Zero instead of using IsNull
* api/gtk-api.xml, sources/Gtk.metadata: metadata updates for
hiding some manually-wrapped stuff
svn path=/trunk/gtk-sharp/; revision=8912
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
(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
* glade/HandlerNotFoundExeception.cs: Added.
* glade/Makefile.in
* glade/XML.custom: Support for autoconnecting signals using
reflection.
* glib/SignalAttribute.cs: Added.
* generator/Signal.cs: Mark events generated from glib signals
with the "Signal" attribute.
* sample/GladeTest.cs
* sample/Makefile.in
* sample/test.glade: Test of signal autoconnection.
svn path=/trunk/gtk-sharp/; revision=7430
* sources/Gtk.metadata: Set null_ok on the callback argument
to Menu.Popup.
* generator/Parameters.cs: Handle null_ok properly for callback
arguments.
svn path=/trunk/gtk-sharp/; revision=7412
* glib/Object.cs (Ref): Added.
* gtk/Object.custom (Ref): Overload. Note that we were reffed.
(DisposeNative): Unref if we were explicitly reffed.
* generator/Method.cs: Call Ref if needs_ret is set.
* generator/StructBase.cs: Call Ref on all object accessors.
* glue/style.c: Ref returned GCs.
* sources/Gtk.metadata: Set needs_ret on various gdk-related
accessors in GtkWidget. Hide Ref/Unref methods on Widget and
RcStyle as these ought to be deprecated anyway.
svn path=/trunk/gtk-sharp/; revision=7380
* parser/gapi2xml.pl: Add support for "fake struct" opaque types.
* generator/StructBase.cs: Generate wrapper fields for opaque
fields as well as pointer fields.
* api/gdk-symbols.xml: Remove GdkAtom as it is now wrapped.
svn path=/trunk/gtk-sharp/; revision=7311
* generator/CallbackGen.cs: Generate wrappers to map
from managed delegates to native ones.
* generator/Ctor.cs: Call parms.Initialize for the static case.
* generator/Parameters.cs: Add "CType" property. Append []
to CSType if necessary. Add "HideData" property if a container
wishes to hide the user_data (used in callbacks).
(Initialize): Add case for callback.
* generator/SymbolTable.cs: Add size_t.
* glue/program.c: string[] marshalling is no longer broken,
remove hack.
* sources/Gtk.metadata: Disable
GtkColorSelection.SetChangePaletteHook and
GtkTreeView.GetSearchEqualFunc for now, they return delegates and
we don't support native->managed delegate mapping yet.
svn path=/trunk/gtk-sharp/; revision=7133
* 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
* parser/Gtk.metadata: add a bunch of out arg rules, add
a vararg rule for the ListStore constructor, change method names of
TreeModel's signal emission methods, remove opaque rule of
GtkTreeIter, remove null_ok rules of TreeModel.IterNChildren
and TreeModel.IterNthChild.
* parser/Metadata.pm: add some code to be able to filter on
parameter names.
* generator/Method.cs: a method with accessor args and a non-void
return value cannot be written as property.
* sample/Makefile.in, sample/TreeViewDemo.cs: add a simple TreeView
demo app.
* gtk/ListStore.custom, gtk/TreeModel.custom, gtk/TreeModelSort.custom,
gtk/TreeStore.custom, gtk/TreeView.custom: customizations.
svn path=/trunk/gtk-sharp/; revision=6576
[ Mike, this is everything I wanted in for the release. ]
* generator/StructBase.cs: Generate field accessors for wrapped
types (opaque, object, and structs/boxed). Bitfields, unions, and
arrays are still unsupported for accessors, and are probably marshalling
incorrectly. But this is enough to get events working (see example
in sample/GnomeHelloWorld.cs).
* parser/Metadata.pm: Support a "delete" directive, and set metadata
on structs and boxed (previously was only checking objects and interfaces).
* parser/Gdk.metadata: Delete bogus entries GdkWindowObject and
GdkPixmapObject (more evil drawable stuff.)
* sample/GnomeHelloWorld.cs: Show an example of how to use marshalled
events, in our selection callback.
svn path=/trunk/gtk-sharp/; revision=6370
* generator/StructBase.cs (GetFieldInfo): Generate strings correctly.
Also, delegates are not marshalling correctly right now, change those
to IntPtr.
* generator/SymbolTable.cs: New method IsCallback.
* sample/GnomeHelloWorld.cs: Use Gnome.App and stock menu items.
Use the new event handlers.
svn path=/trunk/gtk-sharp/; revision=6300
* generator/ClassBase.cs: Change hasDefaultConstructor to protected,
adjust now that it is an attr and not a subnode. Also add virtual
property AssignToName (for ctors).
* generator/Ctor.cs: Add property ForceStatic.
(Generate): Optimize return code a bit for the static case.
* generator/Method.cs: Assign to a "raw_ret" pointer before calling
FromNativeReturn.
* generator/Parameters.cs: Change "out ref" to "out", not "ref".
* generator/Property.cs: Fix to work correctly with all object and
struct types (mostly just some if-cases added).
* generator/SignalHandler.cs: Remove args_type and argfields (unused).
(Generate): Initialize struct if necessary.
* generator/StructBase.cs: Massive reworking to support methods, ctors,
etc.
* generator/SymbolTable.cs: Add GdkAtom and gconstpointer simple types.
* glib/Boxed.cs: Accept both IntPtr and object ctors. Add access for both.
* glib/Opaque.cs: Fix copy/pasted copyright notice, remove data and event
fields. Fix docs.
* glib/Value.cs: Work correctly with boxed properties.
* gnome/Modules.cs: Use new struct ctors.
* gnome/Program.custom: Remove Get, this is being generated now.
* parser/Gdk.metadata: Fix the drawable classes to inherit correctly.
* parser/Metadata.pm: Change per-class attributes to actually be
attributes.
* parser/Gtk.metadata: Add a dummy attribute value for disabledefaultctor.
* parser/gapi2xml.pl: Add hacks for the (broken) Drawable and Bitmap
typedefs.
* sample/test/TestColorSelection.cs: Display color string in hex format,
update to use IsNull instead of == null, and size dialog to look pretty.
* sample/Size.cs: Added.
svn path=/trunk/gtk-sharp/; revision=6264
[about 60% of the marshalling patch that I lost.
The rest to come tomorrow.]
* generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase,
delete large chunks duplicated from ClassBase.
* generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn.
* generator/ClassBase.cs: Move ctor stuff here. Add a CallByName
overload with no parameters for the "self" reference.
* generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType,
FromNativeReturn.
* generator/Method.cs: Use container_type.MarshalType, CallByName, and
SymbolTable.FromNativeReturn when generating call and import sigs.
* generator/OpaqueGen.cs: Added.
* generator/Property.cs: Handle boxed and opaques differently.
* generator/SymbolTable.cs: Update for the opaque stuff and the new Return
methods. Also change GetClassGen to simply call the as operator.
* glib/Boxed.cs: Update for struct usage -- this is now a wrapper for
the purposes of using with Value.
* glib/Opaque.cs: Added. New base class for opaque structs.
* glue/textiter.c, gtk/TextIter.custom: Remove.
* gnome/Program.cs: Update for new struct marshalling.
* parser/Metadata.pm: Use our own getChildrenByTagName.
* parser/README: Update for new requirements (was out of sync with
build.pl)
* parser/gapi2xml.pl: Hide struct like const in field elements.
* parser/gapi_pp.pl: Handle embedded union fields (poorly).
* sample/test/TestColorSelection.cs: Comment out null color tests
for now.
svn path=/trunk/gtk-sharp/; revision=6186