2003/10/28 12:27:05
[org.ibex.core.git] / src / org / xwt / plat / Darwin.java
index 8da005c..44d0ec2 100644 (file)
@@ -145,7 +145,7 @@ public class Darwin extends POSIX {
         private native void natSetTitleBarText(String s);
         public void setTitleBarText(final String s) { CarbonMessage.add(new CarbonMessage() { public void perform() { natSetTitleBarText(s); } }); }
         private native void natSetSize(int w, int h);
-        public void setSize(final int w, final int h) { CarbonMessage.add(new CarbonMessage() { public void perform() { natSetSize(w,h); } }); }
+        public void _setSize(final int w, final int h) { CarbonMessage.add(new CarbonMessage() { public void perform() { natSetSize(w,h); } }); }
         private native void natSetLocation();
         public void setLocation() { CarbonMessage.add(new CarbonMessage() { public void perform() { natSetLocation(); } }); }
         private native void natToFront();
@@ -244,10 +244,10 @@ public class Darwin extends POSIX {
             super.setLimits(mnw,mnh,mxw,mxh);
         }
         
-        public void setSize(int w, int h) {
+        public void _setSize(int w, int h) {
             w = Math.min(w,gl.maxSurfaceWidth);
             h = Math.min(h,gl.maxSurfaceWidth);
-            super.setSize(w,h);
+            super._setSize(w,h);
         }
         
         private native void natBlit(GLCarbonPixelBuffer db, int sx, int sy, int dx, int dy, int dx2, int dy2);
@@ -275,6 +275,7 @@ public class Darwin extends POSIX {
         private native void reshape(int w, int h);
         // blit_lock is assumed to be held
         public void needsReshape() { needsReshape = true; }
+
         public native void natDispose();
     }
 
@@ -321,6 +322,12 @@ public class Darwin extends POSIX {
         else
             return /*new QZCarbonPicture(data,w,h);*/ null;
     }
+    protected Picture _createAlphaOnlyPicture(byte[] data, int w, int h) {
+        if(openGL != null)
+            return openGL.createAlphaOnlyPicture(data,w,h);
+        else
+            return super.createAlphaOnlyPicture(data,w,h);
+    }
     
     /* A message that is sent through the carbon event queue */
     private static abstract class CarbonMessage {