2003/10/16 05:39:20
[org.ibex.core.git] / src / org / xwt / Platform.java
index 3ac3106..aa8be35 100644 (file)
@@ -124,7 +124,14 @@ public class Platform {
     
     /** creates and returns a picture */
     public static Picture createPicture(int[] data, int w, int h) { return platform._createPicture(data, w, h); }
+    public static Picture createAlphaOnlyPicture(byte[] data, int w, int h) { return platform._createAlphaOnlyPicture(data, w, h); }
+    
     protected Picture _createPicture(int[] b, int w, int h) { return null; }
+    protected Picture _createAlphaOnlyPicture(byte[] b, int w, int h) {
+        int[] b2 = new int[b.length];
+        for(int i=0;i<b.length;i++) b2[i] = (b[i]&0xff) << 24;
+        return _createPicture(b2,w,h);
+    }
 
     /** creates a socket object */
     public static Socket getSocket(String host, int port, boolean ssl, boolean negotiate) throws IOException {
@@ -312,7 +319,9 @@ public class Platform {
 
         return cachedProxyInfo;
     }
-
+    
+    public static void running() { platform._running(); }
+    public void _running() { new Semaphore().block(); }
 }