]> code.delx.au - gnu-emacs/blobdiff - lisp/x-dnd.el
(ucs-names): New internal variable.
[gnu-emacs] / lisp / x-dnd.el
index f6f3b75dc0795f0fd44123f0808d3b3b58234456..2cee5710b49e092b4367908b4aa24ecabec28a79 100644 (file)
@@ -1,6 +1,6 @@
 ;;; x-dnd.el --- drag and drop support for X.
 
 ;;; x-dnd.el --- drag and drop support for X.
 
-;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
 ;; Maintainer: FSF
 
 ;; Author: Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
 ;; Maintainer: FSF
@@ -8,10 +8,10 @@
 
 ;; This file is part of GNU Emacs.
 
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,9 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
 
 ;;; Commentary:
 
@@ -117,7 +115,7 @@ any protocol specific data.")
 
 (defvar x-dnd-empty-state [nil nil nil nil nil nil nil])
 
 
 (defvar x-dnd-empty-state [nil nil nil nil nil nil nil])
 
-
+(declare-function x-register-dnd-atom "xselect.c")
 
 (defun x-dnd-init-frame (&optional frame)
   "Setup drag and drop for FRAME (i.e. create appropriate properties)."
 
 (defun x-dnd-init-frame (&optional frame)
   "Setup drag and drop for FRAME (i.e. create appropriate properties)."
@@ -358,6 +356,9 @@ Currently XDND, Motif and old KDE 1.x protocols are recognized."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;  Old KDE protocol.  Only dropping of files.
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;  Old KDE protocol.  Only dropping of files.
 
+(declare-function x-window-property "xfns.c"
+                 (prop &optional frame type source delete-p vector-ret-p))
+
 (defun x-dnd-handle-old-kde (event frame window message format data)
   "Open the files in a KDE 1.x drop."
   (let ((values (x-window-property "DndSelection" frame nil 0 t)))
 (defun x-dnd-handle-old-kde (event frame window message format data)
   "Open the files in a KDE 1.x drop."
   (let ((values (x-window-property "DndSelection" frame nil 0 t)))
@@ -378,6 +379,9 @@ Currently XDND, Motif and old KDE 1.x protocols are recognized."
     ("XdndActionAsk" . ask))
   "Mapping from XDND action types to lisp symbols.")
 
     ("XdndActionAsk" . ask))
   "Mapping from XDND action types to lisp symbols.")
 
+(declare-function x-change-window-property "xfns.c"
+                 (prop value &optional frame type format outer-P))
+
 (defun x-dnd-init-xdnd-for-frame (frame)
   "Set the XdndAware property for FRAME to indicate that we do XDND."
   (x-change-window-property "XdndAware"
 (defun x-dnd-init-xdnd-for-frame (frame)
   "Set the XdndAware property for FRAME to indicate that we do XDND."
   (x-change-window-property "XdndAware"
@@ -422,6 +426,12 @@ otherwise return the frame coordinates."
           (+ frame-real-top (nth 1 edges))))
       (cons frame-real-left frame-real-top))))
 
           (+ frame-real-top (nth 1 edges))))
       (cons frame-real-left frame-real-top))))
 
+(declare-function x-get-atom-name "xselect.c" (value &optional frame))
+(declare-function x-send-client-message "xselect.c"
+                 (display dest from message-type format values))
+(declare-function x-get-selection-internal "xselect.c"
+                 (selection-symbol target-type &optional time-stamp))
+
 (defun x-dnd-handle-xdnd (event frame window message format data)
   "Receive one XDND event (client message) and send the appropriate reply.
 EVENT is the client message.  FRAME is where the mouse is now.
 (defun x-dnd-handle-xdnd (event frame window message format data)
   "Receive one XDND event (client message) and send the appropriate reply.
 EVENT is the client message.  FRAME is where the mouse is now.
@@ -753,5 +763,5 @@ FORMAT is 32 (not used).  MESSAGE is the data part of an XClientMessageEvent."
 
 (provide 'x-dnd)
 
 
 (provide 'x-dnd)
 
-;;; arch-tag: b621fb7e-50da-4323-850b-5fc71ae64621
+;; arch-tag: b621fb7e-50da-4323-850b-5fc71ae64621
 ;;; x-dnd.el ends here
 ;;; x-dnd.el ends here