Subject: File drag and drop support for Emacs for Window NT

From: Sheng-Te Tsao <[email-masked]>
Date: Thu, 30 Oct 1997 15:22:29 -0500

Hi Geoff,

First let me thank you for all the work you put into Emacs for Windows
NT.  It has made my life as a programmer much easier.

I wrote these code to add Drag and Drop to emacs and since I just
updated your 19.34.6 source code to
have these changes I thought that this would be a good time to send them
to you.

The code is based on the drag and drop support code in the OS/2 version
of EMACS.  Basically the drop event is "simulated" by translating it
into an event for the non-existing mouse button 5

Besides drag and drop, I've also added another feature that makes EMACS
into a clipboard viewer.   When
This mode is turned on by calling win32-set-clipboard-viewer (which is
bound to Ctrl-Shift-Insert in win32-win.el), all text that is copied
into the clipboard are copied automatically into EMACS.   I found this
to be useful when I need to cut and paste many separate pieces of text
into a buffer from another application.  By turning it on I don't have
to constantly switch between EMACS and the other application.   You may
or may not find this to be an worthy feature to put into EMACS for NT.

To see all the changes, do a grep for "TSAO".   All the changes I made
are enclosed by #ifndef #endif that
gets compiled when the following compiler options are set (in w32term.h)

ALLOW_DROP_FILE
ALLOW_CLIPBOARD_VIEWER
ALLOW_SIMULATE_MOUSE_BUTTON

I've send the files to you as a zip file.  I don't know if a binary send
from my email system to yours will work or not.
If it does not work, let me know and I will send the files to you in
text format one by one.

I hope you find this code useful.

Sheng-Te