/[classpath]/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
ViewVC logotype

Diff of /classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by fitzsim, Tue May 3 23:57:49 2005 UTC revision 1.15 by mark, Mon Jun 27 17:27:19 2005 UTC
# Line 39  exception statement from your version. * Line 39  exception statement from your version. *
39  #include "gtkpeer.h"  #include "gtkpeer.h"
40  #include "gnu_java_awt_peer_gtk_GtkToolkit.h"  #include "gnu_java_awt_peer_gtk_GtkToolkit.h"
41  #include "gthread-jni.h"  #include "gthread-jni.h"
42    #include "jcl.h"
43    
44  #include <sys/time.h>  #include <sys/time.h>
45    
# Line 102  static void init_dpi_conversion_factor ( Line 103  static void init_dpi_conversion_factor (
103  static void dpi_changed_cb (GtkSettings  *settings,  static void dpi_changed_cb (GtkSettings  *settings,
104                              GParamSpec   *pspec);                              GParamSpec   *pspec);
105    
106    #if GTK_MINOR_VERSION > 4
107    static GLogFunc old_glog_func;
108    static void glog_func (const gchar *log_domain,
109                           GLogLevelFlags log_level,
110                           const gchar *message,
111                           gpointer user_data);
112    #endif
113    
114  /*  /*
115   * Call gtk_init.  It is very important that this happen before any other   * Call gtk_init.  It is very important that this happen before any other
116   * gtk calls.   * gtk calls.
# Line 177  Java_gnu_java_awt_peer_gtk_GtkToolkit_gt Line 186  Java_gnu_java_awt_peer_gtk_GtkToolkit_gt
186    g_free (argv[0]);    g_free (argv[0]);
187    g_free (argv);    g_free (argv);
188    
189      /* On errors or warning print a whole stacktrace. */
190    #if GTK_MINOR_VERSION > 4
191      old_glog_func = g_log_set_default_handler (&glog_func, NULL);
192    #endif
193    
194    /* setup cached IDs for posting GTK events to Java */    /* setup cached IDs for posting GTK events to Java */
195    
196    window = (*env)->FindClass (env, "java/awt/Window");    window = (*env)->FindClass (env, "java/awt/Window");
# Line 362  within_human_latency_tolerance(struct ti Line 376  within_human_latency_tolerance(struct ti
376    return milliseconds_elapsed < 100;    return milliseconds_elapsed < 100;
377  }  }
378    
379    #if GTK_MINOR_VERSION > 4
380    static void
381    glog_func (const gchar *log_domain,
382               GLogLevelFlags log_level,
383               const gchar *message,
384               gpointer user_data)
385    {
386      old_glog_func (log_domain, log_level, message, user_data);
387      if (log_level & (G_LOG_LEVEL_ERROR
388                       | G_LOG_LEVEL_CRITICAL
389                       | G_LOG_LEVEL_WARNING))
390        {
391          JNIEnv *env = gdk_env ();
392          jthrowable *exc = (*env)->ExceptionOccurred(env);
393          gchar *detail = g_strconcat (log_domain, ": ", message, NULL);
394          JCL_ThrowException (env, "java/lang/InternalError", detail);
395          g_free (detail);
396          (*env)->ExceptionDescribe (env);
397          if (exc != NULL)
398            (*env)->Throw (env, exc);
399          else
400            (*env)->ExceptionClear (env);
401        }
402    }
403    #endif
404    
405  JNIEXPORT void JNICALL  JNIEXPORT void JNICALL
406  Java_gnu_java_awt_peer_gtk_GtkToolkit_iterateNativeQueue  Java_gnu_java_awt_peer_gtk_GtkToolkit_iterateNativeQueue

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26