Drag.pas 64 KB

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