[cp-patches] [patch] make darwin 'work' with classpath
Hi all, the attached patch changes link behavior of darwin ppc and makes it work in reality. For detailed explanation please search the apple developer pages. In short, when building against a .so we have a module which is like an extension an not like a shared library as known on ppc linux. It is not possible to link against an extension/module/bundle. It's a longer story and I do not have the breath to expalin every detail right now. I'm certainly open to expalin it. With this test I can run the mauve tests and co quite successfully. I even can run some simple (sometimes bigger) gui apps with it. Regards, Andreas 2005-07-24 Andreas Tobler [EMAIL PROTECTED] * configure.ac (LIBVERSION): Check against darwin to set module 'no' for it. Modules under darwin are not linkable. See Apple docs. * configure: Regenerate Index: classpath/configure.ac === RCS file: /cvs/gcc/gcc/libjava/classpath/configure.ac,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 configure.ac --- classpath/configure.ac 16 Jul 2005 00:30:31 - 1.1.1.1 +++ classpath/configure.ac 24 Jul 2005 20:51:26 - @@ -21,7 +21,16 @@ dnl at which time we'll have to be more anal about such things dnl --- AC_SUBST(LIBVERSION, 0:0:0) -CLASSPATH_MODULE=-module -version-info ${LIBVERSION} -no-undefined +case $host_os in + darwin*) + cp_module= + ;; + *) + cp_module=-module + ;; +esac + +CLASSPATH_MODULE=${cp_module} -version-info ${LIBVERSION} -no-undefined AC_SUBST(CLASSPATH_MODULE) AC_PREREQ(2.59) ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] [patch] examples README
Hi all, a little patchlet for the README in the examples directory. Ok? Andreas 2005-07-25 Andreas Tobler [EMAIL PROTECTED] * examples/README: Add GNULookAndFeel.java to the compile command. Index: README === RCS file: /cvsroot/classpath/classpath/examples/README,v retrieving revision 1.3 diff -u -r1.3 README --- README 2 Jul 2005 20:32:08 - 1.3 +++ README 25 Jul 2005 20:12:26 - @@ -7,7 +7,8 @@ The examples can be compiled and run with gcj as follows: gcj -o swingdemo --main=gnu.classpath.examples.swing.Demo \ - gnu/classpath/examples/swing/Demo.java + gnu/classpath/examples/swing/Demo.java \ + gnu/classpath/examples/swing/GNULookAndFeel.java ./swingdemo Or with a traditional byte code interpreter like: ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] [patch] make darwin 'work' with classpath
Hi Mark, Mark Wielaard wrote: On Sun, 2005-07-24 at 23:05 +0200, Andreas Tobler wrote: the attached patch changes link behavior of darwin ppc and makes it work in reality. For detailed explanation please search the apple developer pages. In short, when building against a .so we have a module which is like an extension an not like a shared library as known on ppc linux. It is not possible to link against an extension/module/bundle. It's a longer story and I do not have the breath to expalin every detail right now. I'm certainly open to expalin it. With this test I can run the mauve tests and co quite successfully. I even can run some simple (sometimes bigger) gui apps with it. 2005-07-24 Andreas Tobler [EMAIL PROTECTED] * configure.ac (LIBVERSION): Check against darwin to set module 'no' for it. Modules under darwin are not linkable. See Apple docs. * configure: Regenerate Thanks. This patch works fine on GNU/Linux :) Since I don't have a darwin machine I cannot test it there. But I know people have been running GNU Classpath with for example jamvm on Darwin. Why don't those people see the problem you are seeing? Well, I will investigate a bit more. But my guess is here: with jamvm and other vm you run interpreted code, where the classpath lib is the last bit in the chain. On gcj/libgcj you can build/run native apps where you link the libgcj against the app. As mentioned above, you can not link against a module on darwin. But as said, I will provide some more details later. Also some tests. It may has also to do with the class loading mechanism. Andreas Btw, I also successfully ran cp with jamvm :) ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] [patch] make darwin 'work' with classpath
Hi Mark, Mark Wielaard wrote: On Mon, 2005-08-01 at 23:29 +0200, Andreas Tobler wrote: Well, I will investigate a bit more. But my guess is here: with jamvm and other vm you run interpreted code, where the classpath lib is the last bit in the chain. On gcj/libgcj you can build/run native apps where you link the libgcj against the app. As mentioned above, you can not link against a module on darwin. But as said, I will provide some more details later. Also some tests. It may has also to do with the class loading mechanism. Btw, I also successfully ran cp with jamvm :) Well, here I should have said 'once', with the actual cp I didn't. :( But I know jamvm will fail because it in src/dll.c:300 it checks against .so and new will .dylib on darwin. Sorry for not being more clear. OK, so it seems a positive change in all cases, at least for you. Then it is probably a good idea to commit it now and see if anybody that tests CVS on darwin yells and screams. I will investigate later today and hopefully I'll be prepared for any compliants. Thanks, Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Re: [commit-cp] classpath java/awt/Component.java ./ChangeLog
Hi Roman, Roman Kennke wrote: CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED] 05/08/02 15:13:01 Modified files: java/awt : Component.java . : ChangeLog Log message: 2005-08-02 Roman Kennke [EMAIL PROTECTED] * java/awt/Toolkit.java (createCustomCursor): Added check for headless environment. (getBestCursorSize): Added check for headless environment. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/Component.java.diff?tr1=1.66tr2=1.67r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4314tr2=1.4315r1=textr2=text I think this one went in accidentally ? Regards, Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] [patch] make darwin 'work' with classpath
Hi Mark, Mark Wielaard wrote: On Tue, 2005-08-02 at 06:41 +0200, Andreas Tobler wrote: Well, here I should have said 'once', with the actual cp I didn't. :( But I know jamvm will fail because it in src/dll.c:300 it checks against .so and new will .dylib on darwin. In the meantime I built cp with .dylib and with .so. Also jamvm was tuned to work with both. (Not simultaneously, but this should be a little effort) Unfortunately cp cvs does crash when I run a swing app. An awt based app does somehow work with jamvm, but only when I build cp with .dylib. Built with .so it segfaults. For both, awt and swing based apps. The awt based app seems to work when I resize the frame (I tried awt.Demo). If I do not resize, I get a blank frame with the menubar only. Resizing the frame brings me the buttons to see, except the close button. This is all against gnome-2.10 core. The swing based app aborts with the following message: ** ERROR **: file gnu_java_awt_peer_gtk_GdkGraphics.c: line 161 (Java_gnu_java_awt_peer_gtk_GdkGraphics_initFromImage): assertion failed: (pixmap != NULL) aborting... java.lang.InternalError at gnu.java.awt.peer.gtk.GdkGraphics.initFromImage (Native Method) at gnu.java.awt.peer.gtk.GdkGraphics.init (GdkGraphics.java:107) at gnu.java.awt.peer.gtk.GtkImage.getGraphics (GtkImage.java:311) at gnu.java.awt.peer.gtk.GtkComponentPeer.createImage (GtkComponentPeer.java:234) at java.awt.Component.createImage (Component.java:2058) at java.awt.Component.createImage (Component.java:2056) at javax.swing.RepaintManager.getOffscreenBuffer (RepaintManager.java:487) at javax.swing.JComponent.paint (JComponent.java:1440) at java.awt.Container$GfxPaintVisitor.visit (Container.java:1737) at java.awt.Container.visitChild (Container.java:1541) at java.awt.Container.visitChildren (Container.java:1503) at java.awt.Container.paint (Container.java:752) at gnu.java.awt.peer.gtk.GtkComponentPeer.handleEvent (GtkComponentPeer.java:311) at java.awt.Component.dispatchEvent (Component.java:2320) at java.awt.EventQueue.dispatchEvent (EventQueue.java:518) at java.awt.EventDispatchThread.run (EventDispatchThread.java:75) Program received signal SIGABRT, Aborted. [Switching to process 2154 local thread 0x3407] 0x9002ca98 in semaphore_wait_signal_trap () Ok, maybe it's a general ppc problem? OK. Useful additional datapoint :) Maybe the simplest solution then would be to symlink the .dylib to a .so with the same name as an additional workaround for darwin based systems. No, .so and .dylib are not the same and you can not symlink apples to pears :) I looked a bit around and also found the extension .jnilib used on darwin systems for libraries loaded through jni. There is a patch for libtool to add a -jnimodule option, but I don't believe that has been integrated. http://lists.gnu.org/archive/html/libtool/2002-07/msg00010.html You can dlopen/link against dylib. See the testsuite in gcc/libjava/testsuite/jni.exp there we test against. So I think we do not need an additional extension. Chris had a fight around this same issue for our libxmlj: http://lists.gnu.org/archive/html/classpath/2004-07/msg00207.html But this was something different, he ended up using a wrong jni.h. It seems it is all a bit of a maze of extensions and options I am afraid :( I know. But I can't change it :) Regards, Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] [patch] make darwin 'work' with classpath
Hi Mark, [EMAIL PROTECTED] wrote: The awt based app seems to work when I resize the frame (I tried awt.Demo). If I do not resize, I get a blank frame with the menubar only. Resizing the frame brings me the buttons to see, except the close button. This is all against gnome-2.10 core. I am seeing the same thing on Debian GNU/Linux x86 for the AWT demo since a couple of days. I don't know when it was introduced, but it isn't darwin specific. Good, at least not a problem I introduced. The swing based app aborts with the following message: ** ERROR **: file gnu_java_awt_peer_gtk_GdkGraphics.c: line 161 (Java_gnu_java_awt_peer_gtk_GdkGraphics_initFromImage): assertion failed: (pixmap != NULL) I don't get this. Although I don't know which 'classpath' you are using. If it is the one inside gcc it might well be that it is missing some bug fixes and that the swing GNU Classpath demo was recently extended to use additional features not yet present in the gcc/classpath tree. As written, I use classpath (cp) cvs for these tests. It's happening on todays head. The problem could be related to the gtk+ installation I have. I will look into it. (Hopefully BE problems ;) At least I think I do not need to debug jamvm. Gcc/libgcj/cp works fine for me (as far as it can). Regards, Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Revert glibtoolize patch for Darwin
Hi Mark, thanks for the corrections. Mark Wielaard wrote: echo You must have libtool 1.5 installed to compile $PROJECT. echo Install the appropriate package for your distribution, echo or get the source tarball at http://ftp.gnu.org/gnu/libtool/; + echo For Darwin you need the latest stable to support Frameworks + echo linking. Also, you have to point ACLOCAL_FLAGS to this + echo libtool/share/aclocal. I am not a Darwin person, but are you sure that the latest stable to support Frameworks linking is clear enough? You mean in terms of version numbering or in terms of explaining all the details behind ? In terms of version I propose this. Yes, it is tested on darwin ppc. Thanks for review! Andreas 2005-09-03 Andreas Tobler [EMAIL PROTECTED] * autogen.sh: Document libtool version needed for Darwin. (LIBTOOLIZE): Don't special case Darwin, always use libtoolize. Index: autogen.sh === RCS file: /cvsroot/classpath/classpath/autogen.sh,v retrieving revision 1.12 diff -u -r1.12 autogen.sh --- autogen.sh 1 May 2005 21:16:31 - 1.12 +++ autogen.sh 3 Sep 2005 19:24:45 - @@ -12,16 +12,9 @@ DIE=0 -case `uname -s` in -Darwin) - LIBTOOLIZE=glibtoolize - ;; -*) - LIBTOOLIZE=libtoolize - ;; -esac +LIBTOOLIZE=libtoolize -have_libtool=true +have_libtool=false if ${LIBTOOLIZE} --version /dev/null /dev/null 21 ; then libtool_version=`${LIBTOOLIZE} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'` case $libtool_version in @@ -35,6 +28,9 @@ echo You must have libtool 1.5 installed to compile $PROJECT. echo Install the appropriate package for your distribution, echo or get the source tarball at http://ftp.gnu.org/gnu/libtool/; + echo For Darwin you need the latest stable (1.5.18) to support + echo Frameworks linking. Also, you have to point ACLOCAL_FLAGS + echo to this libtool/share/aclocal. DIE=1 fi ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] fix double unreferencing bug in GdkFontPeer.c
Hello, this patchlet fixes a bug which tried to unref pfont-font twice. Andreas 2005-09-17 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c (Java_gnu_java_awt_peer_gtk_GdkFontPeer_dispose): Fix double unreferencing pfont-font. Unref pfont-layout instead. Index: gnu_java_awt_peer_gtk_GdkFontPeer.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c,v retrieving revision 1.9 diff -u -r1.9 gnu_java_awt_peer_gtk_GdkFontPeer.c --- gnu_java_awt_peer_gtk_GdkFontPeer.c 18 Aug 2005 03:15:15 - 1.9 +++ gnu_java_awt_peer_gtk_GdkFontPeer.c 17 Sep 2005 20:39:21 - @@ -98,7 +98,7 @@ pfont = (struct peerfont *)NSA_DEL_FONT_PTR (env, self); g_assert (pfont != NULL); if (pfont-layout != NULL) -g_object_unref (pfont-font); +g_object_unref (pfont-layout); if (pfont-font != NULL) g_object_unref (pfont-font); if (pfont-ctx != NULL) ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] fix double unreferencing bug in GdkFontPeer.c
Tom Tromey wrote: Andreas == Andreas Tobler [EMAIL PROTECTED] writes: Andreas this patchlet fixes a bug which tried to unref pfont-font twice. IMO this one could have gone in as obvious; this is clearly just a cut-and-paste error. Committed. Thanks, Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] [patch] gtk-peer, replace deprecated g*k functions
Hello all, I'm going to commit this patch asap. Tom F. approved offline. Also, Roman sent a part of this patch for GdkGraphics (today), he did it right, I mixed some arguments. Thanks, included. Thanks goes also to Paul Jenner, he tested against gtk-2.4. Andreas Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c,v retrieving revision 1.60 diff -u -r1.60 gnu_java_awt_peer_gtk_GtkWindowPeer.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c 12 Sep 2005 03:46:42 - 1.60 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c 22 Sep 2005 20:02:31 - @@ -1205,7 +1205,7 @@ ptr = NSA_GET_PTR (env, obj); - gtk_window_set_policy (GTK_WINDOW (ptr), resizable, resizable, FALSE); + gtk_window_set_resizable (GTK_WINDOW (ptr), resizable); gdk_threads_leave (); } Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c,v retrieving revision 1.19 diff -u -r1.19 gnu_java_awt_peer_gtk_GtkMenuPeer.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c 14 Jul 2005 22:07:02 - 1.19 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c 22 Sep 2005 20:02:31 - @@ -165,7 +165,7 @@ ptr = NSA_GET_PTR (env, obj); - list = gtk_container_children (GTK_CONTAINER (ptr)); + list = gtk_container_get_children (GTK_CONTAINER (ptr)); list = g_list_nth (list, index); gtk_container_remove (GTK_CONTAINER (ptr), GTK_WIDGET (list-data)); Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c,v retrieving revision 1.12 diff -u -r1.12 gnu_java_awt_peer_gtk_GtkMenuBarPeer.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c 11 Jul 2005 23:27:43 - 1.12 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c 22 Sep 2005 20:02:31 - @@ -88,7 +88,7 @@ if (helpmenu != NULL) { - list = gtk_container_children (GTK_CONTAINER (mbar)); + list = gtk_container_get_children (GTK_CONTAINER (mbar)); while (list != NULL list-data != helpmenu) list = list-next; if (list != NULL list-data == helpmenu) @@ -110,7 +110,7 @@ ptr = NSA_GET_PTR (env, obj); - list = gtk_container_children (GTK_CONTAINER (ptr)); + list = gtk_container_get_children (GTK_CONTAINER (ptr)); list = g_list_nth (list, index); gtk_container_remove (GTK_CONTAINER (ptr), GTK_WIDGET (list-data)); Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c,v retrieving revision 1.16 diff -u -r1.16 gnu_java_awt_peer_gtk_GtkImage.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c4 Sep 2005 00:03:58 - 1.16 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c22 Sep 2005 20:02:31 - @@ -299,7 +299,7 @@ if (offScreen (env, obj) == JNI_FALSE) gdk_pixbuf_unref ((GdkPixbuf *)getData (env, obj)); else -gdk_pixmap_unref ((GdkPixmap *)getData (env, obj)); +g_object_unref ((GdkPixmap *)getData (env, obj)); gdk_threads_leave (); } Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,v retrieving revision 1.54 diff -u -r1.54 gnu_java_awt_peer_gtk_GtkComponentPeer.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c20 Sep 2005 04:12:02 - 1.54 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c22 Sep 2005 20:02:31 - @@ -249,7 +249,7 @@ gdk_cursor = gdk_cursor_new (gdk_cursor_type); gdk_window_set_cursor (widget-window, gdk_cursor); - gdk_cursor_destroy (gdk_cursor); + gdk_cursor_unref (gdk_cursor); } JNIEXPORT void JNICALL @@ -272,9 +272,9 @@ if (widget-parent == NULL) { if (GTK_IS_WINDOW (parent_widget)) -{ - GList *children = gtk_container_children -(GTK_CONTAINER (parent_widget)); + { + GList *children = gtk_container_get_children + (GTK_CONTAINER (parent_widget)); if (GTK_IS_MENU_BAR (children-data)) gtk_fixed_put (GTK_FIXED (children-next-data), widget, 0, 0); @@ -843,7 +843,7 @@ if (GTK_IS_EVENT_BOX (widget) || (GTK_IS_BUTTON (widget) - !GTK_IS_OPTION_MENU (widget))) + !GTK_IS_COMBO_BOX
[cp-patches] fix one more deprecated gtk issue
Hello, the attached patch eliminates another deprecated gtk case. It was approved by Tom F, but I missed to commit. Doing it asap. Andreas 2005-09-24 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c (Java_gnu_java_awt_peer_gtk_GtkToolkit_gtkInit): Replace deprecated gtk colormap stuff. Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c,v retrieving revision 1.23 diff -u -r1.23 gnu_java_awt_peer_gtk_GtkToolkit.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c 6 Sep 2005 04:21:14 - 1.23 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c 24 Sep 2005 20:50:11 - @@ -160,10 +160,8 @@ XSynchronize (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), True); #endif - gdk_rgb_init (); - gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); - gtk_widget_set_default_visual (gdk_rgb_get_visual ()); - + gtk_widget_set_default_colormap (gdk_rgb_get_colormap ()); + /* Make sure queued calls don't get sent to GTK/GDK while we're shutting down. */ atexit (gdk_threads_enter); ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] fix GdkGraphics2D segfault
Hi all, this patch fixes a segfault with Metal theme and -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D on our swing demo. The side effect is that the window bars in Dektop World look a bit ugly. Ok? Andreas 2005-09-29 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setTexturePixelsUnlocked): Call cairo_pattern_set_extend after gr-pattern has been set and checked versus NULL. Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c,v retrieving revision 1.32 diff -u -r1.32 gnu_java_awt_peer_gtk_GdkGraphics2D.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c 18 Aug 2005 01:22:00 - 1.32 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c 29 Sep 2005 20:49:01 - @@ -931,9 +931,9 @@ CAIRO_FORMAT_ARGB32, w, h, stride * 4); g_assert (gr-pattern_surface != NULL); - cairo_pattern_set_extend (gr-pattern, 1); gr-pattern = cairo_pattern_create_for_surface (gr-pattern_surface); g_assert (gr-pattern != NULL); + cairo_pattern_set_extend (gr-pattern, CAIRO_EXTEND_REPEAT); cairo_set_source (gr-cr, gr-pattern); } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] FYI: ComboBoxDemo
Hi Dave, David Gilbert wrote: I added this small demo that I've been using while working on the UI delegate for the JComboBox under the MetalLookAndFeel: 2005-09-29 David Gilbert [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/ComboBoxDemo.java: new demo. Here's a screenshot showing the demo running on JamVM: http://www.object-refinery.com/classpath/comboboxes.png cool Would you mind adding a 'close' button to this demo? Maybe to the button demo too? (I'm not a java hacker at all, only a tester ;) Otherwise I have to kill the the demo with a ctrl-c. Only cosmetics :) Thanks a lot !! Regards, Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] fix GdkGraphics2D segfault
Hi all, I commited this one since I feel it goes under obvious. If you do not think so, I'll revert asap. I wanted to ask Tom for official approval. But I did not reach him. He gave me offline confirmation that this is a bug. Andreas Andreas Tobler wrote: Hi all, this patch fixes a segfault with Metal theme and -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D on our swing demo. The side effect is that the window bars in Dektop World look a bit ugly. Ok? Andreas 2005-09-29 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setTexturePixelsUnlocked): Call cairo_pattern_set_extend after gr-pattern has been set and checked versus NULL. Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c,v retrieving revision 1.32 diff -u -r1.32 gnu_java_awt_peer_gtk_GdkGraphics2D.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c 18 Aug 2005 01:22:00 - 1.32 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c 29 Sep 2005 20:49:01 - @@ -931,9 +931,9 @@ CAIRO_FORMAT_ARGB32, w, h, stride * 4); g_assert (gr-pattern_surface != NULL); - cairo_pattern_set_extend (gr-pattern, 1); gr-pattern = cairo_pattern_create_for_surface (gr-pattern_surface); g_assert (gr-pattern != NULL); + cairo_pattern_set_extend (gr-pattern, CAIRO_EXTEND_REPEAT); cairo_set_source (gr-cr, gr-pattern); } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Re: [commit-cp] classpath ./ChangeLog gnu/CORBA/CDR/Vio.java gn...
Hi Audrius, Found 3 semantic errors compiling ../../classpath/gnu/javax/rmi/CORBA/corbaObjectOutput.java: 55. import debugging.CORBA_stream; ^^ *** Semantic Error: The import debugging/CORBA_stream is not valid, since it does not name a type in a package. 258. CORBA_stream c; ^--^ *** Semantic Error: Type CORBA_stream was not found. 260. c = new CORBA_stream(), ara, new gnuRmiUtil()); ^--^ *** Semantic Error: Type CORBA_stream was not found. These are after your latest commit, with jikes. Is there anything missing ? Regards, Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Complete javax.imageio
Hi Tom, hopefully you can enlight a java newbie :) In javax/imageio/ImageReader.java you change the following for example protected List progressListeners = new ArrayList(); to protected List progressListeners = null; The java doc says: progressListeners: A List of currently registered IIOReadProgressListeners, initialized by default to null, which is synonymous with an empty List. My problem is here: protected void processImageComplete() { Iterator it = progressListeners.iterator(); in the same file. I get an NPE on this since progressListeners is initialized to null, not to an empty List, to null. This prevents me to run the swing Demo in 2D mode. I changed the above initializer to: protected List progressListeners = new ArrayList(0); now i can run the demo fine again. So, am I missing an initialization of this progressListeners elsewhere? Or is the initializing to null wrong? Thanks, Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Re: imageio/ImageReader|Writer check *Listeners
Hi Tom, Thomas Fitzsimmons wrote: @@ -185,8 +185,10 @@ { if (listener == null) return; - -progressListeners.add(listener); +if (progressListeners != null) + { + progressListeners.add(listener); + } If progressListeners is null here it should be initialized to a new ArrayList, otherwise no listener could ever be added. Otherwise this patch looks good. Ok, but this would apply to all addIIO*Listeners, right? In ImageReader and ImageWriter. (progressListeners, updateListeners warningListeners) Would this be ok? Or should the ArrayList be initialized with the default 10 elements? new ArrayList()? public void addIIOReadProgressListener(IIOReadProgressListener listener) { if (listener == null) return; if (progressListeners != null) { progressListeners.add(listener); } else { progressListeners = new ArrayList(0); progressListeners.add(listener); } } Thanks for review! Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Re: imageio/ImageReader|Writer check *Listeners
Thomas Fitzsimmons wrote: I replied to the previous message before seeing this one. Yes, this way is shorter/better. Please commit. Thank you. I committed the attached one. Andreas Index: javax/imageio/ImageReader.java === RCS file: /cvsroot/classpath/classpath/javax/imageio/ImageReader.java,v retrieving revision 1.6 diff -u -r1.6 ImageReader.java --- javax/imageio/ImageReader.java 2 Oct 2005 05:29:55 - 1.6 +++ javax/imageio/ImageReader.java 4 Oct 2005 15:41:37 - @@ -1,5 +1,5 @@ /* ImageReader.java -- Decodes raster images. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -185,8 +185,9 @@ { if (listener == null) return; - -progressListeners.add(listener); +if (progressListeners == null) + progressListeners = new ArrayList (); +progressListeners.add(listener); } /** @@ -199,10 +200,11 @@ { if (listener == null) return; - -updateListeners.add(listener); +if (updateListeners == null) + updateListeners = new ArrayList (); +updateListeners.add(listener); } - + /** * Install a read warning listener. This method will return * immediately if listener is null. Warning messages sent to this @@ -216,8 +218,9 @@ { if (listener == null) return; - -warningListeners.add(listener); +if (warningListeners == null) + warningListeners = new ArrayList (); +warningListeners.add(listener); } /** @@ -763,12 +766,16 @@ */ protected void processImageComplete() { -Iterator it = progressListeners.iterator(); - -while (it.hasNext()) +if (progressListeners != null) { - IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); - listener.imageComplete (this); + Iterator it = progressListeners.iterator(); + + while (it.hasNext()) + { + IIOReadProgressListener listener = + (IIOReadProgressListener) it.next(); + listener.imageComplete (this); + } } } @@ -782,15 +789,18 @@ */ protected void processImageProgress(float percentageDone) { -Iterator it = progressListeners.iterator(); - -while (it.hasNext()) + if (progressListeners != null) { - IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); - listener.imageProgress(this, percentageDone); + Iterator it = progressListeners.iterator(); + + while (it.hasNext()) + { + IIOReadProgressListener listener = + (IIOReadProgressListener) it.next(); + listener.imageProgress(this, percentageDone); + } } } - /** * Notifies all installed read progress listeners, by calling their * imageStarted methods, that image loading has started on the given @@ -801,12 +811,16 @@ */ protected void processImageStarted(int imageIndex) { -Iterator it = progressListeners.iterator(); - -while (it.hasNext()) + if (progressListeners != null) { - IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); - listener.imageStarted(this, imageIndex); + Iterator it = progressListeners.iterator(); + + while (it.hasNext()) + { + IIOReadProgressListener listener = + (IIOReadProgressListener) it.next(); + listener.imageStarted(this, imageIndex); + } } } @@ -829,13 +843,16 @@ int width, int height, int periodX, int periodY, int[] bands) { -Iterator it = updateListeners.iterator(); - -while (it.hasNext()) +if (updateListeners != null) { - IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); - listener.imageUpdate(this, image, minX, minY, width, height, periodX, -periodY, bands); + Iterator it = updateListeners.iterator(); + + while (it.hasNext()) + { + IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); + listener.imageUpdate(this, image, minX, minY, width, height, +periodX, periodY, bands); + } } } @@ -848,12 +865,15 @@ */ protected void processPassComplete(BufferedImage image) { -Iterator it = updateListeners.iterator(); - -while (it.hasNext()) +if (updateListeners != null) { - IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); - listener.passComplete(this, image); + Iterator it = updateListeners.iterator(); + + while (it.hasNext()) + { + IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); + listener.passComplete(this, image); +
[cp-patches] minor config issue for QT4 and OS-X
Hello To avoid confusion in kaffe and elsewhere it would make sense to rename the --with-qtdir to --with-qt4dir in the OS-X Qt config section. Kaffe for example uses --with-qtdir for Qt versions 2/3/embedded. Ok? Andreas 2005-10-24 Andreas Tobler [EMAIL PROTECTED] * configure.ac: Rename --with-qtdir to --with-qt4dir to make clear which Qt version is meant. Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.113 diff -u -r1.113 configure.ac --- configure.ac23 Oct 2005 16:59:07 - 1.113 +++ configure.ac24 Oct 2005 21:54:19 - @@ -370,14 +370,14 @@ AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config]) case $host_os in darwin*) - AC_ARG_WITH([qtdir], - [AS_HELP_STRING([--with-qtdir=DIR], + AC_ARG_WITH([qt4dir], + [AS_HELP_STRING([--with-qt4dir=DIR], [Qt4 installation directory used for OS-X. For other systems use pkg-config.])], [QT4DIR=$withval] ) if test x$QT4DIR = x ; then - AC_MSG_ERROR([*** No path for Qt4 --with-qtdir option given]) + AC_MSG_ERROR([*** No path for Qt4 --with-qt4dir option given]) fi AC_MSG_RESULT([QT4DIR... $QT4DIR]) AC_CHECK_PROG(MOC, [moc], [$QT4DIR/bin/moc], [], $QT4DIR/bin) ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] NEWS item Qt4 configury for OS-X
Hi all, for the completeness. Ok? 2005-10-26 Andreas Tobler [EMAIL PROTECTED] * NEWS: Mention Qt4 configury for OS-X. Index: NEWS === RCS file: /cvsroot/classpath/classpath/NEWS,v retrieving revision 1.99 diff -u -i -r1.99 NEWS --- NEWS21 Oct 2005 18:13:39 - 1.99 +++ NEWS26 Oct 2005 20:12:40 - @@ -14,7 +14,11 @@ IIOP protocol. The current implementation is capable for remote invocations, transferring various Serializables and Externalizables via RMI-IIOP protocol. It can flatten graphs and, at least for the simple cases, is interoperable - with Sun's jdk 1.5. + with Sun's jdk 1.5. + +* Qt4 configury switches for OS-X. Additional to the --enable-qt-peer, OS-X + users with a Qt4 installation can build the qt-peers with the argument + --with-qt4dir=Qt4-installation-dir. New in release 0.18 (Sep 6, 2005) ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] [patch] GdkGraphics2D.c debug code update
Hello, this patch is maybe useless, but for completeness. ok? Andreas 2005-11-06 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setGradientUnlocked): Update debug output to reflect actual situation. (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setTexturePixelsUnlocked): Likewise. (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_drawPixels): Adjust formatting. (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetMatrixUnlocked): Update debug output to reflect actual situation. (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetRGBAColorUnlocked): Likewise. (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoCurveTo): Adjust formatting. (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRelCurveTo): Likewise. (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRectangle): Likewise. (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSurfaceSetFilterUnlocked): Update debug output to reflect actual situation. Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c,v retrieving revision 1.34 diff -u -r1.34 gnu_java_awt_peer_gtk_GdkGraphics2D.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c 30 Sep 2005 22:12:33 - 1.34 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c 6 Nov 2005 21:50:08 - @@ -780,12 +780,13 @@ if (peer_is_disposed(env, obj)) return; - if (gr-debug) printf (setGradient (%f,%f) - (%f,%f); (%d,%d,%d,%d) - (%d,%d,%d,%d)\n, -x1, y1, -x2, y2, -r1, g1, b1, a1, -r2, g2, b2, a2); - + if (gr-debug) +printf (setGradientUnlocked (%f,%f) - (%f,%f); (%d,%d,%d,%d) - (%d,%d,%d,%d)\n, + x1, y1, + x2, y2, + r1, g1, b1, a1, + r2, g2, b2, a2); + if (cyclic) surf = cairo_surface_create_similar (gr-surface, CAIRO_FORMAT_ARGB32, 3, 2); else @@ -906,8 +907,9 @@ gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); g_assert (gr != NULL); - if (gr-debug) printf (setTexturePixels (%d pixels, %dx%d, stride: %d)\n, -(*env)-GetArrayLength (env, jarr), w, h, stride); + if (gr-debug) +printf (setTexturePixelsUnlocked (%d pixels, %dx%d, stride: %d)\n, + (*env)-GetArrayLength (env, jarr), w, h, stride); if (gr-pattern) cairo_pattern_destroy (gr-pattern); @@ -960,8 +962,9 @@ gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); g_assert (gr != NULL); - if (gr-debug) printf (drawPixels (%d pixels, %dx%d, stride: %d)\n, -(*env)-GetArrayLength (env, java_pixels), w, h, stride); + if (gr-debug) +printf (drawPixels (%d pixels, %dx%d, stride: %d)\n, + (*env)-GetArrayLength (env, java_pixels), w, h, stride); native_pixels = (*env)-GetIntArrayElements (env, java_pixels, NULL); native_matrix = (*env)-GetDoubleArrayElements (env, java_matrix, NULL); @@ -1081,10 +1084,11 @@ g_assert (native_matrix != NULL); g_assert ((*env)-GetArrayLength (env, java_matrix) == 6); - if (gr-debug) printf (cairo_set_matrix [ %f, %f, %f, %f, %f, %f ]\n, -native_matrix[0], native_matrix[1], -native_matrix[2], native_matrix[3], -native_matrix[4], native_matrix[5]); + if (gr-debug) +printf (cairo_matrix_init [ %f, %f, %f, %f, %f, %f ]\n, + native_matrix[0], native_matrix[1], + native_matrix[2], native_matrix[3], + native_matrix[4], native_matrix[5]); { cairo_matrix_t mat; @@ -1272,7 +1276,7 @@ (*env)-ReleaseFloatArrayElements (env, java_positions, native_positions, 0); (*env)-ReleaseIntArrayElements (env, java_codes, native_codes, 0); - begin_drawing_operation (env, gr); + begin_drawing_operation (env, gr); cairo_show_glyphs (gr-cr, glyphs, n); end_drawing_operation (env, gr); @@ -1440,7 +1444,8 @@ draw to a PixBuf, you must exchange the R and B components of your color. */ - if (gr-debug) printf (cairo_set_source_rgb (%f, %f, %f)\n, r, g, b); + if (gr-debug) +printf (cairo_set_source_rgba (%f, %f, %f, %f)\n, r, g, b, a); if (gr-drawbuf) cairo_set_source_rgba (gr-cr, b, g, r, a); @@ -1731,7 +1736,9 @@ gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); g_assert (gr != NULL); - if (gr-debug) printf (cairo_curve_to (%f, %f), (%f, %f), (%f, %f)\n, x1, y1, x2, y2, x3, y3); + if (gr-debug) +printf (cairo_curve_to (%f, %f), (%f, %f), (%f, %f)\n, + x1, y1, x2, y2, x3, y3); cairo_curve_to (gr-cr, x1, y1, x2, y2, x3, y3); gdk_threads_leave(); @@ -1797,7 +1804,9
[cp-patches] [patch] bump Qt version check to 4.1
Hi all, this patch lets us build classpath with Qt-4.1.0 again, released a few days ago. The problem is the reorganization of the Qt include directory which changed from include to include/module, means in our case, include/QtGui and include/QtCore. ok? Andreas P.s, merry Christmas to all! 2005-12-25 Andreas Tobler [EMAIL PROTECTED] * configure.ac (QT_CFLAGS): Check for 4.1.0 version and for QtCore to have the right include flags. Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.121 diff -u -r1.121 configure.ac --- configure.ac3 Dec 2005 16:59:42 - 1.121 +++ configure.ac25 Dec 2005 21:59:38 - @@ -366,7 +366,7 @@ dnl Check for AWT related Qt4 if test x${COMPILE_QT_PEER} = xyes; then -PKG_CHECK_MODULES(QT, QtGui = 4.0.1, HAVE_QT4=yes, HAVE_QT4=no) +PKG_CHECK_MODULES(QT, QtCore QtGui = 4.1.0, HAVE_QT4=yes, HAVE_QT4=no) if test x$HAVE_QT4 = xyes; then dnl Check needed because in some cases the QtGui includedir dnl doesn't contain the subsystem dir. ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] [patch] fix Qt-4.1 build
Hi all, this patch lets us run qt based peers again. The problem is that the function we used to disable double buffering has gone in qt-4.1. It is still documented in the qt manual but marked as to be fixed for qt-4.1.1. As I understand, the doc will be fixed and not the call itself. Ok? Andreas 2005-12-25 Andreas Tobler [EMAIL PROTECTED] * native/jni/qt-peer/mainqtthread.cpp: Remove call to disable double buffering. Ability has gone in Qt-4.1.x. Index: native/jni/qt-peer/mainqtthread.cpp === RCS file: /cvsroot/classpath/classpath/native/jni/qt-peer/mainqtthread.cpp,v retrieving revision 1.3 diff -u -r1.3 mainqtthread.cpp --- native/jni/qt-peer/mainqtthread.cpp 21 Aug 2005 00:19:49 - 1.3 +++ native/jni/qt-peer/mainqtthread.cpp 25 Dec 2005 22:03:43 - @@ -45,9 +45,6 @@ MainThreadInterface *mainThread; QApplication *qApplication; -#if defined(Q_WS_X11) -extern void qt_x11_set_global_double_buffer( bool ); -#endif /** * Starts up a QApplication @@ -92,11 +89,6 @@ jfieldID nofid = env-GetFieldID( cls, mainThreadInterface, J ); env-SetLongField( obj, nofid, (jlong)mainThread ); -#if defined(Q_WS_X11) - // turn off double-buffering. - qt_x11_set_global_double_buffer( (doublebuffer == JNI_TRUE) ); -#endif - return (jlong)qtApp; } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: checking for socklen_t
Christian Thalinger wrote: Hi! I tried to compile classpath on a quite old system: $ uname -a OSF1 mips.complang.tuwien.ac.at V4.0 878 alpha And on this system socklen_t isn't defined. This macro taken from http://ac-archive.sourceforge.net/Miscellaneous/type_socklen_t.html checks for socklen_t and define it to `int' if not found (Andrew Pinski will surely complain here ;-) Well, he hasn't yet, but I'll add my comment here. I'd like to see it as an unsigned int and not an int. Most systems I know use unsigned int for socklen_t. Posix.1g also recommends to use uint32_t for socklen_t. Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: checking for socklen_t
Christian Thalinger wrote: On Sun, 2006-01-01 at 23:42 +0100, Andreas Tobler wrote: Well, he hasn't yet, but I'll add my comment here. I'd like to see it as an unsigned int and not an int. Most systems I know use unsigned int for socklen_t. Posix.1g also recommends to use uint32_t for socklen_t. Well, on this very special OS not even uint32_t is defined. So i'd vote for `unsigned int' if you think we should use unsigned. That's fine with me. uint32_t is more or less 'unsigned int'. Thanks, Andreas ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] [patch] qtpeers, silence some warnings with gcc-4.2
Hello all, the below patch silences this warnings: classpath/native/jni/qt-peer/eventmethods.h:111: warning: deprecated conversion from string constant to 'char*'' There are quite a lot of them. And they pop up in gcc-head. Ok to commit? Andreas 2006-05-26 Andreas Tobler [EMAIL PROTECTED] * native/jni/qt-peer/eventmethods.h (callVoidMethod): Silence warning. (callMouseMethod): Likewise. Index: native/jni/qt-peer/eventmethods.h === RCS file: /cvsroot/classpath/classpath/native/jni/qt-peer/eventmethods.h,v retrieving revision 1.3 diff -u -r1.3 eventmethods.h --- native/jni/qt-peer/eventmethods.h 23 Aug 2005 02:13:48 - 1.3 +++ native/jni/qt-peer/eventmethods.h 26 May 2006 19:10:00 - @@ -1,5 +1,5 @@ /* eventmethods.cpp -- - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,7 +62,7 @@ env-DeleteGlobalRef(componentCls); } - void callVoidMethod(char *methodName) + void callVoidMethod(const char *methodName) { JNIEnv *env; vm-GetEnv((void **)env, JNI_VERSION_1_1); @@ -72,7 +72,7 @@ env-CallVoidMethod( target, fireEventID ); } - void callMouseMethod(char *methodName, + void callMouseMethod(const char *methodName, int modifiers, int x, int y, int clickCount) { JNIEnv *env;
Re: [cp-patches] [patch] qtpeers, silence some warnings with gcc-4.2
Sven de Marothy wrote: On Fri, 2006-05-26 at 15:23 -0600, Tom Tromey wrote: Andreas == Andreas Tobler [EMAIL PROTECTED] writes: Andreas classpath/native/jni/qt-peer/eventmethods.h:111: warning: deprecated Andreas conversion from string constant to 'char*'' Andreas There are quite a lot of them. And they pop up in gcc-head. Andreas Ok to commit? I think it is ok. However, let's wait a couple days in case Sven wants to respond; this is all his code. Looks fine by me, thanks. Committed, thanks! Andreas
[cp-patches] [rfc] add check for Xrender for recent and future functionality.
Hello all, this patch checks for Xrender and adds the LIB and CFLAGS bits to native/jni/gtk-peer. W/o I'm not able to link on darwin-ppc. Without this check I get unresolved symbols from native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c for XRenderQueryExtension. And I will get more unresolved when Sven's patch gets in. Is this ok or do we need some more testing? Thanks, Andreas 2006-05-28 Andreas Tobler [EMAIL PROTECTED] * configure.ac: Add Xrender check, substitute XRENDER_LIBS and XRENDER_CFLAGS. * native/jni/gtk-peer/Makefile.am (AM_LDFLAGS): Add XRENDER_LIBS. (AM_CFLAGS): Add XRENDER_CFLAGS. Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.153 diff -u -r1.153 configure.ac --- configure.ac27 May 2006 21:10:46 - 1.153 +++ configure.ac28 May 2006 20:30:25 - @@ -406,6 +406,7 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 = 2.8 gthread-2.0 = 2.2 gdk-pixbuf-2.0) PKG_CHECK_MODULES(FREETYPE2, freetype2) PKG_CHECK_MODULES(PANGOFT2, pangoft2) +PKG_CHECK_MODULES(XRENDER, xrender = 0.6) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) @@ -413,6 +414,8 @@ AC_SUBST(FREETYPE2_CFLAGS) AC_SUBST(PANGOFT2_LIBS) AC_SUBST(PANGOFT2_CFLAGS) +AC_SUBST(XRENDER_CFLAGS) +AC_SUBST(XRENDER_LIBS) fi dnl Check for AWT related Qt4 Index: native/jni/gtk-peer/Makefile.am === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/Makefile.am,v retrieving revision 1.38 diff -u -r1.38 Makefile.am --- native/jni/gtk-peer/Makefile.am 26 May 2006 16:14:03 - 1.38 +++ native/jni/gtk-peer/Makefile.am 28 May 2006 20:30:25 - @@ -45,12 +45,12 @@ libgtkpeer_la_LIBADD = $(top_builddir)/native/jni/classpath/native_state.lo \ $(top_builddir)/native/jni/classpath/jcl.lo -AM_LDFLAGS = @CLASSPATH_MODULE@ @GTK_LIBS@ @FREETYPE2_LIBS@ \ +AM_LDFLAGS = @CLASSPATH_MODULE@ @GTK_LIBS@ @FREETYPE2_LIBS@ @XRENDER_LIBS@ \ @PANGOFT2_LIBS@ @X_PRE_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ -lX11 -lXtst AM_CPPFLAGS = @CLASSPATH_INCLUDES@ # Just the WARNING_CFLAGS. We cannot use the strict flags since the gtk # headers contain broken prototypes (by design, see gtkitemfactory.h). -AM_CFLAGS = @WARNING_CFLAGS@ @ERROR_CFLAGS@ \ -@GTK_CFLAGS@ @FREETYPE2_CFLAGS@ @PANGOFT2_CFLAGS@ \ +AM_CFLAGS = @WARNING_CFLAGS@ @ERROR_CFLAGS@ @GTK_CFLAGS@ \ +@FREETYPE2_CFLAGS@ @XRENDER_CFLAGS@ @PANGOFT2_CFLAGS@ \ @X_CFLAGS@
Re: [cp-patches] [rfc] add check for Xrender for recent and future functionality.
Sven de Marothy wrote: On Sun, 2006-05-28 at 20:07 -0400, Thomas Fitzsimmons wrote: Can you add to the GdkGraphics2D NEWS entry to mention the new XRENDER dependency? Please commit, Well, we shouldn't really have an Xrender dependency. There's a check there in the code for a reason. So we'll need some #ifdefs in the code to sort this out. The decision value for the ifdef has to be taken from somewhere... You can not use functions which might not be available. You have to check somehow if they are available. The patch I sent is incomplete in this regard. I think we have to define a HAVE_XRENDER or something similar. And then you could use this to make the code dependent. Otherwise you'll always end up with undefined symbols on systems which do not have this function. My problem is maybe only package dependent, but if you have a system lacking the libXrender.x you'll also fail So I think the check should not hurt, it only brings some benefit. I'll extend the check and write a news entry if this is ok. Otherwise we're going to limit cp to systems which silently fullfil the requirements. Means Linux :( Andreas
Re: [cp-patches] [rfc] add check for Xrender for recent and future functionality.
Hi Tom, Thomas Fitzsimmons wrote: would you please try this patch on your platform and commit it if it works? Thanks for the patch, I had something similar in mind. Unfortunately your version doesn't help me, I need to add -lXrender to the X_EXTRA_LIBS then your patch works. Attached the diff. Andreas Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.153 diff -u -r1.153 configure.ac --- configure.ac27 May 2006 21:10:46 - 1.153 +++ configure.ac30 May 2006 19:03:20 - @@ -406,6 +406,12 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 = 2.8 gthread-2.0 = 2.2 gdk-pixbuf-2.0) PKG_CHECK_MODULES(FREETYPE2, freetype2) PKG_CHECK_MODULES(PANGOFT2, pangoft2) +dnl Check if we can link against the XRender library and set +dnl HAVE_XRENDER accordingly. +AC_CHECK_LIB([Xrender], [XRenderQueryExtension], +[AC_DEFINE(HAVE_XRENDER, 1, [Define to 1 if you have libXrender.])[X_EXTRA_LIBS=$X_EXTRA_LIBS -lXrender]], +[true], +[${X_LIBS}]) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c,v retrieving revision 1.4 diff -u -r1.4 gnu_java_awt_peer_gtk_ComponentGraphics.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c 30 May 2006 11:30:02 - 1.4 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c 30 May 2006 19:03:20 - @@ -55,7 +55,7 @@ #include gnu_java_awt_peer_gtk_ComponentGraphics.h -static void +void cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable(GtkWidget *widget, GdkDrawable **draw, GdkWindow **win) { @@ -78,9 +78,11 @@ Java_gnu_java_awt_peer_gtk_ComponentGraphics_hasXRender (JNIEnv *env __attribute__ ((unused)), jclass cls __attribute__ ((unused))) { +#if HAVE_XRENDER int ev = 0, err = 0; if( XRenderQueryExtension (GDK_DISPLAY (), ev, err) ) return JNI_TRUE; +#endif return JNI_FALSE; }
Re: [cp-patches] [rfc] add check for Xrender for recent and future functionality.
Mark Wielaard wrote: On Tue, 2006-05-30 at 21:03 +0200, Andreas Tobler wrote: -static void +void cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable(GtkWidget *widget, GdkDrawable **draw, GdkWindow **win) This really is a static function. Please keep it that way. ld: Undefined symbols: _cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable ? Andreas
Re: [cp-patches] [rfc] add check for Xrender for recent and future functionality.
Mark Wielaard wrote: On Tue, 2006-05-30 at 21:26 +0200, Andreas Tobler wrote: Mark Wielaard wrote: On Tue, 2006-05-30 at 21:03 +0200, Andreas Tobler wrote: -static void +void cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable(GtkWidget *widget, GdkDrawable **draw, GdkWindow **win) This really is a static function. Please keep it that way. ld: Undefined symbols: _cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable ? Yeah, that is strange. When do you get that? Well, we use it in gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c and in gnu_java_awt_peer_gtk_ComponentGraphics.c. So for me it's only usable in gnu_java_awt_peer_gtk_ComponentGraphics.c I may don't understand it... Thanks, Andreas
Re: [cp-patches] [rfc] add check for Xrender for recent and future functionality.
Mark Wielaard wrote: Hi, On Tue, 2006-05-30 at 22:43 +0200, Andreas Tobler wrote: This really is a static function. Please keep it that way. ld: Undefined symbols: _cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable ? Yeah, that is strange. When do you get that? Well, we use it in gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c and in gnu_java_awt_peer_gtk_ComponentGraphics.c. So for me it's only usable in gnu_java_awt_peer_gtk_ComponentGraphics.c I may don't understand it... OK, we figured it out. This patch and a patch from Sven to implement ComponentGraphicsCopy crossed meaning that the cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable function is now indeed non-static. Which does mean that if we mark it as non-static it has to have a common function prototype in gtkpeer.h. Would this be something usable? Andreas 2006-05-31 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c (cp_gtk_grab_current_drawable): Rename cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable to cp_gtk_grab_current_drawable, remove static declaration. (Java_gnu_java_awt_peer_gtk_ComponentGraphics_initState): Renamed above function. (Java_gnu_java_awt_peer_gtk_ComponentGraphics_copyAreaNative): Likewise. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c: Remove prototype of cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable. (Java_gnu_java_awt_peer_gtk_ComponentGraphicsCopy_getPixbuf): Rename function. (Java_gnu_java_awt_peer_gtk_ComponentGraphicsCopy_copyPixbuf): Likewise. * native/jni/gtk-peer/gtkpeer.h: Add prototype for cp_gtk_grab_current_drawable here. Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c,v retrieving revision 1.7 diff -u -r1.7 gnu_java_awt_peer_gtk_ComponentGraphics.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c 31 May 2006 20:29:41 - 1.7 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c 31 May 2006 20:36:20 - @@ -55,10 +55,9 @@ #include gnu_java_awt_peer_gtk_ComponentGraphics.h -static void -cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable(GtkWidget *widget, - GdkDrawable **draw, GdkWindow **win) -{ +void cp_gtk_grab_current_drawable(GtkWidget *widget, GdkDrawable **draw, + GdkWindow **win) +{ g_assert (widget != NULL); g_assert (draw != NULL); g_assert (win != NULL); @@ -110,7 +109,7 @@ widget = GTK_WIDGET (ptr); g_assert (widget != NULL); - cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable (widget, drawable, win); + cp_gtk_grab_current_drawable (widget, drawable, win); g_assert (drawable != NULL); width = widget-allocation.width; @@ -171,7 +170,7 @@ widget = GTK_WIDGET (ptr); g_assert (widget != NULL); - cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable (widget, drawable, win); + cp_gtk_grab_current_drawable (widget, drawable, win); g_assert (drawable != NULL); pixbuf = gdk_pixbuf_new( GDK_COLORSPACE_RGB, TRUE, 8, w, h ); Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c,v retrieving revision 1.2 diff -u -r1.2 gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c 30 May 2006 11:30:02 - 1.2 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c 31 May 2006 20:36:20 - @@ -53,8 +53,6 @@ #include gnu_java_awt_peer_gtk_ComponentGraphicsCopy.h -void cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable(GtkWidget *widget, GdkDrawable **draw, GdkWindow **win); - JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_ComponentGraphicsCopy_getPixbuf (JNIEnv *env, jobject obj __attribute__((unused)), @@ -75,7 +73,7 @@ widget = GTK_WIDGET (ptr); g_assert (widget != NULL); - cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable (widget, drawable, win); + cp_gtk_grab_current_drawable (widget, drawable, win); g_assert (drawable != NULL); pixbuf = cp_gtk_image_get_pixbuf( env, image ); @@ -115,7 +113,7 @@ widget = GTK_WIDGET (ptr); g_assert (widget != NULL); - cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable (widget, drawable, win); + cp_gtk_grab_current_drawable (widget, drawable, win); g_assert (drawable != NULL); pixbuf = cp_gtk_image_get_pixbuf( env, image ); Index: native/jni/gtk-peer/gtkpeer.h
Re: [cp-patches] [rfc] add check for Xrender for recent and future functionality.
Hello, I committed the attached patch. Andreas 2006-05-31 Thomas Fitzsimmons [EMAIL PROTECTED] Andreas Tobler [EMAIL PROTECTED] * configure.ac: Check for libXrender when the GTK peers are enabled, and set HAVE_XRENDER accordingly. Add -lXrender to X_EXTRA_LIBS. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c (Java_gnu_java_awt_peer_gtk_ComponentGraphics_hasXRender) [HAVE_XRENDER]: Call XRenderQueryExtension conditionally. Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.153 diff -u -r1.153 configure.ac --- configure.ac27 May 2006 21:10:46 - 1.153 +++ configure.ac31 May 2006 20:25:04 - @@ -406,6 +406,12 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 = 2.8 gthread-2.0 = 2.2 gdk-pixbuf-2.0) PKG_CHECK_MODULES(FREETYPE2, freetype2) PKG_CHECK_MODULES(PANGOFT2, pangoft2) +dnl Check if we can link against the XRender library and set +dnl HAVE_XRENDER accordingly. +AC_CHECK_LIB([Xrender], [XRenderQueryExtension], +[AC_DEFINE(HAVE_XRENDER, 1, [Define to 1 if you have libXrender.])[X_EXTRA_LIBS=$X_EXTRA_LIBS -lXrender]], +[true], +[${X_LIBS}]) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c,v retrieving revision 1.6 diff -u -r1.6 gnu_java_awt_peer_gtk_ComponentGraphics.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c 30 May 2006 21:20:43 - 1.6 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c 31 May 2006 20:25:04 - @@ -77,10 +77,12 @@ JNIEXPORT jboolean JNICALL Java_gnu_java_awt_peer_gtk_ComponentGraphics_hasXRender (JNIEnv *env __attribute__ ((unused)), jclass cls __attribute__ ((unused))) -{ +{ +#if HAVE_XRENDER int ev = 0, err = 0; if( XRenderQueryExtension (GDK_DISPLAY (), ev, err) ) return JNI_TRUE; +#endif return JNI_FALSE; }
Re: [cp-patches] [rfc] add check for Xrender for recent and future functionality.
Thomas Fitzsimmons wrote: Andreas Tobler wrote: Mark Wielaard wrote: Hi, On Tue, 2006-05-30 at 22:43 +0200, Andreas Tobler wrote: This really is a static function. Please keep it that way. ld: Undefined symbols: _cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable ? Yeah, that is strange. When do you get that? Well, we use it in gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c and in gnu_java_awt_peer_gtk_ComponentGraphics.c. So for me it's only usable in gnu_java_awt_peer_gtk_ComponentGraphics.c I may don't understand it... OK, we figured it out. This patch and a patch from Sven to implement ComponentGraphicsCopy crossed meaning that the cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable function is now indeed non-static. Which does mean that if we mark it as non-static it has to have a common function prototype in gtkpeer.h. Would this be something usable? Andreas 2006-05-31 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c (cp_gtk_grab_current_drawable): Rename cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable to cp_gtk_grab_current_drawable, remove static declaration. (Java_gnu_java_awt_peer_gtk_ComponentGraphics_initState): Renamed above function. (Java_gnu_java_awt_peer_gtk_ComponentGraphics_copyAreaNative): Likewise. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c: Remove prototype of cp_java_awt_peer_gtk_ComponentGraphics_grab_current_drawable. (Java_gnu_java_awt_peer_gtk_ComponentGraphicsCopy_getPixbuf): Rename function. (Java_gnu_java_awt_peer_gtk_ComponentGraphicsCopy_copyPixbuf): Likewise. * native/jni/gtk-peer/gtkpeer.h: Add prototype for cp_gtk_grab_current_drawable here. [snip] Yes, please commit. Thanks. Do so asap. It would also be nice if scripts/check_jni_methods.sh checked that all public symbols in libgtkpeer.so were prefixed appropriately. If you have the GNU tools installed, you could just nm for this: nm --dynamic --defined-only --extern-only libgtkpeer.so Hm, as mentionend, GNU tools. Cause darwin nm doesn't like the options. Doing this, I just noticed CairoGraphics2D_getCairoT is exported but not properly prefixed. Want to fix this one too? You mean s/CairoGraphics2D_getCairoT/Java_gnu_java_awt_peer_gtk_CairoGraphics2D_getCairoT I see how it fits in my schedule ;) Andreas
[cp-patches] Re: [patch] prefix CairoGraphics2D_getCairoT correctly
Thomas Fitzsimmons wrote: - cr = CairoGraphics2D_getCairoT(env, cairographics); + cr = Java_gnu_java_awt_peer_gtk_CairoGraphics2D_getCairoT(env, cairographics); Shouldn't the prefix be cp_gtk_ since this is not a JNI method implementation? Gosh, I got disturbed by my youngest being hungry. Sure. Better ? Andreas 2006-06-01 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/cairographics2d.h: Rename/prefix function CairoGraphics2D_getCairoT to cp_gtk_getCairoT correctly. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c (Java_gnu_java_awt_peer_gtk_CairoSurface_drawSurface): Rename function CairoGraphics2D_getCairoT to cp_gtk_getCairoT. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c (Java_gnu_java_awt_peer_gtk_GdkTextLayout_cairoDrawGdkTextLayout): Likewise. Index: native/jni/gtk-peer/cairographics2d.h === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/cairographics2d.h,v retrieving revision 1.1 diff -u -r1.1 cairographics2d.h --- native/jni/gtk-peer/cairographics2d.h 29 May 2006 16:14:59 - 1.1 +++ native/jni/gtk-peer/cairographics2d.h 31 May 2006 22:17:53 - @@ -113,6 +113,7 @@ char *pattern_pixels; }; -cairo_t *CairoGraphics2D_getCairoT(JNIEnv *env, jobject cairographics2dobj); +cairo_t *cp_gtk_getCairoT(JNIEnv *env, + jobject cairographics2dobj); #endif Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c,v retrieving revision 1.3 diff -u -r1.3 gnu_java_awt_peer_gtk_CairoGraphics2D.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c 30 May 2006 11:30:02 - 1.3 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c 31 May 2006 22:17:53 - @@ -71,7 +71,8 @@ * Returns the cairo_t * associated with a CairoGraphics2D object, * This is used by GdkTextLayout. */ -cairo_t *CairoGraphics2D_getCairoT(JNIEnv *env, jobject cairographics2dobj) +cairo_t *cp_gtk_getCairoT(JNIEnv *env, + jobject cairographics2dobj) { struct cairographics2d *gr = getPointer(env, cairographics2dobj); g_assert(gr != NULL); Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c,v retrieving revision 1.12 diff -u -r1.12 gnu_java_awt_peer_gtk_GdkTextLayout.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c 30 May 2006 11:30:02 - 1.12 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c 31 May 2006 22:17:53 - @@ -232,7 +232,7 @@ g_assert (cairographics != NULL); - cr = CairoGraphics2D_getCairoT(env, cairographics); + cr = cp_gtk_getCairoT(env, cairographics); tl = (struct textlayout *)NSA_GET_TEXT_LAYOUT_PTR (env, obj); g_assert (cr != NULL);
[cp-patches] Re: [patch] prefix CairoGraphics2D_getCairoT correctly
Thomas Fitzsimmons wrote: Andreas Tobler wrote: Thomas Fitzsimmons wrote: - cr = CairoGraphics2D_getCairoT(env, cairographics); + cr = Java_gnu_java_awt_peer_gtk_CairoGraphics2D_getCairoT(env, cairographics); Shouldn't the prefix be cp_gtk_ since this is not a JNI method implementation? Gosh, I got disturbed by my youngest being hungry. Sure. Better ? Yes, though I'd prefer the name to be all C-style, like cp_gtk_get_cairo_t. Ok to commit with this change? Thanks! Andreas 2006-06-01 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/cairographics2d.h: Rename/prefix function CairoGraphics2D_getCairoT to cp_gtk_get_cairo_t correctly. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c (Java_gnu_java_awt_peer_gtk_CairoSurface_drawSurface): Rename function CairoGraphics2D_getCairoT to cp_gtk_get_cairo_t. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c (Java_gnu_java_awt_peer_gtk_GdkTextLayout_cairoDrawGdkTextLayout): Likewise. Index: native/jni/gtk-peer/cairographics2d.h === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/cairographics2d.h,v retrieving revision 1.1 diff -u -r1.1 cairographics2d.h --- native/jni/gtk-peer/cairographics2d.h 29 May 2006 16:14:59 - 1.1 +++ native/jni/gtk-peer/cairographics2d.h 31 May 2006 22:32:25 - @@ -113,6 +113,7 @@ char *pattern_pixels; }; -cairo_t *CairoGraphics2D_getCairoT(JNIEnv *env, jobject cairographics2dobj); +cairo_t *cp_gtk_get_cairo_t(JNIEnv *env, + jobject cairographics2dobj); #endif Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c,v retrieving revision 1.3 diff -u -r1.3 gnu_java_awt_peer_gtk_CairoGraphics2D.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c 30 May 2006 11:30:02 - 1.3 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c 31 May 2006 22:32:25 - @@ -71,7 +71,8 @@ * Returns the cairo_t * associated with a CairoGraphics2D object, * This is used by GdkTextLayout. */ -cairo_t *CairoGraphics2D_getCairoT(JNIEnv *env, jobject cairographics2dobj) +cairo_t *cp_gtk_get_cairo_t(JNIEnv *env, + jobject cairographics2dobj) { struct cairographics2d *gr = getPointer(env, cairographics2dobj); g_assert(gr != NULL); Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c,v retrieving revision 1.12 diff -u -r1.12 gnu_java_awt_peer_gtk_GdkTextLayout.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c 30 May 2006 11:30:02 - 1.12 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c 31 May 2006 22:32:25 - @@ -232,7 +232,7 @@ g_assert (cairographics != NULL); - cr = CairoGraphics2D_getCairoT(env, cairographics); + cr = cp_gtk_get_cairo_t(env, cairographics); tl = (struct textlayout *)NSA_GET_TEXT_LAYOUT_PTR (env, obj); g_assert (cr != NULL);
Re: [cp-patches] Cleanup new compiler warnings
Hi Mark, Mark Wielaard wrote: * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c (Java_gnu_java_awt_peer_gtk_GdkTextLayout_cairoDrawGdkTextLayout): Remove unused cairographics2d struct. (_moveTo, _lineTo, _quadTo, _curveTo): Mark arguments const. This part results in new warnings on my side. What is your freetype2 version? Do we need a special version? The one I have on linux-ppc (FC4) and darwin-ppc has no const qualifiers in the freetype2/freetype/ftimage.h for these functions. Yours seem to have. I saw in the cvs of freetype2 that there are now. Any thoughts on this? Thanks. Andreas
[cp-patches] cleanup hardcoded Xlibs
Hello all, this patch makes some X11 libs dependent on configury. And removes hardcoded Makefile.am entries. Ok? Thanks, Andreas 2006-06-02 Andreas Tobler [EMAIL PROTECTED] * configure.ac: Add -lX11 and -lXtst to XTEST_LIBS. (XTEST_LIBS): New, substitute. * native/jni/gtk-peer/Makefile.am (AM_LDFLAGS): Add XTEST_LIBS. Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.154 diff -u -r1.154 configure.ac --- configure.ac31 May 2006 20:29:41 - 1.154 +++ configure.ac1 Jun 2006 22:07:44 - @@ -400,9 +400,11 @@ AC_MSG_ERROR([GTK+ peers requested but no X library available]) fi dnl We explicitly want the XTest Extension for Robot support. -AC_CHECK_LIB([Xtst], [XTestQueryExtension], [true], - [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])], - [${X_LIBS}]) +AC_CHECK_LIB([Xtst], [XTestQueryExtension], +[XTEST_LIBS=$XTEST_LIBS -lX11 -lXtst], +[AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])], +[${X_LIBS}]) + PKG_CHECK_MODULES(GTK, gtk+-2.0 = 2.8 gthread-2.0 = 2.2 gdk-pixbuf-2.0) PKG_CHECK_MODULES(FREETYPE2, freetype2) PKG_CHECK_MODULES(PANGOFT2, pangoft2) @@ -419,6 +421,7 @@ AC_SUBST(FREETYPE2_CFLAGS) AC_SUBST(PANGOFT2_LIBS) AC_SUBST(PANGOFT2_CFLAGS) +AC_SUBST(XTEST_LIBS) fi dnl Check for AWT related Qt4 Index: native/jni/gtk-peer/Makefile.am === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/Makefile.am,v retrieving revision 1.41 diff -u -r1.41 Makefile.am --- native/jni/gtk-peer/Makefile.am 30 May 2006 14:27:20 - 1.41 +++ native/jni/gtk-peer/Makefile.am 1 Jun 2006 22:07:44 - @@ -50,7 +50,7 @@ $(top_builddir)/native/jni/classpath/jcl.lo AM_LDFLAGS = @CLASSPATH_MODULE@ @GTK_LIBS@ @FREETYPE2_LIBS@ \ - @PANGOFT2_LIBS@ @X_PRE_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ -lX11 -lXtst + @PANGOFT2_LIBS@ @X_PRE_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ @XTEST_LIBS@ AM_CPPFLAGS = @CLASSPATH_INCLUDES@ # Just the WARNING_CFLAGS. We cannot use the strict flags since the gtk
Re: [cp-patches] cleanup hardcoded Xlibs
Sven de Marothy wrote: On Fri, 2006-06-02 at 00:12 +0200, Andreas Tobler wrote: Hello all, this patch makes some X11 libs dependent on configury. And removes hardcoded Makefile.am entries. Ok? Thanks, Andreas Good good. Thanks! I found a follow up which I missed last night. Also ok? Andreas 2006-06-02 Andreas Tobler [EMAIL PROTECTED] * native/jawt/Makefile.am (AM_LDFLAGS): Add XTEST_LIBS. Index: native/jawt/Makefile.am === RCS file: /cvsroot/classpath/classpath/native/jawt/Makefile.am,v retrieving revision 1.6 diff -u -r1.6 Makefile.am --- native/jawt/Makefile.am 26 May 2006 17:41:18 - 1.6 +++ native/jawt/Makefile.am 2 Jun 2006 21:07:46 - @@ -3,7 +3,7 @@ libjawt_la_SOURCES = jawt.c libjawt_la_LIBADD = $(top_builddir)/native/jni/gtk-peer/libgtkpeer.la -AM_LDFLAGS = @CLASSPATH_MODULE@ @GTK_LIBS@ @PANGOFT2_LIBS@ @X_LIBS@ -lXtst +AM_LDFLAGS = @CLASSPATH_MODULE@ @GTK_LIBS@ @PANGOFT2_LIBS@ @X_LIBS@ @XTEST_LIBS@ AM_CPPFLAGS = @CLASSPATH_INCLUDES@ # Just the WARNING_CFLAGS. We cannot use the strict flags since the gtk
Re: [cp-patches] fix image handling on big endian systems
Andreas Tobler wrote: Hello all, this patch brings the image handling back to work on big endian systems. Please check on a little endian system! I hope the comments in the code are ok. Ok to commit? Commited after review test by Sven. Thanks Andreas Andreas 2006-06-27 Andreas Tobler [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/CairoSurface.java: Swap the data from the GdkPixbuf correctly on big endian systems. Fix a typo in the little endian swapping code. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c (Java_gnu_java_awt_peer_gtk_GtkImage_getPixels): Swap the pixeldata without alpha information correctly on big endian systems.
[cp-patches] [patch] PR28369
Hello all, I'll commit this one asap. Thanks to Sven_M! This fixes PR 28369 on big and little endian platforms. Andreas 2006-07-13 Andreas Tobler [EMAIL PROTECTED] PR awt/28369: * gnu/java/awt/peer/gtk/CairoSurface.java (ColorModel): Swap red and blue mask. Index: gnu/java/awt/peer/gtk/CairoSurface.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/CairoSurface.java,v retrieving revision 1.11 diff -u -r1.11 CairoSurface.java --- gnu/java/awt/peer/gtk/CairoSurface.java 28 Jun 2006 19:47:42 - 1.11 +++ gnu/java/awt/peer/gtk/CairoSurface.java 13 Jul 2006 21:39:00 - @@ -80,10 +80,10 @@ long bufferPointer; - static ColorModel nativeModel = new DirectColorModel(32, - 0x00FF, - 0xFF00, + static ColorModel nativeModel = new DirectColorModel(32, 0x00FF, + 0xFF00, + 0x00FF, 0xFF00); /**
[cp-patches] workaround jikes build error
Hello all, this patch brings classpath again to work with jikes. Ok for head? Andreas 2006-07-17 Andreas Tobler [EMAIL PROTECTED] * javax/swing/text/html/HTMLEditorKit.java: Rearrange import statements to make it compile again under jikes. Note added. Index: javax/swing/text/html/HTMLEditorKit.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/HTMLEditorKit.java,v retrieving revision 1.31 diff -u -r1.31 HTMLEditorKit.java --- javax/swing/text/html/HTMLEditorKit.java16 Jul 2006 15:03:08 - 1.31 +++ javax/swing/text/html/HTMLEditorKit.java17 Jul 2006 19:49:27 - @@ -40,8 +40,6 @@ import gnu.classpath.NotImplementedException; -import gnu.javax.swing.text.html.parser.GnuParserDelegator; -import gnu.javax.swing.text.html.parser.HTML_401Swing; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; @@ -73,6 +71,11 @@ import javax.swing.text.ViewFactory; import javax.swing.text.html.parser.ParserDelegator; +/* Move these imports here after javax.swing.text.html to make it compile + with jikes. */ +import gnu.javax.swing.text.html.parser.GnuParserDelegator; +import gnu.javax.swing.text.html.parser.HTML_401Swing; + /** * @author Lillian Angel (langel at redhat dot com) */
[cp-patches] cleanup imports in gnu/java/awt/peer/gtk
Hello all, writing the CL took more time than the patch itself. Built with ecj and jikes. Ok for head? Andreas 2006-07-18 Andreas Tobler [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/BufferedImageGraphics.java: Remove unneeded imports. * gnu/java/awt/peer/gtk/CairoSurface.java: Likewise. * gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java: Likewise. * gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java: Likewise. * gnu/java/awt/peer/gtk/GdkFontPeer.java: Likewise. * gnu/java/awt/peer/gtk/GdkPixbufDecoder.java: Likewise. * gnu/java/awt/peer/gtk/GtkButtonPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkClipboardNotifier.java: Likewise. * gnu/java/awt/peer/gtk/GtkComponentPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkContainerPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkDialogPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkFramePeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkImage.java: Likewise. * gnu/java/awt/peer/gtk/GtkImageConsumer.java: Likewise. * gnu/java/awt/peer/gtk/GtkMenuBarPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkMenuItemPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkPanelPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkScrollbarPeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkWindowPeer.java: Likewise. * gnu/java/awt/peer/gtk/VolatileImageGraphics.java: Likewise. Index: gnu/java/awt/peer/gtk/BufferedImageGraphics.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/BufferedImageGraphics.java,v retrieving revision 1.7 diff -u -r1.7 BufferedImageGraphics.java --- gnu/java/awt/peer/gtk/BufferedImageGraphics.java2 Jun 2006 22:57:31 - 1.7 +++ gnu/java/awt/peer/gtk/BufferedImageGraphics.java17 Jul 2006 22:13:42 - @@ -40,10 +40,8 @@ import java.awt.Color; import java.awt.Graphics; -import java.awt.Graphics2D; import java.awt.GraphicsConfiguration; import java.awt.Image; -import java.awt.Point; import java.awt.Rectangle; import java.awt.Shape; import java.awt.font.GlyphVector; Index: gnu/java/awt/peer/gtk/CairoSurface.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/CairoSurface.java,v retrieving revision 1.12 diff -u -r1.12 CairoSurface.java --- gnu/java/awt/peer/gtk/CairoSurface.java 13 Jul 2006 21:44:12 - 1.12 +++ gnu/java/awt/peer/gtk/CairoSurface.java 17 Jul 2006 22:13:43 - @@ -38,27 +38,16 @@ package gnu.java.awt.peer.gtk; -import java.awt.Graphics; -import java.awt.Color; -import java.awt.Image; import java.awt.Point; import java.awt.Graphics2D; -import java.awt.GraphicsConfiguration; import java.awt.image.DataBuffer; import java.awt.image.Raster; import java.awt.image.WritableRaster; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.DirectColorModel; -import java.io.File; -import java.io.IOException; import java.nio.ByteOrder; import java.util.Hashtable; -import java.util.Vector; -import java.io.ByteArrayOutputStream; -import java.io.BufferedInputStream; -import java.net.URL; -import gnu.classpath.Pointer; /** * CairoSurface - wraps a Cairo surface. Index: gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java,v retrieving revision 1.6 diff -u -r1.6 CairoSurfaceGraphics.java --- gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java 12 Jun 2006 21:10:11 - 1.6 +++ gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java 17 Jul 2006 22:13:43 - @@ -39,14 +39,9 @@ package gnu.java.awt.peer.gtk; import java.awt.Graphics; -import java.awt.Color; import java.awt.GraphicsEnvironment; -import java.awt.Image; -import java.awt.Point; -import java.awt.Graphics2D; import java.awt.GraphicsConfiguration; import java.awt.geom.Rectangle2D; -import java.awt.image.*; /** * Implementation of Graphics2D on a Cairo surface. Index: gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java,v retrieving revision 1.2 diff -u -r1.2 ComponentGraphicsCopy.java --- gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java4 Jun 2006 19:44:39 - 1.2 +++ gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java17 Jul 2006 22:13:43 - @@ -39,17 +39,11 @@ package gnu.java.awt.peer.gtk; import java.awt.Color; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.GraphicsConfiguration; import java.awt.Image
Re: [cp-patches] [RFC] speed up CairoSurface
Hi Mark, Mark Wielaard wrote: On Sat, 2006-07-22 at 00:00 +0200, Andreas Tobler wrote: But he also suggested to reorganise the code path to check for (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) only once and not for all pixels. Thanks Assen! I attach a patch which does this. The improvement is not bad, around a factor 5 for a BufferedImage 816x616 RGBA. Comments? Ok for head? Seems like a good idea! Just one coding style nitpick: Thanks for doing this! + } else { + for (int i = 0; i data.length; i++ ) + { That should be: } else { for (int i = 0; i data.length; i++) { But looks fine otherwise. Thanks, Thanks, committed. Andreas Index: gnu/java/awt/peer/gtk/CairoSurface.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/CairoSurface.java,v retrieving revision 1.13 diff -u -r1.13 CairoSurface.java --- gnu/java/awt/peer/gtk/CairoSurface.java 17 Jul 2006 22:41:03 - 1.13 +++ gnu/java/awt/peer/gtk/CairoSurface.java 21 Jul 2006 22:38:01 - @@ -175,9 +175,9 @@ int[] data = image.getPixels(); // Swap ordering from GdkPixbuf to Cairo -for(int i = 0; i data.length; i++ ) +if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) { - if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) + for (int i = 0; i data.length; i++ ) { // On a big endian system we get a RRGGBBAA data array. int alpha = (data[i] 0xFF); @@ -195,7 +195,10 @@ | ( b 0x00FF); } } - else + } +else + { + for (int i = 0; i data.length; i++ ) { // On a little endian system we get a AABBGGRR data array. int alpha = (data[i] 0xFF00) 24;
[cp-patches] [RFT] another CairoSurface optimization
Hello all, Assen pointed out that this code could be optimized a bit more. Here the result. Would some Little Endian hackers please test if it still works ? Thanks to Assen. Ok for head if it works on LE too? Andreas 2006-07-22 Andreas Tobler [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/CairoSurface.java: Optimize pixel swap code a bit more. Index: gnu/java/awt/peer/gtk/CairoSurface.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/CairoSurface.java,v retrieving revision 1.14 diff -u -r1.14 CairoSurface.java --- gnu/java/awt/peer/gtk/CairoSurface.java 21 Jul 2006 22:51:38 - 1.14 +++ gnu/java/awt/peer/gtk/CairoSurface.java 22 Jul 2006 12:58:48 - @@ -180,19 +180,13 @@ for (int i = 0; i data.length; i++ ) { // On a big endian system we get a RRGGBBAA data array. - int alpha = (data[i] 0xFF); + int alpha = data[i] 0xFF; if( alpha == 0 ) // I do not know why we need this, but it works. data[i] = 0; else { - int r = (((data[i] 0xFF00) 24)); - int g = (((data[i] 0x00FF) 16)); - int b = (((data[i] 0xFF00) 8)); // Cairo needs a ARGB32 native array. - data[i] = (( alpha 24 ) 0xFF00) - | (( r 16 ) 0x00FF) - | (( g 8 ) 0xFF00) - | ( b 0x00FF); + data[i] = (data[i] 8) | (alpha 24); } } } @@ -201,19 +195,16 @@ for (int i = 0; i data.length; i++ ) { // On a little endian system we get a AABBGGRR data array. - int alpha = (data[i] 0xFF00) 24; + int alpha = data[i] 0xFF00; if( alpha == 0 ) // I do not know why we need this, but it works. data[i] = 0; else { - int b = (((data[i] 0x00FF) 16)); - int g = (((data[i] 0xFF00) 8)); - int r = ((data[i] 0x00FF)); + int b = (data[i] 0xFF) 16; + int g = (data[i] 0xFF00); + int r = (data[i] 0xFF) 16; // Cairo needs a ARGB32 native array. - data[i] = (( alpha 24 ) 0xFF00) - | (( r 16 ) 0x00FF) - | (( g 8 ) 0xFF00) - | ( b 0x00FF); + data[i] = alpha | r | g | b; } } }
[cp-patches] cleanup CairoGraphics2D.c a bit more
Hello all, this patchlet marks some unused variables and removes some unnecessary checks on it. ok? Andreas 2006-07-26 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoSetMatrix): Remove g_assert from unused obj. (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector): Mark obj as unused and remove g_assert on it. Index: gnu_java_awt_peer_gtk_CairoGraphics2D.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c,v retrieving revision 1.12 diff -u -r1.12 gnu_java_awt_peer_gtk_CairoGraphics2D.c --- gnu_java_awt_peer_gtk_CairoGraphics2D.c 12 Jul 2006 20:28:43 - 1.12 +++ gnu_java_awt_peer_gtk_CairoGraphics2D.c 26 Jul 2006 21:39:00 - @@ -239,7 +239,6 @@ { jdouble *native_matrix = NULL; struct cairographics2d *gr = JLONG_TO_PTR(struct cairographics2d, pointer); - g_assert (obj != NULL); g_assert (gr != NULL); native_matrix = (*env)-GetDoubleArrayElements (env, java_matrix, NULL); @@ -275,7 +274,7 @@ JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector -(JNIEnv *env, jobject obj, jlong pointer, +(JNIEnv *env, jobject obj __attribute__((unused)), jlong pointer, jobject font, jfloat x, jfloat y, jint n, jintArray java_codes, @@ -289,7 +288,6 @@ float *native_positions; jint i = 0; - g_assert (obj != NULL); g_assert (java_codes != NULL); g_assert (java_positions != NULL);
[cp-patches] committed fix for BasicStroke.java
Hello all, I just committed the following patch to make compilation work again. Thanks to gnu_andrew :) Andreas 2006-08-04 Andreas Tobler [EMAIL PROTECTED] * java/awt/BasicStroke.java (dashedStroke): Cast coords.clone to double[]. Index: java/awt/BasicStroke.java === RCS file: /cvsroot/classpath/classpath/java/awt/BasicStroke.java,v retrieving revision 1.16 diff -u -r1.16 BasicStroke.java --- java/awt/BasicStroke.java 4 Aug 2006 20:42:42 - 1.16 +++ java/awt/BasicStroke.java 4 Aug 2006 21:59:28 - @@ -554,7 +554,7 @@ // segment spans a dash boundry else { -segmentEnd = coords.clone(); +segmentEnd = (double[]) coords.clone(); // Calculate the remaining distance in this dash, // and coordinates of the dash boundary
[cp-patches] [patch] native GdkPixbufDecoder cleanup some leaks
Hi all, here a patchlet which needs a review. The first one seems obvious, the others are maybe looking for a more elegant way. Ideas? Here it saves in a little app around 400 bytes, yes I know, not much Thanks, Andreas 2006-08-11 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c (query_formats): g_free 'name' after usage. g_strfreev 'ch', the gdk_pixbuf_format_get_extensions instance. g_strfreev 'ch', the gdk_pixbuf_format_get_mime_types instance. Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c,v retrieving revision 1.23 diff -u -r1.23 gnu_java_awt_peer_gtk_GdkPixbufDecoder.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c11 Jun 2006 22:02:14 - 1.23 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c11 Aug 2006 21:36:26 - @@ -210,7 +210,8 @@ jobject jformat; GSList *formats, *f; GdkPixbufFormat *format; - char **ch, *name; + gchar **ch, *name; + gint count; jclass formatClass; jmethodID addExtensionID; @@ -240,14 +241,16 @@ string = (*env)-NewStringUTF(env, name); g_assert(string != NULL); - jformat = (*env)-CallStaticObjectMethod + jformat = (*env)-CallStaticObjectMethod (env, clazz, registerFormatID, string, (jboolean) gdk_pixbuf_format_is_writable(format)); (*env)-DeleteLocalRef(env, string); + g_free(name); g_assert(jformat != NULL); - + ch = gdk_pixbuf_format_get_extensions(format); + count = 0; while (*ch) { string = (*env)-NewStringUTF(env, *ch); @@ -255,9 +258,12 @@ (*env)-CallVoidMethod (env, jformat, addExtensionID, string); (*env)-DeleteLocalRef(env, string); ++ch; + ++count; } - + g_strfreev(ch - count); + ch = gdk_pixbuf_format_get_mime_types(format); + count = 0; while (*ch) { string = (*env)-NewStringUTF(env, *ch); @@ -265,12 +271,13 @@ (*env)-CallVoidMethod (env, jformat, addMimeTypeID, string); (*env)-DeleteLocalRef(env, string); ++ch; + ++count; } - + g_strfreev(ch - count); (*env)-DeleteLocalRef(env, jformat); } - - g_slist_free(formats); + + g_slist_free(formats); }
[cp-patches] fix darwin cvs build
Hello all, the attached patch fixes the current cvs on darwin-ppc. Not tested on functionality yet. But it builds :) Build tested on darwin-ppc and linux-pcc. Other archs, sparc-solaris and hpux maybe tested later. Ok? Andreas P.S, the SYNC bits are taken from gcc/libjava. 2006-08-28 Andreas Tobler [EMAIL PROTECTED] * configure.ac: Add check for gethostbyname_r. Add check for MSG_NOSIGNAL and SO_NOSIGPIPE. * native/jni/native-lib/cpnet.c (SOCKET_NOSIGNAL): Define SOCKET_NOSIGNAL according to the configure check. (cpnet_send): Use SOCKET_NOSIGNAL. (cpnet_sendTo): Likewise. (cpnet_getHostByName): Use gethostbyname in case gethostbyname_r is not defined. * native/jni/native-lib/cpio.c: Define O_SYNC and O_DSYNC in case they are not available. Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.180 diff -u -r1.180 configure.ac --- configure.ac21 Aug 2006 23:34:43 - 1.180 +++ configure.ac28 Aug 2006 20:00:56 - @@ -368,7 +368,7 @@ lseek fstat read write htonl memset htons connect \ getsockname getpeername bind listen accept \ recvfrom send sendto setsockopt getsockopt time mktime \ - localtime_r \ + gethostbyname_r localtime_r \ strerror_r \ fcntl \ mmap munmap mincore msync madvise getpagesize sysconf \ @@ -550,6 +550,28 @@ AC_SUBST(QT_CFLAGS) AC_SUBST(QT_LIBS) fi + dnl ** + dnl Check for MSG_NOSIGNAL + dnl ** + AC_MSG_CHECKING(for MSG_NOSIGNAL) + AC_TRY_COMPILE([#include sys/socket.h], + [ int f = MSG_NOSIGNAL; ], + [ AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, + [Define this symbol if you have MSG_NOSIGNAL]) ], + [ AC_MSG_RESULT(no)] + ) + dnl ** + dnl Check for SO_NOSIGPIPE (Darwin equivalent for MSG_NOSIGNAL) + dnl ** + AC_MSG_CHECKING(for SO_NOSIGPIPE ) + AC_TRY_COMPILE([#include sys/socket.h], + [ int f = SO_NOSIGPIPE; ], + [ AC_MSG_RESULT(yes) +AC_DEFINE(HAVE_SO_NOSIGPIPE, 1, + [Define this symbol if you have SO_NOSIGPIPE]) ], + [ AC_MSG_RESULT(no)] + ) dnl Check for plugin support headers and libraries. if test x${COMPILE_PLUGIN} = xyes; then Index: native/jni/native-lib/cpio.c === RCS file: /cvsroot/classpath/classpath/native/jni/native-lib/cpio.c,v retrieving revision 1.2 diff -u -r1.2 cpio.c --- native/jni/native-lib/cpio.c21 Aug 2006 23:34:46 - 1.2 +++ native/jni/native-lib/cpio.c28 Aug 2006 20:00:56 - @@ -76,6 +76,18 @@ #include cpnative.h #include cpio.h +/* Some POSIX systems don't have O_SYNC and O_DYSNC so we define them here. */ +#if !defined (O_SYNC) defined (O_FSYNC) +#define O_SYNC O_FSYNC +#endif +#if !defined (O_DSYNC) defined (O_FSYNC) +#define O_DSYNC O_FSYNC +#endif +/* If O_DSYNC is still not defined, use O_SYNC (needed for newlib). */ +#if !defined (O_DSYNC) +#define O_DSYNC O_SYNC +#endif + JNIEXPORT int cpio_openFile (const char *filename, int *fd, int flags, int permissions) { int sflags = 0; Index: native/jni/native-lib/cpnet.c === RCS file: /cvsroot/classpath/classpath/native/jni/native-lib/cpnet.c,v retrieving revision 1.2 diff -u -r1.2 cpnet.c --- native/jni/native-lib/cpnet.c 21 Aug 2006 23:34:46 - 1.2 +++ native/jni/native-lib/cpnet.c 28 Aug 2006 20:00:57 - @@ -54,6 +54,14 @@ #define SOCKET_DEFAULT_TIMEOUT -1 /* milliseconds */ +#if defined (HAVE_MSG_NOSIGNAL) +#define SOCKET_NOSIGNAL MSG_NOSIGNAL +#elif defined (HAVE_SO_NOSIGPIPE) +#define SOCKET_NOSIGNAL SO_NOSIGPIPE +#else +#define SOCKET_NOSIGNAL 0 +#endif + static int socketTimeouts[FD_SETSIZE]; static jint waitForWritable(jint fd) @@ -247,7 +255,7 @@ if (waitForWritable(fd) 0) return ETIMEDOUT; - ret = send(fd, data, len, MSG_NOSIGNAL); + ret = send(fd, data, len, SOCKET_NOSIGNAL); if (ret 0) return errno; @@ -263,7 +271,8 @@ if (waitForWritable(fd) 0) return ETIMEDOUT; - ret = sendto(fd, data, len, MSG_NOSIGNAL, (struct sockaddr *)addr-data, addr-len); + ret = sendto(fd, data, len, SOCKET_NOSIGNAL, (struct sockaddr *)addr-data, + addr-len); if (ret 0) return errno; @@ -598,7 +607,11 @@ do { buf = (char *)JCL_malloc(env, buflen
Re: [cp-patches] fix darwin cvs build
Tom Tromey wrote: Andreas == Andreas Tobler [EMAIL PROTECTED] writes: Andreas the attached patch fixes the current cvs on darwin-ppc. Not tested on Andreas functionality yet. But it builds :) This mostly looks ok to me. I just had one question. Andreas +#if defined (HAVE_MSG_NOSIGNAL) Andreas +#define SOCKET_NOSIGNAL MSG_NOSIGNAL Andreas +#elif defined (HAVE_SO_NOSIGPIPE) Andreas +#define SOCKET_NOSIGNAL SO_NOSIGPIPE Andreas +#else Andreas +#define SOCKET_NOSIGNAL 0 Andreas +#endif Why default to 0 here? If we don't know what to do perhaps it would be better to #error. It's just a fallback I chose. I need to test solaris and hpux-pa. But atm I do not have the time to. I'm fine with #error for the time being. I'll update asap I had time to test and fix on those archs (I know they'll have troubles too here). Possibly the #error will stay as default. Thanks Tom for the review. Andreas
[cp-patches] Install default.css
Hello, this patchlet fixes the install of the default.css (and other future .css files). Now we can run the html swing demo. Ok? Andreas 2006-08-31 Andreas Tobler [EMAIL PROTECTED] * lib/Makefile.am (cssfiles): Add new rule to install css files. Index: lib/Makefile.am === RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v retrieving revision 1.126 diff -u -r1.126 Makefile.am --- lib/Makefile.am 18 Aug 2006 19:45:03 - 1.126 +++ lib/Makefile.am 31 Aug 2006 18:44:29 - @@ -7,6 +7,7 @@ propertydirs := $(shell cd $(top_srcdir)/resource $(FIND) gnu java javax org META-INF -type d ! -name CVS -print) propertyfiles := $(shell cd $(top_srcdir)/resource $(FIND) gnu java javax org -name \*\.properties -print) +cssfiles := $(shell cd $(top_srcdir) $(FIND) gnu java javax org -name \*\.css -print) metafiles := $(shell cd $(top_srcdir)/resource $(FIND) META-INF -name CVS -prune -o -name \*\.in -prune -o -type f -print) iconfiles := $(shell cd $(top_srcdir) $(FIND) gnu/javax/swing/plaf/gtk/icons -name *.png -type f -print) @@ -113,6 +114,9 @@ @list='$(propertyfiles)'; for p in $$list; do \ cp $(top_srcdir)/resource/$$p $$p; \ done + @list='$(cssfiles)'; for p in $$list; do \ + cp $(top_srcdir)/$$p $$p; \ + done @list='$(metafiles)'; for p in $$list; do \ cp $(top_srcdir)/resource/$$p $$p; \ done
Re: [cp-patches] fix darwin cvs build
Tom Tromey wrote: Andreas == Andreas Tobler [EMAIL PROTECTED] writes: Andreas the attached patch fixes the current cvs on darwin-ppc. Not tested on Andreas functionality yet. But it builds :) This mostly looks ok to me. I just had one question. Andreas +#if defined (HAVE_MSG_NOSIGNAL) Andreas +#define SOCKET_NOSIGNAL MSG_NOSIGNAL Andreas +#elif defined (HAVE_SO_NOSIGPIPE) Andreas +#define SOCKET_NOSIGNAL SO_NOSIGPIPE Andreas +#else Andreas +#define SOCKET_NOSIGNAL 0 Andreas +#endif Why default to 0 here? If we don't know what to do perhaps it would be better to #error. Ok with this change ? --- native/jni/native-lib/cpnet.c 21 Aug 2006 23:34:46 - 1.2 +++ native/jni/native-lib/cpnet.c 31 Aug 2006 19:01:38 - @@ -54,6 +54,14 @@ #define SOCKET_DEFAULT_TIMEOUT -1 /* milliseconds */ +#if defined (HAVE_MSG_NOSIGNAL) +#define SOCKET_NOSIGNAL MSG_NOSIGNAL +#elif defined (HAVE_SO_NOSIGPIPE) +#define SOCKET_NOSIGNAL SO_NOSIGPIPE +#else +#error No suitable flag found to ommit a SIGPIPE on signal errors with send(). +#endif + Andreas
[cp-patches] FYI: fix duplicate header and adjust __attribute....
Hello, I committed this patchlet to fix some cosmetics. Andreas 2006-09-05 Andreas Tobler [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c: Adjust __attribute to __attribute__. * native/jni/java-nio/java_nio_MappedByteBufferImpl.c: Remove duplicate header include. Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c,v retrieving revision 1.6 diff -u -r1.6 gnu_java_awt_peer_gtk_GtkVolatileImage.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c25 Jul 2006 17:58:52 - 1.6 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c5 Sep 2006 21:19:17 - @@ -88,7 +88,7 @@ */ JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkVolatileImage_destroy -(JNIEnv *env __attribute__((unused)), jobject obj __attribute((unused)), +(JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused)), jlong pointer) { GdkPixmap* pixmap = JLONG_TO_PTR(GdkPixmap, pointer); @@ -148,7 +148,7 @@ */ JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkVolatileImage_nativeCopyArea -(JNIEnv *env __attribute__((unused)), jobject obj __attribute((unused)), +(JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused)), jlong pointer, jint x, jint y, jint w, jint h, jint dx, jint dy) { GdkPixbuf *pixbuf; @@ -169,7 +169,7 @@ JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkVolatileImage_nativeDrawVolatile -(JNIEnv *env __attribute__((unused)), jobject obj __attribute((unused)), +(JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused)), jlong pointer, jlong srcptr, jint x, jint y, jint w, jint h) { GdkPixmap *dst, *src; Index: native/jni/java-nio/java_nio_MappedByteBufferImpl.c === RCS file: /cvsroot/classpath/classpath/native/jni/java-nio/java_nio_MappedByteBufferImpl.c,v retrieving revision 1.12 diff -u -r1.12 java_nio_MappedByteBufferImpl.c --- native/jni/java-nio/java_nio_MappedByteBufferImpl.c 25 Jan 2006 10:40:12 - 1.12 +++ native/jni/java-nio/java_nio_MappedByteBufferImpl.c 5 Sep 2006 21:19:17 - @@ -1,5 +1,5 @@ /* java_nio_MappedByteBufferImpl.c - Native methods for MappedByteBufferImpl - Copyright (C) 2004,2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -7,7 +7,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -43,7 +43,6 @@ #include java_nio_MappedByteBufferImpl.h -#include errno.h #include string.h #include stdlib.h #ifdef HAVE_UNISTD_H
Re: [cp-patches] [patch] add rule to install the sample html files
Hi Mark, Mark Wielaard wrote: On Mon, 2006-11-06 at 22:11 +0100, Andreas Tobler wrote: this patchlet installs the necessary html files in the example directory. Ok? Looks good to me. I think we also need the html files in the example.zip file itself like the icons to make it self-contained. I extended your patch to do this. If you like the attached please check it in. As mentioned on irc, I have had the exact same bits in my second attempt. I commited the patch after testing. Thanks for review and good night. Regards, Andreas
[cp-patches] [patch] GtkImageConsumer, fix big endian.
Hello all, While playing with the great html work from Roman and others I found out that we must have missed another LE/BE issue with graphics handling. The badge.png drawn in the html demo looked very ugly to me, purple instead of the known brown/yellow. I know this type of error so I fixed it. Is it ok? Can a LE user please verify if I did not break anything there? Thanks, Andreas 2006-11-11 Andreas Tobler [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/GtkImageConsumer.java (setPixels): Handle data from big endian systems correctly. Index: gnu/java/awt/peer/gtk/GtkImageConsumer.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GtkImageConsumer.java,v retrieving revision 1.5 diff -u -r1.5 GtkImageConsumer.java --- gnu/java/awt/peer/gtk/GtkImageConsumer.java 17 Jul 2006 22:41:03 - 1.5 +++ gnu/java/awt/peer/gtk/GtkImageConsumer.java 11 Nov 2006 21:12:50 - @@ -42,6 +42,7 @@ import java.awt.image.ImageConsumer; import java.awt.image.ImageProducer; import java.awt.image.MemoryImageSource; +import java.nio.ByteOrder; import java.util.Hashtable; /** @@ -103,7 +104,7 @@ scansize); } - public synchronized void setPixels (int x, int y, int width, int height, + public synchronized void setPixels (int x, int y, int width, int height, ColorModel cm, int[] pixels, int offset, int scansize) { @@ -117,18 +118,34 @@ width); else { - for (int i = 0; i height; i++) - for (int j = 0; j width; j++) - { - // get in AARRGGBB and convert to AABBGGRR - int pix = cm.getRGB(pixels[offset + (i * scansize) + x + j]); - byte b = (byte)(pix 0xFF); - byte r = (byte)(((pix 0x00FF) 16) 0xFF); - pix = 0xFF00FF00; - pix |= ((b 0xFF) 16); - pix |= (r 0xFF); - pixelCache[(y + i) * this.width + x + j] = pix; - } + if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) + { + for (int i = 0; i height; i++) + for (int j = 0; j width; j++) + { + // get in RRGGBBAA and convert to AARRGGBB + int pix = cm.getRGB(pixels[offset + (i * scansize) + x + j]); + int a = ((pix 0xFF00) 24) 0xFF; + int rgb = (pix 0x00FF) 8; + pix = rgb | a; + pixelCache[(y + i) * this.width + x + j] = pix; + } + } + else + { + for (int i = 0; i height; i++) + for (int j = 0; j width; j++) + { + // get in AARRGGBB and convert to AABBGGRR + int pix = cm.getRGB(pixels[offset + (i * scansize) + x + j]); + byte b = (byte)(pix 0xFF); + byte r = (byte)(((pix 0x00FF) 16) 0xFF); + pix = 0xFF00FF00; + pix |= ((b 0xFF) 16); + pix |= (r 0xFF); + pixelCache[(y + i) * this.width + x + j] = pix; + } + } } }
[cp-patches] AUTHORS update
Hi all, I added myself to the file. Thanks, Andreas 2006-11-13 Andreas Tobler [EMAIL PROTECTED] * AUTHORS: Add myself.
[cp-patches] [patch] examples pictures consolidated
Hi all, this patch makes the java2d benchmark and the aicasgraphicsbenchmark run on installed systems. We copy the two image files in one common place and are happy ;) Ok for trunk? Tested on darwin-ppc and linux-ppc. Yes, darwin-ppc, I have my ecj running on it:) Andreas 2007-01-05 Andreas Tobler [EMAIL PROTECTED] * examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java (AicasGraphicsBenchmark): Load images from ../icons. * examples/gnu/classpath/examples/java2d/J2dBenchmark.java (init): Likewise. * examples/Makefile.am (EXAMPLE_ICONS): Add rule to copy *.gif files to icons. * examples/gnu/classpath/examples/awt/aicas.png: Move to ../icons. Delete here. * examples/gnu/classpath/examples/awt/palme.gif: Likewise. * examples/gnu/classpath/examples/java2d/aicas.png: Likewise. * examples/gnu/classpath/examples/java2d/palme.gif: Likewise. * examples/gnu/classpath/examples/icons/aicas.png: Moved. * examples/gnu/classpath/examples/icons/palme.gif: Likewise. Index: examples/Makefile.am === RCS file: /cvsroot/classpath/classpath/examples/Makefile.am,v retrieving revision 1.19 diff -u -r1.19 Makefile.am --- examples/Makefile.am17 Dec 2006 16:30:46 - 1.19 +++ examples/Makefile.am5 Jan 2007 22:12:39 - @@ -35,6 +35,7 @@ # the png icons we use in some of the examples. EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png +EXAMPLE_ICONS += $(srcdir)/gnu/classpath/examples/icons/*.gif # the html pages we use in the swing demo example. EXAMPLE_HTML = $(srcdir)/gnu/classpath/examples/swing/*.html Index: examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java === RCS file: /cvsroot/classpath/classpath/examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java,v retrieving revision 1.1 diff -u -r1.1 AicasGraphicsBenchmark.java --- examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java 14 Jun 2006 14:56:16 - 1.1 +++ examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java 5 Jan 2007 22:12:40 - @@ -100,8 +100,8 @@ public AicasGraphicsBenchmark() { -pngTestImage = loadImage(aicas.png); -gifTestImage = loadImage(palme.gif); +pngTestImage = loadImage(../icons/aicas.png); +gifTestImage = loadImage(../icons/palme.gif); setLayout(new BorderLayout()); testLabel = new Label(); Index: examples/gnu/classpath/examples/java2d/J2dBenchmark.java === RCS file: /cvsroot/classpath/classpath/examples/gnu/classpath/examples/java2d/J2dBenchmark.java,v retrieving revision 1.3 diff -u -r1.3 J2dBenchmark.java --- examples/gnu/classpath/examples/java2d/J2dBenchmark.java23 Jun 2006 21:31:15 - 1.3 +++ examples/gnu/classpath/examples/java2d/J2dBenchmark.java5 Jan 2007 22:12:41 - @@ -174,8 +174,8 @@ public String init() { boolean loadError = false; -pngTestImage = loadImage(aicas.png); -gifTestImage = loadImage(palme.gif); +pngTestImage = loadImage(../icons/aicas.png); +gifTestImage = loadImage(../icons/palme.gif); if (texture != null) {
Re: [cp-patches] [patch] examples pictures consolidated
Mark Wielaard wrote: Hi Andreas, On Fri, 2007-01-05 at 23:16 +0100, Andreas Tobler wrote: this patch makes the java2d benchmark and the aicasgraphicsbenchmark run on installed systems. We copy the two image files in one common place and are happy ;) Ok for trunk? Yes, thanks. Thanks. Tested on darwin-ppc and linux-ppc. Yes, darwin-ppc, I have my ecj running on it:) Nice. How well does the gtk-peers work on darwin-ppc? The X11 are fine, since years. The Native needs to be ported first. Andreas
[cp-patches] [patch] forward gcj/classpath/doc patch
Hi all, I'm going to commit this one soon. It is a change which is already in gcc. Fails w/o patch under darwin-ppc. Andreas 2007-03-09 Andreas Tobler [EMAIL PROTECTED] Port change from gcc: 2007-03-06 Matthias Klose [EMAIL PROTECTED] * doc/Makefile.am(gkeytool.pod): Don't use sed -i. Index: doc/Makefile.am === RCS file: /cvsroot/classpath/classpath/doc/Makefile.am,v retrieving revision 1.8 diff -u -r1.8 Makefile.am --- doc/Makefile.am 19 Feb 2007 22:16:32 - 1.8 +++ doc/Makefile.am 9 Mar 2007 21:29:38 - @@ -54,10 +54,10 @@ # hack around the cross references and the enumeration gkeytool.pod: $(srcdir)/cp-tools.texinfo - -$(TEXI2POD) -D gkeytool $ $@ - sed -i -e 's/^For more details.*/See ICommon Options for more details./' \ + -$(TEXI2POD) -D gkeytool $ \ + | sed -e 's/^For more details.*/See ICommon Options for more details./' \ -e 's/1\.\([^]*\)/- \1/' \ - $@ +$@ gnative2ascii.pod: $(srcdir)/cp-tools.texinfo -$(TEXI2POD) -D gnative2ascii $ $@
Re: [cp-patches] FYI: fix for hacked up autotools toolchains
hi ya, Dalibor Topic wrote: the following patch adds support for passing additional flags to autoreconf by using an environment variable, LOCAL_ACLOCAL_AMFLAGS. s/LOCAL_ACLOCAL_AMFLAGS/LOCAL_AUTORECONF_FLAGS Gruss Andreas
[cp-patches] [patch] committed, update autogen.sh
Hi all, I committed the attached patch to reflect current situation on Darwin. It's only comment work so I took it as obvious. Andreas 2007-05-18 Andreas Tobler [EMAIL PROTECTED] * autogen.sh (have_libtool): Update comments for Darwin. Index: autogen.sh === RCS file: /cvsroot/classpath/classpath/autogen.sh,v retrieving revision 1.19 diff -u -r1.19 autogen.sh --- autogen.sh 22 Apr 2007 16:51:36 - 1.19 +++ autogen.sh 18 May 2007 20:18:14 - @@ -28,9 +28,9 @@ echo You must have libtool 1.5 installed to compile $PROJECT. echo Install the appropriate package for your distribution, echo or get the source tarball at http://ftp.gnu.org/gnu/libtool/; - echo For Darwin you need the latest stable (1.5.18) to support - echo Frameworks linking. Also, you have to point ACLOCAL_FLAGS - echo to this libtool/share/aclocal. + echo For Darwin you need the latest stable (1.5.22) to support + echo Frameworks linking. Also, you have to point + echo LOCAL_AUTORECONF_FLAGS to this libtool/share/aclocal. DIE=1 fi
[cp-patches] [patch] classpath/tools/Makefile.am
Hi all, while building libjava on i386-pc-solaris2.11 I got a failure which reminded me to PR23653, four years back. 'find -path' is not portable. Solaris native find complains about. The attached patch fixes this. It produces the exact same all-classes.lst as with the -path option on a darwin, linux of freebsd machine. Ok for gcc trunk? If yes, could someone please commit it also to classpath? Thanks, Andreas 2009-12-23 Andreas Tobler a.tob...@schweiz.org * tools/Makefile.am (GJDOC_EX): Use find -name pattern -prune -o. * tools/Makefile.in: Regenerate. Index: Makefile.am === --- Makefile.am (revision 155394) +++ Makefile.am (working copy) @@ -277,12 +277,10 @@ $(gnu_classpath_tools_gjdoc_jar_XHTML) $(gnu_classpath_tools_gjdoc_jar_XSLS) if !CREATE_GJDOC -GJDOC_EX = -path '*gnu/classpath/tools/gjdoc' -prune -o \ - -path '*gnu/classpath/tools/doclets' -prune -o \ - -path '*gnu/classpath/tools/taglets' -prune -o \ - -path '*com/sun/javadoc' -prune -o \ - -path '*com/sun/tools/doclets' -prune -o \ - -path '*com/sun/tools/javadoc' -prune -o +GJDOC_EX = -name gjdoc -prune -o \ + -name doclets -prune -o \ + -name taglets -prune -o \ + -name javadoc -prune -o endif # The zip files with classes we want to produce. Index: Makefile.in === --- Makefile.in (revision 155394) +++ Makefile.in (working copy) @@ -684,12 +684,10 @@ $(gnu_classpath_tools_gjdoc_jar_RNGS) $(gnu_classpath_tools_gjdoc_jar_TXTS) \ $(gnu_classpath_tools_gjdoc_jar_XHTML) $(gnu_classpath_tools_gjdoc_jar_XSLS) -...@create_gjdoc_false@GJDOC_EX = -path '*gnu/classpath/tools/gjdoc' -prune -o \ -...@create_gjdoc_false@-path '*gnu/classpath/tools/doclets' -prune -o \ -...@create_gjdoc_false@-path '*gnu/classpath/tools/taglets' -prune -o \ -...@create_gjdoc_false@-path '*com/sun/javadoc' -prune -o \ -...@create_gjdoc_false@-path '*com/sun/tools/doclets' -prune -o \ -...@create_gjdoc_false@-path '*com/sun/tools/javadoc' -prune -o +...@create_gjdoc_false@GJDOC_EX = -name gjdoc -prune -o \ +...@create_gjdoc_false@-name doclets -prune -o \ +...@create_gjdoc_false@-name taglets -prune -o \ +...@create_gjdoc_false@-name javadoc -prune -o # The zip files with classes we want to produce.
[cp-patches] PING: Re: [patch] classpath/tools/Makefile.am
PING! Thanks, Andreas On 23.12.09 21:20, Andreas Tobler wrote: Hi all, while building libjava on i386-pc-solaris2.11 I got a failure which reminded me to PR23653, four years back. 'find -path' is not portable. Solaris native find complains about. The attached patch fixes this. It produces the exact same all-classes.lst as with the -path option on a darwin, linux of freebsd machine. Ok for gcc trunk? If yes, could someone please commit it also to classpath? Thanks, Andreas 2009-12-23 Andreas Toblera.tob...@schweiz.org * tools/Makefile.am (GJDOC_EX): Use find -name pattern -prune -o. * tools/Makefile.in: Regenerate.
[cp-patches] [patch] fix solaris find issue
Hi all, I'd like to commit the following patch. It is already in gcc tree and I have the ok (Tromey) to commit. But I'd like to inform herewith. Everybody ok with? Details here: http://gcc.gnu.org/ml/java-patches/2009-q4/msg00067.html Thanks, Andreas 2010-02-07 Andreas Tobler andre...@fgznet.ch * tools/Makefile.am (GJDOC_EX): Use find -name pattern -prune -o. RCS file: /sources/classpath/classpath/tools/Makefile.am,v retrieving revision 1.62 diff -u -r1.62 Makefile.am --- tools/Makefile.am 30 Jan 2010 02:33:51 - 1.62 +++ tools/Makefile.am 7 Feb 2010 20:16:58 - @@ -267,12 +267,10 @@ $(gnu_classpath_tools_gjdoc_jar_XHTML) $(gnu_classpath_tools_gjdoc_jar_XSLS) if !CREATE_GJDOC -GJDOC_EX = -path '*gnu/classpath/tools/gjdoc' -prune -o \ - -path '*gnu/classpath/tools/doclets' -prune -o \ - -path '*gnu/classpath/tools/taglets' -prune -o \ - -path '*com/sun/javadoc' -prune -o \ - -path '*com/sun/tools/doclets' -prune -o \ - -path '*com/sun/tools/javadoc' -prune -o +GJDOC_EX = -name gjdoc -prune -o \ + -name doclets -prune -o \ + -name taglets -prune -o \ + -name javadoc -prune -o endif # The zip files with classes we want to produce. ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] [patch] update FreeBSD 10 configury changes
Hi, the below patch makes sure that FreeBSD-10 and up gets properly detected in config.rpath. Ok? I'm going to apply the same patch on gcc trunk and gcc-4.6. Thanks, Andreas 2011-11-28 Andreas Tobler andre...@fgznet.ch * config.rpath (ld_shlibs): Fix detection of FreeBSD-10 and up. (libname_spec): Likewise. Index: config.rpath === --- config.rpath(revision 181783) +++ config.rpath(working copy) @@ -361,7 +361,7 @@ hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; -freebsd2*) +freebsd2.*) hardcode_direct=yes hardcode_minus_L=yes ;; @@ -533,7 +533,7 @@ ;; freebsd* | dragonfly*) case $host_os in - freebsd[123]*) + freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;;