propose-patch
[org.ibex.core.git] / src / org / xwt / plat / Win32.java
index d40d9df..a17323b 100644 (file)
@@ -9,7 +9,6 @@ import java.io.*;
 
 /** Platform specific code for GCJ-compiled Win32 binaries */
 public class Win32 extends GCJ {
-
     // Initialization ////////////////////////////////////////////////////////////////////////////
 
     // Win32 often asks for a DC/Handle when it doesn't really need one
@@ -39,10 +38,11 @@ public class Win32 extends GCJ {
 
     public static native String getTempPath();
     public static native void natInit();
+    public static native void natPreInit();
 
     protected native String _fileDialog(String suggestedFileName, boolean write);
 
-    public Win32() { }
+    public Win32() { natPreInit(); }
 
     public void postInit() {
         new Thread() { public void run() { natInit(); } }.start();
@@ -197,7 +197,6 @@ public class Win32 extends GCJ {
     // Win32Picture ////////////////////////////////////////////////////////////////////////////
 
     public static class Win32Picture extends Picture {
-        int w = 0, h = 0;
 
         /** the Win32 bitmap version of this Picture */
         int hbitmap = -1;
@@ -218,8 +217,8 @@ public class Win32 extends GCJ {
         int maskdc = -1;
 
         public Win32Picture(JS r) { super(r); }
-        public int getWidth() { return w; };
-        public int getHeight() { return h; };
+        public int getWidth() { return width; };
+        public int getHeight() { return height; };
         public int[] getData() { return data; }
         boolean initialized = false;
         public void init() { if (!initialized && isLoaded) natInit(); initialized = true; }