Mac OS 9
Drag.h
Go to the documentation of this file.
1 
19 #ifndef __DRAG__
20 #define __DRAG__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __EVENTS__
27 #include <Events.h>
28 #endif
29 
30 #ifndef __FILES__
31 #include <Files.h>
32 #endif
33 
34 #ifndef __APPLEEVENTS__
35 #include <AppleEvents.h>
36 #endif
37 
38 #ifndef __QUICKDRAW__
39 #include <Quickdraw.h>
40 #endif
41 
42 #if PRAGMA_ONCE
43 #pragma once
44 #endif
45 
46 #ifdef __cplusplus
47 extern "C"
48 {
49 #endif
50 
51 #if PRAGMA_IMPORT
52 #pragma import on
53 #endif
54 
55 #if PRAGMA_STRUCT_ALIGN
56 #pragma options align = mac68k
57 #elif PRAGMA_STRUCT_PACKPUSH
58 #pragma pack(push, 2)
59 #elif PRAGMA_STRUCT_PACK
60 #pragma pack(2)
61 #endif
62 
70  typedef struct OpaqueDragRef *DragRef;
71  typedef UInt32 DragItemRef;
72  typedef OSType FlavorType;
79  typedef UInt32 DragAttributes;
80  enum
81  {
82  kDragHasLeftSenderWindow =
83  (1L << 0),
85  (1L << 1),
87  (1L << 2)
88  };
89 
96  typedef UInt32 DragBehaviors;
97  enum
98  {
99  kDragBehaviorNone = 0,
100  kDragBehaviorZoomBackAnimation =
101  (1L << 0)
102  };
103 
110  typedef UInt32 DragImageFlags;
111  enum
112  {
113  kDragRegionAndImage = (1L << 4)
114  };
115 
123  enum
124  {
125  kDragStandardTranslucency = 0L,
129  };
130 
138  typedef SInt16 DragRegionMessage;
139  enum
140  {
141  kDragRegionBegin = 1,
145  kDragRegionEnd = 5
146  };
147 
155  typedef SInt16 ZoomAcceleration;
156  enum
157  {
158  kZoomNoAcceleration = 0,
160  kZoomDecelerate = 2
161  };
162 
170  typedef UInt32 FlavorFlags;
171  enum
172  {
173  flavorSenderOnly = (1 << 0),
175  flavorNotSaved = (1 << 2),
177  flavorDataPromised = (1 << 9)
178  };
179 
187  enum
188  {
189  kDragFlavorTypeHFS = FOUR_CHAR_CODE('hfs '),
191  FOUR_CHAR_CODE('phfs'),
192  flavorTypeHFS = kDragFlavorTypeHFS,
194  };
195 
196  enum
197  {
198  kDragPromisedFlavorFindFile =
199  FOUR_CHAR_CODE('rWm1'),
201  FOUR_CHAR_CODE('fssP')
202  };
203 
204  enum
205  {
206  kDragPseudoCreatorVolumeOrDirectory =
207  FOUR_CHAR_CODE('MACS'),
209  FOUR_CHAR_CODE('disk'),
211  FOUR_CHAR_CODE('fold')
212  };
213 
221  enum
222  {
223  flavorTypeDirectory =
224  FOUR_CHAR_CODE('diry')
225  };
226 
234  enum
235  {
236  kFlavorTypeClippingName = FOUR_CHAR_CODE(
237  'clnm'),
239  FOUR_CHAR_CODE('clfn'),
241  FOUR_CHAR_CODE('fdtt'),
243  kFlavorTypeFinderNoTrackingBehavior = FOUR_CHAR_CODE(
244  'fntb')
245  };
246 
254  typedef SInt16 DragTrackingMessage;
255  enum
256  {
257  kDragTrackingEnterHandler = 1,
262  };
263 
271  enum
272  {
273  kDragActionNothing = 0L,
274  kDragActionCopy = 1L,
275  kDragActionAlias = (1L << 1),
276  kDragActionGeneric = (1L << 2),
277  kDragActionPrivate = (1L << 3),
278  kDragActionMove = (1L << 4),
279  kDragActionDelete = (1L << 5),
280  kDragActionAll = (long)0xFFFFFFFF
281  };
282 
283  typedef UInt32 DragActions;
290  struct HFSFlavor
291  {
292  OSType fileType;
293  OSType fileCreator;
294  UInt16 fdFlags;
295  FSSpec fileSpec;
296  };
297  typedef struct HFSFlavor HFSFlavor;
299  {
300  OSType fileType;
301  OSType fileCreator;
302  UInt16 fdFlags;
303  FlavorType promisedFlavor;
304  };
305  typedef struct PromiseHFSFlavor PromiseHFSFlavor;
312  typedef CALLBACK_API(OSErr,
313  DragTrackingHandlerProcPtr)(DragTrackingMessage message,
315  void *handlerRefCon,
316  DragRef theDrag);
317  typedef CALLBACK_API(OSErr, DragReceiveHandlerProcPtr)(WindowRef theWindow,
318  void *handlerRefCon,
319  DragRef theDrag);
320  typedef STACK_UPP_TYPE(DragTrackingHandlerProcPtr) DragTrackingHandlerUPP;
321  typedef STACK_UPP_TYPE(DragReceiveHandlerProcPtr) DragReceiveHandlerUPP;
330  DragTrackingHandlerUPP
331  NewDragTrackingHandlerUPP(DragTrackingHandlerProcPtr userRoutine);
332 #if !OPAQUE_UPP_TYPES
333  enum
334  {
335  uppDragTrackingHandlerProcInfo = 0x00003FA0
336  };
337 #ifdef __cplusplus
338  inline DragTrackingHandlerUPP
339  NewDragTrackingHandlerUPP(DragTrackingHandlerProcPtr userRoutine)
340  {
341  return (DragTrackingHandlerUPP)NewRoutineDescriptor(
342  (ProcPtr)(userRoutine), uppDragTrackingHandlerProcInfo,
343  GetCurrentArchitecture());
344  }
345 #else
346 #define NewDragTrackingHandlerUPP(userRoutine) \
347  (DragTrackingHandlerUPP) NewRoutineDescriptor( \
348  (ProcPtr)(userRoutine), uppDragTrackingHandlerProcInfo, \
349  GetCurrentArchitecture())
350 #endif
351 #endif
352 
361  DragReceiveHandlerUPP
362  NewDragReceiveHandlerUPP(DragReceiveHandlerProcPtr userRoutine);
363 #if !OPAQUE_UPP_TYPES
364  enum
365  {
366  uppDragReceiveHandlerProcInfo = 0x00000FE0
367  };
368 #ifdef __cplusplus
369  inline DragReceiveHandlerUPP
370  NewDragReceiveHandlerUPP(DragReceiveHandlerProcPtr userRoutine)
371  {
372  return (DragReceiveHandlerUPP)NewRoutineDescriptor(
373  (ProcPtr)(userRoutine), uppDragReceiveHandlerProcInfo,
374  GetCurrentArchitecture());
375  }
376 #else
377 #define NewDragReceiveHandlerUPP(userRoutine) \
378  (DragReceiveHandlerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
379  uppDragReceiveHandlerProcInfo, \
380  GetCurrentArchitecture())
381 #endif
382 #endif
383 
392  void
393  DisposeDragTrackingHandlerUPP(DragTrackingHandlerUPP userUPP);
394 #if !OPAQUE_UPP_TYPES
395 #ifdef __cplusplus
396  inline void DisposeDragTrackingHandlerUPP(DragTrackingHandlerUPP userUPP)
397  {
398  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
399  }
400 #else
401 #define DisposeDragTrackingHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
402 #endif
403 #endif
404 
413  void
414  DisposeDragReceiveHandlerUPP(DragReceiveHandlerUPP userUPP);
415 #if !OPAQUE_UPP_TYPES
416 #ifdef __cplusplus
417  inline void DisposeDragReceiveHandlerUPP(DragReceiveHandlerUPP userUPP)
418  {
419  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
420  }
421 #else
422 #define DisposeDragReceiveHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
423 #endif
424 #endif
425 
434  OSErr
436  void *handlerRefCon, DragRef theDrag,
437  DragTrackingHandlerUPP userUPP);
438 #if !OPAQUE_UPP_TYPES
439 #ifdef __cplusplus
442  void *handlerRefCon, DragRef theDrag,
443  DragTrackingHandlerUPP userUPP)
444  {
445  return (OSErr)CALL_FOUR_PARAMETER_UPP(userUPP, uppDragTrackingHandlerProcInfo,
446  message, theWindow, handlerRefCon,
447  theDrag);
448  }
449 #else
450 #define InvokeDragTrackingHandlerUPP(message, theWindow, handlerRefCon, \
451  theDrag, userUPP) \
452  (OSErr) CALL_FOUR_PARAMETER_UPP((userUPP), uppDragTrackingHandlerProcInfo, \
453  (message), (theWindow), (handlerRefCon), \
454  (theDrag))
455 #endif
456 #endif
457 
466  OSErr
468  DragRef theDrag, DragReceiveHandlerUPP userUPP);
469 #if !OPAQUE_UPP_TYPES
470 #ifdef __cplusplus
472  void *handlerRefCon, DragRef theDrag,
473  DragReceiveHandlerUPP userUPP)
474  {
475  return (OSErr)CALL_THREE_PARAMETER_UPP(userUPP, uppDragReceiveHandlerProcInfo,
476  theWindow, handlerRefCon, theDrag);
477  }
478 #else
479 #define InvokeDragReceiveHandlerUPP(theWindow, handlerRefCon, theDrag, \
480  userUPP) \
481  (OSErr) CALL_THREE_PARAMETER_UPP((userUPP), uppDragReceiveHandlerProcInfo, \
482  (theWindow), (handlerRefCon), (theDrag))
483 #endif
484 #endif
485 
486 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
488 #define NewDragTrackingHandlerProc(userRoutine) \
489  NewDragTrackingHandlerUPP(userRoutine)
490 #define NewDragReceiveHandlerProc(userRoutine) \
491  NewDragReceiveHandlerUPP(userRoutine)
492 #define CallDragTrackingHandlerProc(userRoutine, message, theWindow, \
493  handlerRefCon, theDrag) \
494  InvokeDragTrackingHandlerUPP(message, theWindow, handlerRefCon, theDrag, \
495  userRoutine)
496 #define CallDragReceiveHandlerProc(userRoutine, theWindow, handlerRefCon, \
497  theDrag) \
498  InvokeDragReceiveHandlerUPP(theWindow, handlerRefCon, theDrag, userRoutine)
499 #endif
507  typedef CALLBACK_API(OSErr, DragSendDataProcPtr)(FlavorType theType,
508  void *dragSendRefCon,
509  DragItemRef theItemRef,
510  DragRef theDrag);
511  typedef CALLBACK_API(OSErr, DragInputProcPtr)(Point *mouse, SInt16 *modifiers,
512  void *dragInputRefCon,
513  DragRef theDrag);
514  typedef CALLBACK_API(OSErr,
515  DragDrawingProcPtr)(DragRegionMessage message,
516  RgnHandle showRegion, Point showOrigin,
517  RgnHandle hideRegion, Point hideOrigin,
518  void *dragDrawingRefCon,
519  DragRef theDrag);
520  typedef STACK_UPP_TYPE(DragSendDataProcPtr) DragSendDataUPP;
521  typedef STACK_UPP_TYPE(DragInputProcPtr) DragInputUPP;
522  typedef STACK_UPP_TYPE(DragDrawingProcPtr) DragDrawingUPP;
531  DragSendDataUPP
532  NewDragSendDataUPP(DragSendDataProcPtr userRoutine);
533 #if !OPAQUE_UPP_TYPES
534  enum
535  {
536  uppDragSendDataProcInfo = 0x00003FE0
537  };
538 #ifdef __cplusplus
539  inline DragSendDataUPP NewDragSendDataUPP(DragSendDataProcPtr userRoutine)
540  {
541  return (DragSendDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
542  uppDragSendDataProcInfo,
543  GetCurrentArchitecture());
544  }
545 #else
546 #define NewDragSendDataUPP(userRoutine) \
547  (DragSendDataUPP) \
548  NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragSendDataProcInfo, \
549  GetCurrentArchitecture())
550 #endif
551 #endif
552 
561  DragInputUPP
562  NewDragInputUPP(DragInputProcPtr userRoutine);
563 #if !OPAQUE_UPP_TYPES
564  enum
565  {
566  uppDragInputProcInfo = 0x00003FE0
567  };
568 #ifdef __cplusplus
569  inline DragInputUPP NewDragInputUPP(DragInputProcPtr userRoutine)
570  {
571  return (DragInputUPP)NewRoutineDescriptor(
572  (ProcPtr)(userRoutine), uppDragInputProcInfo, GetCurrentArchitecture());
573  }
574 #else
575 #define NewDragInputUPP(userRoutine) \
576  (DragInputUPP) NewRoutineDescriptor( \
577  (ProcPtr)(userRoutine), uppDragInputProcInfo, GetCurrentArchitecture())
578 #endif
579 #endif
580 
589  DragDrawingUPP
590  NewDragDrawingUPP(DragDrawingProcPtr userRoutine);
591 #if !OPAQUE_UPP_TYPES
592  enum
593  {
594  uppDragDrawingProcInfo = 0x000FFFA0
595  };
597 #ifdef __cplusplus
598  inline DragDrawingUPP NewDragDrawingUPP(DragDrawingProcPtr userRoutine)
599  {
600  return (DragDrawingUPP)NewRoutineDescriptor(
601  (ProcPtr)(userRoutine), uppDragDrawingProcInfo, GetCurrentArchitecture());
602  }
603 #else
604 #define NewDragDrawingUPP(userRoutine) \
605  (DragDrawingUPP) \
606  NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragDrawingProcInfo, \
607  GetCurrentArchitecture())
608 #endif
609 #endif
610 
619  void
620  DisposeDragSendDataUPP(DragSendDataUPP userUPP);
621 #if !OPAQUE_UPP_TYPES
622 #ifdef __cplusplus
623  inline void DisposeDragSendDataUPP(DragSendDataUPP userUPP)
624  {
625  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
626  }
627 #else
628 #define DisposeDragSendDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
629 #endif
630 #endif
631 
640  void
641  DisposeDragInputUPP(DragInputUPP userUPP);
642 #if !OPAQUE_UPP_TYPES
643 #ifdef __cplusplus
644  inline void DisposeDragInputUPP(DragInputUPP userUPP)
645  {
646  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
647  }
648 #else
649 #define DisposeDragInputUPP(userUPP) DisposeRoutineDescriptor(userUPP)
650 #endif
651 #endif
652 
661  void
662  DisposeDragDrawingUPP(DragDrawingUPP userUPP);
663 #if !OPAQUE_UPP_TYPES
664 #ifdef __cplusplus
665  inline void DisposeDragDrawingUPP(DragDrawingUPP userUPP)
666  {
667  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
668  }
669 #else
670 #define DisposeDragDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
671 #endif
672 #endif
673 
682  OSErr
683  InvokeDragSendDataUPP(FlavorType theType, void *dragSendRefCon,
684  DragItemRef theItemRef, DragRef theDrag,
685  DragSendDataUPP userUPP);
686 #if !OPAQUE_UPP_TYPES
687 #ifdef __cplusplus
688  inline OSErr InvokeDragSendDataUPP(FlavorType theType, void *dragSendRefCon,
689  DragItemRef theItemRef, DragRef theDrag,
690  DragSendDataUPP userUPP)
691  {
692  return (OSErr)CALL_FOUR_PARAMETER_UPP(userUPP, uppDragSendDataProcInfo,
693  theType, dragSendRefCon, theItemRef,
694  theDrag);
695  }
696 #else
697 #define InvokeDragSendDataUPP(theType, dragSendRefCon, theItemRef, theDrag, \
698  userUPP) \
699  (OSErr) \
700  CALL_FOUR_PARAMETER_UPP((userUPP), uppDragSendDataProcInfo, (theType), \
701  (dragSendRefCon), (theItemRef), (theDrag))
702 #endif
703 #endif
704 
713  OSErr
714  InvokeDragInputUPP(Point *mouse, SInt16 *modifiers, void *dragInputRefCon,
715  DragRef theDrag, DragInputUPP userUPP);
716 #if !OPAQUE_UPP_TYPES
717 #ifdef __cplusplus
718  inline OSErr InvokeDragInputUPP(Point *mouse, SInt16 *modifiers,
719  void *dragInputRefCon, DragRef theDrag,
720  DragInputUPP userUPP)
721  {
722  return (OSErr)CALL_FOUR_PARAMETER_UPP(userUPP, uppDragInputProcInfo, mouse,
723  modifiers, dragInputRefCon, theDrag);
724  }
725 #else
726 #define InvokeDragInputUPP(mouse, modifiers, dragInputRefCon, theDrag, \
727  userUPP) \
728  (OSErr) CALL_FOUR_PARAMETER_UPP((userUPP), uppDragInputProcInfo, (mouse), \
729  (modifiers), (dragInputRefCon), (theDrag))
730 #endif
731 #endif
732 
741  OSErr
743  Point showOrigin, RgnHandle hideRegion, Point hideOrigin,
744  void *dragDrawingRefCon, DragRef theDrag,
745  DragDrawingUPP userUPP);
746 #if !OPAQUE_UPP_TYPES
747 #ifdef __cplusplus
748  inline OSErr InvokeDragDrawingUPP(DragRegionMessage message,
749  RgnHandle showRegion, Point showOrigin,
750  RgnHandle hideRegion, Point hideOrigin,
751  void *dragDrawingRefCon, DragRef theDrag,
752  DragDrawingUPP userUPP)
753  {
754  return (OSErr)CALL_SEVEN_PARAMETER_UPP(
755  userUPP, uppDragDrawingProcInfo, message, showRegion, showOrigin,
756  hideRegion, hideOrigin, dragDrawingRefCon, theDrag);
757  }
758 #else
759 #define InvokeDragDrawingUPP(message, showRegion, showOrigin, hideRegion, \
760  hideOrigin, dragDrawingRefCon, theDrag, userUPP) \
761  (OSErr) \
762  CALL_SEVEN_PARAMETER_UPP((userUPP), uppDragDrawingProcInfo, (message), \
763  (showRegion), (showOrigin), (hideRegion), \
764  (hideOrigin), (dragDrawingRefCon), (theDrag))
765 #endif
766 #endif
767 
768 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
770 #define NewDragSendDataProc(userRoutine) NewDragSendDataUPP(userRoutine)
771 #define NewDragInputProc(userRoutine) NewDragInputUPP(userRoutine)
772 #define NewDragDrawingProc(userRoutine) NewDragDrawingUPP(userRoutine)
773 #define CallDragSendDataProc(userRoutine, theType, dragSendRefCon, theItemRef, \
774  theDrag) \
775  InvokeDragSendDataUPP(theType, dragSendRefCon, theItemRef, theDrag, \
776  userRoutine)
777 #define CallDragInputProc(userRoutine, mouse, modifiers, dragInputRefCon, \
778  theDrag) \
779  InvokeDragInputUPP(mouse, modifiers, dragInputRefCon, theDrag, userRoutine)
780 #define CallDragDrawingProc(userRoutine, message, showRegion, showOrigin, \
781  hideRegion, hideOrigin, dragDrawingRefCon, \
782  theDrag) \
783  InvokeDragDrawingUPP(message, showRegion, showOrigin, hideRegion, \
784  hideOrigin, dragDrawingRefCon, theDrag, userRoutine)
785 #endif
802  OSErr
803  InstallTrackingHandler(DragTrackingHandlerUPP trackingHandler,
804  WindowRef theWindow, void *handlerRefCon);
805 
814  OSErr
815  InstallReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowRef theWindow,
816  void *handlerRefCon);
817 
826  OSErr
827  RemoveTrackingHandler(DragTrackingHandlerUPP trackingHandler,
829 
838  OSErr
839  RemoveReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowRef theWindow);
840 
856  OSErr
857  NewDrag(DragRef *theDrag);
858 
867  OSErr
869 
895  OSErr
896  AddDragItemFlavor(DragRef theDrag, DragItemRef theItemRef, FlavorType theType,
897  const void *dataPtr, Size dataSize, FlavorFlags theFlags);
898 
907  OSErr
908  SetDragItemFlavorData(DragRef theDrag, DragItemRef theItemRef,
909  FlavorType theType, const void *dataPtr, Size dataSize,
910  UInt32 dataOffset);
911 
927  OSErr
928  SetDragSendProc(DragRef theDrag, DragSendDataUPP sendProc, void *dragSendRefCon);
929 
938  OSErr
939  SetDragInputProc(DragRef theDrag, DragInputUPP inputProc, void *dragInputRefCon);
940 
949  OSErr
950  SetDragDrawingProc(DragRef theDrag, DragDrawingUPP drawingProc,
951  void *dragDrawingRefCon);
952 
968  OSErr
969  SetDragImage(DragRef theDrag, PixMapHandle imagePixMap, RgnHandle imageRgn,
970  Point imageOffsetPt, DragImageFlags theImageFlags);
971 
986  OSErr
987  ChangeDragBehaviors(DragRef theDrag, DragBehaviors inBehaviorsToSet,
988  DragBehaviors inBehaviorsToClear);
989 
1004  OSErr
1005  TrackDrag(DragRef theDrag, const EventRecord *theEvent, RgnHandle theRegion);
1006 
1022  OSErr
1023  CountDragItems(DragRef theDrag, UInt16 *numItems);
1024 
1033  OSErr
1034  GetDragItemReferenceNumber(DragRef theDrag, UInt16 index,
1035  DragItemRef *theItemRef);
1036 
1045  OSErr
1046  CountDragItemFlavors(DragRef theDrag, DragItemRef theItemRef,
1047  UInt16 *numFlavors);
1048 
1057  OSErr
1058  GetFlavorType(DragRef theDrag, DragItemRef theItemRef, UInt16 index,
1059  FlavorType *theType);
1060 
1069  OSErr
1070  GetFlavorFlags(DragRef theDrag, DragItemRef theItemRef, FlavorType theType,
1071  FlavorFlags *theFlags);
1072 
1081  OSErr
1082  GetFlavorDataSize(DragRef theDrag, DragItemRef theItemRef, FlavorType theType,
1083  Size *dataSize);
1084 
1093  OSErr
1094  GetFlavorData(DragRef theDrag, DragItemRef theItemRef, FlavorType theType,
1095  void *dataPtr, Size *dataSize, UInt32 dataOffset);
1096 
1112  OSErr
1113  GetDragItemBounds(DragRef theDrag, DragItemRef theItemRef, Rect *itemBounds);
1114 
1123  OSErr
1124  SetDragItemBounds(DragRef theDrag, DragItemRef theItemRef,
1125  const Rect *itemBounds);
1126 
1142  OSErr
1143  GetDropLocation(DragRef theDrag, AEDesc *dropLocation);
1144 
1153  OSErr
1154  SetDropLocation(DragRef theDrag, const AEDesc *dropLocation);
1155 
1171  OSErr
1173 
1182  OSErr
1183  GetDragMouse(DragRef theDrag, Point *mouse, Point *globalPinnedMouse);
1184 
1193  OSErr
1194  SetDragMouse(DragRef theDrag, Point globalPinnedMouse);
1195 
1204  OSErr
1205  GetDragOrigin(DragRef theDrag, Point *globalInitialMouse);
1206 
1215  OSErr
1216  GetDragModifiers(DragRef theDrag, SInt16 *modifiers, SInt16 *mouseDownModifiers,
1217  SInt16 *mouseUpModifiers);
1218 
1254  OSStatus
1255  GetDragAllowableActions(DragRef theDrag, DragActions *outActions);
1256 
1289  OSStatus
1290  SetDragAllowableActions(DragRef theDrag, DragActions inActions,
1291  Boolean isLocal);
1292 
1318  OSStatus
1319  GetDragDropAction(DragRef theDrag, DragActions *outAction);
1320 
1345  OSStatus
1346  SetDragDropAction(DragRef theDrag, DragActions inAction);
1347 
1363  OSErr
1364  ShowDragHilite(DragRef theDrag, RgnHandle hiliteFrame, Boolean inside);
1365 
1374  OSErr
1376 
1385  OSErr
1386  DragPreScroll(DragRef theDrag, SInt16 dH, SInt16 dV);
1387 
1396  OSErr
1398 
1407  OSErr
1408  UpdateDragHilite(DragRef theDrag, RgnHandle updateRgn);
1409 
1418  OSErr
1420 
1436  Boolean
1437  WaitMouseMoved(Point initialMouse);
1438 
1447  OSErr
1448  ZoomRects(const Rect *fromRect, const Rect *toRect, SInt16 zoomSteps,
1449  ZoomAcceleration acceleration);
1450 
1459  OSErr
1460  ZoomRegion(RgnHandle region, Point zoomDistance, SInt16 zoomSteps,
1461  ZoomAcceleration acceleration);
1462 
1473  typedef DragItemRef ItemReference;
1474 #if OLDROUTINENAMES
1475  enum
1476  {
1477  dragHasLeftSenderWindow =
1478  kDragHasLeftSenderWindow,
1480  dragInsideSenderApplication =
1483  dragInsideSenderWindow =
1485  };
1486 
1487  enum
1488  {
1489  dragTrackingEnterHandler =
1490  kDragTrackingEnterHandler,
1491  dragTrackingEnterWindow =
1493  dragTrackingInWindow =
1495  dragTrackingLeaveWindow =
1497  dragTrackingLeaveHandler =
1499  };
1500 
1501  enum
1502  {
1503  dragRegionBegin = kDragRegionBegin,
1504  dragRegionDraw = kDragRegionDraw,
1505  dragRegionHide = kDragRegionHide,
1506  dragRegionIdle = kDragRegionIdle,
1507  dragRegionEnd = kDragRegionEnd
1508  };
1509 
1510  enum
1511  {
1512  zoomNoAcceleration = kZoomNoAcceleration,
1513  zoomAccelerate = kZoomAccelerate,
1514  zoomDecelerate = kZoomDecelerate
1515  };
1516 
1517  enum
1518  {
1519  kDragStandardImage =
1520  kDragStandardTranslucency,
1521  kDragDarkImage = kDragDarkTranslucency,
1522  kDragDarkerImage = kDragDarkerTranslucency,
1523  kDragOpaqueImage =
1525  };
1526 
1527 #endif
1529 #if PRAGMA_STRUCT_ALIGN
1530 #pragma options align = reset
1531 #elif PRAGMA_STRUCT_PACKPUSH
1532 #pragma pack(pop)
1533 #elif PRAGMA_STRUCT_PACK
1534 #pragma pack()
1535 #endif
1536 
1537 #ifdef PRAGMA_IMPORT_OFF
1538 #pragma import off
1539 #elif PRAGMA_IMPORT
1540 #pragma import reset
1541 #endif
1542 
1543 #ifdef __cplusplus
1544 }
1545 #endif
1546 
1547 #endif
AppleEvent Package Interfaces.
OSErr DragPreScroll(DragRef theDrag, SInt16 dH, SInt16 dV)
UInt32 FlavorFlags
Definition: Drag.h:170
OSErr InvokeDragSendDataUPP(FlavorType theType, void *dragSendRefCon, DragItemRef theItemRef, DragRef theDrag, DragSendDataUPP userUPP)
OSStatus GetDragAllowableActions(DragRef theDrag, DragActions *outActions)
OSErr SetDragInputProc(DragRef theDrag, DragInputUPP inputProc, void *dragInputRefCon)
void DisposeDragDrawingUPP(DragDrawingUPP userUPP)
OSErr GetDragItemReferenceNumber(DragRef theDrag, UInt16 index, DragItemRef *theItemRef)
OSErr SetDragItemBounds(DragRef theDrag, DragItemRef theItemRef, const Rect *itemBounds)
OSErr GetDragMouse(DragRef theDrag, Point *mouse, Point *globalPinnedMouse)
SInt16 DragRegionMessage
Definition: Drag.h:138
@ kDragTrackingInWindow
Definition: Drag.h:259
@ kDragTrackingEnterWindow
Definition: Drag.h:258
@ kDragTrackingLeaveHandler
Definition: Drag.h:261
@ kDragTrackingLeaveWindow
Definition: Drag.h:260
OSErr GetDragHiliteColor(WindowRef window, RGBColor *color)
OSErr GetDragModifiers(DragRef theDrag, SInt16 *modifiers, SInt16 *mouseDownModifiers, SInt16 *mouseUpModifiers)
OSErr SetDragDrawingProc(DragRef theDrag, DragDrawingUPP drawingProc, void *dragDrawingRefCon)
OSErr InvokeDragDrawingUPP(DragRegionMessage message, RgnHandle showRegion, Point showOrigin, RgnHandle hideRegion, Point hideOrigin, void *dragDrawingRefCon, DragRef theDrag, DragDrawingUPP userUPP)
OSErr RemoveReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowRef theWindow)
OSErr InvokeDragTrackingHandlerUPP(DragTrackingMessage message, WindowRef theWindow, void *handlerRefCon, DragRef theDrag, DragTrackingHandlerUPP userUPP)
Boolean WaitMouseMoved(Point initialMouse)
OSErr DisposeDrag(DragRef theDrag)
@ kDragDarkerTranslucency
Definition: Drag.h:127
@ kDragDarkTranslucency
Definition: Drag.h:126
@ kDragOpaqueTranslucency
Definition: Drag.h:128
UInt32 DragAttributes
Definition: Drag.h:79
@ kDragFlavorTypePromiseHFS
Definition: Drag.h:190
@ flavorTypeHFS
Definition: Drag.h:192
@ flavorTypePromiseHFS
Definition: Drag.h:193
#define NewDragSendDataUPP(userRoutine)
Definition: Drag.h:546
@ flavorDataPromised
Definition: Drag.h:177
@ flavorSystemTranslated
Definition: Drag.h:176
@ flavorNotSaved
Definition: Drag.h:175
@ flavorSenderTranslated
Definition: Drag.h:174
OSStatus SetDragDropAction(DragRef theDrag, DragActions inAction)
OSErr RemoveTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowRef theWindow)
OSStatus SetDragAllowableActions(DragRef theDrag, DragActions inActions, Boolean isLocal)
@ kDragInsideSenderWindow
Definition: Drag.h:86
@ kDragInsideSenderApplication
Definition: Drag.h:84
OSErr GetDragAttributes(DragRef theDrag, DragAttributes *flags)
UInt32 DragBehaviors
Definition: Drag.h:96
@ kFlavorTypeDragToTrashOnly
Definition: Drag.h:240
@ kFlavorTypeClippingFilename
Definition: Drag.h:238
@ kFlavorTypeFinderNoTrackingBehavior
Definition: Drag.h:243
OSStatus GetDragDropAction(DragRef theDrag, DragActions *outAction)
OSErr ZoomRegion(RgnHandle region, Point zoomDistance, SInt16 zoomSteps, ZoomAcceleration acceleration)
typedef CALLBACK_API(OSErr, DragTrackingHandlerProcPtr)(DragTrackingMessage message
OSErr GetFlavorFlags(DragRef theDrag, DragItemRef theItemRef, FlavorType theType, FlavorFlags *theFlags)
OSErr GetFlavorData(DragRef theDrag, DragItemRef theItemRef, FlavorType theType, void *dataPtr, Size *dataSize, UInt32 dataOffset)
@ kZoomAccelerate
Definition: Drag.h:159
@ kZoomDecelerate
Definition: Drag.h:160
OSErr InvokeDragReceiveHandlerUPP(WindowRef theWindow, void *handlerRefCon, DragRef theDrag, DragReceiveHandlerUPP userUPP)
OSErr GetFlavorType(DragRef theDrag, DragItemRef theItemRef, UInt16 index, FlavorType *theType)
OSErr InvokeDragInputUPP(Point *mouse, SInt16 *modifiers, void *dragInputRefCon, DragRef theDrag, DragInputUPP userUPP)
SInt16 ZoomAcceleration
Definition: Drag.h:155
OSErr SetDragItemFlavorData(DragRef theDrag, DragItemRef theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, UInt32 dataOffset)
OSErr GetFlavorDataSize(DragRef theDrag, DragItemRef theItemRef, FlavorType theType, Size *dataSize)
OSErr NewDrag(DragRef *theDrag)
OSErr SetDragMouse(DragRef theDrag, Point globalPinnedMouse)
DragRef DragReference
Definition: Drag.h:1472
OSErr SetDragImage(DragRef theDrag, PixMapHandle imagePixMap, RgnHandle imageRgn, Point imageOffsetPt, DragImageFlags theImageFlags)
#define NewDragReceiveHandlerUPP(userRoutine)
Definition: Drag.h:377
OSErr TrackDrag(DragRef theDrag, const EventRecord *theEvent, RgnHandle theRegion)
OSErr GetDragItemBounds(DragRef theDrag, DragItemRef theItemRef, Rect *itemBounds)
#define NewDragTrackingHandlerUPP(userRoutine)
Definition: Drag.h:346
OSErr CountDragItems(DragRef theDrag, UInt16 *numItems)
OSErr AddDragItemFlavor(DragRef theDrag, DragItemRef theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, FlavorFlags theFlags)
UInt32 DragImageFlags
Definition: Drag.h:110
void DisposeDragReceiveHandlerUPP(DragReceiveHandlerUPP userUPP)
@ kDragPseudoFileTypeVolume
Definition: Drag.h:208
@ kDragPseudoFileTypeDirectory
Definition: Drag.h:210
OSErr ShowDragHilite(DragRef theDrag, RgnHandle hiliteFrame, Boolean inside)
OSErr ZoomRects(const Rect *fromRect, const Rect *toRect, SInt16 zoomSteps, ZoomAcceleration acceleration)
@ kDragRegionIdle
Definition: Drag.h:144
@ kDragRegionDraw
Definition: Drag.h:142
@ kDragRegionHide
Definition: Drag.h:143
@ kDragRegionEnd
Definition: Drag.h:145
OSErr ChangeDragBehaviors(DragRef theDrag, DragBehaviors inBehaviorsToSet, DragBehaviors inBehaviorsToClear)
OSErr GetDragOrigin(DragRef theDrag, Point *globalInitialMouse)
OSErr InstallReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowRef theWindow, void *handlerRefCon)
OSErr SetDragSendProc(DragRef theDrag, DragSendDataUPP sendProc, void *dragSendRefCon)
OSErr CountDragItemFlavors(DragRef theDrag, DragItemRef theItemRef, UInt16 *numFlavors)
SInt16 DragTrackingMessage
Definition: Drag.h:254
OSErr InstallTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowRef theWindow, void *handlerRefCon)
void DisposeDragSendDataUPP(DragSendDataUPP userUPP)
struct OpaqueDragRef * DragRef
Definition: Drag.h:70
OSErr UpdateDragHilite(DragRef theDrag, RgnHandle updateRgn)
@ kDragPromisedFlavor
Definition: Drag.h:200
OSErr HideDragHilite(DragRef theDrag)
OSErr DragPostScroll(DragRef theDrag)
void DisposeDragInputUPP(DragInputUPP userUPP)
void DisposeDragTrackingHandlerUPP(DragTrackingHandlerUPP userUPP)
OSErr GetDropLocation(DragRef theDrag, AEDesc *dropLocation)
#define NewDragInputUPP(userRoutine)
Definition: Drag.h:575
#define NewDragDrawingUPP(userRoutine)
Definition: Drag.h:604
OSErr SetDropLocation(DragRef theDrag, const AEDesc *dropLocation)
Event Manager Interfaces.
File Manager (MFS, HFS, and HFS+) Interfaces.
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Interface to Quickdraw Graphics.
Definition: AEDataModel.h:175
Definition: Events.h:224
Definition: Quickdraw.h:1648
Definition: Drag.h:291
UInt16 fdFlags
Definition: Drag.h:294
FSSpec fileSpec
Definition: Drag.h:295
OSType fileCreator
Definition: Drag.h:293
Definition: Quickdraw.h:306
Definition: Quickdraw.h:2064
Definition: MacTypes.h:520
Definition: Drag.h:299
OSType fileCreator
Definition: Drag.h:301
FlavorType promisedFlavor
Definition: Drag.h:303
UInt16 fdFlags
Definition: Drag.h:302
Definition: Quickdraw.h:1710
Definition: MacTypes.h:527