Commit graph

135 commits

Author SHA1 Message Date
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
Mike Kestner
bdec55ab35 2001-10-25 Mike Kestner <mkestner@speakeasy.net>
* glib/Object.cs : Added Get|SetProperty methods for Object
	properties.

svn path=/trunk/gtk-sharp/; revision=1204
2001-10-25 22:44:49 +00:00
Mike Kestner
d7df5fa0ca 2001-10-25 Mike Kestner <mkestner@speakeasy.net>
* codegen/get-props-from-source.pl : Temporary (possibly) defs
	generator for props. Will probably kill this when the official
	defs support props.
	* codegen/defs-parse.pl : Added object-based aggregation of
	defs. Generate the class shells, methods, and props.
	* codegen/gdk-types.defs : ripped from pygtk.
	* codegen/gtk.defs : ripped from pygtk.
	* codegen/gtk-props.defs : some props defs.
	* codegen/makefile : add the new defs files.

svn path=/trunk/gtk-sharp/; revision=1203
2001-10-25 22:16:10 +00:00
Mike Kestner
bd567cdd45 2001-10-11 Mike Kestner <mkestner@speakeasy.net>
* makefile : Add the codegen directory
	* codegen/defs-parse.pl : Moved here from topdir and updated to parse
	the new defs format for enums and flags.
	* codegen/gtk-types.defs : Borrowed from pygtk.
	* codegen/makefile : new
	* gtk/makefile : remove generation step.
	* gtk/gtk.defs : removed, now in codegen dir.

svn path=/trunk/gtk-sharp/; revision=1139
2001-10-11 10:14:14 +00:00
Mike Kestner
8f475577c5 2001-10-07 Mike Kestner <mkestner@speakeasy.net>
* gtk/Button.cs : Some nomenclature changes.  s/EmitClicked/Click, etc.
	We need a consistent way to deal with naming clashes in gtk's method
	and signal namespaces.  When clashes exist, events will be made past
	tense and methods to programatically emit events will be the present
	tense (e.g. Clicked event and Click method).

svn path=/trunk/gtk-sharp/; revision=1116
2001-10-07 13:21:13 +00:00
Mike Kestner
aa1077bbb1 2001-10-07 Mike Kestner <mkestner@speakeasy.net>
* 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
2001-10-07 00:41:52 +00:00
Mike Kestner
58dc5f24bf 2001-10-06 Mike Kestner <mkestner@speakeasy.net>
* gtk/Button.cs : Implemented 3 constructors, 5 methods, 4 properties,
	and 6 signals.  Button API is 100% implemented.  Need to implement
	some Container methods to be able to complete testing.

svn path=/trunk/gtk-sharp/; revision=1104
2001-10-06 02:47:11 +00:00
Mike Kestner
d659e12e05 2001-10-05 Mike Kestner <mkestner@speakeasy.net>
* defs-parse.pl : A little automation for the binding.  The enums and
	flags can be painlessly generated from defs files.
	* gtk/makefile : use defs-parse.pl to produce generated.cs.
	* gtk/.cvsignore : hush generated.cs
	* gtk/gtk.defs : unceremoniously ripped from gtk+ HEAD.
	* gtk/Window.cs : Killed the WindowType enum which is now generated.

svn path=/trunk/gtk-sharp/; revision=1095
2001-10-05 11:34:17 +00:00
Mike Kestner
26142a99ca 2001-10-04 Mike Kestner <mkestner@speakeasy.net>
* glib/SimpleSignal.cs : Reworked to parallel SimpleEvent.

svn path=/trunk/gtk-sharp/; revision=1084
2001-10-04 23:27:19 +00:00
Mike Kestner
4c5e4f1d56 2001-10-04 Mike Kestner <mkestner@speakeasy.net>
* gtk/Widget.cs : Implemented all the bool, string, and int props.

svn path=/trunk/gtk-sharp/; revision=1083
2001-10-04 22:17:20 +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
bda62ac3b7 2001-10-02 Mike Kestner <mkestner@speakeasy.net>
* 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
2001-10-02 01:27:44 +00:00
Mike Kestner
14cf53f336 2001-09-29 Mike Kestner <mkestner@speakeasy.net>
* 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
2001-09-29 20:08:30 +00:00
Mike Kestner
e6979f31de 2001-09-28 Mike Kestner <mkestner@speakeasy.net>
* 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
2001-09-28 18:23:14 +00:00
Mike Kestner
f193cf3efe 2001-09-28 Mike Kestner <mkestner@speakeasy.net>
* glib/Value.cs (~Value): New destructor to release g_malloc'd space.
	(default ctor): New default ctor just mallocs without init.
	(String ctor): call default
	(bool ctor): call default
	(Init): New post construct initializer.
	(String exp cast): Replaces ToString method.
	(bool exp cast): New for bool extraction.
	(MarshalAs): Renamed prop was RawValue.

svn path=/trunk/gtk-sharp/; revision=1017
2001-09-28 00:28:30 +00:00
Mike Kestner
4a2fa05bee 2001-09-27 Mike Kestner <mkestner@speakeasy.net>
* 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
2001-09-27 18:39:53 +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
5056f3e4b3 glib/Object.cs: Rewrote the way the wrapper is kept track of.
svn path=/trunk/gtk-sharp/; revision=921
2001-09-21 16:24:46 +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
Bob Smith
3d40a27630 ObjectManager.cs nuked, Glib.Object now keeps track of the wrapper class, and Gtk.Object should have a better signal handling system.
svn path=/trunk/gtk-sharp/; revision=894
2001-09-20 04:03:27 +00:00
Mike Kestner
91c58501fa 2001-09-19 Mike Kestner <mkestner@speakeasy.net>
* 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
2001-09-19 11:37:15 +00:00
Bob Smith
b4c11b3210 GObject fixes.
svn path=/trunk/gtk-sharp/; revision=878
2001-09-19 04:47:48 +00:00
Bob Smith
22b77037ed More implementation
svn path=/trunk/gtk-sharp/; revision=876
2001-09-19 02:04:57 +00:00
Mike Kestner
073970c120 Added ChangeLog file and tried to capture the history till now. Please
update the entry for your commit Bob, if it's not complete or accurate.

svn path=/trunk/gtk-sharp/; revision=875
2001-09-18 23:14:05 +00:00
Bob Smith
88e3e2c702 More Notes
svn path=/trunk/gtk-sharp/; revision=859
2001-09-18 04:24:34 +00:00
Bob Smith
c2d90eb282 Reworked the event system. Added partial Button and Label classes. Notes added asking many important questions.
svn path=/trunk/gtk-sharp/; revision=858
2001-09-18 03:57:16 +00:00
Mike Kestner
141acf001c Killing a lock file accidentally imported.
svn path=/trunk/gtk-sharp/; revision=837
2001-09-16 23:19:31 +00:00
Mike Kestner
7d69671d49 Initial revision
svn path=/trunk/gtk-sharp/; revision=834
2001-09-16 23:15:56 +00:00