From http://www.jwz.org/xscreensaver/xscreensaver-5.31.tar.gz
[xscreensaver] / android / project / xscreensaver / src / org / jwz / xscreensaver / CallNative.java
diff --git a/android/project/xscreensaver/src/org/jwz/xscreensaver/CallNative.java b/android/project/xscreensaver/src/org/jwz/xscreensaver/CallNative.java
new file mode 100644 (file)
index 0000000..be8c66d
--- /dev/null
@@ -0,0 +1,25 @@
+package org.jwz.xscreensaver;
+
+public class CallNative {
+
+    void onSurfaceCreated() {
+        nativeInit();
+    }
+
+    void onSurfaceChanged(int w, int h) {
+        nativeResize(w, h);
+    }
+
+    void onDrawFrame() {
+        nativeRender();
+    }
+
+    void onDone() {
+        nativeDone();
+    }
+
+    public static native void nativeInit();
+    public static native void nativeResize(int w, int h);
+    public static native void nativeRender();
+    public static native void nativeDone();
+}