Thread: [Java-gnome-developer] Adding support for other GTK Objects
Brought to you by:
afcowie
From: dkennedy <dke...@li...> - 2001-02-21 16:16:52
|
Hello, I stumbled across java-gnome recently and I have to say that I am impressed. It works very well and has a nice clean interface. I would like to add Java support for a Gtk object that is not part of the standard Gtk set. Because the Gtk object is in a separate .so file and has a different header I had to do the following: - add the appropriate description into gtk.defs - add a line to /usr/include/gtk/gtk.h - relink the libGTKJava.so adding in a dependancy for the separate .so The above worked great and it does exactly what I want. Unfortunately, it is obviously a big hack. I would like to know how I should go about adding a java interface to this Gtk object. I have a few thoughts: - I would like to distribute the .defs file with the Gtk object itself - I noticed that there is an include operative in the .defs file so perhaps including the gtk.defs would be the way to go. - Hopefully there could be a way of specifying a .so in some meta way to be associated with the .defs Can you please suggest how I should go about doing this? Thank you. BTW: The Gtk object I am wrapping is GtkEmbedMoz the gtk embedded mozilla object. And please don't mention the Blackwood project. -- David Kennedy, Technical Account Manager, Linuxcare, Inc. 613.562.9594 tel, 613.562.9304 fax dke...@li..., http://www.linuxcare.com/ Linuxcare. Putting open source to work. |
From: Jean v. W. <je...@sm...> - 2001-02-22 06:00:38
|
Hi David, I do not want to throw a spanner in your works but we are planning to release a new version of Java-GNOME some time next week (Do NOT quote me on that) so it may mean that some of your hard work may have to be redone on the new version. Do not be afraid it will be mostly testing. See my comments below: On Wed, 21 Feb 2001, dkennedy wrote: > > Hello, > > I stumbled across java-gnome recently and I have to say that I am impressed. > It works very well and has a nice clean interface. Thank you for the compliment. A lot of very good work has been done by Jeff and Dan. > I would like to add Java support for a Gtk object that is not part of the > standard Gtk set. Because the Gtk object is in a separate .so file and has a > different header I had to do the following: > - add the appropriate description into gtk.defs > - add a line to /usr/include/gtk/gtk.h > - relink the libGTKJava.so adding in a dependancy for the separate .so > > The above worked great and it does exactly what I want. Unfortunately, it is > obviously a big hack. > > I would like to know how I should go about adding a java interface to this Gtk > object. I have a few thoughts: > - I would like to distribute the .defs file with the Gtk object itself > - I noticed that there is an include operative in the .defs file so > perhaps including the gtk.defs would be the way to go. > - Hopefully there could be a way of specifying a .so in some meta > way to be associated with the .defs > > Can you please suggest how I should go about doing this? David, please do not throw away your patch (that is the defs file). What I would rather suggest is that we should add another "library" or jar file. The other alternative is to: - Make a new .defs file called something like gtkmoz.defs - Include this into the gnu.gtk tree or create a new branch called something like gnu.gtkmoz. (We moved the packages from gtk, gdk, gnome etc. to gnu.gtk, gnu.gdk, gnu.gnome to be closer to the Java spec.) - Add a flag to the configure script that will specifically enable this feature (the item above) and that will add the required linking flags and header files. - If we decide to add this permanently to the project we can then remove the flag or make the flag a default. In the long run we MAY make Java-GNOME a bit more modular. That is have the default stuff in one RPM and have additional stuff in "add-ons" that will go and put these RPMS in the java-gnome directory. This will mean that we will be able to distribute it better, only adding those parts which the user wants. Unfortunately we may have to do this post 0.6 (We made a LOT of changes and have added libglade support (thanks Avi Bryant) and libglade-gnome support) Jeff Morgan is co-ordinating this release and will be able to give you more information. > Thank you. > > BTW: The Gtk object I am wrapping is GtkEmbedMoz the gtk embedded mozilla > object. And please don't mention the Blackwood project. > > -- > David Kennedy, Technical Account Manager, Linuxcare, Inc. > 613.562.9594 tel, 613.562.9304 fax > dke...@li..., http://www.linuxcare.com/ > Linuxcare. Putting open source to work. Regards Jean |
From: dkennedy <dke...@li...> - 2001-02-22 18:30:05
|
On Thu, 22 Feb 2001, Jean van Wyk wrote: > Hi David, > > I do not want to throw a spanner in your works but we are planning to > release a new version of Java-GNOME some time next week (Do NOT quote me on > that) so it may mean that some of your hard work may have to be redone on > the new version. Do not be afraid it will be mostly testing. See my > comments below: Assuming that this new version is mostly in CVS now, I have already made the transition. > David, please do not throw away your patch (that is the defs file). What I > would rather suggest is that we should add another "library" or jar file. > The other alternative is to: > > - Make a new .defs file called something like gtkmoz.defs > - Include this into the gnu.gtk tree or create a new branch called > something like gnu.gtkmoz. (We moved the packages from gtk, gdk, gnome > etc. to gnu.gtk, gnu.gdk, gnu.gnome to be closer to the Java spec.) > - Add a flag to the configure script that will specifically enable this > feature (the item above) and that will add the required linking flags and > header files. > - If we decide to add this permanently to the project we can then remove > the flag or make the flag a default. I like all the above comments. I would prefer to keep the gtkmozembed stuff within gnu.gtk because it is a gtk object. I will set it up so that even though it is in gnu.gtk it will produce a separate jar file and .so file. > In the long run we MAY make Java-GNOME a bit more modular. That is have > the default stuff in one RPM and have additional stuff in "add-ons" that > will go and put these RPMS in the java-gnome directory. This will mean > that we will be able to distribute it better, only adding those parts which > the user wants. > > Unfortunately we may have to do this post 0.6 (We made a LOT of changes and > have added libglade support (thanks Avi Bryant) and libglade-gnome support) I'm certain that this will have to be done after the 0.6 release. I'm not in any big rush to push this out there. I'm assuming that I'm the only person thus far that has wanted to do this. I will be sending some patches to the list probably late next week. I do have a few questions about how I should go about doing this. I haven't really done any autoconf hacking so this is my train of thought with respect to what files I need to modify: - modify configure.in and add the appropriate --with tags - modify src/Makefile.in and add the build tags I don't see where to add the GTKMOZEMBED_CFLAGS and GTK_MOZEMBED_LIBS defines in. As well, when I try to run aclocal to build aclocal.m4 it fails on the KAFFE stuff. Do I need to upgrade my aclocal package? Thanks for all the help so far. PS: I think there is a bug in java-gnome/src/other/gtk_wrappers.h it includes gnome.h which fails when you try to build --with-gtk-only without gnome. -- David Kennedy, Technical Account Manager, Linuxcare, Inc. 613.562.9594 tel, 613.562.9304 fax dke...@li..., http://www.linuxcare.com/ Linuxcare. Putting open source to work. |