Commit Graph

309 Commits

Author SHA1 Message Date
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
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
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
Mike Kestner
3c0213de88 2001-10-04 Mike Kestner <mkestner@speakeasy.net>
* gdk/SimpleEvent.cs : Temporarily comment the GCHandle code until
	a layout is ready and exceptions can be avoided.
	* gtk/Widget.cs : Killed all the signal and event attaching methods.
	They never belonged here, and now they exist in the SimpleEvent.
	Add a Signals hash to hold refs of the Signal handlers. Killed default
	ctor and the dtor.  The event Add/Remove methods now create a
	SimpleEvent, stuff it in the hash, and remove it when the last handler
	disappears.

svn path=/trunk/gtk-sharp/; revision=1078
2001-10-04 20:59:48 +00:00
Mike Kestner
bb326f46c9 2001-10-04 Mike Kestner <mkestner@speakeasy.net>
* HACKING : Little bit of cleanup.
	* gdk/SimpleEvent.cs : Redesigned a bit. Docs.  Replaced refcounting
	mechanism with an instance hash and added ctor/dtor.  This class
	now completely encapsulates the signal attachment and forwarding
	mechanism for GdkEvent based signals.  It attaches to the raw signal,
	maintains a ref to the associated event handler, and uses the static
	callback to activate the event handler on signal receipt.
	* sample/makefile : killed one last CSC explicit reference.

svn path=/trunk/gtk-sharp/; revision=1076
2001-10-04 19:12:55 +00:00
Mike Kestner
25000abee7 2001-09-27 Mike Kestner <mkestner@speakeasy.net>
*.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
2001-09-27 17:17:33 +00:00
Bob Smith
699238daad Added refcounts to delegates to make sure they can be unpined when not needed.
svn path=/trunk/gtk-sharp/; revision=962
2001-09-25 15:56:50 +00:00
Bob Smith
3432779d13 Makefile fixes.
svn path=/trunk/gtk-sharp/; revision=920
2001-09-21 14:05:44 +00:00
Bob Smith
33533985d0 Totally reworked the signal system. Should be much more flexable.
svn path=/trunk/gtk-sharp/; revision=919
2001-09-21 14:03:17 +00:00