From 2a4ea9dadd80b0dff304aa87073e12fa2da69c8f Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Tue, 26 Jul 2005 20:25:13 +0000 Subject: 2005-07-26 Thomas Fitzsimmons * gnu/java/awt/peer/gtk/GdkGraphics.java, native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c: Add static initializer. (initStaticState): New method. Add new global graphics reference state table and macros. * include/gnu_java_awt_peer_gtk_GdkGraphics.h: Regenerate. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c: Use new NSA_GET_G_PTR macro to retreive graphics objects. * native/jni/gtk-peer/gtkpeer.h: Add new graphics state table and macros. --- gnu/java/awt/peer/gtk/GdkGraphics.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'gnu/java/awt') diff --git a/gnu/java/awt/peer/gtk/GdkGraphics.java b/gnu/java/awt/peer/gtk/GdkGraphics.java index a125be7b9..65c01b86e 100644 --- a/gnu/java/awt/peer/gtk/GdkGraphics.java +++ b/gnu/java/awt/peer/gtk/GdkGraphics.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.awt.peer.gtk; +import gnu.classpath.Configuration; + import java.awt.Color; import java.awt.Dimension; import java.awt.Font; @@ -52,7 +54,17 @@ import java.text.AttributedCharacterIterator; public class GdkGraphics extends Graphics { - private final int native_state = GtkGenericPeer.getUniqueInteger(); + static + { + if (Configuration.INIT_LOAD_LIBRARY) + { + System.loadLibrary("gtkpeer"); + } + initStaticState (); + } + + static native void initStaticState(); + private final int native_state = GtkGenericPeer.getUniqueInteger (); Color color, xorColor; GtkComponentPeer component; -- cgit v1.2.1