aboutsummaryrefslogtreecommitdiffstats
path: root/src/android.c
diff options
context:
space:
mode:
authorPo Lu2023-07-18 10:12:40 +0800
committerPo Lu2023-07-18 10:12:40 +0800
commit5ff31bf36cf00f9d5a378ce139fd5c2ae8d3f25e (patch)
tree5f1d6659da915840edcb12ed1931a8c379cedfce /src/android.c
parent46fd03a49617066fca87000378771caedfd150f3 (diff)
downloademacs-5ff31bf36cf00f9d5a378ce139fd5c2ae8d3f25e.tar.gz
emacs-5ff31bf36cf00f9d5a378ce139fd5c2ae8d3f25e.zip
Update Android port
* doc/lispref/commands.texi (Touchscreen Events): Describe treatment of canceled touch sequences during touch event translation. * java/org/gnu/emacs/EmacsNative.java (EmacsNative): Update JNI prototypes. * java/org/gnu/emacs/EmacsWindow.java (motionEvent): Set cancelation flag in events sent where appropriate. * lisp/touch-screen.el (touch-screen-handle-point-update): Improve treatment of horizontal scrolling near window edges. (touch-screen-handle-touch): Don't handle point up if the touch sequence has been canceled. * src/android.c (sendTouchDown, sendTouchUp, sendTouchMove): New argument `flags'. * src/androidgui.h (enum android_touch_event_flags): New enum. (struct android_touch_event): New field `flags'. * src/androidterm.c (handle_one_android_event): Report cancelation in TOUCHSCREEN_END_EVENTs. * src/keyboard.c (make_lispy_event): Fix botched merge.
Diffstat (limited to 'src/android.c')
-rw-r--r--src/android.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/android.c b/src/android.c
index 90288737c77..f2e5e75d35e 100644
--- a/src/android.c
+++ b/src/android.c
@@ -2870,7 +2870,8 @@ NATIVE_NAME (sendButtonRelease) (JNIEnv *env, jobject object,
2870JNIEXPORT jlong JNICALL 2870JNIEXPORT jlong JNICALL
2871NATIVE_NAME (sendTouchDown) (JNIEnv *env, jobject object, 2871NATIVE_NAME (sendTouchDown) (JNIEnv *env, jobject object,
2872 jshort window, jint x, jint y, 2872 jshort window, jint x, jint y,
2873 jlong time, jint pointer_id) 2873 jlong time, jint pointer_id,
2874 jint flags)
2874{ 2875{
2875 JNI_STACK_ALIGNMENT_PROLOGUE; 2876 JNI_STACK_ALIGNMENT_PROLOGUE;
2876 2877
@@ -2883,6 +2884,7 @@ NATIVE_NAME (sendTouchDown) (JNIEnv *env, jobject object,
2883 event.touch.y = y; 2884 event.touch.y = y;
2884 event.touch.time = time; 2885 event.touch.time = time;
2885 event.touch.pointer_id = pointer_id; 2886 event.touch.pointer_id = pointer_id;
2887 event.touch.flags = flags;
2886 2888
2887 android_write_event (&event); 2889 android_write_event (&event);
2888 return event_serial; 2890 return event_serial;
@@ -2891,7 +2893,8 @@ NATIVE_NAME (sendTouchDown) (JNIEnv *env, jobject object,
2891JNIEXPORT jlong JNICALL 2893JNIEXPORT jlong JNICALL
2892NATIVE_NAME (sendTouchUp) (JNIEnv *env, jobject object, 2894NATIVE_NAME (sendTouchUp) (JNIEnv *env, jobject object,
2893 jshort window, jint x, jint y, 2895 jshort window, jint x, jint y,
2894 jlong time, jint pointer_id) 2896 jlong time, jint pointer_id,
2897 jint flags)
2895{ 2898{
2896 JNI_STACK_ALIGNMENT_PROLOGUE; 2899 JNI_STACK_ALIGNMENT_PROLOGUE;
2897 2900
@@ -2904,6 +2907,7 @@ NATIVE_NAME (sendTouchUp) (JNIEnv *env, jobject object,
2904 event.touch.y = y; 2907 event.touch.y = y;
2905 event.touch.time = time; 2908 event.touch.time = time;
2906 event.touch.pointer_id = pointer_id; 2909 event.touch.pointer_id = pointer_id;
2910 event.touch.flags = flags;
2907 2911
2908 android_write_event (&event); 2912 android_write_event (&event);
2909 return event_serial; 2913 return event_serial;
@@ -2912,7 +2916,8 @@ NATIVE_NAME (sendTouchUp) (JNIEnv *env, jobject object,
2912JNIEXPORT jlong JNICALL 2916JNIEXPORT jlong JNICALL
2913NATIVE_NAME (sendTouchMove) (JNIEnv *env, jobject object, 2917NATIVE_NAME (sendTouchMove) (JNIEnv *env, jobject object,
2914 jshort window, jint x, jint y, 2918 jshort window, jint x, jint y,
2915 jlong time, jint pointer_id) 2919 jlong time, jint pointer_id,
2920 jint flags)
2916{ 2921{
2917 JNI_STACK_ALIGNMENT_PROLOGUE; 2922 JNI_STACK_ALIGNMENT_PROLOGUE;
2918 2923
@@ -2925,6 +2930,7 @@ NATIVE_NAME (sendTouchMove) (JNIEnv *env, jobject object,
2925 event.touch.y = y; 2930 event.touch.y = y;
2926 event.touch.time = time; 2931 event.touch.time = time;
2927 event.touch.pointer_id = pointer_id; 2932 event.touch.pointer_id = pointer_id;
2933 event.touch.flags = flags;
2928 2934
2929 android_write_event (&event); 2935 android_write_event (&event);
2930 return event_serial; 2936 return event_serial;