To implement dropping in
, supply the
You can also supply
. When the user drags an object over a window, the system first tries to call the
of any pane under the mouse and otherwise calls the
of the top-level interface, if supplied.
The drop-callback receives as arguments a drop-object which is used to communicate information about the dropping operation and stage which is a keyword. The drop-callback is called at several stages: when the pane is displayed; when the user drags over the pane; and when the user drops over the pane. Various functions are provided which you can use to query the drop-object and set attributes appropriately.
You will use
to specify the data formats that it wants to receive. The
format can be used to receive a string from another application and the
format can be used to receive a list of filenames from another application such as the Macintosh Finder or the Windows Explorer. Any other keyword in formats is assumed to be a private format that can only be used to receive objects from with the same Lisp image.
You can use
to query whether a given data format is actually available, and then you can call
to modify the effect of the dropping operation .
Finally, at the
stage, you will use
to retrieve (for each data format) the object which was returned by the
, and then do something with this object, typically copying or moving it to the pane in some way.
CAPI User Guide (Unix version) - 30 Aug 2011