X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fplat%2FX11.java;h=72120f7f275fc52a36892136f7489ec15bf9c0e8;hp=e821ad5182f6c3bc6ed2292ea7de43a640c6a840;hb=HEAD;hpb=3591b88b94a6bb378af3d4abe6eb5233ce583104 diff --git a/src/org/ibex/plat/X11.java b/src/org/ibex/plat/X11.java index e821ad5..72120f7 100644 --- a/src/org/ibex/plat/X11.java +++ b/src/org/ibex/plat/X11.java @@ -5,7 +5,9 @@ import gnu.gcj.RawData; import java.util.*; import org.ibex.js.*; import org.ibex.util.*; -import org.ibex.*; +import org.ibex.graphics.*; +import org.ibex.core.*; +import org.ibex.net.*; /** Platform implementation for POSIX compliant operating systems with an X11 Server */ public class X11 extends POSIX { @@ -40,10 +42,10 @@ public class X11 extends POSIX { protected native String _getClipBoard(); protected native void _setClipBoard(String s); protected boolean _needsAutoDoubleClick() { return true; } + protected native String _fileDialog(String suggestedFileName, boolean write); protected native void eventThread(); private native void natInit(); - public X11() { } public void postInit() { natInit(); (new Thread() { public void run() { eventThread(); } }).start(); @@ -51,9 +53,12 @@ public class X11 extends POSIX { // X11Surface ///////////////////////////////////////////////////// + /** Implements a Surface as an X11 Window */ - public static class X11Surface extends Surface.DoubleBufferedSurface { + public static class X11Surface extends Surface { + public PixelBuffer getPixelBuffer() { return null; } // FIXME + gnu.gcj.RawData window; gnu.gcj.RawData gc; boolean framed = false; @@ -136,7 +141,16 @@ public class X11 extends POSIX { * with all-or-nothing alpha will not use shared pixmaps, however * (since they are only written to once. */ - public static class X11PixelBuffer extends PixelBuffer { + public static class X11PixelBuffer implements PixelBuffer { + public void fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int argb) { throw new Error("not implemented"); } + + public void drawPicture(Picture p, Affine a, Mesh h) { throw new Error("drawPicture() not implemented"); } + public void drawGlyph(Font.Glyph source,Affine a,Mesh h,int rgb,int bg) { throw new Error("drawGlyph() not implemented"); } + + public void drawLine(int x1, int y1, int x2, int y2, int color) { } + public void drawGlyph(Font.Glyph source, int dx1, int dy1, int cx1, int cy1, int cx2, int cy2, int rgb, int pc){} + public void stroke(Mesh p, int color){} + public void fill(Mesh p, Paint paint){} int clipx, clipy, clipw, cliph; int width;