| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | |
| | | #include "SDL_audio.h" |
| | | #include "SDL_rect.h" |
| | | #include "SDL_video.h" |
| | | |
| | | /* Interface from the SDL library into the Android Java activity */ |
| | | extern void Android_JNI_SetActivityTitle(const char *title); |
| | | extern void Android_JNI_SetWindowStyle(SDL_bool fullscreen); |
| | | extern void Android_JNI_SetOrientation(int w, int h, int resizable, const char *hint); |
| | | extern void Android_JNI_MinizeWindow(void); |
| | | extern SDL_bool Android_JNI_ShouldMinimizeOnFocusLoss(void); |
| | | |
| | | extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]); |
| | | extern void Android_JNI_ShowTextInput(SDL_Rect *inputRect); |
| | | extern void Android_JNI_HideTextInput(void); |
| | | extern SDL_bool Android_JNI_IsScreenKeyboardShown(void); |
| | | extern ANativeWindow* Android_JNI_GetNativeWindow(void); |
| | | extern void Android_JNI_SetSurfaceViewFormat(int format); |
| | | |
| | | extern SDL_DisplayOrientation Android_JNI_GetDisplayOrientation(void); |
| | | extern int Android_JNI_GetDisplayDPI(float *ddpi, float *xdpi, float *ydpi); |
| | | |
| | | /* Audio support */ |
| | |
| | | extern int Android_JNI_CaptureAudioBuffer(void *buffer, int buflen); |
| | | extern void Android_JNI_FlushCapturedAudio(void); |
| | | extern void Android_JNI_CloseAudioDevice(const int iscapture); |
| | | extern void Android_JNI_AudioSetThreadPriority(int iscapture, int device_id); |
| | | |
| | | /* Detecting device type */ |
| | | extern SDL_bool Android_IsDeXMode(); |
| | | extern SDL_bool Android_IsChromebook(); |
| | | extern SDL_bool Android_IsDeXMode(void); |
| | | extern SDL_bool Android_IsChromebook(void); |
| | | |
| | | #include "SDL_rwops.h" |
| | | |
| | |
| | | void Android_JNI_SuspendScreenSaver(SDL_bool suspend); |
| | | |
| | | /* Touch support */ |
| | | int Android_JNI_InitTouch(void); |
| | | void Android_JNI_SetSeparateMouseAndTouch(SDL_bool new_value); |
| | | int Android_JNI_GetTouchDeviceIds(int **ids); |
| | | void Android_JNI_InitTouch(void); |
| | | |
| | | /* Threads */ |
| | | #include <jni.h> |
| | |
| | | SDL_bool Android_JNI_SupportsRelativeMouse(void); |
| | | SDL_bool Android_JNI_SetRelativeMouseEnabled(SDL_bool enabled); |
| | | |
| | | /* Request permission */ |
| | | SDL_bool Android_JNI_RequestPermission(const char *permission); |
| | | |
| | | int SDL_GetAndroidSDKVersion(void); |
| | | |
| | | SDL_bool SDL_IsAndroidTablet(void); |
| | | SDL_bool SDL_IsAndroidTV(void); |
| | | SDL_bool SDL_IsChromebook(void); |
| | | SDL_bool SDL_IsDeXMode(void); |
| | | |
| | | void Android_ActivityMutex_Lock(void); |
| | | void Android_ActivityMutex_Unlock(void); |
| | | void Android_ActivityMutex_Lock_Running(void); |
| | | |
| | | /* Ends C function definitions when using C++ */ |
| | | #ifdef __cplusplus |
| | | /* *INDENT-OFF* */ |