annotate man/lispref/dragndrop.texi @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents 3ecd8885ac67
children 47c30044fc4e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 @c -*-texinfo-*-
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @c This is part of the XEmacs Lisp Reference Manual.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 @c Copyright (C) 1998 Oliver Graf <ograf@fga.de>
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
4 @c Original reference is (c) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 @c See the file lispref.texi for copying conditions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 @setfilename ../../info/dragndrop.texi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 @node Drag and Drop, Modes, Scrollbars, Top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 @chapter Drag and Drop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 @cindex drag and drop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 @emph{WARNING}: the Drag'n'Drop API is still under development and the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 interface may change! The current implementation is considered experimental.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 Drag'n'drop is a way to transfer information between multiple applications.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 To do this several GUIs define their own protocols. Examples are OffiX, CDE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 Motif, KDE, MSWindows, GNOME, and many more. To catch all these protocols,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 XEmacs provides a generic API.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 One prime idea behind the API is to use a data interface that is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 transparent for all systems. The author thinks that this is best
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 archived by using URL and MIME data, cause any internet enabled system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 must support these for email already. XEmacs also already provides
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 powerful interfaces to support these types of data (tm and w3).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 * Supported Protocols:: Which low-level protocols are supported.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 * Drop Interface:: How XEmacs handles a drop from another application.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 * Drag Interface:: Calls to initiate a drag from XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 @node Supported Protocols
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 @section Supported Protocols
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 The current release of XEmacs only support a small set of Drag'n'drop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 protocols. Some of these only support limited options available in the API.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 * OffiX DND:: A generic X based protocol.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 * CDE dt:: Common Desktop Environment used on suns.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 * MSWindows OLE:: Mr. Gates way of live.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 * Loose ends:: The other protocols.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 @node OffiX DND
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 @subsection OffiX DND
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 @cindex OffiX DND
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 @emph{WARNING}: If you compile in OffiX, you may not be able to use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 multiple X displays successfully. If the two servers are from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 different vendors, the results may be unpredictable.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 The OffiX Drag'n'Drop protocol is part of a X API/Widget library created by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 Cesar Crusius. It is based on X-Atoms and ClientMessage events, and works with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 any X platform supporting them.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 OffiX is supported if 'offix is member of the variable dragdrop-protocols, or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 the feature 'offix is defined.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 Unfortunately it uses it's own data types. Examples are: File, Files,
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
60 Exe, Link, URL, MIME. The API tries to choose the right type for the data that
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 is dragged from XEmacs (well, not yet...).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
63 XEmacs supports both MIME and URL drags and drops using this API. No application
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 interaction is possible while dragging is in progress.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 For information about the OffiX project have a look at http://leb.net/~offix/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 @node CDE dt
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 @subsection CDE dt
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 @cindex CDE dt
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 CDE stands for Common Desktop Environment. It is based on the Motif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 widget library. It's drag'n'drop protocol is also an abstraction of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 Motif protocol (so it might be possible, that XEmacs will also support
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 the Motif protocol soon).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 CDE has three different types: file, buffer, and text. XEmacs only uses
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 file and buffer drags. The API will disallow full URL drags, only file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 method URLs are passed through.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 Buffer drags are always converted to plain text.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 @node MSWindows OLE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 @subsection MSWindows OLE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 @cindex MSWindows OLE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 Only allows file drags and drops.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 @node Loose ends
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 @subsection Loose ends
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 The following protocols will be supported soon: Xdnd, Motif, Xde (if I
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 get some specs), KDE OffiX (if KDE can find XEmacs windows).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 In particular Xdnd will be one of the protocols that can benefit from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 the XEmacs API, cause it also uses MIME types to encode dragged data.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 @node Drop Interface
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 @section Drop Interface
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 @cindex drop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 @cindex Drop API
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 For each activated low-level protocol, a internal routine will catch
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 incoming drops and convert them to a dragdrop-drop type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 misc-user-event.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 This misc-user-event has its function argument set to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 @code{dragdrop-drop-dispatch} and the object contains the data of the drop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 (converted to URL/MIME specific data). This function will search the variable
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
110 @code{experimental-dragdrop-drop-functions} for a function that can handle the
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 dropped data.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 To modify the drop behavior, the user can modify the variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 @code{experimental-dragdrop-drop-functions}. Each element of this list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 specifies a possible handler for dropped data. The first one that can handle
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 the data will return @code{t} and exit. Another possibility is to set a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 extent-property with the same name. Extents are checked prior to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 variable.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 The customization group @code{drag-n-drop} shows all variables of user
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
121 interest.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 @node Drag Interface
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 @section Drag Interface
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 @cindex drag
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 @cindex Drag API
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 This describes the drag API (not implemented yet).