2003/12/13 08:13:34
[org.ibex.core.git] / src / org / xwt / plat / Darwin.java
index 07c2fe5..84bec1c 100644 (file)
@@ -77,11 +77,7 @@ public class Darwin extends POSIX {
     
     private static native final boolean isJaguar();
     
-    // Called by main thread after initialization, this is the event handler
-    protected native void runApplicationEventLoop();
-    
-    public void init() {
-        super.init();
+    public void postInit() {
         jaguar = isJaguar();
         try {
             openGL = new CarbonOpenGL();
@@ -94,7 +90,13 @@ public class Darwin extends POSIX {
         natInit();
     }
     
-    public void _running() { runApplicationEventLoop(); }
+    protected native void runApplicationEventLoop();
+    private class DarwinScheduler extends org.xwt.Scheduler {
+        public void run() {
+            new Thread() { public void run() { defaultRun(); } }.start();
+            runApplicationEventLoop();
+        }
+    }
     
     private final class CarbonOpenGL extends OpenGL {
         public RawData rawPixelFormat;
@@ -316,17 +318,17 @@ public class Darwin extends POSIX {
         else
             return /*new QZCarbonSufrace(b,framed)*/ null;
     }
-    protected Picture _createPicture(int[] data, int w, int h) {
+    protected Picture _createPicture() {
         if(openGL != null)
-            return openGL.createPicture(data,w,h);
+            return openGL._createPicture(true);
         else
             return /*new QZCarbonPicture(data,w,h);*/ null;
     }
-    protected Picture _createAlphaOnlyPicture(byte[] data, int w, int h) {
+    protected org.xwt.Font.Glyph  _createGlyph(org.xwt.Font f, char c) {
         if(openGL != null)
-            return openGL.createAlphaOnlyPicture(data,w,h);
+            return openGL._createGlyph(f, c);
         else
-            return super.createAlphaOnlyPicture(data,w,h);
+            return super.createGlyph(f, c);
     }
     
     /* A message that is sent through the carbon event queue */