classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] [Patch] gtk peer event loop patches merged


From: Michael Koch
Subject: [cp-patches] [Patch] gtk peer event loop patches merged
Date: Tue, 11 Jan 2005 16:11:55 +0100
User-agent: Mutt/1.5.6+20040907i

Hi list,


I commited the attached patches to merge them from java-gui-branch. They
enhance the event thread handling in our gtk peer implementation. To be
able to use GNU classpath with jamvm now you need to apply the following
little patch fromMArk Wielaard on top of jamvm 1.2.3:

--- jamvm-1.2.3/src/dll.c       2004-12-23 12:11:32.000000000 +0100
+++ jamvm-1.2.3.patched/src/dll.c       2005-01-10 23:05:22.000000000
+0100
@@ -290,8 +290,8 @@
     return NULL;
 }

+static void *env = &Jam_JNINativeInterface;
 u4 *callJNIWrapper(Class *class, MethodBlock *mb, u4 *ostack) {
-    void *env = &Jam_JNINativeInterface;

     TRACE(("<DLL: Calling JNI method %s.%s%s>\n", CLASS_CB(class)->name, 
mb->name, mb->type));


Michael


2005-01-11  Graydon Hoare  <address@hidden>

        * gnu/java/awt/ClasspathToolkit.java
        (nativeQueueEmpty)
        (wakeNativeQueue)
        (iterateNativeQueue): New methods.
        * gnu/java/awt/peer/gtk/GtkMainThread.java: Remove.
        * gnu/java/awt/peer/gtk/GtkToolkit.java
        (gtkInit): Absorb from defunct GtkMainThread class.
        (static): Run gtkInit in static startup block.
        (GtkToolkit): Remove construction of GtkMainThread and queue.
        (getSystemEventQueueImpl): Construct queue when requested.
        (nativeQueueEmpty)
        (wakeNativeQueue)
        (iterateNativeQueue): New methods.
        * java/awt/Component.java (removeNotify): Remove race.
        * java/awt/EventDispatchThread.java
        (EventDispatchThread): Don't start on construction.
        (run): Remove isInterrupted check.
        * java/awt/EventQueue.java (shutdown): New flag.
        (isShutdown): New method checking J2SE shutdown condition.
        (setShutdown): New method.
        (getNextEvent): Restructure to use ClasspathToolkit.
        (postEvent): Activate new thread on posting, wake thread on
        post of possible shutdown condition event.
        * java/awt/Frame.java
        (Frame): Call noteFrame in all constructors.
        (fireDummyEvent): New helper method.
        (addNotify): Fire a dummy event to wake up queue.
        (removeNotify): Fire a dummy event to wake up queue.
        (noteFrame): New method.
        (weakFrames): New static field.
        (getFrames): Implement.
        * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c:
        Remove.
        * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c:
        Move everything from GtkMainThread into this file
        (Java_gnu_java_awt_peer_gtk_GtkToolkit_iterateNativeQueue)
        (Java_gnu_java_awt_peer_gtk_GtkToolkit_wakeNativeQueue)
        (Java_gnu_java_awt_peer_gtk_GtkToolkit_nativeQueueEmpty):
        New functions to implement single-threaded queue semantics.

2005-01-11  Thomas Fitzsimmons  <address@hidden>

        * gnu/java/awt/peer/gtk/GtkComponentPeer.java: Replace direct
        references to event queue q with method call q().
        * gnu/java/awt/peer/gtk/GtkDialogPeer.java: Likewise.
        * gnu/java/awt/peer/gtk/GtkFramePeer.java: Likewise.
        * gnu/java/awt/peer/gtk/GtkScrollbarPeer.java: Likewise.
        * gnu/java/awt/peer/gtk/GtkTextComponentPeer.java: Likewise.
        * gnu/java/awt/peer/gtk/GtkWindowPeer.java: Likewise.
        * gnu/java/awt/peer/gtk/GtkGenericPeer.java: Likewise.
        (q): New method.

2005-01-11  Michael Koch  <address@hidden>

        * native/jni/gtk-peer/Makefile.am:
        Removed gnu_java_awt_peer_gtk_GtkMainThread.c.
        * include/Makefile.am:
        Don't generate gnu_java_awt_peer_gtk_GtkMainThread.h
        * include/gnu_java_awt_peer_gtk_GtkMainThread.h: Removed.

Attachment: gtk.diff.bz2
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]