Development target:

Desired platforms for native support:

A perl binding is not on the cards, though it shouldn't be too difficult to do (once you have the Tcl/Tk implementation... :^))


Current major desires and points:
Currently, what I'm thinking of is having a single command dragdrop that is the interface to all this. The loading of this command (and its associated library) will trigger the loading of another shared lib that loads the native support desired (this would be customisable in a script somewhere).

Possible interface:

dragdrop drag       xRoot  yRoot  pathName  ?types?  ?preferredModes?
Perform a drag-and-drop operation. Returns the mode of data transfer that actually occurred. If types is unspecified, then all the types for which there are data generators will be offered. If preferredModes is unspecified, then the mode will be copy.

No reliance should be placed upon the event loop running, or otherwise.

dragdrop info  ...  dragId
Provides info about the specified drag-and-drop action.
dragdrop data       dragId   ?type?
Used in target scripts to obtain the data related to a particular type.
dragdrop source     pathName ?type?    ?command?
Defines a command (or allows the querying of the current command) to provide the data when a message requesting the type given arrives during a drop action. If the type is unspecified, then it should return a list of types for which there are handlers.
dragdrop preview    srcTrg   pathName ?command?
Provides for drag-over and drag-under effects. These may not be fully implemented by the underlying system.
dragdrop target     pathName ?command?
Defines a command (or allows the querying of the current command) to handle drop actions. This command is responsible for choosing what type(s) of data to obtain from the source, and what to do with it. The command should give the mode of data transfer that it chose to perform as its result.
dragdrop system     ...
Entry point to System Module specific components, which should not be relied upon to be platform portable.

All command arguments would have some kind of % expansion applied to them. Currently, I'm thinking of having these expansions as being something like this:

Escape
sequence
Meaning
 %D Drag identifier
 %i Source interpreter
 %w Source widget
 %I Target interpreter
 %W Target widget
 %X Pointer position (relative to root window)
 %Y Pointer position (relative to root window)
 %x Pointer position (relative to source/target window)
 %y Pointer position (relative to source/target window)
 %M Preferred mode(s)
 %T Allowed type(s)
It is anticipated that most of these will be available using the  dragdrop info  call.

Drag identifiers will continue to exist at least until the first time the application becomes idle after their (official) use ends; their purpose being to distinguish between operations being carried out on multiple displays at once.


This page works best when viewed with Netscape (yes, it has quite a few `netscapisms' in it) but it also looks quite good with Mosaic, and even Lynx is acceptable with it.
Donal K. Fellows / University of Manchester / U.K. / fellowsd@cs.man.ac.uk