]> git.eshelyaron.com Git - emacs.git/commit
Implement multi-window drag-and-drop under Android
authorPo Lu <luangruo@yahoo.com>
Sat, 14 Oct 2023 02:15:20 +0000 (10:15 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 14 Oct 2023 02:15:42 +0000 (10:15 +0800)
commit03f5a06a052ee0b4b8b77b4460ead717b87c4798
treec047e2c53e56e6c6e20b5475a6e33fd1b25ece96
parent0dd7e6e3aeac1ab0a03f2ed2ad108deecde82447
Implement multi-window drag-and-drop under Android

* java/org/gnu/emacs/EmacsNative.java (sendDndDrag, sendDndUri)
(sendDndText): Declare new event-sending functions.

* java/org/gnu/emacs/EmacsView.java (onDragEvent): New function.

* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): New
function; respond to each drag and drop event, request
permissions if necessary and transfer dropped data to Lisp.

* lisp/dnd.el (dnd-unescape-file-uris): New variable.
(dnd-get-local-file-name): If that variable is nil, refrain from
unescaping URLs provided.

* lisp/term/android-win.el (android-handle-dnd-event): New
function.
(special-event-map): Bind drag-n-drop-event.

* src/android.c (sendDndDrag, sendDndUri, sendDndText): New
functions.

* src/androidgui.h (enum android_event_type): New event types
ANDROID_DND_DRAG_EVENT, ANDROID_DND_URI_EVENT,
ANDROID_DND_TEXT_EVENT.
(struct android_dnd_event): New structure.
(union android_event) <dnd>: New field.

* src/androidterm.c (handle_one_android_event)
<ANDROID_DND_..._EVENT>: Generate drag-n-drop events for each
of these types.
(syms_of_androidterm) <Quri, Qtext>: New defsyms.
java/org/gnu/emacs/EmacsNative.java
java/org/gnu/emacs/EmacsView.java
java/org/gnu/emacs/EmacsWindow.java
lisp/dnd.el
lisp/term/android-win.el
src/android.c
src/androidgui.h
src/androidterm.c