1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| OSErr
InterfacePlayliste::MyDragReceiveHandler(WindowRef theWindow, void * handlerRefCon, DragRef theDrag)
{
Rect itemB;
DragItemRef theItemRef = 0;
ushort numItems = 0, numFlavors = 0;
Point mouse;
Point globalPinnedMouse;
FlavorType theType;
long dataSize;
void * dataPtr;
CountDragItems (theDrag, &numItems);
for (ushort i = 0; i < numItems; ++i)
{
GetDragItemReferenceNumber(theDrag, i, &theItemRef);
printf("%d\n",GetDragItemBounds(theDrag, theItemRef, &itemB));
GetDragMouse(theDrag, &mouse, 0);
printf("%d\n",CountDragItemFlavors( theDrag, theItemRef, &numFlavors));
printf("%d, top: %d left: %d bottom: %d right: %d, mouse v : %d, h : %d, globalPinnedMouse v : %d, h : %d, nombre de flavors : %d \n",i,itemB.top, itemB.left, itemB.bottom, itemB.right, mouse.v, mouse.h, globalPinnedMouse.v, globalPinnedMouse.h, numFlavors);
//kFlavorTypeClippingFilename
for (ushort j = 0; j < numFlavors; ++j)
{
GetFlavorType(theDrag, theItemRef, j, &theType);
printf("flavor %d : %d, %d\n", j, kFlavorTypeClippingFilename,theType);
//GetFlavorDataSize(theDrag, theItemRef, theType, &dataSize);
//dataPtr = NewHandle(dataSize);
//GetFlavorData(theDrag, theItemRef, theType, &dataPtr, &dataSize, 0);
//DisposeHandle
}
}
return noErr;
} |
Partager