When you use the Drag Manager to drag some data to a Finder window or to the desktop, you create a clipping file. The format of these is not documented anywhere that I know, and obviously it could change in future. Nevertheless, it's clear that any future change has to be backward-compatible with the way they currently work.
The following is my collection of guesses as to how the format works.
Clipping files have creator code 'drag', and one of four file types: 'clpt' for a text clipping, 'clpp' for a picture clipping, 'clps' for a sound clipping, and 'clpu' for everything else. The format for all these types is identical, and all the data is kept in the resource fork.
The 'drag' resource lists all the other resources containing the different
flavours of the drag item. It always seems to have an ID of 128. It begins
with a 16-byte DragMapHeader, followed by some number of
16-byte DragMapEntry records:
TYPE
(* layout of the drag map resource in a clipping file *)
DragMapHeader =
RECORD
MapVersion : LONGCARD; (* = 1 *)
Unused1, Unused2 : LONGCARD; (* = 0 *)
NrTypes : LONGCARD;
(* Entry : ARRAY [1 .. NrTypes] OF DragMapEntry *)
END (*RECORD*);
DragMapEntry =
RECORD
EntryType : OSType; (* resource type *)
Unused1 : ShortCard; (* = 0 *)
EntryID : ResID; (* resource ID *)
Unused2, Unused3 : LONGCARD; (* = 0 *)
END (*RECORD*);
Each DragMapEntry lists the type and ID of the resource
containing the data for that particular item flavour. The resource type is
the flavour type (eg 'PICT' for a QuickDraw picture, 'snd ' for a sound,
and so on). In all the clipping files that I've seen, the flavour resource
IDs are always 128.