aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/AndroidWindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/native/AndroidWindow.c')
-rw-r--r--src/newt/native/AndroidWindow.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/newt/native/AndroidWindow.c b/src/newt/native/AndroidWindow.c
index 5eca96fc2..d75bc27d7 100644
--- a/src/newt/native/AndroidWindow.c
+++ b/src/newt/native/AndroidWindow.c
@@ -30,6 +30,13 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_android_AndroidWindow_getSurface
return (jlong) (intptr_t) anw;
}
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_android_AndroidWindow_getSurfaceVisualID
+ (JNIEnv *env, jclass clazz, jlong surfaceHandle)
+{
+ ANativeWindow * anw = (ANativeWindow *) (intptr_t) surfaceHandle;
+ return (jint) ANativeWindow_getFormat(anw);
+}
+
JNIEXPORT void JNICALL Java_jogamp_newt_driver_android_AndroidWindow_setSurfaceVisualID
(JNIEnv *env, jclass clazz, jlong surfaceHandle, jint nativeVisualID)
{
@@ -37,6 +44,20 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_android_AndroidWindow_setSurfaceV
ANativeWindow_setBuffersGeometry(anw, 0, 0, nativeVisualID);
}
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_android_AndroidWindow_acquire
+ (JNIEnv *env, jclass clazz, jlong surfaceHandle)
+{
+ ANativeWindow * anw = (ANativeWindow *) (intptr_t) surfaceHandle;
+ ANativeWindow_acquire(anw);
+}
+
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_android_AndroidWindow_release
+ (JNIEnv *env, jclass clazz, jlong surfaceHandle)
+{
+ ANativeWindow * anw = (ANativeWindow *) (intptr_t) surfaceHandle;
+ ANativeWindow_release(anw);
+}
+
JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_android_AndroidWindow_initIDs
(JNIEnv *env, jclass clazz)
{