include/SDL_system.h
changeset 6630 55910871076b
parent 6392 fa7eb111f994
child 6635 e0c1f77597e3
     1.1 --- a/include/SDL_system.h	Fri Nov 02 00:35:48 2012 -0700
     1.2 +++ b/include/SDL_system.h	Fri Nov 02 02:22:32 2012 -0700
     1.3 @@ -43,6 +43,11 @@
     1.4  /* *INDENT-ON* */
     1.5  #endif
     1.6  
     1.7 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     1.8 +/*
     1.9 +/* Platform specific functions for iOS 
    1.10 +/*
    1.11 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    1.12  #if __IPHONEOS__
    1.13  
    1.14  extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
    1.15 @@ -53,7 +58,47 @@
    1.16  #define SDL_iPhoneKeyboardToggle    SDL_ToggleScreenKeyboard
    1.17  #define SDL_iPhoneKeyboardIsShown   SDL_IsScreenKeyboardShown
    1.18  
    1.19 -#endif
    1.20 +#endif /* __IPHONEOS__ */
    1.21 +
    1.22 +
    1.23 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    1.24 +/*
    1.25 +/* Platform specific functions for Android 
    1.26 +/*
    1.27 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    1.28 +#if __ANDROID__
    1.29 +
    1.30 +/* Get the JNI environment for the current thread
    1.31 +   This returns JNIEnv*, but the prototype is void* so we don't need jni.h
    1.32 + */
    1.33 +extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();
    1.34 +
    1.35 +/* Get the SDL Activity object for the application
    1.36 +   This returns jobject, but the prototype is void* so we don't need jni.h
    1.37 + */
    1.38 +extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
    1.39 +
    1.40 +/* See the official Android developer guide for more information:
    1.41 +   http://developer.android.com/guide/topics/data/data-storage.html
    1.42 +*/
    1.43 +#define SDL_ANDROID_EXTERNAL_STORAGE_READ   0x01
    1.44 +#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE  0x02
    1.45 +
    1.46 +/* Get the path used for internal storage for this application */
    1.47 +extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath();
    1.48 +
    1.49 +/* Get the current state of external storage, a bitmask of these values:
    1.50 +    SDL_ANDROID_EXTERNAL_STORAGE_READ
    1.51 +    SDL_ANDROID_EXTERNAL_STORAGE_WRITE
    1.52 +   If external storage is currently unavailable, this will return 0.
    1.53 +*/
    1.54 +extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState();
    1.55 +
    1.56 +/* Get the path used for external storage for this application */
    1.57 +extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath();
    1.58 +
    1.59 +#endif /* __ANDROID__ */
    1.60 +
    1.61  
    1.62  /* Ends C function definitions when using C++ */
    1.63  #ifdef __cplusplus