src/core/android/SDL_android.h
changeset 7039 f69b305b053d
parent 7018 9cef1005df5f
child 7245 03d2c8cb205d
equal deleted inserted replaced
7038:7f22b9ba218f 7039:f69b305b053d
    31 
    31 
    32 /* Interface from the SDL library into the Android Java activity */
    32 /* Interface from the SDL library into the Android Java activity */
    33 extern SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion, int red, int green, int blue, int alpha, int buffer, int depth, int stencil, int buffers, int samples);
    33 extern SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion, int red, int green, int blue, int alpha, int buffer, int depth, int stencil, int buffers, int samples);
    34 extern void Android_JNI_SwapWindow();
    34 extern void Android_JNI_SwapWindow();
    35 extern void Android_JNI_SetActivityTitle(const char *title);
    35 extern void Android_JNI_SetActivityTitle(const char *title);
    36 #ifdef ENABLE_ACCELOMETER_AS_EMULATED_JOYSTICK
       
    37 extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]);
    36 extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]);
    38 #endif
       
    39 extern void Android_JNI_ShowTextInput(SDL_Rect *inputRect);
    37 extern void Android_JNI_ShowTextInput(SDL_Rect *inputRect);
    40 extern void Android_JNI_HideTextInput();
    38 extern void Android_JNI_HideTextInput();
    41 
    39 
    42 // Audio support
    40 // Audio support
    43 extern int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int channelCount, int desiredBufferFrames);
    41 extern int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int channelCount, int desiredBufferFrames);
    60 SDL_bool Android_JNI_HasClipboardText();
    58 SDL_bool Android_JNI_HasClipboardText();
    61 
    59 
    62 /* Power support */
    60 /* Power support */
    63 int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent);
    61 int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent);
    64 
    62 
    65 /* Joystick/accelerometer support */
       
    66 int Android_JNI_JoystickInit();
       
    67 int Android_JNI_JoystickQuit();
       
    68 int Android_JNI_GetNumJoysticks();
       
    69 char* Android_JNI_GetJoystickName(int i);
       
    70 int Android_JNI_GetJoystickNumOfAxes(int index);
       
    71 #ifdef ENABLE_ACCELOMETER_AS_EMULATED_JOYSTICK
       
    72 char* Android_GetAccelName();
       
    73 #endif
       
    74 
       
    75 // Threads
    63 // Threads
    76 #include <jni.h>
    64 #include <jni.h>
    77 static void Android_JNI_ThreadDestroyed(void*);
    65 static void Android_JNI_ThreadDestroyed(void*);
    78 JNIEnv *Android_JNI_GetEnv(void);
    66 JNIEnv *Android_JNI_GetEnv(void);
    79 int Android_JNI_SetupThread(void);
    67 int Android_JNI_SetupThread(void);