/[classpath]/classpath/gnu/java/awt/peer/gtk/GtkToolkit.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/gtk/GtkToolkit.java

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

revision 1.61 by mkoch, Mon Jan 3 12:20:54 2005 UTC revision 1.62 by mkoch, Tue Jan 11 15:06:03 2005 UTC
# Line 70  import java.util.LinkedHashMap; Line 70  import java.util.LinkedHashMap;
70  import java.util.Map;  import java.util.Map;
71  import java.util.MissingResourceException;  import java.util.MissingResourceException;
72  import java.util.Properties;  import java.util.Properties;
73    import javax.imageio.spi.IIORegistry;
74    
75  /* This class uses a deprecated method java.awt.peer.ComponentPeer.getPeer().  /* This class uses a deprecated method java.awt.peer.ComponentPeer.getPeer().
76     This merits comment.  We are basically calling Sun's bluff on this one.     This merits comment.  We are basically calling Sun's bluff on this one.
# Line 88  import java.util.Properties; Line 89  import java.util.Properties;
89  public class GtkToolkit extends gnu.java.awt.ClasspathToolkit  public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
90    implements EmbeddedWindowSupport    implements EmbeddedWindowSupport
91  {  {
   GtkMainThread main;  
92    Hashtable containers = new Hashtable();    Hashtable containers = new Hashtable();
93    static EventQueue q = new EventQueue();    static EventQueue q;
94    static Clipboard systemClipboard;    static Clipboard systemClipboard;
95    static boolean useGraphics2dSet;    static boolean useGraphics2dSet;
96    static boolean useGraphics2d;    static boolean useGraphics2d;
# Line 105  public class GtkToolkit extends gnu.java Line 105  public class GtkToolkit extends gnu.java
105      return useGraphics2d;      return useGraphics2d;
106    }    }
107    
108      static native void gtkInit(int portableNativeSync);
109    
110    static    static
111    {    {
112      if (Configuration.INIT_LOAD_LIBRARY)      if (Configuration.INIT_LOAD_LIBRARY)
113        System.loadLibrary("gtkpeer");        System.loadLibrary("gtkpeer");
114    
115        int portableNativeSync;    
116        String portNatSyncProp =
117          System.getProperty("gnu.classpath.awt.gtk.portable.native.sync");
118        
119        if (portNatSyncProp == null)
120          portableNativeSync = -1;  // unset
121        else if (Boolean.valueOf(portNatSyncProp).booleanValue())
122          portableNativeSync = 1;   // true
123        else
124          portableNativeSync = 0;   // false
125    
126        gtkInit(portableNativeSync);
127    }    }
128    
129    public GtkToolkit ()    public GtkToolkit ()
130    {    {
     main = new GtkMainThread ();  
131      systemClipboard = new GtkClipboard ();      systemClipboard = new GtkClipboard ();
     GtkGenericPeer.enableQueue (q);  
132    }    }
133      
134    native public void beep ();    native public void beep ();
135    native private void getScreenSizeDimensions (int[] xy);    native private void getScreenSizeDimensions (int[] xy);
136        
# Line 596  public class GtkToolkit extends gnu.java Line 609  public class GtkToolkit extends gnu.java
609    
610    protected EventQueue getSystemEventQueueImpl()    protected EventQueue getSystemEventQueueImpl()
611    {    {
612        synchronized (GtkToolkit.class)
613          {
614            if (q == null)
615              {
616                q = new EventQueue();
617                GtkGenericPeer.enableQueue (q);
618              }
619          }    
620      return q;      return q;
621    }    }
622    
# Line 627  public class GtkToolkit extends gnu.java Line 648  public class GtkToolkit extends gnu.java
648    {    {
649      return new GdkRobotPeer (screen);      return new GdkRobotPeer (screen);
650    }    }
651  }  
652      public native boolean nativeQueueEmpty();
653      public native void wakeNativeQueue();  
654      public native void iterateNativeQueue(EventQueue locked);
655    
656    } // class GtkToolkit

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.62

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