Commit Graph

130 Commits

Author SHA1 Message Date
Mike Kestner
ff61ba7907 2002-03-29 Mike Kestner <mkestner@speakeasy.net>
* generator/SymbolTable.cs (Trim): revamp TrimEnd call.

svn path=/trunk/gtk-sharp/; revision=3501
2002-03-29 17:55:46 +00:00
Mike Kestner
28049f1c2b 2002-03-28 Mike Kestner <mkestner@speakeasy.net>
* generator/SignalHandler.cs : switch to 2.0 libs
	* generator/SymbolTable.cs : switch to 2.0 libs
	* glib/Object.cs : switch to 2.0 libs
	* glib/SList.cs : switch to 2.0 libs
	* glib/Value.cs : switch to 2.0 libs
	* gtk/Application.cs : switch to 2.0 libs

svn path=/trunk/gtk-sharp/; revision=3468
2002-03-28 21:16:43 +00:00
Mike Kestner
4242ad7415 2002-03-26 Mike Kestner <mkestner@speakeasy.net>
* generator/SignalHandler.cs : Use Path.DirectorySeparatorChar.

svn path=/trunk/gtk-sharp/; revision=3381
2002-03-27 01:24:56 +00:00
Mike Kestner
f3a997ca6f 2002-03-25 Mike Kestner <mkestner@speakeasy.net>
* generator/StructBase.cs : Throttle _gtk methods.
	* generator/SymbolTable.cs : tweak dll names.
	* glib/Object.cs : restructure DllImports and prop code.
	* glib/SList.cs : restructure DllImports.
	* glib/Value.cs : restructure DllImports.
	* gtk/Application.cs : overload Init() to get past the string[]
	  marshaling crash on linux.
	* sample/HelloWorld.cs : Use App::Init() since no args are needed.

svn path=/trunk/gtk-sharp/; revision=3341
2002-03-26 01:29:43 +00:00
Mike Kestner
12acb7ff05 2002-03-24 Mike Kestner <mkestner@speakeasy.net>
* generator/*Gen.cs : Use Path.DirectorySeparatorChar.
	* generator/Parser.cs : better debug for unexpected types.
	* generator/SymbolTable.cs : Use linux library names.

svn path=/trunk/gtk-sharp/; revision=3308
2002-03-24 17:04:25 +00:00
Mike Kestner
95d51167de 2002-03-07 Mike Kestner <mkestner@speakeasy.net>
* generator/CodeGenerator.cs : Refactor generatable iteration.
	* generator/SymbolTable.cs : Add Generatables property to expose complex_types.Values.

svn path=/trunk/gtk-sharp/; revision=3008
2002-03-08 22:40:00 +00:00
Mike Kestner
7c31e5f7cb 2002-03-02 Mike Kestner <mkestner@speakeasy.net>
* makefile : add linux build.
	* generator/makefile : add linux build.

svn path=/trunk/gtk-sharp/; revision=2839
2002-03-02 12:04:46 +00:00
Mike Kestner
d5d3baa601 2002-02-19 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs : Add ctor and method generation.
	* generator/StructBase.cs : Switch to Raw syntax.
	* glib/Boxed.cs : Add Handle prop, make Raw protected, and add ctors.
	* glib/Object.cs : s/RawObject/Raw to simplify generation.

svn path=/trunk/gtk-sharp/; revision=2518
2002-02-19 19:46:44 +00:00
Mike Kestner
ede9016e25 2002-02-19 Mike Kestner <mkestner@speakeasy.net>
* generator/Statistics.cs : New. Gathers stats about generation.
	* generator/*.cs : Hook in the stat counters.

svn path=/trunk/gtk-sharp/; revision=2491
2002-02-19 03:12:47 +00:00
Mike Kestner
179097cbf6 2002-02-18 Mike Kestner <mkestner@speakeasy.net>
* generator/StructBase.cs (GenCtor): StudCapsify static method names.
	* generator/SymbolTable.cs (Trim): strip const- prefix.
	* sample/ButtonApp.cs (Window_delete): handle RetVal.

svn path=/trunk/gtk-sharp/; revision=2482
2002-02-18 19:26:33 +00:00
Mike Kestner
fe08134ba0 2002-02-17 Mike Kestner <mkestner@speakeasy.net>
* generator/StructBase.cs (MangleName): add object and event.
	* parser/gapi2xml.pl : Handle embedded callback declarations in method
	  parameter lists.

svn path=/trunk/gtk-sharp/; revision=2462
2002-02-17 20:54:54 +00:00
Mike Kestner
486c867726 2002-02-15 Mike Kestner <mkestner@speakeasy.net>
* generator/SignalHandler.cs : Create the SignalArgs.Args array and fix
	  indexing into it.
	* sample/ButtonApp.cs : A little cleanup.  Not quite there yet.
	* sample/HelloWorld.cs : Set up the RetVal in the delete handler.

svn path=/trunk/gtk-sharp/; revision=2426
2002-02-15 11:15:11 +00:00
Mike Kestner
bd171184ed Build description update.
svn path=/trunk/gtk-sharp/; revision=2425
2002-02-15 10:21:28 +00:00
Mike Kestner
ecc2f8407c Oops, forgot the add on this.
svn path=/trunk/gtk-sharp/; revision=2420
2002-02-15 01:10:14 +00:00
Mike Kestner
61b1d1de13 2002-02-14 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs : suppress generation of get/set methods when
	  properties exist. Mangle method names on signal name clashes.  Gen
	  the signals.
	* generator/SymbolTable.cs : Add GetName. Add some more calls to Trim.
	* generator/gtkapi.xml : adding binary file as an experiment.  If the
	  diff's show this file, I'll be removing it with apologies and going
	  back to the separate package idea.
	* parser/gapi2xml.pl : some signal related fixes.
	* sample/HelloWorld.cs : uncomment the event hook.

svn path=/trunk/gtk-sharp/; revision=2419
2002-02-15 01:08:57 +00:00
Mike Kestner
123557fb68 2002-02-10 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs (FromNative): Add explicit cast.
	* generator/ObjectGen.cs (FromNative): Add explicit cast.
	(GenSignal): New.  Partial.  Not hooked in yet.
	* generator/StructBase.cs (GenMethod): return-type is a sub-element,
	  not an attribute.

svn path=/trunk/gtk-sharp/; revision=2304
2002-02-10 23:11:25 +00:00
Mike Kestner
55e63cb433 2002-02-09 Mike Kestner <mkestner@speakeasy.net>
* generator/StructBase.cs (GenMethod): Add handle arg to paramless
	  method call and extern.

svn path=/trunk/gtk-sharp/; revision=2280
2002-02-09 13:58:21 +00:00
Mike Kestner
4966896f1e This should be the last enormo-diff on mono-patches. I have removed the
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
2002-02-08 23:56:27 +00:00
Mike Kestner
e99a131e6a 2002-02-06 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs : Marshal as IntPtr using Raw prop.
	* generator/ObjectGen.cs : Use Handle for marshaling.
	* generator/StructBase.cs (CallByName): Fill out the stub.
	(GetImportSig): Fill out the stub.
	* generator/StructGen.cs (MarshalType): Use QualifiedName.
	* generator/SymbolTable.cs (GetMarshalType): Trim type.
	(CallByName): New. Provides calling syntax.
	* sample/HelloWorld.cs : Make it compile.

svn path=/trunk/gtk-sharp/; revision=2253
2002-02-06 20:09:14 +00:00
Mike Kestner
2918e60a50 2002-02-02 Mike Kestner <mkestner@speakeasy.net>
* 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
2002-02-03 03:44:10 +00:00
Mike Kestner
2a29390caf 2002-01-17 Mike Kestner <mkestner@speakeasy.net>
* generator/BoxedGen.cs : Removed Name, CName, and QualifiedName.
	* generator/ObjectGen.cs : Removed Name, CName, and QualifiedName.
	* generator/StructBase.cs : Add Name, CName, and QualifiedName. Add
	  GenCtor method. Stub GetCallString, GetImportSig, and GetSignature
	  methods.
	* generator/StructGen.cs : Removed Name, CName, and QualifiedName.
	* generator/SymbolTable.cs : Add GetDllName method.
	* parser/gapi2xml.pl : Fix a couple <parameters> bugs.

svn path=/trunk/gtk-sharp/; revision=2030
2002-01-17 23:44:56 +00:00
Mike Kestner
88175147cf 2002-01-16 Mike Kestner <mkestner@speakeasy.net>
* 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
2002-01-17 00:26:46 +00:00
Mike Kestner
9fcf82d28e 2002-01-11 Mike Kestner <mkestner@speakeasy.net>
* 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
2002-01-12 02:08:16 +00:00
Mike Kestner
d828b8ce59 2002-01-08 Mike Kestner <mkestner@speakeasy.net>
* generator/StructBase.cs (GenField): Return a bool success indicator.
	* generator/ObjectGen.cs : Check the return of GenField.
	* generator/SymbolTable.cs : More fixage to simple_types.
	* parser/gapi2xml.pl : Fix multiline comment bug, and callback name
	  hashing logic. Squash callbacks that aren't in the namespace.
	* sample/HelloWorld.cs : Clean out some debugging to make it closer to
	  compiling.  Not quite there yet.

svn path=/trunk/gtk-sharp/; revision=1948
2002-01-10 15:01:31 +00:00
Mike Kestner
dbadac1885 2002-01-08 Mike Kestner <mkestner@speakeasy.net>
* 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
2002-01-08 20:30:29 +00:00
Mike Kestner
a9581bd50b 2002-01-08 Mike Kestner <mkestner@speakeasy.net>
* 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
2002-01-08 20:05:47 +00:00
Mike Kestner
e33710f1c3 2002-01-07 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs : Make parent debug statement more helpful.
	* generator/Parser.cs : Add interface element case.
	* parser/gapi2xml.pl : Add interface types.
	* parser/gapi_pp.pl : Grab G_TYPE_INSTANCE_GET_INTERFACE defines. Grab
	  struct declarations out of private headers.

svn path=/trunk/gtk-sharp/; revision=1904
2002-01-07 23:30:01 +00:00
Mike Kestner
8648757e19 2002-01-06 Mike Kestner <mkestner@speakeasy.net>
* */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
2002-01-07 00:25:51 +00:00
Mike Kestner
ca64721a09 2002-01-06 Mike Kestner <mkestner@speakeasy.net>
* generator/EnumGen.cs : Open stream Create only.
	* generator/ObjectGen.cs : New generatable for GObject subclasses.
	* generator/Parser.cs : Add the object element hook.
	* generator/StructBase.cs : Handle bits element in GenField.
	* generator/StructGen.cs : Open stream Create only.
	* generator/SymbolTable.cs : Additions to simple_types hash.
	* parser/gapi2xml.pl : Parse bitflags into the bits element.

svn path=/trunk/gtk-sharp/; revision=1871
2002-01-06 13:33:25 +00:00
Mike Kestner
43a19345ca 2002-01-05 Mike Kestner <mkestner@speakeasy.net>
* generator/SymbolTable.cs : First pass at simple_types hash.

svn path=/trunk/gtk-sharp/; revision=1860
2002-01-05 13:24:13 +00:00
Mike Kestner
02fa6a31e6 2002-01-05 Mike Kestner <mkestner@speakeasy.net>
* generator/*.cs : Move into GtkSharp.Generation namespace.
	* generator/CodeGenerator.cs (Main): Add usage check. Add SymbolTable.
	* generator/EnumGen.cs (QualifiedName): New.
	(Generate): Add SymbolTable to signature.
	* generator/IGeneratable : Add QualifiedName prop and update Generate
	  signature.
	* generator/Parser.cs : Switch from plain Hashtable to SymbolTable.
	(Parse): Replaces the Types property and returns a SymbolTable.
	* generator/StructBase.cs : New base class to derive struct and object
	  types. Initial implementation of protected GenField method and ctor.
	* generator/StructGen.cs : New non-object struct type generatable.
	* generator/SymbolTable.cs : New. Manages complex types hash and a
	  simple types hash.  Will provide generic lookup interface.

svn path=/trunk/gtk-sharp/; revision=1855
2002-01-05 12:45:55 +00:00
Mike Kestner
30e653825c This is an enormous commit of stuff that I've been working on for several
weeks.  I'll be posting an update to gtk-sharp-list in a bit to describe my
latest psychosis.

svn path=/trunk/gtk-sharp/; revision=1797
2002-01-04 02:02:28 +00:00
Mike Kestner
e1c553c646 2001-12-31 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : Fix EOL handling for DOS \r\n patterns as
	reported by David Dawkins.

svn path=/trunk/gtk-sharp/; revision=1763
2001-12-31 10:40:48 +00:00
Mike Kestner
7052eadbaf 2001-12-11 Mike Kestner <mkestner@speakeasy.net>
* codegen/get-structs-from-source.pl : New define-struct extractor.
	* codegen/gdk-structs.defs : generated defs with a few hand edits.

svn path=/trunk/gtk-sharp/; revision=1559
2001-12-12 00:08:19 +00:00
Mike Kestner
8f1d4d3412 Some README updates.
svn path=/trunk/gtk-sharp/; revision=1541
2001-12-07 16:34:30 +00:00
Mike Kestner
354b306274 2001-12-04 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : Index %structs by cname, not name. Derive
	  structs from class to facilitate marshalling since Value types can't
	  use the Marshal.PtrToStructure method. Generate StructLayout attr
	  for struct class defs. Stuff the signal args into a SignalArgs inst
	  to pass to the EventHandlers.
	* sample/HelloWorld.cs : some cleanup and temporary signal playcode.

svn path=/trunk/gtk-sharp/; revision=1526
2001-12-04 19:34:26 +00:00
Mike Kestner
82646f231e 2001-12-01 Mike Kestner <mkestner@speakeasy.net>
* makefile : Make ROOT /cygdrive/, not //.

svn path=/trunk/gtk-sharp/; revision=1499
2001-12-01 14:32:35 +00:00
Mike Kestner
372e7ef7de 2001-11-25 Mike Kestner <mkestner@speakeasy.net>
* 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
2001-11-25 17:06:27 +00:00
Mike Kestner
bb8d2c4ee9 2001-11-24 Mike Kestner <mkestner@speakeasy.net>
* 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
2001-11-25 00:25:47 +00:00
Mike Kestner
2ce0c470c2 2001-11-14 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : Add System.Collections to usings.
	s/event/signal. Add gen_signal sub and call it from gen_object.
	Mangle method names that collide with signal names by prepending
	Emit to the method name.
	* codegen/makefile : add gtk-signals.defs to the build.

svn path=/trunk/gtk-sharp/; revision=1359
2001-11-14 23:45:44 +00:00
Mike Kestner
b6338e2402 2001-11-13 Mike Kestner <mkestner@speakeasy.net>
* codegen/get-signals-from-source.pl : My own little perl signal
	parser.
	* codegen/gtk-signals.defs : Ripped the GtkWindow signals into here
	to goof with.

svn path=/trunk/gtk-sharp/; revision=1345
2001-11-14 00:58:14 +00:00
Mike Kestner
2af291dc52 2001-11-10 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : Fix String prop generation code.
	* gtk/Window.custom : Fix ctor param casting error.

svn path=/trunk/gtk-sharp/; revision=1319
2001-11-10 16:32:12 +00:00
Mike Kestner
c9a40e80bc 2001-11-09 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : Use the @ctors list to determine if a class
	is abstract.  There is an abstract indicator in the new defs format
	description, but it doesn't appear in the defs files currently. This
	method should be reliable though, even in the long term. Use the same
	check to determine if ctor(IntPtr obj) should be gen'd.

svn path=/trunk/gtk-sharp/; revision=1315
2001-11-10 02:35:15 +00:00
Mike Kestner
200f01ad2d 2001-11-09 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : Now genning Window, AccelGroup, Bin, and
	GdkPixbuf classes to peel the csc error onion. Explicitly add GObject
	to the "exists ($objects{...})" branches, since GObject is a hard
	coded Class.

svn path=/trunk/gtk-sharp/; revision=1314
2001-11-10 02:17:57 +00:00
Mike Kestner
1351a509e6 2001-11-08 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : Build a structs hash and gen the structs
	after the first pass of the defs.  For structs and functions, mangle
	the 100s of params/fields named object to objekt. Insert using stmnts
	for structs too.
	* codegen/hardcoded.defs : Add GtkAccelEntry struct.

svn path=/trunk/gtk-sharp/; revision=1286
2001-11-08 01:35:11 +00:00
Mike Kestner
807b6ea645 2001-11-07 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl (gen_object): Insert using statements. Insert
	class members from corresponding .custom file.
	* gtk/Window.custom : Renamed file from Window.cs.  Removed all the
	automatically generated members.  This will be the mechanism used to
	improve upon the mechanically generated binding.

svn path=/trunk/gtk-sharp/; revision=1282
2001-11-07 23:13:05 +00:00
Mike Kestner
4fbf115083 2001-11-05 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl (gen_object): Generate a ctor (IntPtr obj) for
	every object.  This is a wrapper constructor for use by an Object
	manager which will be called by GLib.Object.GetObject eventually to
	wrap raw GObject pointers returned by methods/props.

svn path=/trunk/gtk-sharp/; revision=1270
2001-11-06 01:08:51 +00:00
Mike Kestner
aba851645c 2001-11-04 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : struct generation.  Added float and double
	type mapping entries.
	* codegen/hardcoded.defs : GdkGeometry definition.  define-struct
	doesn't appear to be supported in the current defs files.  This file
	will be used for manual definition of unsupported defs.
	* codegen/makefile : add hardcoded.defs.

svn path=/trunk/gtk-sharp/; revision=1256
2001-11-04 15:42:46 +00:00
Mike Kestner
408db7677c 2001-11-02 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : define-struct detection.  Partial ctor
	support.  Still need to deal with ctor signature collisions.
	Refactored gen_method to share get_param_strings with ctors.

svn path=/trunk/gtk-sharp/; revision=1245
2001-11-03 00:45:15 +00:00
Mike Kestner
c3b0ed58d9 2001-10-30 Mike Kestner <mkestner@speakeasy.net>
* 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
2001-10-31 01:31:05 +00:00