Mac OS 9
Drag.h File Reference

Drag and Drop Interfaces. More...

#include <MacTypes.h>
#include <Events.h>
#include <Files.h>
#include <AppleEvents.h>
#include <Quickdraw.h>

Go to the source code of this file.

Data Structures

struct  HFSFlavor
 
struct  PromiseHFSFlavor
 

Macros

#define NewDragTrackingHandlerUPP(userRoutine)
 
#define NewDragReceiveHandlerUPP(userRoutine)
 
#define DisposeDragTrackingHandlerUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeDragReceiveHandlerUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeDragTrackingHandlerUPP(message, theWindow, handlerRefCon, theDrag, userUPP)
 
#define InvokeDragReceiveHandlerUPP(theWindow, handlerRefCon, theDrag, userUPP)
 
#define NewDragTrackingHandlerProc(userRoutine)    NewDragTrackingHandlerUPP(userRoutine)
 
#define NewDragReceiveHandlerProc(userRoutine)    NewDragReceiveHandlerUPP(userRoutine)
 
#define CallDragTrackingHandlerProc(userRoutine, message, theWindow, handlerRefCon, theDrag)
 
#define CallDragReceiveHandlerProc(userRoutine, theWindow, handlerRefCon, theDrag)    InvokeDragReceiveHandlerUPP(theWindow, handlerRefCon, theDrag, userRoutine)
 
#define NewDragSendDataUPP(userRoutine)
 
#define NewDragInputUPP(userRoutine)
 
#define NewDragDrawingUPP(userRoutine)
 
#define DisposeDragSendDataUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeDragInputUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeDragDrawingUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeDragSendDataUPP(theType, dragSendRefCon, theItemRef, theDrag, userUPP)
 
#define InvokeDragInputUPP(mouse, modifiers, dragInputRefCon, theDrag, userUPP)
 
#define InvokeDragDrawingUPP(message, showRegion, showOrigin, hideRegion, hideOrigin, dragDrawingRefCon, theDrag, userUPP)
 
#define NewDragSendDataProc(userRoutine)   NewDragSendDataUPP(userRoutine)
 
#define NewDragInputProc(userRoutine)   NewDragInputUPP(userRoutine)
 
#define NewDragDrawingProc(userRoutine)   NewDragDrawingUPP(userRoutine)
 
#define CallDragSendDataProc(userRoutine, theType, dragSendRefCon, theItemRef, theDrag)
 
#define CallDragInputProc(userRoutine, mouse, modifiers, dragInputRefCon, theDrag)    InvokeDragInputUPP(mouse, modifiers, dragInputRefCon, theDrag, userRoutine)
 
#define CallDragDrawingProc(userRoutine, message, showRegion, showOrigin, hideRegion, hideOrigin, dragDrawingRefCon, theDrag)
 

Typedefs

typedef struct OpaqueDragRef * DragRef
 
typedef UInt32 DragItemRef
 
typedef OSType FlavorType
 
typedef UInt32 DragAttributes
 
typedef UInt32 DragBehaviors
 
typedef UInt32 DragImageFlags
 
typedef SInt16 DragRegionMessage
 
typedef SInt16 ZoomAcceleration
 
typedef UInt32 FlavorFlags
 
typedef SInt16 DragTrackingMessage
 
typedef UInt32 DragActions
 
typedef struct HFSFlavor HFSFlavor
 
typedef struct PromiseHFSFlavor PromiseHFSFlavor
 
typedef WindowRef theWindow
 
typedef WindowRef void * handlerRefCon
 
typedef WindowRef void DragRef theDrag
 
typedef void * dragSendRefCon
 
typedef void DragItemRef theItemRef
 
typedef SInt16 * modifiers
 
typedef SInt16 void * dragInputRefCon
 
typedef RgnHandle showRegion
 
typedef RgnHandle Point showOrigin
 
typedef RgnHandle Point RgnHandle hideRegion
 
typedef RgnHandle Point RgnHandle Point hideOrigin
 
typedef RgnHandle Point RgnHandle Point void * dragDrawingRefCon
 
typedef DragRef DragReference
 
typedef DragItemRef ItemReference
 

Enumerations

enum  { kDragHasLeftSenderWindow , kDragInsideSenderApplication , kDragInsideSenderWindow }
 
enum  { kDragBehaviorNone = 0 , kDragBehaviorZoomBackAnimation }
 
enum  { kDragRegionAndImage = (1L << 4) }
 
enum  { kDragStandardTranslucency = 0L , kDragDarkTranslucency = 1L , kDragDarkerTranslucency = 2L , kDragOpaqueTranslucency = 3L }
 
enum  {
  kDragRegionBegin = 1 , kDragRegionDraw = 2 , kDragRegionHide = 3 , kDragRegionIdle = 4 ,
  kDragRegionEnd = 5
}
 
enum  { kZoomNoAcceleration = 0 , kZoomAccelerate = 1 , kZoomDecelerate = 2 }
 
enum  {
  flavorSenderOnly = (1 << 0) , flavorSenderTranslated = (1 << 1) , flavorNotSaved = (1 << 2) , flavorSystemTranslated = (1 << 8) ,
  flavorDataPromised = (1 << 9)
}
 
enum  { kDragFlavorTypeHFS = FOUR_CHAR_CODE('hfs ') , kDragFlavorTypePromiseHFS , flavorTypeHFS = kDragFlavorTypeHFS , flavorTypePromiseHFS = kDragFlavorTypePromiseHFS }
 
enum  { kDragPromisedFlavorFindFile , kDragPromisedFlavor }
 
enum  { kDragPseudoCreatorVolumeOrDirectory , kDragPseudoFileTypeVolume , kDragPseudoFileTypeDirectory }
 
enum  { flavorTypeDirectory }
 
enum  { kFlavorTypeClippingName , kFlavorTypeClippingFilename , kFlavorTypeDragToTrashOnly , kFlavorTypeFinderNoTrackingBehavior }
 
enum  {
  kDragTrackingEnterHandler = 1 , kDragTrackingEnterWindow = 2 , kDragTrackingInWindow = 3 , kDragTrackingLeaveWindow = 4 ,
  kDragTrackingLeaveHandler = 5
}
 
enum  {
  kDragActionNothing = 0L , kDragActionCopy = 1L , kDragActionAlias = (1L << 1) , kDragActionGeneric = (1L << 2) ,
  kDragActionPrivate = (1L << 3) , kDragActionMove = (1L << 4) , kDragActionDelete = (1L << 5) , kDragActionAll = (long)0xFFFFFFFF
}
 
enum  { uppDragTrackingHandlerProcInfo = 0x00003FA0 }
 
enum  { uppDragReceiveHandlerProcInfo = 0x00000FE0 }
 
enum  { uppDragSendDataProcInfo = 0x00003FE0 }
 
enum  { uppDragInputProcInfo = 0x00003FE0 }
 
enum  { uppDragDrawingProcInfo = 0x000FFFA0 }
 

Functions

typedef CALLBACK_API (OSErr, DragTrackingHandlerProcPtr)(DragTrackingMessage message
 
typedef CALLBACK_API (OSErr, DragReceiveHandlerProcPtr)(WindowRef theWindow
 
typedef STACK_UPP_TYPE (DragTrackingHandlerProcPtr) DragTrackingHandlerUPP
 
typedef STACK_UPP_TYPE (DragReceiveHandlerProcPtr) DragReceiveHandlerUPP
 
DragTrackingHandlerUPP NewDragTrackingHandlerUPP (DragTrackingHandlerProcPtr userRoutine)
 
DragReceiveHandlerUPP NewDragReceiveHandlerUPP (DragReceiveHandlerProcPtr userRoutine)
 
void DisposeDragTrackingHandlerUPP (DragTrackingHandlerUPP userUPP)
 
void DisposeDragReceiveHandlerUPP (DragReceiveHandlerUPP userUPP)
 
OSErr InvokeDragTrackingHandlerUPP (DragTrackingMessage message, WindowRef theWindow, void *handlerRefCon, DragRef theDrag, DragTrackingHandlerUPP userUPP)
 
OSErr InvokeDragReceiveHandlerUPP (WindowRef theWindow, void *handlerRefCon, DragRef theDrag, DragReceiveHandlerUPP userUPP)
 
typedef CALLBACK_API (OSErr, DragSendDataProcPtr)(FlavorType theType
 
typedef CALLBACK_API (OSErr, DragInputProcPtr)(Point *mouse
 
typedef CALLBACK_API (OSErr, DragDrawingProcPtr)(DragRegionMessage message
 
typedef STACK_UPP_TYPE (DragSendDataProcPtr) DragSendDataUPP
 
typedef STACK_UPP_TYPE (DragInputProcPtr) DragInputUPP
 
typedef STACK_UPP_TYPE (DragDrawingProcPtr) DragDrawingUPP
 
DragSendDataUPP NewDragSendDataUPP (DragSendDataProcPtr userRoutine)
 
DragInputUPP NewDragInputUPP (DragInputProcPtr userRoutine)
 
DragDrawingUPP NewDragDrawingUPP (DragDrawingProcPtr userRoutine)
 
void DisposeDragSendDataUPP (DragSendDataUPP userUPP)
 
void DisposeDragInputUPP (DragInputUPP userUPP)
 
void DisposeDragDrawingUPP (DragDrawingUPP userUPP)
 
OSErr InvokeDragSendDataUPP (FlavorType theType, void *dragSendRefCon, DragItemRef theItemRef, DragRef theDrag, DragSendDataUPP userUPP)
 
OSErr InvokeDragInputUPP (Point *mouse, SInt16 *modifiers, void *dragInputRefCon, DragRef theDrag, DragInputUPP userUPP)
 
OSErr InvokeDragDrawingUPP (DragRegionMessage message, RgnHandle showRegion, Point showOrigin, RgnHandle hideRegion, Point hideOrigin, void *dragDrawingRefCon, DragRef theDrag, DragDrawingUPP userUPP)
 
OSErr InstallTrackingHandler (DragTrackingHandlerUPP trackingHandler, WindowRef theWindow, void *handlerRefCon)
 
OSErr InstallReceiveHandler (DragReceiveHandlerUPP receiveHandler, WindowRef theWindow, void *handlerRefCon)
 
OSErr RemoveTrackingHandler (DragTrackingHandlerUPP trackingHandler, WindowRef theWindow)
 
OSErr RemoveReceiveHandler (DragReceiveHandlerUPP receiveHandler, WindowRef theWindow)
 
OSErr NewDrag (DragRef *theDrag)
 
OSErr DisposeDrag (DragRef theDrag)
 
OSErr AddDragItemFlavor (DragRef theDrag, DragItemRef theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, FlavorFlags theFlags)
 
OSErr SetDragItemFlavorData (DragRef theDrag, DragItemRef theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, UInt32 dataOffset)
 
OSErr SetDragSendProc (DragRef theDrag, DragSendDataUPP sendProc, void *dragSendRefCon)
 
OSErr SetDragInputProc (DragRef theDrag, DragInputUPP inputProc, void *dragInputRefCon)
 
OSErr SetDragDrawingProc (DragRef theDrag, DragDrawingUPP drawingProc, void *dragDrawingRefCon)
 
OSErr SetDragImage (DragRef theDrag, PixMapHandle imagePixMap, RgnHandle imageRgn, Point imageOffsetPt, DragImageFlags theImageFlags)
 
OSErr ChangeDragBehaviors (DragRef theDrag, DragBehaviors inBehaviorsToSet, DragBehaviors inBehaviorsToClear)
 
OSErr TrackDrag (DragRef theDrag, const EventRecord *theEvent, RgnHandle theRegion)
 
OSErr CountDragItems (DragRef theDrag, UInt16 *numItems)
 
OSErr GetDragItemReferenceNumber (DragRef theDrag, UInt16 index, DragItemRef *theItemRef)
 
OSErr CountDragItemFlavors (DragRef theDrag, DragItemRef theItemRef, UInt16 *numFlavors)
 
OSErr GetFlavorType (DragRef theDrag, DragItemRef theItemRef, UInt16 index, FlavorType *theType)
 
OSErr GetFlavorFlags (DragRef theDrag, DragItemRef theItemRef, FlavorType theType, FlavorFlags *theFlags)
 
OSErr GetFlavorDataSize (DragRef theDrag, DragItemRef theItemRef, FlavorType theType, Size *dataSize)
 
OSErr GetFlavorData (DragRef theDrag, DragItemRef theItemRef, FlavorType theType, void *dataPtr, Size *dataSize, UInt32 dataOffset)
 
OSErr GetDragItemBounds (DragRef theDrag, DragItemRef theItemRef, Rect *itemBounds)
 
OSErr SetDragItemBounds (DragRef theDrag, DragItemRef theItemRef, const Rect *itemBounds)
 
OSErr GetDropLocation (DragRef theDrag, AEDesc *dropLocation)
 
OSErr SetDropLocation (DragRef theDrag, const AEDesc *dropLocation)
 
OSErr GetDragAttributes (DragRef theDrag, DragAttributes *flags)
 
OSErr GetDragMouse (DragRef theDrag, Point *mouse, Point *globalPinnedMouse)
 
OSErr SetDragMouse (DragRef theDrag, Point globalPinnedMouse)
 
OSErr GetDragOrigin (DragRef theDrag, Point *globalInitialMouse)
 
OSErr GetDragModifiers (DragRef theDrag, SInt16 *modifiers, SInt16 *mouseDownModifiers, SInt16 *mouseUpModifiers)
 
OSStatus GetDragAllowableActions (DragRef theDrag, DragActions *outActions)
 
OSStatus SetDragAllowableActions (DragRef theDrag, DragActions inActions, Boolean isLocal)
 
OSStatus GetDragDropAction (DragRef theDrag, DragActions *outAction)
 
OSStatus SetDragDropAction (DragRef theDrag, DragActions inAction)
 
OSErr ShowDragHilite (DragRef theDrag, RgnHandle hiliteFrame, Boolean inside)
 
OSErr HideDragHilite (DragRef theDrag)
 
OSErr DragPreScroll (DragRef theDrag, SInt16 dH, SInt16 dV)
 
OSErr DragPostScroll (DragRef theDrag)
 
OSErr UpdateDragHilite (DragRef theDrag, RgnHandle updateRgn)
 
OSErr GetDragHiliteColor (WindowRef window, RGBColor *color)
 
Boolean WaitMouseMoved (Point initialMouse)
 
OSErr ZoomRects (const Rect *fromRect, const Rect *toRect, SInt16 zoomSteps, ZoomAcceleration acceleration)
 
OSErr ZoomRegion (RgnHandle region, Point zoomDistance, SInt16 zoomSteps, ZoomAcceleration acceleration)
 

Detailed Description

Drag and Drop Interfaces.

Introduced In: Mac OS 9
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1992-2001 by Apple Computer, Inc., all rights reserved.

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ CallDragDrawingProc

#define CallDragDrawingProc (   userRoutine,
  message,
  showRegion,
  showOrigin,
  hideRegion,
  hideOrigin,
  dragDrawingRefCon,
  theDrag 
)
Value:
InvokeDragDrawingUPP(message, showRegion, showOrigin, hideRegion, \
hideOrigin, dragDrawingRefCon, theDrag, userRoutine)
OSErr InvokeDragDrawingUPP(DragRegionMessage message, RgnHandle showRegion, Point showOrigin, RgnHandle hideRegion, Point hideOrigin, void *dragDrawingRefCon, DragRef theDrag, DragDrawingUPP userUPP)
Definition: Quickdraw.h:306

◆ CallDragSendDataProc

#define CallDragSendDataProc (   userRoutine,
  theType,
  dragSendRefCon,
  theItemRef,
  theDrag 
)
Value:
InvokeDragSendDataUPP(theType, dragSendRefCon, theItemRef, theDrag, \
userRoutine)
OSErr InvokeDragSendDataUPP(FlavorType theType, void *dragSendRefCon, DragItemRef theItemRef, DragRef theDrag, DragSendDataUPP userUPP)

◆ CallDragTrackingHandlerProc

#define CallDragTrackingHandlerProc (   userRoutine,
  message,
  theWindow,
  handlerRefCon,
  theDrag 
)
Value:
InvokeDragTrackingHandlerUPP(message, theWindow, handlerRefCon, theDrag, \
userRoutine)
OSErr InvokeDragTrackingHandlerUPP(DragTrackingMessage message, WindowRef theWindow, void *handlerRefCon, DragRef theDrag, DragTrackingHandlerUPP userUPP)
Definition: Quickdraw.h:1648

◆ InvokeDragDrawingUPP

#define InvokeDragDrawingUPP (   message,
  showRegion,
  showOrigin,
  hideRegion,
  hideOrigin,
  dragDrawingRefCon,
  theDrag,
  userUPP 
)
Value:
(OSErr) \
CALL_SEVEN_PARAMETER_UPP((userUPP), uppDragDrawingProcInfo, (message), \
(showRegion), (showOrigin), (hideRegion), \
(hideOrigin), (dragDrawingRefCon), (theDrag))

◆ InvokeDragInputUPP

#define InvokeDragInputUPP (   mouse,
  modifiers,
  dragInputRefCon,
  theDrag,
  userUPP 
)
Value:
(OSErr) CALL_FOUR_PARAMETER_UPP((userUPP), uppDragInputProcInfo, (mouse), \
(modifiers), (dragInputRefCon), (theDrag))

◆ InvokeDragReceiveHandlerUPP

#define InvokeDragReceiveHandlerUPP (   theWindow,
  handlerRefCon,
  theDrag,
  userUPP 
)
Value:
(OSErr) CALL_THREE_PARAMETER_UPP((userUPP), uppDragReceiveHandlerProcInfo, \
(theWindow), (handlerRefCon), (theDrag))

◆ InvokeDragSendDataUPP

#define InvokeDragSendDataUPP (   theType,
  dragSendRefCon,
  theItemRef,
  theDrag,
  userUPP 
)
Value:
(OSErr) \
CALL_FOUR_PARAMETER_UPP((userUPP), uppDragSendDataProcInfo, (theType), \
(dragSendRefCon), (theItemRef), (theDrag))

◆ InvokeDragTrackingHandlerUPP

#define InvokeDragTrackingHandlerUPP (   message,
  theWindow,
  handlerRefCon,
  theDrag,
  userUPP 
)
Value:
(OSErr) CALL_FOUR_PARAMETER_UPP((userUPP), uppDragTrackingHandlerProcInfo, \
(message), (theWindow), (handlerRefCon), \
(theDrag))

◆ NewDragDrawingUPP

#define NewDragDrawingUPP (   userRoutine)
Value:
(DragDrawingUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragDrawingProcInfo, \
GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes)

◆ NewDragInputUPP

#define NewDragInputUPP (   userRoutine)
Value:
(DragInputUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppDragInputProcInfo, GetCurrentArchitecture())

pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes)

◆ NewDragReceiveHandlerUPP

#define NewDragReceiveHandlerUPP (   userRoutine)
Value:
(DragReceiveHandlerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
uppDragReceiveHandlerProcInfo, \
GetCurrentArchitecture())

pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes)

◆ NewDragSendDataProc

#define NewDragSendDataProc (   userRoutine)    NewDragSendDataUPP(userRoutine)

support for pre-Carbon UPP routines: New...Proc and Call...Proc

◆ NewDragSendDataUPP

#define NewDragSendDataUPP (   userRoutine)
Value:
(DragSendDataUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragSendDataProcInfo, \
GetCurrentArchitecture())

pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes)

◆ NewDragTrackingHandlerProc

#define NewDragTrackingHandlerProc (   userRoutine)     NewDragTrackingHandlerUPP(userRoutine)

support for pre-Carbon UPP routines: New...Proc and Call...Proc

◆ NewDragTrackingHandlerUPP

#define NewDragTrackingHandlerUPP (   userRoutine)
Value:
(DragTrackingHandlerUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppDragTrackingHandlerProcInfo, \
GetCurrentArchitecture())

pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes)

Typedef Documentation

◆ DragAttributes

typedef UInt32 DragAttributes

© DRAG ATTRIBUTES


◆ DragBehaviors

typedef UInt32 DragBehaviors

© DRAG BEHAVIORS


◆ DragImageFlags

typedef UInt32 DragImageFlags

© DRAG IMAGE FLAGS


◆ DragRef

typedef struct OpaqueDragRef* DragRef

© DRAG MANAGER DATA TYPES


◆ DragReference


© OLD NAMES These are provided for compatiblity with older source bases. It is recommended to not use them since they may removed from this interface file at any time.


◆ DragRegionMessage

typedef SInt16 DragRegionMessage

© DRAG DRAWING PROCEDURE MESSAGES


◆ DragTrackingMessage

typedef SInt16 DragTrackingMessage

© DRAG TRACKING HANDLER MESSAGES


◆ FlavorFlags

typedef UInt32 FlavorFlags

© FLAVOR FLAGS


◆ ZoomAcceleration

typedef SInt16 ZoomAcceleration

© ZOOM ACCELERATION


Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kDragInsideSenderApplication 

drag has left the source window since TrackDrag

kDragInsideSenderWindow 

drag is occurring within the sender application

◆ anonymous enum

anonymous enum

© DRAG IMAGE TRANSLUCENCY LEVELS


Enumerator
kDragDarkTranslucency 

65% image translucency (standard)

kDragDarkerTranslucency 

50% image translucency

kDragOpaqueTranslucency 

25% image translucency

◆ anonymous enum

anonymous enum
Enumerator
kDragRegionDraw 

initialize drawing

kDragRegionHide 

draw drag feedback

kDragRegionIdle 

hide drag feedback

kDragRegionEnd 

drag feedback idle time

◆ anonymous enum

anonymous enum
Enumerator
kZoomAccelerate 

use linear interpolation

kZoomDecelerate 

ramp up step size

◆ anonymous enum

anonymous enum
Enumerator
flavorSenderTranslated 

flavor is available to sender only

flavorNotSaved 

flavor is translated by sender

flavorSystemTranslated 

flavor should not be saved

flavorDataPromised 

flavor is translated by system

◆ anonymous enum

anonymous enum

© FILE SYSTEM CONSTANTS


Enumerator
kDragFlavorTypePromiseHFS 

flavor type for HFS data

flavorTypeHFS 

flavor type for promised HFS data

flavorTypePromiseHFS 

old name

◆ anonymous enum

anonymous enum
Enumerator
kDragPromisedFlavor 

promisedFlavor value for Find File

◆ anonymous enum

anonymous enum
Enumerator
kDragPseudoFileTypeVolume 

"creator code" for volume or directory

kDragPseudoFileTypeDirectory 

"file type" for volume

◆ anonymous enum

anonymous enum

© SPECIAL FLAVORS


◆ anonymous enum

anonymous enum

© FLAVORS FOR FINDER 8.0 AND LATER


Enumerator
kFlavorTypeClippingFilename 

name hint for clipping file (preferred over 'clfn')

kFlavorTypeDragToTrashOnly 

name for clipping file

kFlavorTypeFinderNoTrackingBehavior 

for apps that want to allow dragging private data to the trash

◆ anonymous enum

anonymous enum
Enumerator
kDragTrackingEnterWindow 

drag has entered handler

kDragTrackingInWindow 

drag has entered window

kDragTrackingLeaveWindow 

drag is moving within window

kDragTrackingLeaveHandler 

drag has exited window

◆ anonymous enum

anonymous enum

© DRAG ACTIONS


Function Documentation

◆ AddDragItemFlavor()

OSErr AddDragItemFlavor ( DragRef  theDrag,
DragItemRef  theItemRef,
FlavorType  theType,
const void *  dataPtr,
Size  dataSize,
FlavorFlags  theFlags 
)

© ADDING DRAG ITEM FLAVORS


The method for setting Drag Manager promises differs from that for Scrap Manger promises. This chart describes the method for setting drag promises via AddDragItemFlavor().

 dataPtr         dataSize                                result

pointer value actual data size The data of size dataSize pointed to by dataPtr is added to the drag. NULL ignored A promise is placed on the drag. AddDragItemFlavor()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CALLBACK_API() [1/2]

typedef CALLBACK_API ( OSErr  ,
DragSendDataProcPtr   
)

CALL_NOT_IN_CARBON


© APPLICATION-DEFINED ROUTINES


◆ CALLBACK_API() [2/2]

typedef CALLBACK_API ( OSErr  ,
DragTrackingHandlerProcPtr   
)

© APPLICATION-DEFINED DRAG HANDLER ROUTINES


◆ ChangeDragBehaviors()

OSErr ChangeDragBehaviors ( DragRef  theDrag,
DragBehaviors  inBehaviorsToSet,
DragBehaviors  inBehaviorsToClear 
)

© ALTERING THE BEHAVIOR OF A DRAG


ChangeDragBehaviors()

Non-Carbon CFM: in DragLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CountDragItemFlavors()

OSErr CountDragItemFlavors ( DragRef  theDrag,
DragItemRef  theItemRef,
UInt16 *  numFlavors 
)

CountDragItemFlavors()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CountDragItems()

OSErr CountDragItems ( DragRef  theDrag,
UInt16 *  numItems 
)

© GETTING DRAG ITEM INFORMATION


CountDragItems()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDrag()

OSErr DisposeDrag ( DragRef  theDrag)

DisposeDrag()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDragDrawingUPP()

void DisposeDragDrawingUPP ( DragDrawingUPP  userUPP)

DisposeDragDrawingUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDragInputUPP()

void DisposeDragInputUPP ( DragInputUPP  userUPP)

DisposeDragInputUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDragReceiveHandlerUPP()

void DisposeDragReceiveHandlerUPP ( DragReceiveHandlerUPP  userUPP)

DisposeDragReceiveHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDragSendDataUPP()

void DisposeDragSendDataUPP ( DragSendDataUPP  userUPP)

DisposeDragSendDataUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDragTrackingHandlerUPP()

void DisposeDragTrackingHandlerUPP ( DragTrackingHandlerUPP  userUPP)

DisposeDragTrackingHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DragPostScroll()

OSErr DragPostScroll ( DragRef  theDrag)

DragPostScroll()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DragPreScroll()

OSErr DragPreScroll ( DragRef  theDrag,
SInt16  dH,
SInt16  dV 
)

DragPreScroll()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDragAllowableActions()

OSStatus GetDragAllowableActions ( DragRef  theDrag,
DragActions *  outActions 
)

© ACCESSING DRAG ACTIONS


GetDragAllowableActions()

Discussion: Gets the actions the drag sender has allowed the receiver to perform. These are not requirements, but they highly suggested actions which allows the drag receiver to improve harmony across the system. The allowable actions received are always those local to the caller's process.

Parameters:

theDrag: The drag reference from which to retreive the allowable drag actions.

outActions: A pointer to receive the field of allowable drag actions.

Result: An operating system result code.

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.1 and later

Mac OS X: in version 10.1 and later

◆ GetDragAttributes()

OSErr GetDragAttributes ( DragRef  theDrag,
DragAttributes flags 
)

© GETTING INFORMATION ABOUT A DRAG


GetDragAttributes()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDragDropAction()

OSStatus GetDragDropAction ( DragRef  theDrag,
DragActions *  outAction 
)

GetDragDropAction()

Discussion: Gets the action performed by the receiver of the drag. More than one action may have been performed.

Parameters:

theDrag: The drag reference from which to retreive the performed drop action.

outAction: A pointer to receive the drag action performed.

Result: An operating system result code.

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.1 and later

Mac OS X: in version 10.1 and later

◆ GetDragHiliteColor()

OSErr GetDragHiliteColor ( WindowRef  window,
RGBColor color 
)

GetDragHiliteColor()

Non-Carbon CFM: in DragLib 7.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDragItemBounds()

OSErr GetDragItemBounds ( DragRef  theDrag,
DragItemRef  theItemRef,
Rect itemBounds 
)

© DRAG ITEM BOUNDS


GetDragItemBounds()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDragItemReferenceNumber()

OSErr GetDragItemReferenceNumber ( DragRef  theDrag,
UInt16  index,
DragItemRef *  theItemRef 
)

GetDragItemReferenceNumber()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDragModifiers()

OSErr GetDragModifiers ( DragRef  theDrag,
SInt16 *  modifiers,
SInt16 *  mouseDownModifiers,
SInt16 *  mouseUpModifiers 
)

GetDragModifiers()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDragMouse()

OSErr GetDragMouse ( DragRef  theDrag,
Point mouse,
Point globalPinnedMouse 
)

GetDragMouse()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDragOrigin()

OSErr GetDragOrigin ( DragRef  theDrag,
Point globalInitialMouse 
)

GetDragOrigin()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDropLocation()

OSErr GetDropLocation ( DragRef  theDrag,
AEDesc dropLocation 
)

© DROP LOCATIONS


GetDropLocation()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetFlavorData()

OSErr GetFlavorData ( DragRef  theDrag,
DragItemRef  theItemRef,
FlavorType  theType,
void *  dataPtr,
Size *  dataSize,
UInt32  dataOffset 
)

GetFlavorData()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetFlavorDataSize()

OSErr GetFlavorDataSize ( DragRef  theDrag,
DragItemRef  theItemRef,
FlavorType  theType,
Size *  dataSize 
)

GetFlavorDataSize()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetFlavorFlags()

OSErr GetFlavorFlags ( DragRef  theDrag,
DragItemRef  theItemRef,
FlavorType  theType,
FlavorFlags theFlags 
)

GetFlavorFlags()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetFlavorType()

OSErr GetFlavorType ( DragRef  theDrag,
DragItemRef  theItemRef,
UInt16  index,
FlavorType *  theType 
)

GetFlavorType()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HideDragHilite()

OSErr HideDragHilite ( DragRef  theDrag)

HideDragHilite()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InstallReceiveHandler()

OSErr InstallReceiveHandler ( DragReceiveHandlerUPP  receiveHandler,
WindowRef  theWindow,
void *  handlerRefCon 
)

InstallReceiveHandler()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InstallTrackingHandler()

OSErr InstallTrackingHandler ( DragTrackingHandlerUPP  trackingHandler,
WindowRef  theWindow,
void *  handlerRefCon 
)

CALL_NOT_IN_CARBON


© INSTALLING AND REMOVING HANDLERS API'S


InstallTrackingHandler()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeDragDrawingUPP()

OSErr InvokeDragDrawingUPP ( DragRegionMessage  message,
RgnHandle  showRegion,
Point  showOrigin,
RgnHandle  hideRegion,
Point  hideOrigin,
void *  dragDrawingRefCon,
DragRef  theDrag,
DragDrawingUPP  userUPP 
)

InvokeDragDrawingUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeDragInputUPP()

OSErr InvokeDragInputUPP ( Point mouse,
SInt16 *  modifiers,
void *  dragInputRefCon,
DragRef  theDrag,
DragInputUPP  userUPP 
)

InvokeDragInputUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeDragReceiveHandlerUPP()

OSErr InvokeDragReceiveHandlerUPP ( WindowRef  theWindow,
void *  handlerRefCon,
DragRef  theDrag,
DragReceiveHandlerUPP  userUPP 
)

InvokeDragReceiveHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeDragSendDataUPP()

OSErr InvokeDragSendDataUPP ( FlavorType  theType,
void *  dragSendRefCon,
DragItemRef  theItemRef,
DragRef  theDrag,
DragSendDataUPP  userUPP 
)

InvokeDragSendDataUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeDragTrackingHandlerUPP()

OSErr InvokeDragTrackingHandlerUPP ( DragTrackingMessage  message,
WindowRef  theWindow,
void *  handlerRefCon,
DragRef  theDrag,
DragTrackingHandlerUPP  userUPP 
)

InvokeDragTrackingHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDrag()

OSErr NewDrag ( DragRef theDrag)

© CREATING & DISPOSING


NewDrag()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDragDrawingUPP()

DragDrawingUPP NewDragDrawingUPP ( DragDrawingProcPtr  userRoutine)

NewDragDrawingUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDragInputUPP()

DragInputUPP NewDragInputUPP ( DragInputProcPtr  userRoutine)

NewDragInputUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDragReceiveHandlerUPP()

DragReceiveHandlerUPP NewDragReceiveHandlerUPP ( DragReceiveHandlerProcPtr  userRoutine)

NewDragReceiveHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDragSendDataUPP()

DragSendDataUPP NewDragSendDataUPP ( DragSendDataProcPtr  userRoutine)

NewDragSendDataUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDragTrackingHandlerUPP()

DragTrackingHandlerUPP NewDragTrackingHandlerUPP ( DragTrackingHandlerProcPtr  userRoutine)

NewDragTrackingHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RemoveReceiveHandler()

OSErr RemoveReceiveHandler ( DragReceiveHandlerUPP  receiveHandler,
WindowRef  theWindow 
)

RemoveReceiveHandler()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RemoveTrackingHandler()

OSErr RemoveTrackingHandler ( DragTrackingHandlerUPP  trackingHandler,
WindowRef  theWindow 
)

RemoveTrackingHandler()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDragAllowableActions()

OSStatus SetDragAllowableActions ( DragRef  theDrag,
DragActions  inActions,
Boolean  isLocal 
)

SetDragAllowableActions()

Discussion: Sets the actions the receiver of the drag is allowed to perform. These are not requirements, but they highly suggested actions which allows the drag receiver to improve harmony across the system. The caller may select wether these drag actions apply to a local or remote process.

Parameters:

theDrag: The drag reference in which to set the allowable drag actions.

inActions: A field of allowable drag actions to be set.

isLocal: A boolean value allowing the drag sender to distinguish between those drag actions allowable by the local receiver versus a remote one.

Result: An operating system result code.

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.1 and later

Mac OS X: in version 10.1 and later

◆ SetDragDrawingProc()

OSErr SetDragDrawingProc ( DragRef  theDrag,
DragDrawingUPP  drawingProc,
void *  dragDrawingRefCon 
)

SetDragDrawingProc()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDragDropAction()

OSStatus SetDragDropAction ( DragRef  theDrag,
DragActions  inAction 
)

SetDragDropAction()

Discussion: Sets the action performed by the receiver of the drag. More than one action may be performed.

Parameters:

theDrag: The drag reference in which to set the performed drop action.

inAction: The drop action performed.

Result: An operating system result code.

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.1 and later

Mac OS X: in version 10.1 and later

◆ SetDragImage()

OSErr SetDragImage ( DragRef  theDrag,
PixMapHandle  imagePixMap,
RgnHandle  imageRgn,
Point  imageOffsetPt,
DragImageFlags  theImageFlags 
)

© SETTING THE DRAG IMAGE


SetDragImage()

Non-Carbon CFM: in DragLib 7.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDragInputProc()

OSErr SetDragInputProc ( DragRef  theDrag,
DragInputUPP  inputProc,
void *  dragInputRefCon 
)

SetDragInputProc()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDragItemBounds()

OSErr SetDragItemBounds ( DragRef  theDrag,
DragItemRef  theItemRef,
const Rect itemBounds 
)

SetDragItemBounds()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDragItemFlavorData()

OSErr SetDragItemFlavorData ( DragRef  theDrag,
DragItemRef  theItemRef,
FlavorType  theType,
const void *  dataPtr,
Size  dataSize,
UInt32  dataOffset 
)

SetDragItemFlavorData()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDragMouse()

OSErr SetDragMouse ( DragRef  theDrag,
Point  globalPinnedMouse 
)

SetDragMouse()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDragSendProc()

OSErr SetDragSendProc ( DragRef  theDrag,
DragSendDataUPP  sendProc,
void *  dragSendRefCon 
)

© PROVIDING CALLBACK PROCEDURES


SetDragSendProc()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDropLocation()

OSErr SetDropLocation ( DragRef  theDrag,
const AEDesc dropLocation 
)

SetDropLocation()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ShowDragHilite()

OSErr ShowDragHilite ( DragRef  theDrag,
RgnHandle  hiliteFrame,
Boolean  inside 
)

© DRAG HIGHLIGHTING


ShowDragHilite()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ TrackDrag()

OSErr TrackDrag ( DragRef  theDrag,
const EventRecord theEvent,
RgnHandle  theRegion 
)

© PERFORMING A DRAG


TrackDrag()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UpdateDragHilite()

OSErr UpdateDragHilite ( DragRef  theDrag,
RgnHandle  updateRgn 
)

UpdateDragHilite()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ WaitMouseMoved()

Boolean WaitMouseMoved ( Point  initialMouse)

© UTILITIES


WaitMouseMoved()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ZoomRects()

OSErr ZoomRects ( const Rect fromRect,
const Rect toRect,
SInt16  zoomSteps,
ZoomAcceleration  acceleration 
)

ZoomRects()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ZoomRegion()

OSErr ZoomRegion ( RgnHandle  region,
Point  zoomDistance,
SInt16  zoomSteps,
ZoomAcceleration  acceleration 
)

ZoomRegion()

Non-Carbon CFM: in DragLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later