8 import javajs.awt.Font;
11 public interface GenericPlatform extends FontManager {
13 public final static int CURSOR_DEFAULT = 0;
14 public final static int CURSOR_CROSSHAIR = 1;
15 public final static int CURSOR_WAIT = 3;
16 public final static int CURSOR_ZOOM = 8;
17 public final static int CURSOR_HAND = 12;
18 public final static int CURSOR_MOVE = 13;
20 void setViewer(PlatformViewer vwr, Object display);
26 void convertPointFromScreen(Object display, P3 ptTemp);
28 void getFullScreenDimensions(Object display, int[] widthHeight);
30 boolean hasFocus(Object display);
32 String prompt(String label, String data, String[] list, boolean asButtons);
34 void repaint(Object display);
36 void requestFocusInWindow(Object display);
38 void setCursor(int i, Object display);
40 void setTransparentCursor(Object display);
44 GenericMouseInterface getMouseManager(double privateKey, Object display);
46 ///// core Image handling
48 Object allocateRgbImage(int windowWidth, int windowHeight, int[] pBuffer,
49 int windowSize, boolean backgroundTransparent, boolean isImageWrite);
51 void disposeGraphics(Object graphicForText);
53 void drawImage(Object g, Object img, int x, int y, int width, int height);
55 int[] drawImageToBuffer(Object gObj, Object imageOffscreen,
56 Object image, int width, int height, int bgcolor);
58 void flushImage(Object imagePixelBuffer);
60 Object getStaticGraphics(Object image, boolean backgroundTransparent);
62 Object getGraphics(Object image);
64 int getImageWidth(Object image);
66 int getImageHeight(Object image);
68 Object newBufferedImage(Object image, int i, int height);
70 Object newOffScreenImage(int w, int h);
73 void renderScreenImage(Object g, Object currentSize);
75 int[] getTextPixels(String text, Font font3d, Object gObj,
76 Object image, int mapWidth, int height,
79 ///// Image creation for export (optional for any platform)
82 * can be ignored (return null) if platform cannot save images
85 * @return null only if this platform cannot save images
87 Object createImage(Object ret);
99 int[] grabPixels(Object image, int width, int height,
100 int[] pixels, int startRow, int nRows);
103 * can be ignored (return false) if platform cannot save images
107 * @return false only if this platform cannot save images
108 * @throws InterruptedException
110 boolean waitForDisplay(Object boolIsEcho, Object image) throws InterruptedException;
112 GenericMenuInterface getMenuPopup(String menuStructure, char type);
114 Object getJsObjectInfo(Object[] jsObject, String method, Object[] args);
116 boolean isSingleThreaded();
118 void notifyEndOfRendering();
120 String getDateFormat(String isoType);
122 GenericFileInterface newFile(String name);
124 Object getBufferedFileInputStream(String name);
132 * @return may be javajs.util.SB or byte[] or java.io.InputStream
134 Object getURLContents(URL url, byte[] outputBytes, String post, boolean asString);
136 String getLocalUrl(String fileName);
138 GenericImageDialog getImageDialog(String title,
139 Map<String, GenericImageDialog> imageMap);