]> git.eshelyaron.com Git - emacs.git/commit
Implement drag-n-drop for w32 with support for files and text
authorCecilio Pardo <cpardo@imayhem.com>
Fri, 27 Sep 2024 21:58:02 +0000 (23:58 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 14 Oct 2024 17:37:10 +0000 (19:37 +0200)
commit04885eb8bb461e2ae3f30de4f09b6eb7f2526a7f
tree5fcb9b4d5f8c4a09dca187a52139ec8bc11016ed
parent54ca700a01fb581ba33c862a70074a8169375c62
Implement drag-n-drop for w32 with support for files and text

Implement drag-n-drop with IDropTarget for MS-Windows. This
allows for dropping files or text.
* lisp/term/w32-win.el (w32-drag-n-drop): Change to handle
files or strings.
* src/w32fns.c (process_dropfiles): New function to convert
DROPFILES struct to array of strings.
(w32_process_dnd_data): New function to process drop data.
(w32_try_get_data): Extract data from IDataObject.
(w32_createwindow): Assign an IDropTarget to each new frame.
(w32_name_of_message): New message.
(w32_msg_pump): Changed CoInitialize to OleInitialize, needed
by the drag-n-drop functions.
(w32_wnd_proc): New struct w32_drop_target, and
w32_drop_target_* functions to implement the IDropTarget
interface.
* src/w32term.c (w32_read_socket): Handle WM_EMACS_DROP and
remove WM_EMACS_DROPFILES.
* src/w32term.h: New message WM_EMACS_DROP.
(Bug#3468)

* etc/NEWS: Announce the new feature.

(cherry picked from commit 9af36e70f83d00eaef2255929e8aed7e1d3ed5b9)
etc/NEWS
lisp/term/w32-win.el
src/w32fns.c
src/w32term.c
src/w32term.h