X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src2%2Fjavajs%2Fapi%2FJSInterface.java;fp=src2%2Fjavajs%2Fapi%2FJSInterface.java;h=0f785fa799565f96d9797beefe61f9affff90be1;hb=665d2c2f4c1310e6985b93b7c2c8a8eec2fa9086;hp=0000000000000000000000000000000000000000;hpb=0e684f72690bd6532272a39ab6c188a27559fd09;p=jalview.git diff --git a/src2/javajs/api/JSInterface.java b/src2/javajs/api/JSInterface.java new file mode 100644 index 0000000..0f785fa --- /dev/null +++ b/src2/javajs/api/JSInterface.java @@ -0,0 +1,30 @@ +package javajs.api; + +/** + * called by JSmol JavaScript methods using + * + * this._applet.xxxx() + * + */ +public interface JSInterface { + + int cacheFileByName(String fileName, boolean isAdd); + void cachePut(String key, Object data); + void destroy(); + String getFullName(); + void openFileAsyncSpecial(String fileName, int flags); + boolean processMouseEvent(int id, int x, int y, int modifiers, long time); + void processTwoPointGesture(float[][][] touches); + void setDisplay(Object canvas); + void setScreenDimension(int width, int height); + boolean setStatusDragDropped(int mode, int x, int y, String fileName); + void startHoverWatcher(boolean enable); + void update(); + + // these are not general methods +//Object getGLmolView(); +//String loadInlineString(String mol, String script, boolean isAppend); +//String openFile(String fileName); + +} +