Function: x-dnd-save-state

x-dnd-save-state is a byte-compiled function defined in x-dnd.el.gz.

Signature

(x-dnd-save-state WINDOW ACTION ACTION-TYPE &optional TYPES EXTRA-DATA)

Documentation

Save the state of the current drag and drop.

WINDOW is the window the mouse is over. ACTION is the action suggested by the source. ACTION-TYPE is the result of calling x-dnd-test-function. If given, TYPES are the types for the drop data that the source supports. EXTRA-DATA is data needed for a specific protocol.

Source Code

;; Defined in /usr/src/emacs/lisp/x-dnd.el.gz
(defun x-dnd-save-state (window action action-type &optional types extra-data)
  "Save the state of the current drag and drop.
WINDOW is the window the mouse is over.  ACTION is the action suggested
by the source.  ACTION-TYPE is the result of calling `x-dnd-test-function'.
If given, TYPES are the types for the drop data that the source supports.
EXTRA-DATA is data needed for a specific protocol."
  (let ((current-state (x-dnd-get-state-for-frame window)))
    (aset current-state 5 (car action-type))
    (aset current-state 4 (cdr action-type))
    (aset current-state 3 action)
    (when types (aset current-state 2 types))
    (when extra-data (aset current-state 6 extra-data))
    (aset current-state 1 window)
    (aset current-state 0 (and (window-live-p window) (window-buffer window)))
    (setcdr (x-dnd-get-state-cons-for-frame window) current-state)))