* 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
* generator/ClassBase.cs : make MarshalType virtual.
* generator/Parameters.cs : add Parameter class and Indexer.
* generator/Signal.cs : Now use Parameters.
(GetHandlerName): New abstraction of name handling.
(GenerateDecls): use GetHandlerName.
(GenComments): make private.
(GenHandler): New. Generate custom event handlers and args.
(Generate): use GenHandler. Pass args type to SignalHandler.
* generate/SignalHandler.cs : store args type. Generate handler
dependent args and use MulticastDelegate.DynamicInvoke.
* generate/StructGen.cs : override MarshalType.
* glib/SignalCallback.cs : store a MulticastDelegate and args type
* sample/*.cs : use new DeleteEventHandler
svn path=/trunk/gtk-sharp/; revision=5834
* configure.in, makefile, makefile.win32: add gnome.
* doc/index.html, netdoc.xsl: Add gnome.
* gdk/Event.cs: New manual wrap for GdkEvent.
* generator/ClassBase.cs: Add methods GetProperty,
GetPropertyRecursively, GetMethodRecursively.
Move Parent property here from ObjectGen.cs. Pass this pointer
into Property.
* generator/Ctor.cs: Generate docs.
* generator/Method.cs, Property.cs: Tag method as "new" if a
Method/Property with the same name is found in the class hierarchy.
* generator/SignalHandler.cs: Correctly wrap complex signal argument
types. Add gnome directory.
* generator/SymbolTable.cs: Add manually wrapped types hash
(contains GLib.GSList and Gdk.Event). Add method IsManuallyWrapped.
* glib/SList.cs: Add constructor from IntPtr.
* glue/slist.c, glue/event.c: Added (field accessor glue).
* glue/Makefile.am: Update.
* parser/Gtk.metadata: Add new signal renames for new signals
exposed by GdkEvent changes.
* parser/README, parser/build.pl: Add libgnome, libgnomecanvas,
libgnomeui.
* parser/gapi2xml.pl: Handle literal-length array parameters,
and NULL property doc strings.
* sample/: Add new test GnomeHelloWorld.cs.
* gnome/: Added.
* parser/Gnome.metadata: Added.
svn path=/trunk/gtk-sharp/; revision=5461
* glib/UnwrappedObject.cs: New class which holds an IntPtr.
This is used in Value so that we can retrieve the IntPtr itself
for an object property.
* glib/Value.cs: Add UnwrappedObject cast operator.
* glib/Property.cs: If the retrieved value is an object,
and there is no wrapper object, create a new one.
svn path=/trunk/gtk-sharp/; revision=5440
* 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
* glib/Object.cs, glib/SList.cs, glib/Value.cs, gtk/Application.cs:
Move documentation to right before their actual methods, rather
than the DllImported ones.
* generator/Method.cs: Generate documentation before the actual
method and not the DllImport.
svn path=/trunk/gtk-sharp/; revision=5423
* 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
* glib/GException.cs: Added.
* generator/Ctor.cs, Method.cs: Tag function as unsafe if it throws
an exception. Call parms.HandleException.
* generator/Paramaters.cs: Add property ThrowsException (based
on a trailing GError**). If ThrowsException, mask GError in the
signature, initialize a GError in Initialize, and add new method
HandleException to throw an exception if error != null.
* generator/SymbolTable.cs: Add gdk-pixbuf DLL, and GError type.
* gdk.imaging, gdk.imaging/Makefile.in, gdk.imaging/makefile.win32:
Added.
* configure.in, Makefile, makefile.win32: Build gdk.imaging.
* gtk/Makefile.in, gtk/makefile.win32: Link against gdk.imaging.
* parser/gapi2xml.pl: Support namespace renaming.
* parser/build.pl: Build gdk-pixbuf as gdk.imaging.
svn path=/trunk/gtk-sharp/; revision=5281
* */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
* autogen.sh : simple config for the glue build
* configure.in : simple config for the glue build
* makefile : add glue dir to build
* glib/SList.cs : Fix some leakage.
* glue/value.c : a helper function for heap alloc of GValues
* glue/Makefile.am : build for libgtksharpglue
svn path=/trunk/gtk-sharp/; revision=4042
* generator/ObjectGen.cs : Add IntPtr constructor generation. Pass a
ctor signature hash around to use in clash resolution. Generate a
void ctor if none is present which just calls the parent ctor.
* generator/StructBase.cs : Add non-void signature ctor generation,
including collision handling logic. Collisions are implemented as
static methods.
* generator/SymbolTable.cs : Map GSList to GLib.SList. Add type
trimming to remove trailing *'s. Need to suppress leading const yet.
* glib/Object.cs : Add default ctor for void and IntPtr ctors.
* glib/SList.cs : Implementation of a wrapper class for GSLists. Lots
of FIXMEs.
* parser/gapi2xml.pl : Handle ** and array params.
svn path=/trunk/gtk-sharp/; revision=2232
* generator/BoxedGen.cs : New boxed type generatable.
* generator/ObjectGen.cs : Add boxed type property generation and stub
off interface properties for now.
* generator/Parser.cs : Add boxed element parsing.
* generator/SymbolTable.cs : Add IsBoxed and IsInterface methods.
* glib/Boxed.cs : New base class for deriving boxed types.
* glib/Object.cs : Add boxed GetProp/SetProp methods.
* parser/gapi2xml.pl : Add boxed type element formatting.
* parser/gapi_pp.pl : Add preprocessing of the generated sourcefiles.
Handle the builtins and make them identifiable to the xml generator.
svn path=/trunk/gtk-sharp/; revision=2012
* generator/ObjectGen.cs : Add property generation.
* generator/SymbolTable.cs : More fixage to simple_types. Add
GetMarshalType and IsObject methods.
* glib/Object.cs : Rename Events prop to EventList to avoid name
collision. Add float, double, uint, and IntPtr GetProp and SetProp
methods.
* parser/TODO : Add a couple prop related bugs to come back for.
* parser/gapi2xml.pl (addPropElems): Restructure. It was thoroughly
broken. It's better now.
svn path=/trunk/gtk-sharp/; revision=1960
* */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
* codegen/defs-parse.pl (get_sighandler): gen the helper class. arg
passing and return value handling need beefing up still.
* glib/SignalArgs.cs : New arg passing/ return value handling class.
* glib/SignalCallback.cs (dtor): kill, this will be gen'd in the
subclasses. (ctor): prune down to two params.
svn path=/trunk/gtk-sharp/; revision=1438
* codegen/defs-parse.pl : mkdir the glib/generated dir.
(gen_signal): Call new get_sighandler sub. Doesn't use the returned
value yet. s/event/ev3nt on arg names.
(get_sighandler): new sub to lookup or gen a signal helper/delegate.
Only generates the delegate so far.
* codegen/hardcoded.defs : Added a stub for Gdk.Event.
* gdk/Event.cs : Killed, now a generated struct.
* gdk/SimpleEvent.cs (SimpleEventCallback): Use Marshal.PtrToStructure
to create the Event, not a ctor(IntPtr).
* glib/SignalCallback.cs : New abstract base class for signal helpers.
svn path=/trunk/gtk-sharp/; revision=1437
* codegen/defs-parse.pl : streamline mkdir stuff. Prune the object
list back to just Window for now. Suppress generation of the Prop
get/set accessor methods.
* codegen/gdk-types.defs : Updated the 2button/3button event types
since I don't feel like automangling them now.
* gdk/Event.cs : Killed the now redundant EventType declaration.
* glib/Object.cs : Override the Equals and GetHashCode methods.
svn path=/trunk/gtk-sharp/; revision=1231
* glib/Object.cs : Added public Handle property. It would be nice
if I could make the RawObject public for get and protected for set,
but that doesn't appear to be possible with C# properties.
* gtk/Container.cs : New class with 2 of the 3 props and the Add/Remove
methods only implemented.
* gtk/Widget.cs : Added SizeRequest prop which is a combination of
HeightRequest and SizeRequest. Embrace and extend gtk...
* gtk/Window.cs : Derive from newly added Container subclass.
* sample/ButtonApp.cs : Simple tire-kicking app.
svn path=/trunk/gtk-sharp/; revision=1112
* glib/Value.cs : Tried adding CallingConvention.Cdecl to all the
DllImports, but still couldn't get reliable Propery setting without
periodic NullReference exceptions. When all else fails, drop back
and punt.
* glib/Object.cs : Rewrote Set|GetProperty methods. Now they use
g_object_get|set and don't rely on GValues. The int, bool, and string
prop types are now working reliably.
* gtk/Window.cs : Update all Properties to use new GLib.Object
signatures.
* sample/HelloWorld.cs : added some more property usage for testing
purposes.
svn path=/trunk/gtk-sharp/; revision=1048
* glib/Value.cs (int ctor): New constructor for int-based values.
(int exp cast): New explicit cast operator for Val to int conversion.
* gtk/Window.cs (DefaultHeight): New prop.
(DefaultWidth): New prop.
svn path=/trunk/gtk-sharp/; revision=1034
* glib/Object.cs (GetProperty): New, gets props from the raw obj.
(SetProperty): New, for setting props on the raw obj.
* glib/Value.cs (type ctor): New needed for get accessors.
*gtk/Window.cs (AllowGrow): Uncommented and filled out.
(AllowShrink): Uncommented and filled out.
(DestroyWithParent): Uncommented and filled out.
(Modal): Uncommented and filled out.
(Resizable): Added. All the bool Props work now.
svn path=/trunk/gtk-sharp/; revision=1030
* glib/Object.cs : Docs for everything. Made Objects hash private.
Some coding style cleanup. Pruned some of the TODO methods from the
commented header listing to make a more relistic picture of the
remaining effort. Some GSignal stuff probly belongs here too.
([Get|Set]Data): Killed some DllImports and set up methods to store
arbitrary data in a managed hash table.
svn path=/trunk/gtk-sharp/; revision=1012
*.cs : Added .dll extension to a load of DllImports.
* makefile : now can make the project with one make windows and on
both NT and Win98.
* gdk/Event.cs : Fixed some invalid symbol names and commented out a
load of stuff.
* gdk/SimpleEvent.cs : Relocated file from unnecessary subdir and fixed
several event keyword clashing bugs. Need to relocate the EventArgs
class out of here into its own file. Fixed loads of typos.
* glib/Object.cs : Killed the Constructor, this should be a purely
abstract class. made Events property public until I can fix the Signal
proxying system's broken reliance on it.
* glib/SimpleSignal.cs : Relocated, namespaces, and named this Class.
Loads of bugfixes. Still doesn't work worth a damn, but it builds.
* glib/TypeFundamentals.cs : New enum for use in the Value code.
* glib/Value.cs : Implemented a more opaque approach with heap allocated
memory and g_value_init and friends. Still doesn't work. Will probably
switch to a more C# like approach and avoid GValues altogether.
* gtk/Button.cs : Commented out some brokeness until I can get around
to fixing it later.
* gtk/Widget.cs : Commented out a bunch of the new signal stuff until
I get around to it.
* gtk/Window.cs (Title): using g_object_set until I work out the
details of the new Value/SetProperty system. It looks like g_object_set
will end up being easier to use via PInvoke.
svn path=/trunk/gtk-sharp/; revision=1008
* HACKING : New rulez.
* NOTES: Killed. We have a mailing list now for this kind of stuff.
* glib/makefile : New, to build the new glib-sharp.dll target.
* glib/Object.cs : (GetObject): Commented out. Design problems here.
IntPtr's can't be used in the manner this code attempts to use them.
(Data prop): Commented out. Apparently keyed properties are not
supported.
(Object prop): Renamed RawObject, and made it protected.
(Events): Fixed to cause list to be initialized if null and then
return the list.
* glib/ObjectManager.cs : commented out entirely. Not sure what this
code is trying to accomplish and it doesn't compile.
* glib/Value.cs : New attempt at implementing GValues. Doesn't work
yet.
* gtk/Button.cs : Updated to use RawObject.
(Clicked event): s/EmitDeleteEvent/EmitClickedEvent.
(Button(String)): s/gtk_label_new_with_lable/gtk_button_new_with_label.
* gtk/Label.cs : Fixed some yank and paste errors where 2 value params
were getting passed to all the set_* property methods.
* gtk/Window.cs : Fixed hanging GTK namespace ref.
* sample/HelloWorld.cs : Fixed hanging GTK namespace ref.
svn path=/trunk/gtk-sharp/; revision=884