Function: x-dnd-handle-drag-n-drop-event

x-dnd-handle-drag-n-drop-event is an interactive and byte-compiled function defined in x-dnd.el.gz.

Signature

(x-dnd-handle-drag-n-drop-event EVENT)

Documentation

Receive drag and drop events (X client messages).

Currently XDND, Motif and old KDE 1.x protocols are recognized.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/x-dnd.el.gz
(defun x-dnd-handle-drag-n-drop-event (event)
  "Receive drag and drop events (X client messages).
Currently XDND, Motif and old KDE 1.x protocols are recognized."
  (interactive "e")
  (let* ((client-message (car (cdr (cdr event))))
	 (window (posn-window (event-start event)))
	 (message-atom (aref client-message 0))
	 (frame (aref client-message 1))
	 (format (aref client-message 2))
	 (data (aref client-message 3)))

    (cond ((equal "DndProtocol" message-atom)	; Old KDE 1.x.
	   (x-dnd-handle-old-kde event frame window message-atom format data))

	  ((equal "_MOTIF_DRAG_AND_DROP_MESSAGE" message-atom)	; Motif
	   (x-dnd-handle-motif event frame window message-atom format data))

	  ((and (> (length message-atom) 4)	; XDND protocol.
		(equal "Xdnd" (substring message-atom 0 4)))
	   (x-dnd-handle-xdnd event frame window message-atom format data)))))