Browse Source

WIP JNI support for sdl2.

Mark Sibly 8 years ago
parent
commit
324a581bfa
1 changed files with 16 additions and 0 deletions
  1. 16 0
      modules/sdl2/sdl2.monkey2

+ 16 - 0
modules/sdl2/sdl2.monkey2

@@ -1,10 +1,18 @@
 
 Namespace sdl2
 
+#Import "<jni>"
 #Import "<libc>"
 #Import "<gles20>"
 
 #Import "SDL/include/*.h"
+
+#If __TARGET__="android"
+
+#Import "SDL/src/core/android/SDL_android.h"
+
+#Endif
+
 #Import "<SDL.h>"
 
 #Import "makefile.monkey2"
@@ -13,6 +21,14 @@ Using libc
 
 Extern
 
+#If __TARGET__="android"
+
+Function Android_JNI_GetEnv:jni.JNIEnv()
+Function Android_JNI_GetActivityClass:jni.jclass()
+Function Android_JNI_SetActivityTitle( title:CString )
+
+#Endif
+
 Struct SDL_Surface
 End