18 #ifndef _PLATFORM_UNIX_H 19 #define _PLATFORM_UNIX_H 38 #include <android/looper.h> 39 #include <android/configuration.h> 40 #include <android/native_activity.h> 41 #include <android/window.h> 42 #include <android/sensor.h> 46 bool test_permissions(
const char *
path);
53 struct android_poll_source
60 struct android_app*
app;
64 void (*process)(
struct android_app*
app,
struct android_poll_source*
source);
83 ANativeActivity* activity;
98 size_t savedStateSize;
105 AInputQueue* inputQueue;
119 int destroyRequested;
130 struct android_poll_source cmdPollSource;
131 struct android_poll_source inputPollSource;
136 AInputQueue* pendingInputQueue;
137 ANativeWindow* pendingWindow;
141 unsigned accelerometer_event_rate;
142 ASensorManager *sensorManager;
143 ASensorEventQueue *sensorEventQueue;
144 const ASensor* accelerometerSensor;
151 jmethodID onRetroArchExit;
152 jmethodID getStringExtra;
153 jmethodID clearPendingIntent;
154 jmethodID hasPendingIntent;
155 jmethodID getPendingIntentConfigPath;
156 jmethodID getPendingIntentLibretroPath;
157 jmethodID getPendingIntentFullPath;
158 jmethodID getPendingIntentIME;
159 jmethodID getPendingIntentStorageLocation;
160 jmethodID getPendingIntentDownloadsLocation;
161 jmethodID getPendingIntentScreenshotsLocation;
162 jmethodID isAndroidTV;
163 jmethodID getPowerstate;
164 jmethodID getBatteryLevel;
165 jmethodID setSustainedPerformanceMode;
179 APP_CMD_INPUT_CHANGED,
199 APP_CMD_WINDOW_RESIZED,
206 APP_CMD_WINDOW_REDRAW_NEEDED,
213 APP_CMD_CONTENT_RECT_CHANGED,
219 APP_CMD_GAINED_FOCUS,
230 APP_CMD_CONFIG_CHANGED,
273 #define JNI_EXCEPTION(env) \ 274 if ((*env)->ExceptionOccurred(env)) \ 276 (*env)->ExceptionDescribe(env); \ 277 (*env)->ExceptionClear(env); \ 280 #define FIND_CLASS(env, var, classname) \ 281 var = (*env)->FindClass(env, classname); \ 284 #define GET_OBJECT_CLASS(env, var, clazz_obj) \ 285 var = (*env)->GetObjectClass(env, clazz_obj); \ 288 #define GET_FIELD_ID(env, var, clazz, fieldName, fieldDescriptor) \ 289 var = (*env)->GetFieldID(env, clazz, fieldName, fieldDescriptor); \ 292 #define GET_METHOD_ID(env, var, clazz, methodName, fieldDescriptor) \ 293 var = (*env)->GetMethodID(env, clazz, methodName, fieldDescriptor); \ 296 #define GET_STATIC_METHOD_ID(env, var, clazz, methodName, fieldDescriptor) \ 297 var = (*env)->GetStaticMethodID(env, clazz, methodName, fieldDescriptor); \ 300 #define CALL_OBJ_METHOD(env, var, clazz_obj, methodId) \ 301 var = (*env)->CallObjectMethod(env, clazz_obj, methodId); \ 304 #define CALL_OBJ_STATIC_METHOD(env, var, clazz, methodId) \ 305 var = (*env)->CallStaticObjectMethod(env, clazz, methodId); \ 308 #define CALL_OBJ_STATIC_METHOD_PARAM(env, var, clazz, methodId, ...) \ 309 var = (*env)->CallStaticObjectMethod(env, clazz, methodId, __VA_ARGS__); \ 312 #define CALL_OBJ_METHOD_PARAM(env, var, clazz_obj, methodId, ...) \ 313 var = (*env)->CallObjectMethod(env, clazz_obj, methodId, __VA_ARGS__); \ 316 #define CALL_VOID_METHOD(env, clazz_obj, methodId) \ 317 (*env)->CallVoidMethod(env, clazz_obj, methodId); \ 320 #define CALL_VOID_METHOD_PARAM(env, clazz_obj, methodId, ...) \ 321 (*env)->CallVoidMethod(env, clazz_obj, methodId, __VA_ARGS__); \ 324 #define CALL_BOOLEAN_METHOD(env, var, clazz_obj, methodId) \ 325 var = (*env)->CallBooleanMethod(env, clazz_obj, methodId); \ 328 #define CALL_DOUBLE_METHOD(env, var, clazz_obj, methodId) \ 329 var = (*env)->CallDoubleMethod(env, clazz_obj, methodId); \ 332 #define CALL_INT_METHOD(env, var, clazz_obj, methodId) \ 333 var = (*env)->CallIntMethod(env, clazz_obj, methodId); \ 336 extern JNIEnv *jni_thread_getenv(
void);
338 void android_app_write_cmd(
struct android_app *android_app,
int8_t cmd);
340 extern struct android_app *g_android;
#define MAX_AXIS
Definition: platform_unix.h:30
static int16_t analog_state[1][2][2]
Definition: ctr_joypad.c:35
Definition: rthreads.c:88
GLsizei const GLchar ** path
Definition: glext.h:7901
#define MAX_PADS
Definition: platform_unix.h:26
GLenum GLuint id
Definition: glext.h:6233
static int cond(LexState *ls)
Definition: lparser.c:1177
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
static sys_sem mutex
Definition: memp.c:120
#define PATH_MAX_LENGTH
Definition: retro_miscellaneous.h:83
typedefRETRO_BEGIN_DECLS struct sthread sthread_t
Definition: rthreads.h:35
ubyte cmd
Definition: wiiuse_internal.h:319
signed short int16_t
Definition: stdint.h:122
Definition: rthreads.c:106
signed int int32_t
Definition: stdint.h:123
GLsizei GLsizei GLchar * source
Definition: glext.h:6688
CRetroArch app
Definition: xui.cpp:140
struct _cl_event * event
Definition: glext.h:8406
void * userData
Definition: jsonsax_full.h:259
unsigned __int64 uint64_t
Definition: stdint.h:136
signed char int8_t
Definition: stdint.h:121