comparison tests/Dnd/README @ 284:558f606b08ae r21-0b40

Import from CVS: tag r21-0b40
author cvs
date Mon, 13 Aug 2007 10:34:13 +0200
parents c42ec1d1cded
children e11d67e05968
comparison
equal deleted inserted replaced
283:fa3d41851a08 284:558f606b08ae
1 * Sun May 3 1998 Oliver Graf <ograf@fga.de> 1 * Sun May 3 1998 Oliver Graf <ograf@fga.de>
2 2
3 This path contains test code for the new XEmacs 3 This path contains test code for the new XEmacs
4 Drag'n'Drop code. 4 Drag'n'Drop code.
5 5
6 Currently only drags are of interest. The internal 6 Currently only drops are of interest. The internal
7 functions only work for OffiX. MSWindows and CDE 7 functions only work for OffiX and MSWindows. CDE
8 are broken with this patch. 8 is broken with this.
9 9
10 The OffiX functions in mouse.el also work no longer, 10 The OffiX functions in mouse.el also work no longer,
11 because drags are now misc-user-events. 11 because drops are now misc-user-events.
12 12
13 The misc-user-event now also responds as a button-x-event 13 The misc-user-event now also responds as a button-x-event
14 to the event-* query functions. 14 to the event-* query functions.
15 15
16 The function of a drag is called dragdrop-drop-dispatch 16 The function of a drag is called dragdrop-drop-dispatch
17 as you can see in droptest.el. From within the function 17 as you can see in droptest.el. From within the function
18 you can access the actual misc-user-event through the 18 you can access the actual misc-user-event through the
19 current-mouse-event variable. 19 current-mouse-event variable.
20 20
21 dragtest.el works theoretically, but it needs to be 21 dragtest.el works theoretically, but it needs to be
22 adapted to some new scheme fitting the drop code. 22 adapted to some new scheme fitting the drop code (droptest.el
23 has it's own dragsources).
23 24
24 Short description of the object part of a drop misc-user-event: 25 Short description of the object part of a drop misc-user-event:
25 ( TYPE . DATA ) 26 ( TYPE . DATA )
26 TYPE is either the symbol dragdrop_MIME 27 TYPE is either the symbol dragdrop_MIME
27 or the symbol dragdrop_URL 28 or the symbol dragdrop_URL
28 29
29 DATA is a list of URL strings if TYPE is dragdrop_URL 30 DATA is a list of URL strings if TYPE is dragdrop_URL
30 if TYPE is dragdrop_MIME DATA is either a string 31 if TYPE is dragdrop_MIME DATA is either a string
31 which contains the MIME data, or it is a list of 32 which contains the MIME data, or it is a list of
32 ( CONTENT-TYPE CONTENT-ENCODING MIME-DATA ) 33 ( CONTENT-TYPE CONTENT-ENCODING MIME-DATA )
34 CONTENT-TYPE is encoded for tm-view (list, first element type,
35 rest key.value conses)
36 CONTENT-ENCODING is a string
37 MIME-DATA is a string
33 38
34 For DATA I am thinking of some different scheme: 39 CONTENT-TYPE and -ENCODING can be directly supplied to mime/viewer-mode.
35 perhaps it would be more efficient to split the 40
36 MIME data into header and body, make a plist from
37 the header (for easy access), pre-convert the body
38 to 8bit, and also attach the original data.
39 This would make the access easier, but it would
40 require that I do a lot of MIME stuff in C, a thing
41 that tm-mime-view already does for us.