You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
split handle_cache out of util.c
This commit is contained in:
151
src/api-impl-jni/handle_cache.h
Normal file
151
src/api-impl-jni/handle_cache.h
Normal file
@@ -0,0 +1,151 @@
|
||||
#include <jni.h>
|
||||
|
||||
struct handle_cache {
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID onCreate;
|
||||
jmethodID onPostCreate;
|
||||
jmethodID onStart;
|
||||
jmethodID onResume;
|
||||
jmethodID onPostResume;
|
||||
jmethodID onWindowFocusChanged;
|
||||
jmethodID onDestroy;
|
||||
jmethodID onStop;
|
||||
jmethodID onPause;
|
||||
jmethodID onBackPressed;
|
||||
} activity;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID getAttributeValue_string;
|
||||
jmethodID getAttributeValue_int;
|
||||
} attribute_set;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID add;
|
||||
jmethodID remove;
|
||||
jmethodID get;
|
||||
jmethodID size;
|
||||
jmethodID clear;
|
||||
} array_list;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID getColor;
|
||||
} paint;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID constructor;
|
||||
jmethodID constructor_single;
|
||||
} motion_event;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID constructor;
|
||||
} sensor_event;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID onPeriodicNotification;
|
||||
} audio_track_periodic_listener;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID onInputQueueCreated;
|
||||
} input_queue_callback;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID surfaceCreated;
|
||||
jmethodID surfaceChanged;
|
||||
} surface_view;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID setLayoutParams;
|
||||
jmethodID onDraw;
|
||||
jmethodID dispatchDraw;
|
||||
jmethodID draw;
|
||||
jmethodID onMeasure;
|
||||
jmethodID onLayout;
|
||||
jmethodID getMeasuredWidth;
|
||||
jmethodID getMeasuredHeight;
|
||||
jmethodID getSuggestedMinimumWidth;
|
||||
jmethodID getSuggestedMinimumHeight;
|
||||
jmethodID setMeasuredDimension;
|
||||
jmethodID onGenericMotionEvent;
|
||||
jmethodID computeScroll;
|
||||
jmethodID getScrollX;
|
||||
jmethodID getScrollY;
|
||||
jmethodID performClick;
|
||||
jmethodID onTouchEvent;
|
||||
jmethodID onTouchEventInternal;
|
||||
jmethodID dispatchTouchEvent;
|
||||
jmethodID onInterceptTouchEvent;
|
||||
jmethodID layoutInternal;
|
||||
jmethodID measure;
|
||||
jmethodID performLongClick;
|
||||
jmethodID getId;
|
||||
jmethodID getIdName;
|
||||
jmethodID getAllSuperClasses;
|
||||
jmethodID dispatchKeyEvent;
|
||||
jmethodID onKeyDown;
|
||||
} view;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID dispatchTouchEvent;
|
||||
} view_group;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID extractFromAPK;
|
||||
} asset_manager;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID get_package_name;
|
||||
jmethodID sendBroadcast;
|
||||
jmethodID startActivity;
|
||||
jmethodID startService;
|
||||
} context;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID get_app_icon_path;
|
||||
jmethodID get_app_icon_paintable;
|
||||
} application;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID loop;
|
||||
jmethodID prepareMainLooper;
|
||||
} looper;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID constructor;
|
||||
} key_event;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID draw;
|
||||
jmethodID setBounds;
|
||||
} drawable;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID constructor;
|
||||
jmethodID putExtraCharSequence;
|
||||
jmethodID putExtraByteArray;
|
||||
jmethodID getDataString;
|
||||
jmethodID setClassName;
|
||||
} intent;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID internalGetAssetManager;
|
||||
jmethodID internalLoadChanged;
|
||||
} webview;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID onCreate;
|
||||
jmethodID start;
|
||||
} instrumentation;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID drawText;
|
||||
} canvas;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID parse;
|
||||
} uri;
|
||||
};
|
||||
|
||||
extern struct handle_cache handle_cache;
|
||||
|
||||
void set_up_handle_cache(JNIEnv *env);
|
||||
Reference in New Issue
Block a user