All Manuals > CAPI User Guide > 16 Drag and Drop > 16.2 Dragging

NextPrevUpTopContentsIndex

16.2.3 Data formats

:string

Receives a string, potentially from another application. Is also understood by some other panes that expect text.

:image

Receives an image on Cocoa and GTK+. The value passed should be a gp:image . See Working with images for more information about images.When supplying an image for dragging (that is, including :image image in the plist argument of drag-pane-object or in the plist that is returned from the drop-callback ), the dragging mechanism frees the image (as by gp:free-image ) when it finishes with it (which will be at some indeterminate time later). If you need to pass an image which you want to use later, you should make a copy of it by gp:make-sub-image .

When receiving an image (by calling drop-object-get-object with :image ), the received image should also be freed when you finish with it. However, it will be freed automatically when the pane supplied to drop-object-get-object is destroyed, so you do not need to free it explictly if freeing can wait (which is probably true in most cases).

See the example in
examples/capi/choice/list-panel-drag-image.lisp

:filename-list

Receives a list of files. Is understood by other applications such as the Mac OS X Finder and Windows Explorer.

You can also use private formats, named by arbitrary keywords, which will work only in the same Lisp image.


CAPI User Guide (Macintosh version) - 30 Aug 2011

NextPrevUpTopContentsIndex