1 {
2 File: HIToolbox/Drag.h
3
4 Contains: Drag and Drop Interfaces.
5
6 Version: HIToolbox-624~3
7
8 Copyright: � 1992-2008 by Apple Computer, Inc., all rights reserved.
9
10 Bugs?: For bug reports, consult the following page on
11 the World Wide Web:
12
13 http://bugs.freepascal.org
14
15 }
16 { Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
17 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2009 }
18 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 }
19 {
20 Modified for use with Free Pascal
21 Version 308
22 Please report any bugs to <gpc@microbizz.nl>
23 }
24
25 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
26 {$mode macpas}
27 {$modeswitch cblocks}
28 {$packenum 1}
29 {$macro on}
30 {$inline on}
31 {$calling mwpascal}
32
33 unit Drag;
34 interface
35 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
36 {$setc GAP_INTERFACES_VERSION := $0308}
37
38 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
39 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
40 {$endc}
41
42 {$ifc defined CPUPOWERPC and defined CPUI386}
43 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
44 {$endc}
45 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
46 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
47 {$endc}
48
49 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
50 {$setc __ppc__ := 1}
51 {$elsec}
52 {$setc __ppc__ := 0}
53 {$endc}
54 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
55 {$setc __ppc64__ := 1}
56 {$elsec}
57 {$setc __ppc64__ := 0}
58 {$endc}
59 {$ifc not defined __i386__ and defined CPUI386}
60 {$setc __i386__ := 1}
61 {$elsec}
62 {$setc __i386__ := 0}
63 {$endc}
64 {$ifc not defined __x86_64__ and defined CPUX86_64}
65 {$setc __x86_64__ := 1}
66 {$elsec}
67 {$setc __x86_64__ := 0}
68 {$endc}
69 {$ifc not defined __arm__ and defined CPUARM}
70 {$setc __arm__ := 1}
71 {$elsec}
72 {$setc __arm__ := 0}
73 {$endc}
74 {$ifc not defined __arm64__ and defined CPUAARCH64}
75 {$setc __arm64__ := 1}
76 {$elsec}
77 {$setc __arm64__ := 0}
78 {$endc}
79
80 {$ifc defined cpu64}
81 {$setc __LP64__ := 1}
82 {$elsec}
83 {$setc __LP64__ := 0}
84 {$endc}
85
86
87 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
88 {$error Conflicting definitions for __ppc__ and __i386__}
89 {$endc}
90
91 {$ifc defined __ppc__ and __ppc__}
92 {$setc TARGET_CPU_PPC := TRUE}
93 {$setc TARGET_CPU_PPC64 := FALSE}
94 {$setc TARGET_CPU_X86 := FALSE}
95 {$setc TARGET_CPU_X86_64 := FALSE}
96 {$setc TARGET_CPU_ARM := FALSE}
97 {$setc TARGET_CPU_ARM64 := FALSE}
98 {$setc TARGET_OS_MAC := TRUE}
99 {$setc TARGET_OS_IPHONE := FALSE}
100 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
101 {$setc TARGET_OS_EMBEDDED := FALSE}
102 {$elifc defined __ppc64__ and __ppc64__}
103 {$setc TARGET_CPU_PPC := FALSE}
104 {$setc TARGET_CPU_PPC64 := TRUE}
105 {$setc TARGET_CPU_X86 := FALSE}
106 {$setc TARGET_CPU_X86_64 := FALSE}
107 {$setc TARGET_CPU_ARM := FALSE}
108 {$setc TARGET_CPU_ARM64 := FALSE}
109 {$setc TARGET_OS_MAC := TRUE}
110 {$setc TARGET_OS_IPHONE := FALSE}
111 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
112 {$setc TARGET_OS_EMBEDDED := FALSE}
113 {$elifc defined __i386__ and __i386__}
114 {$setc TARGET_CPU_PPC := FALSE}
115 {$setc TARGET_CPU_PPC64 := FALSE}
116 {$setc TARGET_CPU_X86 := TRUE}
117 {$setc TARGET_CPU_X86_64 := FALSE}
118 {$setc TARGET_CPU_ARM := FALSE}
119 {$setc TARGET_CPU_ARM64 := FALSE}
120 {$ifc defined iphonesim}
121 {$setc TARGET_OS_MAC := FALSE}
122 {$setc TARGET_OS_IPHONE := TRUE}
123 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
124 {$elsec}
125 {$setc TARGET_OS_MAC := TRUE}
126 {$setc TARGET_OS_IPHONE := FALSE}
127 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
128 {$endc}
129 {$setc TARGET_OS_EMBEDDED := FALSE}
130 {$elifc defined __x86_64__ and __x86_64__}
131 {$setc TARGET_CPU_PPC := FALSE}
132 {$setc TARGET_CPU_PPC64 := FALSE}
133 {$setc TARGET_CPU_X86 := FALSE}
134 {$setc TARGET_CPU_X86_64 := TRUE}
135 {$setc TARGET_CPU_ARM := FALSE}
136 {$setc TARGET_CPU_ARM64 := FALSE}
137 {$ifc defined iphonesim}
138 {$setc TARGET_OS_MAC := FALSE}
139 {$setc TARGET_OS_IPHONE := TRUE}
140 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
141 {$elsec}
142 {$setc TARGET_OS_MAC := TRUE}
143 {$setc TARGET_OS_IPHONE := FALSE}
144 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
145 {$endc}
146 {$setc TARGET_OS_EMBEDDED := FALSE}
147 {$elifc defined __arm__ and __arm__}
148 {$setc TARGET_CPU_PPC := FALSE}
149 {$setc TARGET_CPU_PPC64 := FALSE}
150 {$setc TARGET_CPU_X86 := FALSE}
151 {$setc TARGET_CPU_X86_64 := FALSE}
152 {$setc TARGET_CPU_ARM := TRUE}
153 {$setc TARGET_CPU_ARM64 := FALSE}
154 {$setc TARGET_OS_MAC := FALSE}
155 {$setc TARGET_OS_IPHONE := TRUE}
156 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
157 {$setc TARGET_OS_EMBEDDED := TRUE}
158 {$elifc defined __arm64__ and __arm64__}
159 {$setc TARGET_CPU_PPC := FALSE}
160 {$setc TARGET_CPU_PPC64 := FALSE}
161 {$setc TARGET_CPU_X86 := FALSE}
162 {$setc TARGET_CPU_X86_64 := FALSE}
163 {$setc TARGET_CPU_ARM := FALSE}
164 {$setc TARGET_CPU_ARM64 := TRUE}
165 {$ifc defined ios}
166 {$setc TARGET_OS_MAC := FALSE}
167 {$setc TARGET_OS_IPHONE := TRUE}
168 {$setc TARGET_OS_EMBEDDED := TRUE}
169 {$elsec}
170 {$setc TARGET_OS_MAC := TRUE}
171 {$setc TARGET_OS_IPHONE := FALSE}
172 {$setc TARGET_OS_EMBEDDED := FALSE}
173 {$endc}
174 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
175 {$elsec}
176 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
177 {$endc}
178
179 {$ifc defined __LP64__ and __LP64__ }
180 {$setc TARGET_CPU_64 := TRUE}
181 {$elsec}
182 {$setc TARGET_CPU_64 := FALSE}
183 {$endc}
184
185 {$ifc defined FPC_BIG_ENDIAN}
186 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
187 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
188 {$elifc defined FPC_LITTLE_ENDIAN}
189 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
190 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
191 {$elsec}
192 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
193 {$endc}
194 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
195 {$setc CALL_NOT_IN_CARBON := FALSE}
196 {$setc OLDROUTINENAMES := FALSE}
197 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
198 {$setc OPAQUE_UPP_TYPES := TRUE}
199 {$setc OTCARBONAPPLICATION := TRUE}
200 {$setc OTKERNEL := FALSE}
201 {$setc PM_USE_SESSION_APIS := TRUE}
202 {$setc TARGET_API_MAC_CARBON := TRUE}
203 {$setc TARGET_API_MAC_OS8 := FALSE}
204 {$setc TARGET_API_MAC_OSX := TRUE}
205 {$setc TARGET_CARBON := TRUE}
206 {$setc TARGET_CPU_68K := FALSE}
207 {$setc TARGET_CPU_MIPS := FALSE}
208 {$setc TARGET_CPU_SPARC := FALSE}
209 {$setc TARGET_OS_UNIX := FALSE}
210 {$setc TARGET_OS_WIN32 := FALSE}
211 {$setc TARGET_RT_MAC_68881 := FALSE}
212 {$setc TARGET_RT_MAC_CFM := FALSE}
213 {$setc TARGET_RT_MAC_MACHO := TRUE}
214 {$setc TYPED_FUNCTION_POINTERS := TRUE}
215 {$setc TYPE_BOOL := FALSE}
216 {$setc TYPE_EXTENDED := FALSE}
217 {$setc TYPE_LONGLONG := TRUE}
218 uses MacTypes,AEDataModel,CGImage,CGGeometry,Events,Files,AppleEvents,QuickdrawTypes,Pasteboard,HIGeometry;
219 {$endc} {not MACOSALLINCLUDE}
220
221
222 {$ifc TARGET_OS_MAC}
223
224 {$ALIGN MAC68K}
225
226 {
227 _________________________________________________________________________________________________________
228
229 � DRAG MANAGER DATA TYPES
230 _________________________________________________________________________________________________________
231 }
232 type
233 DragRef = ^OpaqueDragRef; { an opaque type }
234 OpaqueDragRef = record end;
235 DragRefPtr = ^DragRef; { when a var xx:DragRef parameter can be nil, it is changed to xx: DragRefPtr }
236 DragItemRef = URefCon;
237 FlavorType = OSType;
238 {
239 _________________________________________________________________________________________________________
240
241 � DRAG ATTRIBUTES
242 _________________________________________________________________________________________________________
243 }
244 type
245 DragAttributes = OptionBits;
246 const
247 kDragHasLeftSenderWindow = 1 shl 0; { drag has left the source window since TrackDrag}
248 kDragInsideSenderApplication = 1 shl 1; { drag is occurring within the sender application}
249 kDragInsideSenderWindow = 1 shl 2; { drag is occurring within the sender window}
250
251 {
252 _________________________________________________________________________________________________________
253
254 � DRAG BEHAVIORS
255 _________________________________________________________________________________________________________
256 }
257
258 type
259 DragBehaviors = OptionBits;
260 const
261 kDragBehaviorNone = 0;
262 kDragBehaviorZoomBackAnimation = 1 shl 0; { do zoomback animation for failed drags (normally enabled).}
263
264 {
265 _________________________________________________________________________________________________________
266
267 � DRAG IMAGE FLAGS
268 _________________________________________________________________________________________________________
269 }
270
271
272 {
273 * DragImageFlags
274 *
275 * Summary:
276 * Parameters to SetDragImage and SetDragImageWithCGImage.
277 }
278 type
279 DragImageFlags = OptionBits;
280 const
281 {
282 * Indicates that the outline region passed to TrackDrag should be
283 * drawn onscreen, in addition to the translucent drag image. Do not
284 * set this flag when passing your own drag reference to
285 * HIWindowTrackProxyDrag.
286 }
287 kDragRegionAndImage = 1 shl 4;
288
289 {
290 * Indicates that the image and offset being passed in are already at
291 * device resolution, and the image should be drawn as-is. If this
292 * option is not specified, the image will be scaled according to the
293 * user's current scaling factor. Available in Mac OS X 10.4 and
294 * later.
295 }
296 kDragDoNotScaleImage = 1 shl 5;
297
298 {
299 _________________________________________________________________________________________________________
300
301 � DRAG IMAGE TRANSLUCENCY LEVELS
302 _________________________________________________________________________________________________________
303 }
304
305 const
306 kDragStandardTranslucency = 0; { 65% image translucency (standard)}
307 kDragDarkTranslucency = 1; { 50% image translucency}
308 kDragDarkerTranslucency = 2; { 25% image translucency}
309 kDragOpaqueTranslucency = 3; { 0% image translucency (opaque)}
310
311 {
312 _________________________________________________________________________________________________________
313
314 � FLAVOR FLAGS
315 _________________________________________________________________________________________________________
316 }
317
318 type
319 FlavorFlags = UInt32;
320 const
321 flavorSenderOnly = 1 shl 0; { flavor is available to sender only}
322 flavorSenderTranslated = 1 shl 1; { flavor is translated by sender}
323 flavorNotSaved = 1 shl 2; { flavor should not be saved}
324 flavorSystemTranslated = 1 shl 8; { flavor is translated by system}
325 flavorDataPromised = 1 shl 9; { flavor data is promised by sender}
326
327 {
328 _________________________________________________________________________________________________________
329
330 � FLAVORS FOR FINDER 8.0 AND LATER
331 _________________________________________________________________________________________________________
332 }
333
334 const
335 kFlavorTypeClippingName = FourCharCode('clnm'); { name hint for clipping file (preferred over 'clfn')}
336 kFlavorTypeClippingFilename = FourCharCode('clfn'); { name for clipping file}
337 kFlavorTypeUnicodeClippingName = FourCharCode('ucln'); { unicode name hint for clipping file (preferred over 'uclf')}
338 kFlavorTypeUnicodeClippingFilename = FourCharCode('uclf'); { unicode name for clipping file}
339 kFlavorTypeDragToTrashOnly = FourCharCode('fdtt'); { for apps that want to allow dragging private data to the trash}
340 kFlavorTypeFinderNoTrackingBehavior = FourCharCode('fntb'); { Finder completely ignores any drag containing this flavor}
341
342 {
343 _________________________________________________________________________________________________________
344
345 � DRAG ACTIONS
346 _________________________________________________________________________________________________________
347 }
348
349 type
350 DragActions = OptionBits;
351
352 {
353 * Summary:
354 * Drag Action constants
355 *
356 * Discussion:
357 * The following constants define, in a general way, what actions a
358 * drag should or has performed. Some drag actions enforce a mode
359 * of operation while others are flexible suggestions. These
360 * constants are used in conjunction with the
361 * Get/SetDragAllowableActions() and Get/SetDragDropAction() APIs.
362 * Adopting the Drag Action APIs increases compatability with the
363 * Cocoa drag operation model.
364 }
365 const
366 {
367 * Suggests nothing should be/was done with the data in a drag. When
368 * set as an allowable action for remote drags, the drag will not be
369 * sent to apps other than the sender.
370 }
371 kDragActionNothing = 0;
372
373 {
374 * Suggests the data contained within the drag can be/was copied.
375 }
376 kDragActionCopy = 1;
377
378 {
379 * Suggests the data contained within the drag can be/is shared.
380 }
381 kDragActionAlias = 1 shl 1;
382
383 {
384 * Suggests the drag action is can be defined by the drag destination
385 * or was not defined by the drag destination.
386 }
387 kDragActionGeneric = 1 shl 2;
388
389 {
390 * Suggests the drag action should be negotiated privately between
391 * the drag source and destination.
392 }
393 kDragActionPrivate = 1 shl 3;
394
395 {
396 * Description forthcoming.
397 }
398 kDragActionMove = 1 shl 4;
399
400 {
401 * Description forthcoming.
402 }
403 kDragActionDelete = 1 shl 5;
404
405 {
406 * All of the above drag actions are allowed.
407 }
408 kDragActionAll = $FFFFFFFF;
409
410 {
411 _________________________________________________________________________________________________________
412
413 � PROVIDING CALLBACK PROCEDURES
414 _________________________________________________________________________________________________________
415 }
416
417 type
varnull418 DragInputProcPtr = function( var mouse: Point; var modifiers: SInt16; dragInputRefCon: UnivPtr; theDrag: DragRef ): OSErr;
419 DragInputUPP = DragInputProcPtr;
420 {
421 * NewDragInputUPP()
422 *
423 * Availability:
424 * Mac OS X: in version 10.0 and later in Carbon.framework
425 * CarbonLib: in CarbonLib 1.0 and later
426 * Non-Carbon CFM: available as macro/inline
427 }
NewDragInputUPPnull428 function NewDragInputUPP( userRoutine: DragInputProcPtr ): DragInputUPP; external name '_NewDragInputUPP';
429 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
430
431 {
432 * DisposeDragInputUPP()
433 *
434 * Availability:
435 * Mac OS X: in version 10.0 and later in Carbon.framework
436 * CarbonLib: in CarbonLib 1.0 and later
437 * Non-Carbon CFM: available as macro/inline
438 }
439 procedure DisposeDragInputUPP( userUPP: DragInputUPP ); external name '_DisposeDragInputUPP';
440 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
441
442 {
443 * InvokeDragInputUPP()
444 *
445 * Availability:
446 * Mac OS X: in version 10.0 and later in Carbon.framework
447 * CarbonLib: in CarbonLib 1.0 and later
448 * Non-Carbon CFM: available as macro/inline
449 }
InvokeDragInputUPPnull450 function InvokeDragInputUPP( var mouse: Point; var modifiers: SInt16; dragInputRefCon: UnivPtr; theDrag: DragRef; userUPP: DragInputUPP ): OSErr; external name '_InvokeDragInputUPP';
451 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
452
453 {$ifc not TARGET_CPU_64}
454 {
455 * SetDragInputProc()
456 *
457 * Mac OS X threading:
458 * Not thread safe
459 *
460 * Availability:
461 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
462 * CarbonLib: in CarbonLib 1.0 and later
463 * Non-Carbon CFM: in DragLib 1.1 and later
464 }
SetDragInputProcnull465 function SetDragInputProc( theDrag: DragRef; inputProc: DragInputUPP; dragInputRefCon: UnivPtr ): OSErr; external name '_SetDragInputProc';
466 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
467
468
469 {
470 _________________________________________________________________________________________________________
471
472 � CREATING & DISPOSING
473 _________________________________________________________________________________________________________
474 }
475
476 {
477 * NewDrag()
478 *
479 * Mac OS X threading:
480 * Not thread safe
481 *
482 * Availability:
483 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
484 * CarbonLib: in CarbonLib 1.0 and later
485 * Non-Carbon CFM: in DragLib 1.1 and later
486 }
NewDragnull487 function NewDrag( var theDrag: DragRef ): OSErr; external name '_NewDrag';
488 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
489
490
491 {
492 * DisposeDrag()
493 *
494 * Mac OS X threading:
495 * Not thread safe
496 *
497 * Availability:
498 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
499 * CarbonLib: in CarbonLib 1.0 and later
500 * Non-Carbon CFM: in DragLib 1.1 and later
501 }
DisposeDragnull502 function DisposeDrag( theDrag: DragRef ): OSErr; external name '_DisposeDrag';
503 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
504
505
506 {
507 _________________________________________________________________________________________________________
508
509 � DRAG PASTEBOARD
510 _________________________________________________________________________________________________________
511 }
512
513 {
514 * NewDragWithPasteboard()
515 *
516 * Discussion:
517 * Creates a new Drag reference containing the pasteboard reference
518 * provided.
519 *
520 * Mac OS X threading:
521 * Not thread safe
522 *
523 * Parameters:
524 *
525 * inPasteboard:
526 * A pasteboard created by the drag sender for use with the drag.
527 * Items may be added to the pasteboard via the Pasteboard Manager
528 * API either before or after this routine is called. It is still
529 * possible to add data via the Drag Manager API, but only after
530 * this routine is called. It is the drag sender's responsibility
531 * to clear the pasteboard before adding items. It is also the
532 * drag sender's responsibility to release the pasteboard. This
533 * may be done at any time after this routine is called. The
534 * pasteboard is retained by the Drag Manager for the duration of
535 * the drag.
536 *
537 * outDrag:
538 * A drag reference which receives the newly created drag.
539 *
540 * Result:
541 * An operating system result code.
542 *
543 * Availability:
544 * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
545 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
546 * Non-Carbon CFM: not available
547 }
NewDragWithPasteboardnull548 function NewDragWithPasteboard( inPasteboard: PasteboardRef; var outDrag: DragRef ): OSStatus; external name '_NewDragWithPasteboard';
549 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
550
551
552 {
553 * GetDragPasteboard()
554 *
555 * Discussion:
556 * Returns the pasteboard reference contained within the provided
557 * drag reference. This routine may be called by a drag sender or
558 * receiver at any point after a valid drag reference has been
559 * created/received.
560 *
561 * Mac OS X threading:
562 * Not thread safe
563 *
564 * Parameters:
565 *
566 * inDrag:
567 * The drag reference containing the requested pasteboard.
568 *
569 * outPasteboard:
570 * A pasteboard reference which receives the pasteboard contained
571 * by the drag.
572 *
573 * Result:
574 * An operating system result code.
575 *
576 * Availability:
577 * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
578 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
579 * Non-Carbon CFM: not available
580 }
GetDragPasteboardnull581 function GetDragPasteboard( inDrag: DragRef; var outPasteboard: PasteboardRef ): OSStatus; external name '_GetDragPasteboard';
582 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
583
584
585 {
586 _________________________________________________________________________________________________________
587
588 � SETTING THE DRAG IMAGE
589 _________________________________________________________________________________________________________
590 }
591
592 {
593 * SetDragImageWithCGImage()
594 *
595 * Discussion:
596 * Used by the sender of the drag to set the image, in CGImage
597 * format, to be displayed as user feedback during the drag. This
598 * API may be called at any point during the drag to update the
599 * image.
600 *
601 * Mac OS X threading:
602 * Not thread safe
603 *
604 * Parameters:
605 *
606 * inDrag:
607 * The drag reference for which the image will be displayed.
608 *
609 * inCGImage:
610 * The CGImageRef for the image to be displayed during the drag.
611 * The image is retained internally by the Drag Manager for the
612 * duration of the drag so it may be released by the client
613 * immediately after setting. For Mac OS X 10.4 and earlier only
614 * images with an alpha info value between
615 * kCGImageAlphaPremultipliedLast and kCGImageAlphaFirst inclusive
616 * are properly accepted. All alpha info values are accepted in
617 * later versions.
618 *
619 * inImageOffsetPt:
620 * A pointer to the offset from the mouse to the upper left of the
621 * image (normally expressed in negative values). This differs
622 * from the usage of the offset passed to SetDragImage(). Here,
623 * an offset of ( -30, -30 ) will center a 60x60 pixel image on
624 * the drag mouse. In order to support resolution independence the
625 * kDragDoNotScaleImage flag must be set. In this case, the
626 * inImageOffsetPt parameter will be interpreted in pixels rather
627 * than points.
628 *
629 * inImageFlags:
630 * The flags determining image drawing during the drag.
631 *
632 * Result:
633 * An operating system result code.
634 *
635 * Availability:
636 * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
637 * CarbonLib: not available in CarbonLib 1.x
638 * Non-Carbon CFM: not available
639 }
SetDragImageWithCGImagenull640 function SetDragImageWithCGImage( inDrag: DragRef; inCGImage: CGImageRef; const (*var*) inImageOffsetPt: HIPoint; inImageFlags: DragImageFlags ): OSStatus; external name '_SetDragImageWithCGImage';
641 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
642
643
644 {
645 _________________________________________________________________________________________________________
646
647 � ALTERING THE BEHAVIOR OF A DRAG
648 _________________________________________________________________________________________________________
649 }
650
651 {
652 * ChangeDragBehaviors()
653 *
654 * Mac OS X threading:
655 * Not thread safe
656 *
657 * Availability:
658 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
659 * CarbonLib: in CarbonLib 1.0 and later
660 * Non-Carbon CFM: in DragLib 9.0 and later
661 }
ChangeDragBehaviorsnull662 function ChangeDragBehaviors( theDrag: DragRef; inBehaviorsToSet: DragBehaviors; inBehaviorsToClear: DragBehaviors ): OSErr; external name '_ChangeDragBehaviors';
663 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
664
665
666 {
667 _________________________________________________________________________________________________________
668
669 � PERFORMING A DRAG
670 _________________________________________________________________________________________________________
671 }
672
673 {
674 * TrackDrag()
675 *
676 * Summary:
677 * Tracks a drag across the displays, returning when the drag has
678 * completed, either via a drop action or a user cancel operation.
679 *
680 * Mac OS X threading:
681 * Not thread safe
682 *
683 * Parameters:
684 *
685 * theDrag:
686 * A drag reference describing the data to be dragged.
687 *
688 * theEvent:
689 * An event describing the start location for the drag and
690 * modifier keys.
691 *
692 * theRegion:
693 * A region describing the visible outline of the dragged data. If
694 * no drag image was supplied, or if a drag image was supplied
695 * along with the kDragRegionAndImage flag, this region is moved
696 * across the displays as the user moves the mouse during the drag
697 * operation. On Mac OS X 10.5 and later, you may pass NULL if you
698 * only want the drag image to be shown.
699 *
700 * Result:
701 * An operating system result code.
702 *
703 * Availability:
704 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
705 * CarbonLib: in CarbonLib 1.0 and later
706 * Non-Carbon CFM: in DragLib 1.1 and later
707 }
TrackDragnull708 function TrackDrag( theDrag: DragRef; const (*var*) theEvent: EventRecord; theRegion: RgnHandle ): OSErr; external name '_TrackDrag';
709 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
710
711
712 {
713 _________________________________________________________________________________________________________
714
715 � GETTING INFORMATION ABOUT A DRAG
716 _________________________________________________________________________________________________________
717 }
718
719 {
720 * GetDragAttributes()
721 *
722 * Mac OS X threading:
723 * Not thread safe
724 *
725 * Availability:
726 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
727 * CarbonLib: in CarbonLib 1.0 and later
728 * Non-Carbon CFM: in DragLib 1.1 and later
729 }
GetDragAttributesnull730 function GetDragAttributes( theDrag: DragRef; var flags: DragAttributes ): OSErr; external name '_GetDragAttributes';
731 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
732
733
734 {
735 * GetDragMouse()
736 *
737 * Mac OS X threading:
738 * Not thread safe
739 *
740 * Availability:
741 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
742 * CarbonLib: in CarbonLib 1.0 and later
743 * Non-Carbon CFM: in DragLib 1.1 and later
744 }
GetDragMousenull745 function GetDragMouse( theDrag: DragRef; var mouse: Point; var globalPinnedMouse: Point ): OSErr; external name '_GetDragMouse';
746 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
747
748
749 {
750 * SetDragMouse()
751 *
752 * Mac OS X threading:
753 * Not thread safe
754 *
755 * Availability:
756 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
757 * CarbonLib: in CarbonLib 1.0 and later
758 * Non-Carbon CFM: in DragLib 1.1 and later
759 }
SetDragMousenull760 function SetDragMouse( theDrag: DragRef; globalPinnedMouse: Point ): OSErr; external name '_SetDragMouse';
761 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
762
763
764 {
765 * GetDragOrigin()
766 *
767 * Mac OS X threading:
768 * Not thread safe
769 *
770 * Availability:
771 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
772 * CarbonLib: in CarbonLib 1.0 and later
773 * Non-Carbon CFM: in DragLib 1.1 and later
774 }
GetDragOriginnull775 function GetDragOrigin( theDrag: DragRef; var globalInitialMouse: Point ): OSErr; external name '_GetDragOrigin';
776 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
777
778
779 {
780 * GetDragModifiers()
781 *
782 * Mac OS X threading:
783 * Not thread safe
784 *
785 * Availability:
786 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
787 * CarbonLib: in CarbonLib 1.0 and later
788 * Non-Carbon CFM: in DragLib 1.1 and later
789 }
GetDragModifiersnull790 function GetDragModifiers( theDrag: DragRef; var modifiers: SInt16; var mouseDownModifiers: SInt16; var mouseUpModifiers: SInt16 ): OSErr; external name '_GetDragModifiers';
791 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
792
793
794 {
795 * GetDragItemBounds()
796 *
797 * Mac OS X threading:
798 * Not thread safe
799 *
800 * Availability:
801 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
802 * CarbonLib: in CarbonLib 1.0 and later
803 * Non-Carbon CFM: in DragLib 1.1 and later
804 }
GetDragItemBoundsnull805 function GetDragItemBounds( theDrag: DragRef; theItemRef: DragItemRef; var itemBounds: Rect ): OSErr; external name '_GetDragItemBounds';
806 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
807
808
809 {
810 * SetDragItemBounds()
811 *
812 * Mac OS X threading:
813 * Not thread safe
814 *
815 * Availability:
816 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
817 * CarbonLib: in CarbonLib 1.0 and later
818 * Non-Carbon CFM: in DragLib 1.1 and later
819 }
SetDragItemBoundsnull820 function SetDragItemBounds( theDrag: DragRef; theItemRef: DragItemRef; const (*var*) itemBounds: Rect ): OSErr; external name '_SetDragItemBounds';
821 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
822
823
824 {
825 _________________________________________________________________________________________________________
826
827 � ACCESSING DRAG ACTIONS
828 _________________________________________________________________________________________________________
829 }
830
831 {
832 * GetDragAllowableActions()
833 *
834 * Discussion:
835 * Gets the actions the drag sender has allowed the receiver to
836 * perform. These are not requirements, but they highly suggested
837 * actions which allows the drag receiver to improve harmony across
838 * the system. The allowable actions received are always those
839 * local to the caller's process.
840 *
841 * Mac OS X threading:
842 * Not thread safe
843 *
844 * Parameters:
845 *
846 * theDrag:
847 * The drag reference from which to retreive the allowable drag
848 * actions.
849 *
850 * outActions:
851 * A pointer to receive the field of allowable drag actions.
852 *
853 * Result:
854 * An operating system result code.
855 *
856 * Availability:
857 * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
858 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
859 * Non-Carbon CFM: not available
860 }
GetDragAllowableActionsnull861 function GetDragAllowableActions( theDrag: DragRef; var outActions: DragActions ): OSStatus; external name '_GetDragAllowableActions';
862 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
863
864
865 {
866 * SetDragAllowableActions()
867 *
868 * Discussion:
869 * Sets the actions the receiver of the drag is allowed to perform.
870 * These are not requirements, but they highly suggested actions
871 * which allows the drag receiver to improve harmony across the
872 * system. The caller may select wether these drag actions apply to
873 * a local or remote process.
874 *
875 * Mac OS X threading:
876 * Not thread safe
877 *
878 * Parameters:
879 *
880 * theDrag:
881 * The drag reference in which to set the allowable drag actions.
882 *
883 * inActions:
884 * A field of allowable drag actions to be set.
885 *
886 * isLocal:
887 * A boolean value allowing the drag sender to distinguish between
888 * those drag actions allowable by the local receiver versus a
889 * remote one.
890 *
891 * Result:
892 * An operating system result code.
893 *
894 * Availability:
895 * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
896 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
897 * Non-Carbon CFM: not available
898 }
SetDragAllowableActionsnull899 function SetDragAllowableActions( theDrag: DragRef; inActions: DragActions; isLocal: Boolean ): OSStatus; external name '_SetDragAllowableActions';
900 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
901
902
903 {
904 * GetDragDropAction()
905 *
906 * Discussion:
907 * Gets the action performed by the receiver of the drag. More than
908 * one action may have been performed.
909 *
910 * Mac OS X threading:
911 * Not thread safe
912 *
913 * Parameters:
914 *
915 * theDrag:
916 * The drag reference from which to retreive the performed drop
917 * action.
918 *
919 * outAction:
920 * A pointer to receive the drag action performed.
921 *
922 * Result:
923 * An operating system result code.
924 *
925 * Availability:
926 * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
927 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
928 * Non-Carbon CFM: not available
929 }
GetDragDropActionnull930 function GetDragDropAction( theDrag: DragRef; var outAction: DragActions ): OSStatus; external name '_GetDragDropAction';
931 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
932
933
934 {
935 * SetDragDropAction()
936 *
937 * Discussion:
938 * Sets the action performed by the receiver of the drag. More than
939 * one action may be performed.
940 *
941 * Mac OS X threading:
942 * Not thread safe
943 *
944 * Parameters:
945 *
946 * theDrag:
947 * The drag reference in which to set the performed drop action.
948 *
949 * inAction:
950 * The drop action performed.
951 *
952 * Result:
953 * An operating system result code.
954 *
955 * Availability:
956 * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
957 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
958 * Non-Carbon CFM: not available
959 }
SetDragDropActionnull960 function SetDragDropAction( theDrag: DragRef; inAction: DragActions ): OSStatus; external name '_SetDragDropAction';
961 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
962
963
964 {
965 _________________________________________________________________________________________________________
966
967 � UTILITIES
968 _________________________________________________________________________________________________________
969 }
970
971 {
972 * WaitMouseMoved()
973 *
974 * Mac OS X threading:
975 * Not thread safe
976 *
977 * Availability:
978 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
979 * CarbonLib: in CarbonLib 1.0 and later
980 * Non-Carbon CFM: in DragLib 1.1 and later
981 }
WaitMouseMovednull982 function WaitMouseMoved( initialGlobalMouse: Point ): Boolean; external name '_WaitMouseMoved';
983 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
984
985
986 {--------------------------------------------------------------------------------------}
987 { � DEPRECATED }
988 { All functions below this point are either deprecated (they continue to function }
989 { but are not the most modern nor most efficient solution to a problem), or they are }
990 { completely unavailable on Mac OS X. }
991 {--------------------------------------------------------------------------------------}
992 {
993 The file dragging constants and structures have been deprecated in Leopard. Use kUTTypeFileURL,
994 kPasteboardTypeFileURLPromise and kPasteboardTypeFilePromiseContent from UTCoreTypes.h and Pasteboard.h instead.
995 }
996
997 {$endc} {not TARGET_CPU_64}
998
999 const
1000 kDragFlavorTypeHFS = FourCharCode('hfs '); { flavor type for HFS data}
1001 kDragFlavorTypePromiseHFS = FourCharCode('phfs'); { flavor type for promised HFS data}
1002 flavorTypeHFS = kDragFlavorTypeHFS; { old name}
1003 flavorTypePromiseHFS = kDragFlavorTypePromiseHFS; { old name}
1004
1005 const
1006 kDragPromisedFlavorFindFile = FourCharCode('rWm1'); { promisedFlavor value for Find File}
1007 kDragPromisedFlavor = FourCharCode('fssP'); { promisedFlavor value for everything else}
1008
1009 const
1010 kDragPseudoCreatorVolumeOrDirectory = FourCharCode('MACS'); { "creator code" for volume or directory}
1011 kDragPseudoFileTypeVolume = FourCharCode('disk'); { "file type" for volume}
1012 kDragPseudoFileTypeDirectory = FourCharCode('fold'); { "file type" for directory}
1013
1014 {
1015 The file dragging constants and structures have been deprecated in Leopard. Use kUTTypeFileURL,
1016 kPasteboardTypeFileURLPromise and kPasteboardTypeFilePromiseContent from UTCoreTypes.h and Pasteboard.h instead.
1017 }
1018
1019 type
1020 HFSFlavorPtr = ^HFSFlavor;
1021 HFSFlavor = record
1022 fileType: OSType; { file type }
1023 fileCreator: OSType; { file creator }
1024 fdFlags: UInt16; { Finder flags }
1025 fileSpec: FSSpec; { file system specification }
1026 end;
1027 type
1028 PromiseHFSFlavorPtr = ^PromiseHFSFlavor;
1029 PromiseHFSFlavor = record
1030 fileType: OSType; { file type }
1031 fileCreator: OSType; { file creator }
1032 fdFlags: UInt16; { Finder flags }
1033 promisedFlavor: FlavorType; { promised flavor containing an FSSpec }
1034 end;
1035 type
1036 DragTrackingMessage = SInt16;
1037 const
1038 kDragTrackingEnterHandler = 1; { drag has entered handler}
1039 kDragTrackingEnterWindow = 2; { drag has entered window}
1040 kDragTrackingInWindow = 3; { drag is moving within window}
1041 kDragTrackingLeaveWindow = 4; { drag has exited window}
1042 kDragTrackingLeaveHandler = 5; { drag has exited handler}
1043
1044
1045 type
1046 DragRegionMessage = SInt16;
1047 const
1048 kDragRegionBegin = 1; { initialize drawing}
1049 kDragRegionDraw = 2; { draw drag feedback}
1050 kDragRegionHide = 3; { hide drag feedback}
1051 kDragRegionIdle = 4; { drag feedback idle time}
1052 kDragRegionEnd = 5; { end of drawing}
1053
1054
1055 type
1056 ZoomAcceleration = SInt16;
1057 const
1058 kZoomNoAcceleration = 0; { use linear interpolation}
1059 kZoomAccelerate = 1; { ramp up step size}
1060 kZoomDecelerate = 2; { ramp down step size}
1061
1062
1063 {
1064 * Summary:
1065 * Standard Drop Location constants
1066 *
1067 * Discussion:
1068 * The following constants define common "meta" drop locations.
1069 }
1070 const
1071 {
1072 * The drop location was in the trash. This is set when a drag is
1073 * dropped on the trash icon. Setting this standard drop location
1074 * sets the traditional drop location to an alias to the trash folder
1075 * automatically.
1076 }
1077 kDragStandardDropLocationTrash = FourCharCode('trsh');
1078
1079 {
1080 * The receiver did not specify a drop lcoation. This is the default.
1081 }
1082 kDragStandardDropLocationUnknown = FourCharCode('unkn');
1083
1084
1085 type
1086 StandardDropLocation = OSType;
theTypenull1087 DragSendDataProcPtr = function( theType: FlavorType; dragSendRefCon: UnivPtr; theItemRef: DragItemRef; theDrag: DragRef ): OSErr;
messagenull1088 DragTrackingHandlerProcPtr = function( message: DragTrackingMessage; theWindow: WindowRef; handlerRefCon: UnivPtr; theDrag: DragRef ): OSErr;
theWindownull1089 DragReceiveHandlerProcPtr = function( theWindow: WindowRef; handlerRefCon: UnivPtr; theDrag: DragRef ): OSErr;
messagenull1090 DragDrawingProcPtr = function( message: DragRegionMessage; showRegion: RgnHandle; showOrigin: Point; hideRegion: RgnHandle; hideOrigin: Point; dragDrawingRefCon: UnivPtr; theDrag: DragRef ): OSErr;
1091 DragSendDataUPP = DragSendDataProcPtr;
1092 DragTrackingHandlerUPP = DragTrackingHandlerProcPtr;
1093 DragReceiveHandlerUPP = DragReceiveHandlerProcPtr;
1094 DragDrawingUPP = DragDrawingProcPtr;
1095 {
1096 * NewDragSendDataUPP()
1097 *
1098 * Availability:
1099 * Mac OS X: in version 10.0 and later in Carbon.framework
1100 * CarbonLib: in CarbonLib 1.0 and later
1101 * Non-Carbon CFM: available as macro/inline
1102 }
NewDragSendDataUPPnull1103 function NewDragSendDataUPP( userRoutine: DragSendDataProcPtr ): DragSendDataUPP; external name '_NewDragSendDataUPP';
1104 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1105
1106 {
1107 * NewDragTrackingHandlerUPP()
1108 *
1109 * Availability:
1110 * Mac OS X: in version 10.0 and later in Carbon.framework
1111 * CarbonLib: in CarbonLib 1.0 and later
1112 * Non-Carbon CFM: available as macro/inline
1113 }
NewDragTrackingHandlerUPPnull1114 function NewDragTrackingHandlerUPP( userRoutine: DragTrackingHandlerProcPtr ): DragTrackingHandlerUPP; external name '_NewDragTrackingHandlerUPP';
1115 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1116
1117 {
1118 * NewDragReceiveHandlerUPP()
1119 *
1120 * Availability:
1121 * Mac OS X: in version 10.0 and later in Carbon.framework
1122 * CarbonLib: in CarbonLib 1.0 and later
1123 * Non-Carbon CFM: available as macro/inline
1124 }
NewDragReceiveHandlerUPPnull1125 function NewDragReceiveHandlerUPP( userRoutine: DragReceiveHandlerProcPtr ): DragReceiveHandlerUPP; external name '_NewDragReceiveHandlerUPP';
1126 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1127
1128 {
1129 * NewDragDrawingUPP()
1130 *
1131 * Availability:
1132 * Mac OS X: in version 10.0 and later in Carbon.framework
1133 * CarbonLib: in CarbonLib 1.0 and later
1134 * Non-Carbon CFM: available as macro/inline
1135 }
NewDragDrawingUPPnull1136 function NewDragDrawingUPP( userRoutine: DragDrawingProcPtr ): DragDrawingUPP; external name '_NewDragDrawingUPP';
1137 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1138
1139 {
1140 * DisposeDragSendDataUPP()
1141 *
1142 * Availability:
1143 * Mac OS X: in version 10.0 and later in Carbon.framework
1144 * CarbonLib: in CarbonLib 1.0 and later
1145 * Non-Carbon CFM: available as macro/inline
1146 }
1147 procedure DisposeDragSendDataUPP( userUPP: DragSendDataUPP ); external name '_DisposeDragSendDataUPP';
1148 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1149
1150 {
1151 * DisposeDragTrackingHandlerUPP()
1152 *
1153 * Availability:
1154 * Mac OS X: in version 10.0 and later in Carbon.framework
1155 * CarbonLib: in CarbonLib 1.0 and later
1156 * Non-Carbon CFM: available as macro/inline
1157 }
1158 procedure DisposeDragTrackingHandlerUPP( userUPP: DragTrackingHandlerUPP ); external name '_DisposeDragTrackingHandlerUPP';
1159 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1160
1161 {
1162 * DisposeDragReceiveHandlerUPP()
1163 *
1164 * Availability:
1165 * Mac OS X: in version 10.0 and later in Carbon.framework
1166 * CarbonLib: in CarbonLib 1.0 and later
1167 * Non-Carbon CFM: available as macro/inline
1168 }
1169 procedure DisposeDragReceiveHandlerUPP( userUPP: DragReceiveHandlerUPP ); external name '_DisposeDragReceiveHandlerUPP';
1170 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1171
1172 {
1173 * DisposeDragDrawingUPP()
1174 *
1175 * Availability:
1176 * Mac OS X: in version 10.0 and later in Carbon.framework
1177 * CarbonLib: in CarbonLib 1.0 and later
1178 * Non-Carbon CFM: available as macro/inline
1179 }
1180 procedure DisposeDragDrawingUPP( userUPP: DragDrawingUPP ); external name '_DisposeDragDrawingUPP';
1181 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1182
1183 {
1184 * InvokeDragSendDataUPP()
1185 *
1186 * Availability:
1187 * Mac OS X: in version 10.0 and later in Carbon.framework
1188 * CarbonLib: in CarbonLib 1.0 and later
1189 * Non-Carbon CFM: available as macro/inline
1190 }
InvokeDragSendDataUPPnull1191 function InvokeDragSendDataUPP( theType: FlavorType; dragSendRefCon: UnivPtr; theItemRef: DragItemRef; theDrag: DragRef; userUPP: DragSendDataUPP ): OSErr; external name '_InvokeDragSendDataUPP';
1192 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1193
1194 {
1195 * InvokeDragTrackingHandlerUPP()
1196 *
1197 * Availability:
1198 * Mac OS X: in version 10.0 and later in Carbon.framework
1199 * CarbonLib: in CarbonLib 1.0 and later
1200 * Non-Carbon CFM: available as macro/inline
1201 }
InvokeDragTrackingHandlerUPPnull1202 function InvokeDragTrackingHandlerUPP( message: DragTrackingMessage; theWindow: WindowRef; handlerRefCon: UnivPtr; theDrag: DragRef; userUPP: DragTrackingHandlerUPP ): OSErr; external name '_InvokeDragTrackingHandlerUPP';
1203 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1204
1205 {
1206 * InvokeDragReceiveHandlerUPP()
1207 *
1208 * Availability:
1209 * Mac OS X: in version 10.0 and later in Carbon.framework
1210 * CarbonLib: in CarbonLib 1.0 and later
1211 * Non-Carbon CFM: available as macro/inline
1212 }
InvokeDragReceiveHandlerUPPnull1213 function InvokeDragReceiveHandlerUPP( theWindow: WindowRef; handlerRefCon: UnivPtr; theDrag: DragRef; userUPP: DragReceiveHandlerUPP ): OSErr; external name '_InvokeDragReceiveHandlerUPP';
1214 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1215
1216 {
1217 * InvokeDragDrawingUPP()
1218 *
1219 * Availability:
1220 * Mac OS X: in version 10.0 and later in Carbon.framework
1221 * CarbonLib: in CarbonLib 1.0 and later
1222 * Non-Carbon CFM: available as macro/inline
1223 }
InvokeDragDrawingUPPnull1224 function InvokeDragDrawingUPP( message: DragRegionMessage; showRegion: RgnHandle; showOrigin: Point; hideRegion: RgnHandle; hideOrigin: Point; dragDrawingRefCon: UnivPtr; theDrag: DragRef; userUPP: DragDrawingUPP ): OSErr; external name '_InvokeDragDrawingUPP';
1225 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1226
1227 {$ifc not TARGET_CPU_64}
1228 {
1229 * GetStandardDropLocation() *** DEPRECATED ***
1230 *
1231 * Deprecated:
1232 * Use PasteboardGetStandardPasteLocation instead.
1233 *
1234 * Discussion:
1235 * Gets the standard drop location that was set by the receiver of
1236 * the drag.
1237 *
1238 * Mac OS X threading:
1239 * Not thread safe
1240 *
1241 * Parameters:
1242 *
1243 * theDrag:
1244 * The drag reference from which to retrieve the allowable drag
1245 * actions.
1246 *
1247 * outDropLocation:
1248 * A pointer to the standard drop location, set by the receiver,
1249 * representing the location where the drag was dropped.
1250 *
1251 * Result:
1252 * An operating system result code.
1253 *
1254 * Availability:
1255 * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1256 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1257 * Non-Carbon CFM: not available
1258 }
GetStandardDropLocationnull1259 function GetStandardDropLocation( theDrag: DragRef; var outDropLocation: StandardDropLocation ): OSStatus; external name '_GetStandardDropLocation';
1260 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1261
1262
1263 {
1264 * SetStandardDropLocation() *** DEPRECATED ***
1265 *
1266 * Deprecated:
1267 * Use PasteboardSetStandardPasteLocation instead.
1268 *
1269 * Discussion:
1270 * Used by the receiver of the drag to set the standard drop
1271 * location.
1272 *
1273 * Mac OS X threading:
1274 * Not thread safe
1275 *
1276 * Parameters:
1277 *
1278 * theDrag:
1279 * The drag reference from which to retrieve the allowable drag
1280 * actions.
1281 *
1282 * dropLocation:
1283 * The standard drop location representing the location where the
1284 * drag was dropped.
1285 *
1286 * Result:
1287 * An operating system result code.
1288 *
1289 * Availability:
1290 * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1291 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1292 * Non-Carbon CFM: not available
1293 }
SetStandardDropLocationnull1294 function SetStandardDropLocation( theDrag: DragRef; dropLocation: StandardDropLocation ): OSStatus; external name '_SetStandardDropLocation';
1295 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1296
1297
1298 {
1299 * ZoomRects() *** DEPRECATED ***
1300 *
1301 * Deprecated:
1302 * Use window transitions or custom drawing in an overlay window
1303 * instead.
1304 *
1305 * Mac OS X threading:
1306 * Not thread safe
1307 *
1308 * Availability:
1309 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1310 * CarbonLib: in CarbonLib 1.0 and later
1311 * Non-Carbon CFM: in DragLib 1.1 and later
1312 }
ZoomRectsnull1313 function ZoomRects( const (*var*) fromRect: Rect; const (*var*) toRect: Rect; zoomSteps: SInt16; acceleration: ZoomAcceleration ): OSErr; external name '_ZoomRects';
1314 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1315
1316
1317 {
1318 * ZoomRegion() *** DEPRECATED ***
1319 *
1320 * Deprecated:
1321 * Use window transitions or custom drawing in an overlay window
1322 * instead.
1323 *
1324 * Mac OS X threading:
1325 * Not thread safe
1326 *
1327 * Availability:
1328 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1329 * CarbonLib: in CarbonLib 1.0 and later
1330 * Non-Carbon CFM: in DragLib 1.1 and later
1331 }
ZoomRegionnull1332 function ZoomRegion( region: RgnHandle; zoomDistance: Point; zoomSteps: SInt16; acceleration: ZoomAcceleration ): OSErr; external name '_ZoomRegion';
1333 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1334
1335
1336 {
1337 * SetDragImage() *** DEPRECATED ***
1338 *
1339 * Deprecated:
1340 * Applications should use SetDragImageWithCGImage instead.
1341 *
1342 * Summary:
1343 * Associates an image with a drag reference.
1344 *
1345 * Discussion:
1346 * Used by the sender of the drag to set the image, in PixMapHandle
1347 * format, to be displayed as user feedback during the drag. This
1348 * API may be called at any point during the drag to update the
1349 * image.
1350 *
1351 * Mac OS X threading:
1352 * Not thread safe
1353 *
1354 * Parameters:
1355 *
1356 * inDrag:
1357 * The drag reference for which the image will be displayed.
1358 *
1359 * inImagePixMap:
1360 * The PixMapHandle for the image to be displayed during the drag.
1361 *
1362 * inImageRgn:
1363 * A mask describing the portion of the PixMap contained in the
1364 * imagePixMap parameter which contains the drag image. Pass NULL
1365 * for inImageRgn if the entire PixMap, including white space,
1366 * should be dragged.
1367 *
1368 * inImageOffsetPt:
1369 * The offset required to move the PixMap specified in the
1370 * imagePixMap parameter to the global coordinates where the image
1371 * initially appears. If this parameter is (0,0), the PixMap
1372 * should already be in global coordinates.
1373 *
1374 * inImageFlags:
1375 * Flags controlling the appearance of the drag image.
1376 *
1377 * Result:
1378 * An operating system result code.
1379 *
1380 * Availability:
1381 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.4
1382 * CarbonLib: in CarbonLib 1.0 and later
1383 * Non-Carbon CFM: in DragLib 7.5 and later
1384 }
SetDragImagenull1385 function SetDragImage( inDrag: DragRef; inImagePixMap: PixMapHandle; inImageRgn: RgnHandle; inImageOffsetPt: Point; inImageFlags: DragImageFlags ): OSErr; external name '_SetDragImage';
1386 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1387
1388
1389 {
1390 The method for setting Drag Manager promises differs from that for Scrap Manger promises. This chart
1391 describes the method for setting drag promises via AddDragItemFlavor().
1392
1393 dataPtr dataSize result
1394 pointer value actual data size The data of size dataSize pointed to by dataPtr is added to the drag.
1395 NULL ignored A promise is placed on the drag.
1396 }
1397 {
1398 * AddDragItemFlavor() *** DEPRECATED ***
1399 *
1400 * Deprecated:
1401 * The Drag Flavor APIs are deprecated. Use PasteboardPutItemFlavor
1402 * instead.
1403 *
1404 * Mac OS X threading:
1405 * Not thread safe
1406 *
1407 * Availability:
1408 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1409 * CarbonLib: in CarbonLib 1.0 and later
1410 * Non-Carbon CFM: in DragLib 1.1 and later
1411 }
AddDragItemFlavornull1412 function AddDragItemFlavor( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; dataPtr: {const} UnivPtr; dataSize: Size; theFlags: FlavorFlags ): OSErr; external name '_AddDragItemFlavor';
1413 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1414
1415
1416 {
1417 * SetDragItemFlavorData() *** DEPRECATED ***
1418 *
1419 * Deprecated:
1420 * The Drag Flavor APIs are deprecated. Use PasteboardPutItemFlavor
1421 * instead.
1422 *
1423 * Mac OS X threading:
1424 * Not thread safe
1425 *
1426 * Availability:
1427 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1428 * CarbonLib: in CarbonLib 1.0 and later
1429 * Non-Carbon CFM: in DragLib 1.1 and later
1430 }
SetDragItemFlavorDatanull1431 function SetDragItemFlavorData( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; dataPtr: {const} UnivPtr; dataSize: Size; dataOffset: UInt32 ): OSErr; external name '_SetDragItemFlavorData';
1432 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1433
1434
1435 {
1436 * InstallTrackingHandler() *** DEPRECATED ***
1437 *
1438 * Deprecated:
1439 * Install drag suite event handlers on a drag tracking HIView
1440 * instead.
1441 *
1442 * Mac OS X threading:
1443 * Not thread safe
1444 *
1445 * Availability:
1446 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1447 * CarbonLib: in CarbonLib 1.0 and later
1448 * Non-Carbon CFM: in DragLib 1.1 and later
1449 }
InstallTrackingHandlernull1450 function InstallTrackingHandler( trackingHandler: DragTrackingHandlerUPP; theWindow: WindowRef; handlerRefCon: UnivPtr ): OSErr; external name '_InstallTrackingHandler';
1451 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1452
1453
1454 {
1455 * InstallReceiveHandler() *** DEPRECATED ***
1456 *
1457 * Deprecated:
1458 * Install drag suite event handlers on a drag tracking HIView
1459 * instead.
1460 *
1461 * Mac OS X threading:
1462 * Not thread safe
1463 *
1464 * Availability:
1465 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1466 * CarbonLib: in CarbonLib 1.0 and later
1467 * Non-Carbon CFM: in DragLib 1.1 and later
1468 }
InstallReceiveHandlernull1469 function InstallReceiveHandler( receiveHandler: DragReceiveHandlerUPP; theWindow: WindowRef; handlerRefCon: UnivPtr ): OSErr; external name '_InstallReceiveHandler';
1470 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1471
1472
1473 {
1474 * RemoveTrackingHandler() *** DEPRECATED ***
1475 *
1476 * Deprecated:
1477 * Remove drag suite event handlers from a drag tracking HIView
1478 * instead.
1479 *
1480 * Mac OS X threading:
1481 * Not thread safe
1482 *
1483 * Availability:
1484 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1485 * CarbonLib: in CarbonLib 1.0 and later
1486 * Non-Carbon CFM: in DragLib 1.1 and later
1487 }
RemoveTrackingHandlernull1488 function RemoveTrackingHandler( trackingHandler: DragTrackingHandlerUPP; theWindow: WindowRef ): OSErr; external name '_RemoveTrackingHandler';
1489 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1490
1491
1492 {
1493 * RemoveReceiveHandler() *** DEPRECATED ***
1494 *
1495 * Deprecated:
1496 * Remove drag suite event handlers from a drag tracking HIView
1497 * instead.
1498 *
1499 * Mac OS X threading:
1500 * Not thread safe
1501 *
1502 * Availability:
1503 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1504 * CarbonLib: in CarbonLib 1.0 and later
1505 * Non-Carbon CFM: in DragLib 1.1 and later
1506 }
RemoveReceiveHandlernull1507 function RemoveReceiveHandler( receiveHandler: DragReceiveHandlerUPP; theWindow: WindowRef ): OSErr; external name '_RemoveReceiveHandler';
1508 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1509
1510
1511 {
1512 * SetDragSendProc() *** DEPRECATED ***
1513 *
1514 * Deprecated:
1515 * The Drag Flavor APIs are deprecated. Use
1516 * PasteboardSetPromiseKeeper instead.
1517 *
1518 * Mac OS X threading:
1519 * Not thread safe
1520 *
1521 * Availability:
1522 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1523 * CarbonLib: in CarbonLib 1.0 and later
1524 * Non-Carbon CFM: in DragLib 1.1 and later
1525 }
SetDragSendProcnull1526 function SetDragSendProc( theDrag: DragRef; sendProc: DragSendDataUPP; dragSendRefCon: UnivPtr ): OSErr; external name '_SetDragSendProc';
1527 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1528
1529
1530 {
1531 * SetDragDrawingProc() *** DEPRECATED ***
1532 *
1533 * Deprecated:
1534 * Use SetDragImageWithCGImage instead.
1535 *
1536 * Mac OS X threading:
1537 * Not thread safe
1538 *
1539 * Availability:
1540 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1541 * CarbonLib: in CarbonLib 1.0 and later
1542 * Non-Carbon CFM: in DragLib 1.1 and later
1543 }
SetDragDrawingProcnull1544 function SetDragDrawingProc( theDrag: DragRef; drawingProc: DragDrawingUPP; dragDrawingRefCon: UnivPtr ): OSErr; external name '_SetDragDrawingProc';
1545 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1546
1547
1548 {
1549 * CountDragItems() *** DEPRECATED ***
1550 *
1551 * Deprecated:
1552 * The Drag Flavor APIs are deprecated. Use PasteboardGetItemCount
1553 * instead.
1554 *
1555 * Mac OS X threading:
1556 * Not thread safe
1557 *
1558 * Availability:
1559 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1560 * CarbonLib: in CarbonLib 1.0 and later
1561 * Non-Carbon CFM: in DragLib 1.1 and later
1562 }
CountDragItemsnull1563 function CountDragItems( theDrag: DragRef; var numItems: UInt16 ): OSErr; external name '_CountDragItems';
1564 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1565
1566
1567 {
1568 * GetDragItemReferenceNumber() *** DEPRECATED ***
1569 *
1570 * Deprecated:
1571 * The Drag Flavor APIs are deprecated. Use
1572 * PasteboardGetItemIdentifier instead.
1573 *
1574 * Mac OS X threading:
1575 * Not thread safe
1576 *
1577 * Availability:
1578 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1579 * CarbonLib: in CarbonLib 1.0 and later
1580 * Non-Carbon CFM: in DragLib 1.1 and later
1581 }
GetDragItemReferenceNumbernull1582 function GetDragItemReferenceNumber( theDrag: DragRef; theIndex: UInt16; var theItemRef: DragItemRef ): OSErr; external name '_GetDragItemReferenceNumber';
1583 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1584
1585
1586 {
1587 * CountDragItemFlavors() *** DEPRECATED ***
1588 *
1589 * Deprecated:
1590 * The Drag Flavor APIs are deprecated. Use
1591 * PasteboardCopyItemFlavors instead.
1592 *
1593 * Mac OS X threading:
1594 * Not thread safe
1595 *
1596 * Availability:
1597 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1598 * CarbonLib: in CarbonLib 1.0 and later
1599 * Non-Carbon CFM: in DragLib 1.1 and later
1600 }
CountDragItemFlavorsnull1601 function CountDragItemFlavors( theDrag: DragRef; theItemRef: DragItemRef; var numFlavors: UInt16 ): OSErr; external name '_CountDragItemFlavors';
1602 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1603
1604
1605 {
1606 * GetFlavorType() *** DEPRECATED ***
1607 *
1608 * Deprecated:
1609 * The Drag Flavor APIs are deprecated. Use
1610 * PasteboardCopyItemFlavors instead.
1611 *
1612 * Mac OS X threading:
1613 * Not thread safe
1614 *
1615 * Availability:
1616 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1617 * CarbonLib: in CarbonLib 1.0 and later
1618 * Non-Carbon CFM: in DragLib 1.1 and later
1619 }
GetFlavorTypenull1620 function GetFlavorType( theDrag: DragRef; theItemRef: DragItemRef; theIndex: UInt16; var theType: FlavorType ): OSErr; external name '_GetFlavorType';
1621 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1622
1623
1624 {
1625 * GetFlavorFlags() *** DEPRECATED ***
1626 *
1627 * Deprecated:
1628 * The Drag Flavor APIs are deprecated. Use
1629 * PasteboardGetItemFlavorFlags instead.
1630 *
1631 * Mac OS X threading:
1632 * Not thread safe
1633 *
1634 * Availability:
1635 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1636 * CarbonLib: in CarbonLib 1.0 and later
1637 * Non-Carbon CFM: in DragLib 1.1 and later
1638 }
GetFlavorFlagsnull1639 function GetFlavorFlags( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; var theFlags: FlavorFlags ): OSErr; external name '_GetFlavorFlags';
1640 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1641
1642
1643 {
1644 * GetFlavorDataSize() *** DEPRECATED ***
1645 *
1646 * Deprecated:
1647 * The Drag Flavor APIs are deprecated. Use
1648 * PasteboardCopyItemFlavorData instead.
1649 *
1650 * Mac OS X threading:
1651 * Not thread safe
1652 *
1653 * Availability:
1654 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1655 * CarbonLib: in CarbonLib 1.0 and later
1656 * Non-Carbon CFM: in DragLib 1.1 and later
1657 }
GetFlavorDataSizenull1658 function GetFlavorDataSize( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; var dataSize: Size ): OSErr; external name '_GetFlavorDataSize';
1659 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1660
1661
1662 {
1663 * GetFlavorData() *** DEPRECATED ***
1664 *
1665 * Deprecated:
1666 * The Drag Flavor APIs are deprecated. Use
1667 * PasteboardCopyItemFlavorData instead.
1668 *
1669 * Mac OS X threading:
1670 * Not thread safe
1671 *
1672 * Availability:
1673 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1674 * CarbonLib: in CarbonLib 1.0 and later
1675 * Non-Carbon CFM: in DragLib 1.1 and later
1676 }
GetFlavorDatanull1677 function GetFlavorData( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; dataPtr: UnivPtr; var dataSize: Size; dataOffset: UInt32 ): OSErr; external name '_GetFlavorData';
1678 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1679
1680
1681 {
1682 * GetDropLocation() *** DEPRECATED ***
1683 *
1684 * Deprecated:
1685 * Use PasteboardCopyPasteLocation instead.
1686 *
1687 * Mac OS X threading:
1688 * Not thread safe
1689 *
1690 * Availability:
1691 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1692 * CarbonLib: in CarbonLib 1.0 and later
1693 * Non-Carbon CFM: in DragLib 1.1 and later
1694 }
GetDropLocationnull1695 function GetDropLocation( theDrag: DragRef; var dropLocation: AEDesc ): OSErr; external name '_GetDropLocation';
1696 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1697
1698
1699 {
1700 * SetDropLocation() *** DEPRECATED ***
1701 *
1702 * Deprecated:
1703 * Use PasteboardSetPasteLocation instead.
1704 *
1705 * Mac OS X threading:
1706 * Not thread safe
1707 *
1708 * Availability:
1709 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1710 * CarbonLib: in CarbonLib 1.0 and later
1711 * Non-Carbon CFM: in DragLib 1.1 and later
1712 }
SetDropLocationnull1713 function SetDropLocation( theDrag: DragRef; const (*var*) dropLocation: AEDesc ): OSErr; external name '_SetDropLocation';
1714 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1715
1716
1717 {
1718 * ShowDragHilite() *** DEPRECATED ***
1719 *
1720 * Deprecated:
1721 * The Drag scroll and hilite APIs are deprecated. Use the
1722 * kThemeBrushDragHilite theme brush and draw the hilight as part of
1723 * your custom window or control drawing instead.
1724 *
1725 * Mac OS X threading:
1726 * Not thread safe
1727 *
1728 * Availability:
1729 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1730 * CarbonLib: in CarbonLib 1.0 and later
1731 * Non-Carbon CFM: in DragLib 1.1 and later
1732 }
ShowDragHilitenull1733 function ShowDragHilite( theDrag: DragRef; hiliteFrame: RgnHandle; inside: Boolean ): OSErr; external name '_ShowDragHilite';
1734 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1735
1736
1737 {
1738 * HideDragHilite() *** DEPRECATED ***
1739 *
1740 * Deprecated:
1741 * The Drag scroll and hilite APIs are deprecated. Use the
1742 * kThemeBrushDragHilite theme brush and draw the hilight as part of
1743 * your custom window or control drawing instead.
1744 *
1745 * Mac OS X threading:
1746 * Not thread safe
1747 *
1748 * Availability:
1749 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1750 * CarbonLib: in CarbonLib 1.0 and later
1751 * Non-Carbon CFM: in DragLib 1.1 and later
1752 }
HideDragHilitenull1753 function HideDragHilite( theDrag: DragRef ): OSErr; external name '_HideDragHilite';
1754 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1755
1756
1757 {
1758 * DragPreScroll() *** DEPRECATED ***
1759 *
1760 * Deprecated:
1761 * The Drag scroll and hilite APIs are deprecated. Redraw as part of
1762 * your custom window or control drawing instead.
1763 *
1764 * Mac OS X threading:
1765 * Not thread safe
1766 *
1767 * Availability:
1768 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1769 * CarbonLib: in CarbonLib 1.0 and later
1770 * Non-Carbon CFM: in DragLib 1.1 and later
1771 }
DragPreScrollnull1772 function DragPreScroll( theDrag: DragRef; dH: SInt16; dV: SInt16 ): OSErr; external name '_DragPreScroll';
1773 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1774
1775
1776 {
1777 * DragPostScroll() *** DEPRECATED ***
1778 *
1779 * Deprecated:
1780 * The Drag scroll and hilite APIs are deprecated. Redraw as part of
1781 * your custom window or control drawing instead.
1782 *
1783 * Mac OS X threading:
1784 * Not thread safe
1785 *
1786 * Availability:
1787 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1788 * CarbonLib: in CarbonLib 1.0 and later
1789 * Non-Carbon CFM: in DragLib 1.1 and later
1790 }
DragPostScrollnull1791 function DragPostScroll( theDrag: DragRef ): OSErr; external name '_DragPostScroll';
1792 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1793
1794
1795 {
1796 * UpdateDragHilite() *** DEPRECATED ***
1797 *
1798 * Deprecated:
1799 * The Drag scroll and hilite APIs are deprecated. Use the
1800 * kThemeBrushDragHilite theme brush and draw the hilight as part of
1801 * your custom window or control drawing instead.
1802 *
1803 * Mac OS X threading:
1804 * Not thread safe
1805 *
1806 * Availability:
1807 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1808 * CarbonLib: in CarbonLib 1.0 and later
1809 * Non-Carbon CFM: in DragLib 1.1 and later
1810 }
UpdateDragHilitenull1811 function UpdateDragHilite( theDrag: DragRef; updateRgn: RgnHandle ): OSErr; external name '_UpdateDragHilite';
1812 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1813
1814
1815 {
1816 * GetDragHiliteColor() *** DEPRECATED ***
1817 *
1818 * Deprecated:
1819 * The Drag scroll and hilite APIs are deprecated. Use the
1820 * kThemeBrushDragHilite theme brush and draw the hilight as part of
1821 * your custom window or control drawing instead.
1822 *
1823 * Mac OS X threading:
1824 * Not thread safe
1825 *
1826 * Availability:
1827 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1828 * CarbonLib: in CarbonLib 1.0 and later
1829 * Non-Carbon CFM: in DragLib 7.5 and later
1830 }
GetDragHiliteColornull1831 function GetDragHiliteColor( window: WindowRef; var color: RGBColor ): OSErr; external name '_GetDragHiliteColor';
1832 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1833
1834
1835 {
1836 _________________________________________________________________________________________________________
1837 � OLD NAMES
1838 These are provided for compatiblity with older source bases. It is recommended to not use them since
1839 they may removed from this interface file at any time.
1840 _________________________________________________________________________________________________________
1841 }
1842
1843 {$endc} {not TARGET_CPU_64}
1844
1845 type
1846 DragReference = DragRef;
1847 ItemReference = DragItemRef;
1848 (*
1849 #if OLDROUTINENAMES
1850 const
1851 dragHasLeftSenderWindow = kDragHasLeftSenderWindow; { drag has left the source window since TrackDrag }
1852 dragInsideSenderApplication = kDragInsideSenderApplication; { drag is occurring within the sender application }
1853 dragInsideSenderWindow = kDragInsideSenderWindow; { drag is occurring within the sender window }
1854
1855 const
1856 dragTrackingEnterHandler = kDragTrackingEnterHandler; { drag has entered handler }
1857 dragTrackingEnterWindow = kDragTrackingEnterWindow; { drag has entered window }
1858 dragTrackingInWindow = kDragTrackingInWindow; { drag is moving within window }
1859 dragTrackingLeaveWindow = kDragTrackingLeaveWindow; { drag has exited window }
1860 dragTrackingLeaveHandler = kDragTrackingLeaveHandler; { drag has exited handler }
1861
1862 const
1863 dragRegionBegin = kDragRegionBegin; { initialize drawing }
1864 dragRegionDraw = kDragRegionDraw; { draw drag feedback }
1865 dragRegionHide = kDragRegionHide; { hide drag feedback }
1866 dragRegionIdle = kDragRegionIdle; { drag feedback idle time }
1867 dragRegionEnd = kDragRegionEnd; { end of drawing }
1868
1869 const
1870 zoomNoAcceleration = kZoomNoAcceleration; { use linear interpolation }
1871 zoomAccelerate = kZoomAccelerate; { ramp up step size }
1872 zoomDecelerate = kZoomDecelerate; { ramp down step size }
1873
1874 const
1875 kDragStandardImage = kDragStandardTranslucency; { 65% image translucency (standard)}
1876 kDragDarkImage = kDragDarkTranslucency; { 50% image translucency}
1877 kDragDarkerImage = kDragDarkerTranslucency; { 25% image translucency}
1878 kDragOpaqueImage = kDragOpaqueTranslucency; { 0% image translucency (opaque)}
1879
1880 #endif { OLDROUTINENAMES }
1881 *)
1882
1883 {$endc} {TARGET_OS_MAC}
1884 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
1885
1886 end.
1887 {$endc} {not MACOSALLINCLUDE}
1888