swingjs/api, javajs/async
[jalview.git] / src / swingjs / api / js / JSInterface.java
1 package swingjs.api.js;
2
3 /**
4  * called by SwingJS JavaScript methods
5  * 
6  */
7 public interface JSInterface {
8
9         int cacheFileByName(String fileName, boolean isAdd); // $S$Z
10
11         void cachePut(String key, Object data); // $S$O
12
13         void destroy();
14
15         String getFullName();
16
17         void openFileAsyncSpecial(String fileName, int flags); // $S$I
18
19         boolean processMouseEvent(int id, int x, int y, int modifiers, long time, Object jqevent, int scroll); // $I$I$I$I$J$O$I
20
21         void processTwoPointGesture(float[][][] touches); // AFFF
22
23         void setDisplay(HTML5Canvas canvas);
24
25         void setScreenDimension(int width, int height);
26
27         boolean setStatusDragDropped(int mode, int x, int y, String fileName);
28
29         void startHoverWatcher(boolean enable);
30
31         static void setCursor(String c) {
32                 /**
33                  * @j2sNative
34                  * 
35                  * try {
36                  * 
37                  *   document.body.style.cursor = c;
38                  * 
39                  * } catch (e) {}
40                  */
41         }
42
43 }