JAL-3446 JavaScript interface
[jalview.git] / src / swingjs / api / JSUtilI.java
index 1b6ff9b..322ec83 100644 (file)
@@ -7,6 +7,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.URL;
 import java.util.HashMap;
+import java.util.Map;
 import java.util.Properties;
 import java.util.function.Function;
 import java.util.zip.ZipEntry;
@@ -91,10 +92,10 @@ public interface JSUtilI {
 
 
        /**
-        * Get an attribute of applet's Info map for the applet found using
-        * getApplet(null). That is, applet.__Info[InfoKey].
+        * Get the applet's __Info map or an attribute of that map for the applet found using
+        * getApplet(null). That is, applet.__Info or applet.__Info[InfoKey].
         * 
-        * @param infoKey
+        * @param infoKey if null, return the full __Info map
         */
        Object getAppletInfo(String infoKey);
 
@@ -329,4 +330,25 @@ public interface JSUtilI {
         */
        void setUIEnabled(JComponent jc, boolean enabled);
 
+
+       /**
+        * Play an audio
+        * @param buffer
+        * @param format a javax.sound.sampled.AudioFormat
+        * @throws Exception 
+        */
+       void playAudio(byte[] buffer, Object format) throws Exception;
+
+       /**
+        * For either an applet or an application, get the ORIGINAL __Info as a Map that
+        * has a full set up lower-case keys along with whatever non-all-lower-case keys
+        * provided at start-up.
+        * 
+        * @return
+        */
+       Map<String, Object> getAppletInfoAsMap();
+
+       
+  void setAppClass(Object j);
+
 }