mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 00:01:33 -08:00
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.
This commit is contained in:
parent
46fd03a496
commit
5ff31bf36c
8 changed files with 186 additions and 90 deletions
|
|
@ -142,15 +142,18 @@ public final class EmacsNative
|
|||
|
||||
/* Send an ANDROID_TOUCH_DOWN event. */
|
||||
public static native long sendTouchDown (short window, int x, int y,
|
||||
long time, int pointerID);
|
||||
long time, int pointerID,
|
||||
int flags);
|
||||
|
||||
/* Send an ANDROID_TOUCH_UP event. */
|
||||
public static native long sendTouchUp (short window, int x, int y,
|
||||
long time, int pointerID);
|
||||
long time, int pointerID,
|
||||
int flags);
|
||||
|
||||
/* Send an ANDROID_TOUCH_MOVE event. */
|
||||
public static native long sendTouchMove (short window, int x, int y,
|
||||
long time, int pointerID);
|
||||
long time, int pointerID,
|
||||
int flags);
|
||||
|
||||
/* Send an ANDROID_WHEEL event. */
|
||||
public static native long sendWheel (short window, int x, int y,
|
||||
|
|
|
|||
|
|
@ -1025,23 +1025,30 @@ public final class EmacsWindow extends EmacsHandleObject
|
|||
/* Touch down event. */
|
||||
EmacsNative.sendTouchDown (this.handle, coordinate.x,
|
||||
coordinate.y, time,
|
||||
coordinate.id);
|
||||
coordinate.id, 0);
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
case MotionEvent.ACTION_POINTER_UP:
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
/* Touch up event. Android documentation says ACTION_CANCEL
|
||||
should be treated as more or less equivalent to ACTION_UP,
|
||||
so that is what is done here. */
|
||||
/* Touch up event. */
|
||||
EmacsNative.sendTouchUp (this.handle, coordinate.x,
|
||||
coordinate.y, time, coordinate.id);
|
||||
coordinate.y, time,
|
||||
coordinate.id, 0);
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
/* Touch sequence cancellation event. */
|
||||
EmacsNative.sendTouchUp (this.handle, coordinate.x,
|
||||
coordinate.y, time,
|
||||
coordinate.id,
|
||||
1 /* ANDROID_TOUCH_SEQUENCE_CANCELED */);
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
/* Pointer motion event. */
|
||||
EmacsNative.sendTouchMove (this.handle, coordinate.x,
|
||||
coordinate.y, time, coordinate.id);
|
||||
coordinate.y, time,
|
||||
coordinate.id, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue