Make NS port use the normal dnd functions.
authorJan Djärv <jan.h.d@swipnet.se>
Thu, 19 Dec 2013 10:25:48 +0000 (11:25 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Thu, 19 Dec 2013 10:25:48 +0000 (11:25 +0100)
commit1269a680862a9bc6cd65e3d26ef05f68c7521632
tree1160cb3afcd5b77d2240c276029289ce38feffc1
parent680e6b8c5a28489733df544edb074fd29d0522a0
Make NS port use the normal dnd functions.

* lisp/term/ns-win.el: Require dnd.
(global-map): Remove drag items.
(ns-insert-text, ns-set-foreground-at-mouse)
(ns-set-background-at-mouse): Remove
(ns-drag-n-drop, ns-drag-n-drop-other-frame)
(ns-drag-n-drop-as-text, ns-drag-n-drop-as-text-other-frame): New
functions.

* src/nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
Remove.

* src/nsterm.m (Qfile, Qurl): New.
(EV_MODIFIERS2): New macro.
(EV_MODIFIERS): Use EV_MODIFIERS2.
(ns_term_init): Remove font and color from DND, does not work on
newer OSX, and other ports don't have them.
(performDragOperation:): Handle modifiers used during drag.
Use DRAG_N_DROP_EVENT instead of NS specific events.
Remove global Lisp variables used to communicate with ns-win.el.
Remove font and color handling.
(syms_of_nsterm): Defsym Qfile and Qurl.

Fixes: debbugs:8051
lisp/ChangeLog
lisp/term/ns-win.el
src/ChangeLog
src/nsterm.h
src/nsterm.m