2003/09/19 05:26:47
[org.ibex.core.git] / src / org / xwt / plat / X11.java
index fec155c..da7be81 100644 (file)
@@ -35,7 +35,7 @@ public class X11 extends POSIX {
     protected String[] _listFonts() { return fontList; }
 
     protected Picture _createPicture(int[] data, int w, int h) { return new X11Picture(data, w, h); }
-    protected DoubleBuffer _createDoubleBuffer(int w, int h, Surface owner) { return new X11DoubleBuffer(w, h); }
+    protected PixelBuffer _createDoubleBuffer(int w, int h, Surface owner) { return new X11DoubleBuffer(w, h); }
     protected Surface _createSurface(Box b, boolean framed) { return new X11Surface(b, framed); }
     protected boolean _needsAutoClick() { return true; }
     protected native int _getScreenWidth();
@@ -79,7 +79,7 @@ public class X11 extends POSIX {
         public native void syncCursor();
         public native void _dispose();
         public native void setLimits(int minw, int minh, int maxw, int maxh);
-        public native void blit(DoubleBuffer s, int sx, int sy, int dx, int dy, int dx2, int dy2);
+        public native void blit(PixelBuffer s, int sx, int sy, int dx, int dy, int dx2, int dy2);
         public native void dispatchEvent(gnu.gcj.RawData ev);
 
         public X11Surface(Box root, boolean framed) {
@@ -96,8 +96,8 @@ public class X11 extends POSIX {
     /**
      *  Implements a Picture. No special X11 structure is created
      *  unless the image has no alpha (in which case a
-     *  non-shared-pixmap DoubleBuffer is created), or all-or-nothing
-     *  alpha (in which case a non-shared-pixmap DoubleBuffer with a
+     *  non-shared-pixmap PixelBuffer is created), or all-or-nothing
+     *  alpha (in which case a non-shared-pixmap PixelBuffer with a
      *  stipple bitmap is created).
      */
     public static class X11Picture extends Picture {
@@ -105,7 +105,7 @@ public class X11 extends POSIX {
         int width;
         int height;
         int[] data = null;
-        public X11DoubleBuffer doublebuf = null;
+        public X11PixelBuffer doublebuf = null;
 
         public int getWidth() { return width; }
         public int getHeight() { return height; }
@@ -123,13 +123,13 @@ public class X11 extends POSIX {
                 else if ((data[i] & 0xFF000000) != 0x00)
                     return;
 
-            buildDoubleBuffer(needsStipple);
+            buildPixelBuffer(needsStipple);
         }
 
-        void buildDoubleBuffer(boolean needsStipple) {
+        void buildPixelBuffer(boolean needsStipple) {
             if (doublebuf != null) return;
             // no point in using a shared pixmap since we'll only write to this image once
-            X11DoubleBuffer b = new X11DoubleBuffer(width, height, false);
+            X11PixelBuffer b = new X11DoubleBuffer(width, height, false);
             b.drawPicture(this, 0, 0);
             if (needsStipple) b.createStipple(this);
             doublebuf = b;
@@ -138,22 +138,22 @@ public class X11 extends POSIX {
     }
 
     /**
-     *  An X11DoubleBuffer is implemented as an X11 pixmap. "Normal"
-     *  DoubleBuffers will use XShm shared pixmaps if
-     *  available. X11DoubleBuffers created to accelerate Pictures
+     *  An X11PixelBuffer is implemented as an X11 pixmap. "Normal"
+     *  PixelBuffers will use XShm shared pixmaps if
+     *  available. X11PixelBuffers created to accelerate Pictures
      *  with all-or-nothing alpha will not use shared pixmaps, however
      *  (since they are only written to once.
      */
-    public static class X11DoubleBuffer extends DoubleBuffer {
+    public static class X11PixelBuffer extends DoubleBuffer {
 
         int clipx, clipy, clipw, cliph;
         int width;
         int height;
 
-        /** DoubleBuffers of X11Pictures can have stipples -- the stipple of the Picture */
+        /** PixelBuffers of X11Pictures can have stipples -- the stipple of the Picture */
         RawData stipple = null;
 
-        /** Sets the DoubleBuffer's internal stipple to the alpha==0x00 regions of xpi */
+        /** Sets the PixelBuffer's internal stipple to the alpha==0x00 regions of xpi */
         public native void createStipple(X11Picture xpi);
         
         RawData pm;                    // Pixmap (if any) representing this Picture
@@ -164,9 +164,9 @@ public class X11 extends POSIX {
         RawData gc;                    // Graphics Context on pm (never changes, so it's fast)
         RawData clipped_gc;            // Graphics Context on pm, use this one if you need a clip/stipple
 
-        /** DoubleBuffer mode */
-        public X11DoubleBuffer(int w, int h) { this(w, h, true); }
-        public X11DoubleBuffer(int w, int h, boolean shared_pixmap) {
+        /** PixelBuffer mode */
+        public X11PixelBuffer(int w, int h) { this(w, h, true); }
+        public X11PixelBuffer(int w, int h, boolean shared_pixmap) {
             width = clipw = w;
             height = cliph = h;
             clipx = clipy = 0;