Commit Graph

4050 Commits

Author SHA1 Message Date
Rachel Hestilow
967e3e9c5a 2002-07-30 Rachel Hestilow <hestilow@ximian.com>
* 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
2002-07-30 23:02:12 +00:00
Gonzalo Paniagua Javier
9823d2d8ea Removed old file and added some info que a DB error happens.
svn path=/trunk/gtk-sharp/; revision=6214
2002-07-27 15:27:54 +00:00
Rachel Hestilow
4d92d54b3f 2002-07-25 Rachel Hestilow <hestilow@ximian.com>
[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
2002-07-26 06:08:52 +00:00
Duncan Mak
dd71eaf3ea 2002-07-25 Duncan Mak <duncan@ximian.com>
* TestRange.cs: Fix the EventHandlers here.

svn path=/trunk/gtk-sharp/; revision=6167
2002-07-25 11:42:04 +00:00
Duncan Mak
c1b8365702 Fix the IP yet another, sorry.
svn path=/trunk/gtk-sharp/; revision=6156
2002-07-24 18:48:39 +00:00
Duncan Mak
203ab445f8 Make the Action menu work.
svn path=/trunk/gtk-sharp/; revision=6155
2002-07-24 18:46:56 +00:00
Duncan Mak
4c1e8f1b53 Give Gustavo some privacy.
svn path=/trunk/gtk-sharp/; revision=6154
2002-07-24 18:35:10 +00:00
Duncan Mak
dd1c45b22e Add a menubar
svn path=/trunk/gtk-sharp/; revision=6152
2002-07-24 18:33:28 +00:00
Gonzalo Paniagua Javier
e032408c50 Handle DB exceptions
svn path=/trunk/gtk-sharp/; revision=6151
2002-07-24 18:19:21 +00:00
Gonzalo Paniagua Javier
5937983a62 added status bar and simulate modal dialogs
svn path=/trunk/gtk-sharp/; revision=6150
2002-07-24 18:09:51 +00:00
Duncan Mak
45e4ed0684 Line up the titles.
svn path=/trunk/gtk-sharp/; revision=6149
2002-07-24 17:54:38 +00:00
Gonzalo Paniagua Javier
c6f414c7d4 Added edit callback
svn path=/trunk/gtk-sharp/; revision=6148
2002-07-24 17:41:14 +00:00
Gonzalo Paniagua Javier
6a7c95725c Insert and Delete now work
svn path=/trunk/gtk-sharp/; revision=6144
2002-07-24 17:04:45 +00:00
Duncan Mak
dd6a2b8878 UI tweaks to make it more beautiful.
svn path=/trunk/gtk-sharp/; revision=6139
2002-07-24 15:07:29 +00:00
Duncan Mak
640ba7857e Made the entries accessible, so that we can grab the text out of it.
svn path=/trunk/gtk-sharp/; revision=6137
2002-07-24 14:15:58 +00:00
Mike Kestner
ccfec8b7e2 2002-07-24 Mike Kestner <mkestner@speakeasy.net>
* generator/SignalHandler.cs : use ref parameters in signal cb's.

svn path=/trunk/gtk-sharp/; revision=6136
2002-07-24 14:11:40 +00:00
Duncan Mak
960dbb8c7a New GUI. Go! Go! Go!
svn path=/trunk/gtk-sharp/; revision=6135
2002-07-24 14:06:07 +00:00
Gonzalo Paniagua Javier
d4a5d43707 slightly modified makefile. Added DB stuff
svn path=/trunk/gtk-sharp/; revision=6132
2002-07-24 13:46:19 +00:00
Alp Toker
6be8587936 gtk/Makefile.in etc. : reference the newly compiled assemblies instead of those
already installed on the system

svn path=/trunk/gtk-sharp/; revision=6130
2002-07-24 11:47:01 +00:00
Gonzalo Paniagua Javier
834ac7cac8 Added the wodget for Browse tab. Not yet finished.
svn path=/trunk/gtk-sharp/; revision=6129
2002-07-24 11:40:33 +00:00
Duncan Mak
1fb8452fce Sample Gtk# database client.
svn path=/trunk/gtk-sharp/; revision=6119
2002-07-24 10:17:15 +00:00
Mike Kestner
7ba51928a5 2002-07-23 Mike Kestner <mkestner@speakeasy.net>
* generator/Method.cs : implement static method generation.
	* parser/Gnome.metadata : map AppBar::ClearPrompt signal collision.
	* parser/Gtk.metadata : map IMContext::DeleteSurrounding collision.
	* parser/gapi2xml.pl : mark shared methods in the XML.

svn path=/trunk/gtk-sharp/; revision=6096
2002-07-23 22:23:40 +00:00
Duncan Mak
2f44d60039 2002-07-23 Duncan Mak <duncan@ximian.com>
* TestMenus.cs: Use MenuItem instead of ImageMenuItem, this test
works now.

* TestFileSelection.cs: window.Selections is crashing, remove
it. OK Button doesn't do anything now.

* WidgetViewer.cs: Add in a frame.

svn path=/trunk/gtk-sharp/; revision=6021
2002-07-22 17:06:28 +00:00
Mike Kestner
738aef2a29 2002-07-20 Mike Kestner <mkestner@speakeasy.net>
* generator/SignalHandler.cs : pring unexpected key in exception.

svn path=/trunk/gtk-sharp/; revision=5967
2002-07-20 15:00:10 +00:00
Mike Kestner
d837953e6c 2002-07-20 Mike Kestner <mkestner@speakeasy.net>
* generator/Method.cs : beef up !Validate warnings
	* generator/ObjectGen.cs : beef up !Validate warnings
	* generator/Parameters.cs (Validate): fail on ellipsis parm
	* parser/gapi2xml.pl : Handle more opaque types properly

svn path=/trunk/gtk-sharp/; revision=5965
2002-07-20 14:43:48 +00:00
Duncan Mak
2ac0a2cc89 2002-07-20 Duncan Mak <duncan@ximian.com>
* TestSizeGroup.cs: Minor aesthetic changes.

	* TestStatusbar.cs: Some changes in the output to figure out why
	it is behaving like this.

svn path=/trunk/gtk-sharp/; revision=5946
2002-07-19 19:05:11 +00:00
Duncan Mak
66d0a287b3 2002-07-19 Duncan Mak <duncan@ximian.com>
* TestSizeGroup.cs: New test for GtkSizeGroup.

	* Makefile:
	* WidgetViewer.cs: Include TestSizeGroup.

svn path=/trunk/gtk-sharp/; revision=5907
2002-07-19 09:44:29 +00:00
Duncan Mak
ef47320ee2 2002-07-19 Duncan Mak <duncan@ximian.com>
* gtk/Paned.custom:
	* glue/paned.c: Glue code for getting child1 and child2 out from a Gtk.Paned.

	* glue/Makefile.am: Add paned.c

svn path=/trunk/gtk-sharp/; revision=5906
2002-07-19 07:54:33 +00:00
Mike Kestner
88bc0b71d2 2002-07-19 Mike Kestner <mkestner@speakeasy.net>
* generator/StructGen.cs : comment out GenField. It's broke.
	* sample/ButtonApp.cs : revert the EventAny WriteLine.

svn path=/trunk/gtk-sharp/; revision=5905
2002-07-19 06:05:14 +00:00
Mike Kestner
d5dc10e6ce 2002-07-19 Mike Kestner <mkestner@speakeasy.net>
* parser/gapi2xml.pl : mark privately defined structs opaque.

svn path=/trunk/gtk-sharp/; revision=5904
2002-07-19 05:44:32 +00:00
Mike Kestner
01eeafcd6e 2002-07-18 Mike Kestner <mkestner@speakeasy.net>
* generator/StructBase.cs : use GetMarshalType for field gen.
	* sample/ButtonApp.cs : WriteLine the Gdk.EventAny in DeleteEvent.

svn path=/trunk/gtk-sharp/; revision=5903
2002-07-19 04:27:02 +00:00
Mike Kestner
9f329710ed 2002-07-18 Mike Kestner <mkestner@speakeasy.net>
* generator/StructGen.cs : make them public structs, not classes.
	* parser/build.pl : step up to the g2final tarballs.
	* parser/gapi2xml.pl : suppress *Private struct types. Mark
	  ellipsis terminated param lists.

svn path=/trunk/gtk-sharp/; revision=5902
2002-07-19 04:07:50 +00:00
Radek Doulik
5fd1b11716 fixed typo
svn path=/trunk/gtk-sharp/; revision=5897
2002-07-18 20:02:37 +00:00
Mike Kestner
e39080baa6 2002-07-18 Mike Kestner <mkestner@speakeasy.net>
* generator/StructBase.cs : Mangle field names.
	* generator/StructGen.cs : uncomment GenField.

svn path=/trunk/gtk-sharp/; revision=5892
2002-07-18 13:42:31 +00:00
Duncan Mak
aeb6280e2f 2002-07-18 Duncan Mak <duncan@ximian.com>
* WidgetViewer.cs: Fixed InvalidCastException.

	* TestStatusbar.cs: Made it work. Sigh, I dunno why I got it wrong
	the first time.

	* TestMenus.cs: Use null instead of new SList (IntPtr.Zero); and
	remove the unnecessary try... catch block.

svn path=/trunk/gtk-sharp/; revision=5889
2002-07-18 12:06:17 +00:00
Duncan Mak
6f5bbc2259 2002-07-18 Duncan Mak <duncan@ximian.com>
* TestMenus.cs: Use null instead of new SList (IntPtr.Zero); and
	remove try... catch block.

svn path=/trunk/gtk-sharp/; revision=5879
2002-07-17 18:31:51 +00:00
Duncan Mak
d789d80bc0 Forgot to add gtk_radio_button_new_with_mnemonic
svn path=/trunk/gtk-sharp/; revision=5878
2002-07-17 18:30:10 +00:00
Duncan Mak
6de1f261a2 2002-07-18 Duncan Mak <duncan@ximian.com>
* parser/Gtk.metadata: Mark gtk_radio_menu_item_new_with_label,
	gtk_radio_button_new_with_label and gtk_radio_button_new with
	null_ok flags.

svn path=/trunk/gtk-sharp/; revision=5877
2002-07-17 18:05:48 +00:00
Duncan Mak
f3ad31837b 2002-07-18 Duncan Mak <duncan@ximian.com>
* TestCheckButton.cs:
	* TestDialog.cs:
	* TestFileSelection.cs:
	* TestFlipping.cs:
	* TestMenus.cs:
	* TestRadioButton.cs:
	* TestRange.cs:
	* TestStatusbar.cs:
	* TestTooltip.cs:  Removed erroneous references to SignalArgs, and
	changed EventHandlers to more appropriate specialized Handlers instead.

svn path=/trunk/gtk-sharp/; revision=5869
2002-07-17 16:33:35 +00:00
Radek Doulik
e4b4ce171c use this (null, null)
svn path=/trunk/gtk-sharp/; revision=5857
2002-07-17 15:38:03 +00:00
Duncan Mak
aa56559530 2002-07-17 Duncan Mak <duncan@ximian.com>
* Makefile:
	* WidgetViewer.cs: Added TestMenus.cs

	* TestMenus.cs: New test for testing menu widgets.

svn path=/trunk/gtk-sharp/; revision=5856
2002-07-17 15:14:55 +00:00
Radek Doulik
4f6a03287c added <disabledefaultconstructor/> to ScrolledWindow
svn path=/trunk/gtk-sharp/; revision=5855
2002-07-17 15:09:34 +00:00
Radek Doulik
33b715ef83 2002-07-17 Radek Doulik <rodo@ximian.com>
* gtk/ScrolledWindow.custom: new file with ScrolledWindow custom
	default constructor

	* parser/Metadata.pm: addClassData subroutine to add
	<disabledefaultconstructor/>

	* parser/Gtk.metadata: disable default constructor for
	ScrolledWindow

	* generator/ObjectGen.cs: added hasDefaultConstructor flag, dont
	generate default protected empty constructor if
	hasDefaultConstructor is false, it will be provided by .custom
	file

	* generator/makefile (RUNTIME): use RUNTIME variable

svn path=/trunk/gtk-sharp/; revision=5854
2002-07-17 15:05:22 +00:00
Rachel Hestilow
9e29ccbf0a 2002-07-17 Rachel Hestilow <hestilow@ximian.com>
* parser/Gtk.metadata: Tag MenuItem.SetSubmenu as null-ok.

svn path=/trunk/gtk-sharp/; revision=5853
2002-07-17 14:44:01 +00:00
Rachel Hestilow
faf9967df6 2002-07-17 Rachel Hestilow <hestilow@ximian.com>
* generator/Method.cs: Honor array in return type.

	* parser/Gtk.metadata: Tag FileSelection.GetSelections as array.
	* parser/Metadata.pm: Add "return" target.

	* parser/gtkhtml, parser/README: Add gtkhtml-stream.[ch].
	Needed for url-requested signal. The actual wrapper for this
	compiles but is badly borked, it will probably need a lot of love.

svn path=/trunk/gtk-sharp/; revision=5852
2002-07-17 14:31:13 +00:00
Duncan Mak
ec3f7ead3e 2002-07-17 Duncan Mak <duncan@ximian.com>
* WidgetViewer.cs: Changed the EventArgs stuff to match Mike's
	latest commit.

	* TestToolbar.cs: Thanks to Dietmar for fixing #27695. Added new
	button for toggling showing tooltips.

svn path=/trunk/gtk-sharp/; revision=5841
2002-07-17 08:59:11 +00:00
Mike Kestner
8b85bf647a 2002-07-16 Mike Kestner <mkestner@speakeasy.net>
* 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
2002-07-16 23:14:35 +00:00
Duncan Mak
caf4397b04 2002-07-16 Duncan Mak <duncan@ximian.com>
* TestCheckButton.cs:
	* TestTooltip.cs: Added copyright material.

	* TestColorSelection.cs: Attempt to do something new after color
	is selected. ColorSelection.CurrentColor (get) doesn't seem to
	work right now, bug 27834.

	* TestDialog.cs: Removed debugging messages and beautified the dialog.

	* TestFlipping.cs: New test to show widget flipping.

	* TestRadioButton.cs: Changed the constructors used to build the
	radio buttons to work around bug 27833.

	* Makefile: Added TestFlipping.cs.

	* WidgetViewer.cs (AddWindow): Another convenience method for
	adding new Test dialogs.

2002-07-15  Duncan Mak  <duncan@ximian.com>

	* WidgetViewer.cs (AddButton): New convenience method so that I don't have to type
	the same thing when adding a new test button.

svn path=/trunk/gtk-sharp/; revision=5824
2002-07-16 10:11:49 +00:00
Rachel Hestilow
eb38e65353 2002-07-13 Rachel Hestilow <hestilow@ximian.com>
* generator/Parameters.cs: Allow nulls if null_ok set.
	* generator/SymbolTable.cs: Add method IsStruct.
	* parser/Gtk.metadata, Gdk.metadata, Gnome.metadata: Merge in
	null_ok from *.defs. This is probably incomplete though, I've
	already found one method that wasn't listed.

	* sample/GnomeHelloWorld.cs: Remove IntPtr.Zero hack.

svn path=/trunk/gtk-sharp/; revision=5792
2002-07-14 01:32:18 +00:00
Rachel Hestilow
fb1256d2f3 2002-07-13 Rachel Hestilow <hestilow@ximian.com>
* parser/Gnome.metadata, Gtk.metadata: More conflict
	fixes.
	* parser/build.pl: Fully qualify all lib names. (Gtk+ packages
	are now LFS-compliant in Debian...)
	* parser/gapi2xml.pl: Fix for whitespace in fields, defines,
	and docs.

	* generator/BoxedGen.cs: Remove extraneous CallByName definition,
	add "override" keyword to FromNative.
	(Generate): Generate methods after fields.
	* generator/ClassBase.cs: Change CallByName, FromNative to virtual.
	(.ctor): Ignore "hidden" nodes. Set container on signal.
	(GenSignals, GenMethods): Add "implementor" argument for interface
	use.
	(Get(Method|Signal|Property)Recursively): Rework to correctly
	recurse interfaces.
	(Implements): Added.
	* generator/Ctor.cs (Initialize): Move clash initialization completely
	out of Generate, so we can check for collisions.
	* generator/Method.cs (GenerateDeclCommon): Check for duplicates,
	for "new" keyword.
	(Generate): Add "implementor" argument.
	* generator/ObjectGen.cs (Generate): Initialize ctor clashes on
	this and all parents, before generating.
	(Ctors, InitializeCtors): Added.
	* generator/Signal.cs: Store the container_type, check for
	collisions.
	* generator/StructGen.cs: Add "override" keyword to overriden methods.

	* gtk/FileSelection.custom (ActionArea): Add "new" keyword.

svn path=/trunk/gtk-sharp/; revision=5782
2002-07-13 20:31:23 +00:00