LaunchServices.pas 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257
  1. {
  2. File: LaunchServices.p
  3. Contains: Public interfaces for LaunchServices.framework
  4. Version: Technology: Mac OS X
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 2001-2002 by Apple Computer, Inc., all rights reserved.
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 210
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$calling mwpascal}
  21. unit LaunchServices;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0210}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,CFBase,CFArray,CFString,Files,CFURL,AEDataModel;
  92. {$ALIGN MAC68K}
  93. { ======================================================================================================== }
  94. { LaunchServices Structures and Enums }
  95. { ======================================================================================================== }
  96. const
  97. kLSAppInTrashErr = -10660; { The app cannot be run when inside a Trash folder }
  98. kLSUnknownErr = -10810;
  99. kLSNotAnApplicationErr = -10811;
  100. kLSNotInitializedErr = -10812;
  101. kLSDataUnavailableErr = -10813; { e.g. no kind string }
  102. kLSApplicationNotFoundErr = -10814; { e.g. no application claims the file }
  103. kLSUnknownTypeErr = -10815;
  104. kLSDataTooOldErr = -10816;
  105. kLSDataErr = -10817;
  106. kLSLaunchInProgressErr = -10818; { e.g. opening an alreay opening application }
  107. kLSNotRegisteredErr = -10819;
  108. kLSAppDoesNotClaimTypeErr = -10820;
  109. kLSAppDoesNotSupportSchemeWarning = -10821; { not an error, just a warning }
  110. kLSServerCommunicationErr = -10822; { cannot set recent items }
  111. kLSCannotSetInfoErr = -10823; { you may not set item info for this item }
  112. kLSNoRegistrationInfoErr = -10824; { the item contains no registration info }
  113. kLSIncompatibleSystemVersionErr = -10825; { the app cannot run on the current OS version }
  114. kLSNoLaunchPermissionErr = -10826; { user doesn't have permission to launch the app (managed networks) }
  115. kLSNoExecutableErr = -10827; { the executable is missing or has an unusable format }
  116. kLSNoClassicEnvironmentErr = -10828; { the Classic environment was required but is not available }
  117. kLSMultipleSessionsNotSupportedErr = -10829; { the app cannot run simultaneously in two different sessions }
  118. type
  119. LSInitializeFlags = OptionBits;
  120. const
  121. kLSInitializeDefaults = $00000001;
  122. kLSMinCatInfoBitmap = $0000180A; { do not use }{ minimum info needed to avoid a FSGetCatalogInfo call when fetching item information }
  123. kLSInvalidExtensionIndex = $FFFFFFFF; { Index returned from LSGetExtensionInfo when name has no extension }
  124. type
  125. LSRequestedInfo = OptionBits;
  126. const
  127. kLSRequestExtension = $00000001; { safe to use from threads } { thread-safe in 10.0 }
  128. kLSRequestTypeCreator = $00000002; { safe to use from threads } { thread-safe in 10.0 }
  129. kLSRequestBasicFlagsOnly = $00000004; { all but type of application and extension flags - safe to use from threads } { thread-safe in 10.2 }
  130. kLSRequestAppTypeFlags = $00000008; { NOT SAFE to use from threads } { thread-safe in 10.2 }
  131. kLSRequestAllFlags = $00000010; { NOT SAFE to use from threads } { thread-safe in 10.2 }
  132. kLSRequestIconAndKind = $00000020; { NOT SAFE to use from threads } { thread-safe in 10.2 }
  133. kLSRequestExtensionFlagsOnly = $00000040; { safe to use from threads } { thread-safe in 10.0 }
  134. kLSRequestAllInfo = $FFFFFFFF; { NOT SAFE to use from threads } { thread-safe in 10.2 }
  135. type
  136. LSItemInfoFlags = OptionBits;
  137. const
  138. kLSItemInfoIsPlainFile = $00000001; { none of the following applies }
  139. kLSItemInfoIsPackage = $00000002; { app, doc, or bundle package }
  140. kLSItemInfoIsApplication = $00000004; { single-file or packaged }
  141. kLSItemInfoIsContainer = $00000008; { folder or volume }
  142. kLSItemInfoIsAliasFile = $00000010; { 'real' alias }
  143. kLSItemInfoIsSymlink = $00000020; { UNIX symbolic link only }
  144. kLSItemInfoIsInvisible = $00000040; { does not include '.' files or '.hidden' entries }
  145. kLSItemInfoIsNativeApp = $00000080; { Carbon or Cocoa native app }
  146. kLSItemInfoIsClassicApp = $00000100; { CFM Classic app }
  147. kLSItemInfoAppPrefersNative = $00000200; { Carbon app that prefers to be launched natively }
  148. kLSItemInfoAppPrefersClassic = $00000400; { Carbon app that prefers to be launched in Classic }
  149. kLSItemInfoAppIsScriptable = $00000800; { App can be scripted }
  150. kLSItemInfoIsVolume = $00001000; { item is a volume }
  151. kLSItemInfoExtensionIsHidden = $00100000; { item has a hidden extension }
  152. type
  153. LSRolesMask = OptionBits;
  154. const
  155. kLSRolesNone = $00000001; { no claim is made about support for this type/scheme }
  156. kLSRolesViewer = $00000002; { claim to be able to view this type/scheme }
  157. kLSRolesEditor = $00000004; { claim to be able to edit this type/scheme }
  158. kLSRolesAll = $FFFFFFFF; { claim to do it all }
  159. type
  160. LSKindID = UInt32;
  161. const
  162. kLSUnknownKindID = 0;
  163. kLSUnknownType = 0;
  164. kLSUnknownCreator = 0;
  165. type
  166. LSItemInfoRecordPtr = ^LSItemInfoRecord;
  167. LSItemInfoRecord = record
  168. flags: LSItemInfoFlags;
  169. filetype: OSType;
  170. creator: OSType;
  171. extension: CFStringRef; { release when finished }
  172. iconFileName: CFStringRef; { not for general use }
  173. kindID: LSKindID; { not for general use }
  174. end;
  175. LSAcceptanceFlags = OptionBits;
  176. const
  177. kLSAcceptDefault = $00000001;
  178. kLSAcceptAllowLoginUI = $00000002; { show UI to log in if necessary }
  179. type
  180. LSLaunchFlags = OptionBits;
  181. const
  182. kLSLaunchDefaults = $00000001; { default = open, async, use Info.plist, start Classic }
  183. kLSLaunchAndPrint = $00000002; { print items instead of open them }
  184. kLSLaunchReserved2 = $00000004;
  185. kLSLaunchReserved3 = $00000008;
  186. kLSLaunchReserved4 = $00000010;
  187. kLSLaunchReserved5 = $00000020;
  188. kLSLaunchReserved6 = $00000040;
  189. kLSLaunchInhibitBGOnly = $00000080; { causes launch to fail if target is background-only. }
  190. kLSLaunchDontAddToRecents = $00000100; { do not add app or documents to recents menus. }
  191. kLSLaunchDontSwitch = $00000200; { don't bring new app to the foreground. }
  192. kLSLaunchNoParams = $00000800; { Use Info.plist to determine launch parameters }
  193. kLSLaunchAsync = $00010000; { launch async; obtain results from kCPSNotifyLaunch. }
  194. kLSLaunchStartClassic = $00020000; { start up Classic environment if required for app. }
  195. kLSLaunchInClassic = $00040000; { force app to launch in Classic environment. }
  196. kLSLaunchNewInstance = $00080000; { Instantiate app even if it is already running. }
  197. kLSLaunchAndHide = $00100000; { Send child a "hide" request as soon as it checks in. }
  198. kLSLaunchAndHideOthers = $00200000; { Hide all other apps when child checks in. }
  199. type
  200. LSLaunchFSRefSpecPtr = ^LSLaunchFSRefSpec;
  201. LSLaunchFSRefSpec = record
  202. appRef: FSRefPtr; { app to use, can be NULL }
  203. numDocs: UInt32; { items to open/print, can be NULL }
  204. itemRefs: FSRefPtr; { array of FSRefs }
  205. passThruParams: AEDescPtr; { passed untouched to application as optional parameter }
  206. launchFlags: LSLaunchFlags;
  207. asyncRefCon: Ptr; { used if you register for app birth/death notification }
  208. end;
  209. LSLaunchURLSpecPtr = ^LSLaunchURLSpec;
  210. LSLaunchURLSpec = record
  211. appURL: CFURLRef; { app to use, can be NULL }
  212. itemURLs: CFArrayRef; { items to open/print, can be NULL }
  213. passThruParams: AEDescPtr; { passed untouched to application as optional parameter }
  214. launchFlags: LSLaunchFlags;
  215. asyncRefCon: Ptr; { used if you register for app birth/death notification }
  216. end;
  217. { ======================================================================================================== }
  218. { LaunchServices Public Entry Points }
  219. { ======================================================================================================== }
  220. {
  221. * LSInit() *** DEPRECATED in 10.3 ***
  222. *
  223. * Discussion:
  224. * LSInit is deprecated. Do not use.
  225. *
  226. * Pre 10.3 Summary:
  227. * Initialize LaunchServices for use.
  228. *
  229. * Pre 10.3 Discussion:
  230. * LSInit is optional but should be called by top level applications
  231. * to explicitly incur any startup costs at a known time. Frameworks
  232. * and libraries need never call LSInit.
  233. *
  234. * Pre 10.3 Parameters:
  235. *
  236. * inFlags:
  237. * Use kLSInitializeDefaults.
  238. *
  239. * Availability:
  240. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
  241. * CarbonLib: not available in CarbonLib 1.x
  242. * Non-Carbon CFM: not available
  243. }
  244. // AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3
  245. function LSInit(inFlags: LSInitializeFlags): OSStatus; external name '_LSInit';
  246. {
  247. * LSTerm() *** DEPRECATED in 10.3 ***
  248. *
  249. * Discussion:
  250. * LSTerm is deprecated. It does nothing.
  251. *
  252. * Pre 10.3 Summary:
  253. * Terminate LaunchServices use.
  254. *
  255. * Pre 10.3 Discussion:
  256. * LSTerm is optional but should be called by top level applications
  257. * to explicitly terminate LaunchServices activity at a known time.
  258. * Frameworks and libraries need never call LSTerm.
  259. *
  260. * Availability:
  261. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
  262. * CarbonLib: not available in CarbonLib 1.x
  263. * Non-Carbon CFM: not available
  264. }
  265. // AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3
  266. function LSTerm: OSStatus; external name '_LSTerm';
  267. {
  268. * LSCopyItemInfoForRef()
  269. *
  270. * Summary:
  271. * Return information about an item.
  272. *
  273. * Discussion:
  274. * Returns as much or as little information as requested about
  275. * inItemRef. Some information is available in a thread-safe manner,
  276. * some is not. All CFStrings must be released after use.
  277. *
  278. * Mac OS X threading:
  279. * Thread safe since version 10.2
  280. *
  281. * Parameters:
  282. *
  283. * inItemRef:
  284. * The FSRef of the item about which information is requested.
  285. *
  286. * inWhichInfo:
  287. * Flags indicating which information to return
  288. *
  289. * outItemInfo:
  290. * Information is returned in this structure. Must not be NULL
  291. *
  292. * Availability:
  293. * Non-Carbon CFM: not available
  294. * CarbonLib: not available in CarbonLib 1.x
  295. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  296. }
  297. function LSCopyItemInfoForRef(const (*var*) inItemRef: FSRef; inWhichInfo: LSRequestedInfo; var outItemInfo: LSItemInfoRecord): OSStatus; external name '_LSCopyItemInfoForRef';
  298. {
  299. * LSCopyItemInfoForURL()
  300. *
  301. * Summary:
  302. * Return information about an item.
  303. *
  304. * Discussion:
  305. * Returns as much or as little information as requested about
  306. * inURL. Some information is available in a thread-safe manner,
  307. * some is not. All CFStrings must be released after use.
  308. *
  309. * Mac OS X threading:
  310. * Thread safe since version 10.2
  311. *
  312. * Parameters:
  313. *
  314. * inURL:
  315. * The CFURLRef of the item about which information is requested.
  316. *
  317. * inWhichInfo:
  318. * Flags indicating which information to return
  319. *
  320. * outItemInfo:
  321. * Information is returned in this structure. Must not be NULL
  322. *
  323. * Availability:
  324. * Non-Carbon CFM: not available
  325. * CarbonLib: not available in CarbonLib 1.x
  326. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  327. }
  328. function LSCopyItemInfoForURL(inURL: CFURLRef; inWhichInfo: LSRequestedInfo; var outItemInfo: LSItemInfoRecord): OSStatus; external name '_LSCopyItemInfoForURL';
  329. {
  330. * LSGetExtensionInfo()
  331. *
  332. * Summary:
  333. * Get information about the extension for a file system name.
  334. *
  335. * Discussion:
  336. * Returns the starting index of the extension (not including the
  337. * period) or kLSInvalidExtensionIndex if the input name has no
  338. * extension.
  339. *
  340. * Mac OS X threading:
  341. * Thread safe since version 10.2
  342. *
  343. * Parameters:
  344. *
  345. * inNameLen:
  346. * The number of the UniChars in inNameBuffer.
  347. *
  348. * inNameBuffer:
  349. * The buffer containing the name's Unicode characters.
  350. *
  351. * outExtStartIndex:
  352. * On success, the starting index of the extension if there is one
  353. * (not including the period). Set to kLSInvalidExtensionIndex if
  354. * inNameBuffer does not contain a valid extension.
  355. *
  356. * Availability:
  357. * Non-Carbon CFM: not available
  358. * CarbonLib: not available in CarbonLib 1.x
  359. * Mac OS X: in version 10.1 and later in ApplicationServices.framework
  360. }
  361. function LSGetExtensionInfo(inNameLen: UniCharCount; inNameBuffer: ConstUniCharPtr; var outExtStartIndex: UniCharCount): OSStatus; external name '_LSGetExtensionInfo';
  362. {
  363. * LSCopyDisplayNameForRef()
  364. *
  365. * Summary:
  366. * Get the display name for an FSRef.
  367. *
  368. * Discussion:
  369. * Return a copy of the display name for an FSRef. Takes into
  370. * consideration whether this item has a hidden extension or not.
  371. *
  372. * Mac OS X threading:
  373. * Thread safe since version 10.2
  374. *
  375. * Parameters:
  376. *
  377. * inRef:
  378. * The FSRef for which the display name is desired.
  379. *
  380. * outDisplayName:
  381. * Pointer to the CFString into which the display name should be
  382. * copied. Callers must dispose of the resulting CFString.
  383. *
  384. * Availability:
  385. * Non-Carbon CFM: not available
  386. * CarbonLib: not available in CarbonLib 1.x
  387. * Mac OS X: in version 10.1 and later in ApplicationServices.framework
  388. }
  389. function LSCopyDisplayNameForRef(const (*var*) inRef: FSRef; var outDisplayName: CFStringRef): OSStatus; external name '_LSCopyDisplayNameForRef';
  390. {
  391. * LSCopyDisplayNameForURL()
  392. *
  393. * Summary:
  394. * Get the display name for a CFURLRef.
  395. *
  396. * Discussion:
  397. * Return a copy of the display name for a CFURLRef. Takes into
  398. * consideration whether this item has a hidden extension or not.
  399. *
  400. * Mac OS X threading:
  401. * Thread safe since version 10.2
  402. *
  403. * Parameters:
  404. *
  405. * inURL:
  406. * The URL for which the display name is desired.
  407. *
  408. * outDisplayName:
  409. * Pointer to the CFString into which the display name should be
  410. * copied. Callers must dispose of the resulting CFString.
  411. *
  412. * Availability:
  413. * Non-Carbon CFM: not available
  414. * CarbonLib: not available in CarbonLib 1.x
  415. * Mac OS X: in version 10.1 and later in ApplicationServices.framework
  416. }
  417. function LSCopyDisplayNameForURL(inURL: CFURLRef; var outDisplayName: CFStringRef): OSStatus; external name '_LSCopyDisplayNameForURL';
  418. {
  419. * LSSetExtensionHiddenForRef()
  420. *
  421. * Summary:
  422. * Sets whether the extension for an FSRef is hidden or not.
  423. *
  424. * Discussion:
  425. * Sets the necessary file system state to indicate that the
  426. * extension for inRef is hidden, as in the Finder. You can
  427. * determine if an FSRef's extension is hidden using
  428. * LSCopyItemInfoForRef.
  429. *
  430. * Mac OS X threading:
  431. * Thread safe since version 10.2
  432. *
  433. * Parameters:
  434. *
  435. * inRef:
  436. * The FSRef for which the extension is to be hidden or shown.
  437. *
  438. * inHide:
  439. * True to hide inRef's extension, false to show it.
  440. *
  441. * Availability:
  442. * Non-Carbon CFM: not available
  443. * CarbonLib: not available in CarbonLib 1.x
  444. * Mac OS X: in version 10.1 and later in ApplicationServices.framework
  445. }
  446. function LSSetExtensionHiddenForRef(const (*var*) inRef: FSRef; inHide: boolean): OSStatus; external name '_LSSetExtensionHiddenForRef';
  447. {
  448. * LSSetExtensionHiddenForURL()
  449. *
  450. * Summary:
  451. * Sets whether the extension for a CFURLRef is hidden or not.
  452. *
  453. * Discussion:
  454. * Sets the necessary file system state to indicate that the
  455. * extension for inURL is hidden, as in the Finder. You can
  456. * determine if a CFURLRef's extension is hidden using
  457. * LSCopyItemInfoForURL.
  458. *
  459. * Mac OS X threading:
  460. * Thread safe since version 10.2
  461. *
  462. * Parameters:
  463. *
  464. * inURL:
  465. * The CFURLRef for which the extension is to be hidden or shown.
  466. *
  467. * inHide:
  468. * True to hide inURL's extension, false to show it.
  469. *
  470. * Availability:
  471. * Non-Carbon CFM: not available
  472. * CarbonLib: not available in CarbonLib 1.x
  473. * Mac OS X: in version 10.1 and later in ApplicationServices.framework
  474. }
  475. function LSSetExtensionHiddenForURL(inURL: CFURLRef; inHide: boolean): OSStatus; external name '_LSSetExtensionHiddenForURL';
  476. {
  477. * LSCopyKindStringForRef()
  478. *
  479. * Summary:
  480. * Get the kind string for an item.
  481. *
  482. * Discussion:
  483. * Returns the kind string as used in the Finder and elsewhere for
  484. * inFSRef. The CFStringRef must be released after use.
  485. *
  486. * Mac OS X threading:
  487. * Thread safe since version 10.2
  488. *
  489. * Parameters:
  490. *
  491. * inFSRef:
  492. * The item for which the kind string is requested.
  493. *
  494. * outKindString:
  495. * A non-NULL CFStringRef* into which the kind string will be
  496. * copied. This CFStringRef must be released after use.
  497. *
  498. * Availability:
  499. * Non-Carbon CFM: not available
  500. * CarbonLib: not available in CarbonLib 1.x
  501. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  502. }
  503. function LSCopyKindStringForRef(const (*var*) inFSRef: FSRef; var outKindString: CFStringRef): OSStatus; external name '_LSCopyKindStringForRef';
  504. {
  505. * LSCopyKindStringForURL()
  506. *
  507. * Summary:
  508. * Get the kind string for an item.
  509. *
  510. * Discussion:
  511. * Returns the kind string as used in the Finder and elsewhere for
  512. * inURL. The CFStringRef must be released after use.
  513. *
  514. * Mac OS X threading:
  515. * Thread safe since version 10.2
  516. *
  517. * Parameters:
  518. *
  519. * inURL:
  520. * The item for which the kind string is requested.
  521. *
  522. * outKindString:
  523. * A non-NULL CFStringRef* into which the kind string will be
  524. * copied. This CFStringRef must be released after use.
  525. *
  526. * Availability:
  527. * Non-Carbon CFM: not available
  528. * CarbonLib: not available in CarbonLib 1.x
  529. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  530. }
  531. function LSCopyKindStringForURL(inURL: CFURLRef; var outKindString: CFStringRef): OSStatus; external name '_LSCopyKindStringForURL';
  532. {
  533. * LSCopyKindStringForTypeInfo()
  534. *
  535. * Summary:
  536. * Return the kind string for items like the provided info
  537. *
  538. * Discussion:
  539. * Returns the kind string as shown in the Finder for the those
  540. * items whose type, creator, and/or extension match the provided
  541. * information. The kind string returned will be the one that most
  542. * closely describes all the information provided. The kind string
  543. * is subject to the document binding preferences that have been
  544. * specified by the user. For example, if a creator is specified but
  545. * the user has asked for files with the given
  546. * creator/type/extension combination to open in an application with
  547. * a different creator, the kind string will be loaded from the
  548. * user's preferred application.
  549. *
  550. * Mac OS X threading:
  551. * Thread safe since version 10.2
  552. *
  553. * Parameters:
  554. *
  555. * inType:
  556. * The OSType file type for which you want a kind string. Specify
  557. * kLSUnknownType if no file type information is available.
  558. *
  559. * inCreator:
  560. * The OSType creator for which you want a kind string. Specify
  561. * kLSUnknownCreator if no creator information is available.
  562. *
  563. * inExtension:
  564. * The extension for which you want a kind string. Specify NULL if
  565. * no extension information is available.
  566. *
  567. * outKindString:
  568. * A CFStringRef* to receive the copied kind string object. This
  569. * CFStringRef must be released eventually.
  570. *
  571. * Availability:
  572. * Mac OS X: in version 10.2 and later in ApplicationServices.framework
  573. * CarbonLib: not available in CarbonLib 1.x
  574. * Non-Carbon CFM: not available
  575. }
  576. // AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
  577. function LSCopyKindStringForTypeInfo(
  578. inType: OSType;
  579. inCreator: OSType;
  580. inExtension: CFStringRef; { can be NULL }
  581. VAR outKindString: CFStringRef): OSStatus; external name '_LSCopyKindStringForTypeInfo';
  582. {
  583. * LSCopyKindStringForMIMEType()
  584. *
  585. * Summary:
  586. * Get the kind string for the specified MIME type.
  587. *
  588. * Discussion:
  589. * Returns the localized kind string describing the specified MIME
  590. * type.
  591. *
  592. * Mac OS X threading:
  593. * Thread safe since version 10.2
  594. *
  595. * Parameters:
  596. *
  597. * inMIMEType:
  598. * The string specifying the MIME type.
  599. *
  600. * outKindString:
  601. * A CFStringRef* to receive the copied kind string object. This
  602. * CFStringRef must be released eventually.
  603. *
  604. * Availability:
  605. * Mac OS X: in version 10.2 and later in ApplicationServices.framework
  606. * CarbonLib: not available in CarbonLib 1.x
  607. * Non-Carbon CFM: not available
  608. }
  609. // AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
  610. function LSCopyKindStringForMIMEType(
  611. inMIMEType: CFStringRef;
  612. VAR outKindString: CFStringRef): OSStatus; external name '_LSCopyKindStringForMIMEType';
  613. {
  614. * LSGetApplicationForItem()
  615. *
  616. * Summary:
  617. * Return the application used to open an item.
  618. *
  619. * Discussion:
  620. * Consults the binding tables to return the application that would
  621. * be used to open inItemRef if it were double-clicked in the
  622. * Finder. This application will be the user-specified override if
  623. * appropriate or the default otherwise. If no application is known
  624. * to LaunchServices suitable for opening this item,
  625. * kLSApplicationNotFoundErr will be returned.
  626. *
  627. * Mac OS X threading:
  628. * Thread safe since version 10.2
  629. *
  630. * Parameters:
  631. *
  632. * inItemRef:
  633. * The FSRef of the item for which the application is requested.
  634. *
  635. * inRoleMask:
  636. * Whether to return the editor or viewer for inItemRef. If you
  637. * don't care which, use kLSRolesAll.
  638. *
  639. * outAppRef:
  640. * Filled in with the FSRef of the application if not NULL.
  641. *
  642. * outAppURL:
  643. * Filled in with the CFURLRef of the application if not NULL.
  644. * THIS FUNCTION, DESPITE ITS NAME, RETAINS THE URL REFERENCE ON
  645. * BEHALF OF THE CALLER. THE CALLER MUST EVENTUALLY RELEASE THE
  646. * RETURNED URL REFERENCE.
  647. *
  648. * Availability:
  649. * Non-Carbon CFM: not available
  650. * CarbonLib: not available in CarbonLib 1.x
  651. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  652. }
  653. function LSGetApplicationForItem(const (*var*) inItemRef: FSRef; inRoleMask: LSRolesMask; outAppRef: FSRefPtr; outAppURL: CFURLRefPtr): OSStatus; external name '_LSGetApplicationForItem';
  654. {
  655. * LSGetApplicationForInfo()
  656. *
  657. * Summary:
  658. * Return the application used to open items with particular data.
  659. *
  660. * Discussion:
  661. * Consults the binding tables to return the application that would
  662. * be used to open items with type, creator, and/or extension as
  663. * provided if they were double-clicked in the Finder. This
  664. * application will be the default for items like this if one has
  665. * been set. If no application is known to LaunchServices suitable
  666. * for opening such items, kLSApplicationNotFoundErr will be
  667. * returned. Not all three input parameters can be NULL at the same
  668. * time nor can both output parameters be NULL at the same time.
  669. *
  670. * Mac OS X threading:
  671. * Thread safe since version 10.2
  672. *
  673. * Parameters:
  674. *
  675. * inType:
  676. * The file type to consider. Can be kLSUnknownType.
  677. *
  678. * inCreator:
  679. * The file creator to consider. Can be kLSUnknownCreator.
  680. *
  681. * inExtension:
  682. * The file name extension to consider. Can be NULL.
  683. *
  684. * inRoleMask:
  685. * Whether to return the editor or viewer for inItemRef. If you
  686. * don't care which, use kLSRolesAll.
  687. *
  688. * outAppRef:
  689. * Filled in with the FSRef of the application if not NULL.
  690. *
  691. * outAppURL:
  692. * Filled in with the CFURLRef of the application if not NULL.
  693. * THIS FUNCTION, DESPITE ITS NAME, RETAINS THE URL REFERENCE ON
  694. * BEHALF OF THE CALLER. THE CALLER MUST EVENTUALLY RELEASE THE
  695. * RETURNED URL REFERENCE.
  696. *
  697. * Availability:
  698. * Non-Carbon CFM: not available
  699. * CarbonLib: not available in CarbonLib 1.x
  700. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  701. }
  702. function LSGetApplicationForInfo(inType: OSType; inCreator: OSType; inExtension: CFStringRef; inRoleMask: LSRolesMask; outAppRef: FSRefPtr; outAppURL: CFURLRefPtr): OSStatus; external name '_LSGetApplicationForInfo';
  703. {
  704. * LSCopyApplicationForMIMEType()
  705. *
  706. * Summary:
  707. * Return the application used to handle data with the specified
  708. * MIME type.
  709. *
  710. * Discussion:
  711. * The returned application URL will be the user's preferred handler
  712. * for the MIME type if one has been set. If no user preferred
  713. * application has been set, Launch Services will select a default
  714. * handler for the MIME type. If no application is known to handle
  715. * the MIME type, kLSApplicationNotFoundErr will be returned.
  716. *
  717. * Mac OS X threading:
  718. * Thread safe since version 10.2
  719. *
  720. * Parameters:
  721. *
  722. * inMIMEType:
  723. * The string specifying the MIME type.
  724. *
  725. * inRoleMask:
  726. * A role mask that the chosen application must satisfy. Use
  727. * kLSRolesAll if the role is not important.
  728. *
  729. * outAppURL:
  730. * Receives the copied CFURLRef, which must be released by the
  731. * caller.
  732. *
  733. * Availability:
  734. * Mac OS X: in version 10.2 and later in ApplicationServices.framework
  735. * CarbonLib: not available in CarbonLib 1.x
  736. * Non-Carbon CFM: not available
  737. }
  738. // AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
  739. function LSCopyApplicationForMIMEType(
  740. inMIMEType: CFStringRef;
  741. inRoleMask: LSRolesMask;
  742. VAR outAppURL: CFURLRef): OSStatus; external name '_LSCopyApplicationForMIMEType';
  743. {
  744. * LSGetApplicationForURL()
  745. *
  746. * Summary:
  747. * Return the application used to open an item.
  748. *
  749. * Discussion:
  750. * Consults the binding tables to return the application that would
  751. * be used to open inURL if it were double-clicked in the Finder.
  752. * This application will be the user-specified override if
  753. * appropriate or the default otherwise. If no application is known
  754. * to LaunchServices suitable for opening this item,
  755. * kLSApplicationNotFoundErr will be returned.
  756. *
  757. * Mac OS X threading:
  758. * Thread safe since version 10.2
  759. *
  760. * Parameters:
  761. *
  762. * inURL:
  763. * The CFURLRef of the item for which the application is requested.
  764. *
  765. * inRoleMask:
  766. * Whether to return the editor or viewer for inItemRef. If you
  767. * don't care which, use kLSRolesAll.
  768. *
  769. * outAppRef:
  770. * Filled in with the FSRef of the application if not NULL.
  771. *
  772. * outAppURL:
  773. * Filled in with the CFURLRef of the application if not NULL.
  774. * THIS FUNCTION, DESPITE ITS NAME, RETAINS THE URL REFERENCE ON
  775. * BEHALF OF THE CALLER. THE CALLER MUST EVENTUALLY RELEASE THE
  776. * RETURNED URL REFERENCE.
  777. *
  778. * Availability:
  779. * Non-Carbon CFM: not available
  780. * CarbonLib: not available in CarbonLib 1.x
  781. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  782. }
  783. function LSGetApplicationForURL(inURL: CFURLRef; inRoleMask: LSRolesMask; var outAppRef: FSRef; var outAppURL: CFURLRef): OSStatus; external name '_LSGetApplicationForURL';
  784. {
  785. * LSFindApplicationForInfo()
  786. *
  787. * Summary:
  788. * Locate a specific application.
  789. *
  790. * Discussion:
  791. * Returns the application with the corresponding input information.
  792. * The registry of applications is consulted first in order of
  793. * bundleID, then creator, then name. All comparisons are case
  794. * insensitive and 'ties' are decided first by version, then by
  795. * native vs. Classic.
  796. *
  797. * Mac OS X threading:
  798. * Thread safe since version 10.2
  799. *
  800. * Parameters:
  801. *
  802. * inCreator:
  803. * The file creator to consider. Can be kLSUnknownCreator.
  804. *
  805. * inBundleID:
  806. * The bundle ID to consider. Can be NULL.
  807. *
  808. * inName:
  809. * The name to consider. Can be NULL. Must include any extensions
  810. * that are part of the file system name, e.g. '.app'.
  811. *
  812. * outAppRef:
  813. * Filled in with the FSRef of the application if not NULL.
  814. *
  815. * outAppURL:
  816. * Filled in with the CFURLRef of the application if not NULL.
  817. * THIS FUNCTION, DESPITE ITS NAME, RETAINS THE URL REFERENCE ON
  818. * BEHALF OF THE CALLER. THE CALLER MUST EVENTUALLY RELEASE THE
  819. * RETURNED URL REFERENCE.
  820. *
  821. * Availability:
  822. * Non-Carbon CFM: not available
  823. * CarbonLib: not available in CarbonLib 1.x
  824. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  825. }
  826. function LSFindApplicationForInfo(inCreator: OSType; inBundleID: CFStringRef; inName: CFStringRef; outAppRef: FSRefPtr; outAppURL: CFURLRefPtr): OSStatus; external name '_LSFindApplicationForInfo';
  827. {
  828. * LSCanRefAcceptItem()
  829. *
  830. * Summary:
  831. * Determine whether an item can accept another item.
  832. *
  833. * Discussion:
  834. * Returns in outAcceptsItem whether inTargetRef can accept
  835. * inItemFSRef as in a drag and drop operation. If inRoleMask is
  836. * other than kLSRolesAll then make sure inTargetRef claims to
  837. * fulfill the requested role.
  838. *
  839. * Mac OS X threading:
  840. * Thread safe since version 10.2
  841. *
  842. * Parameters:
  843. *
  844. * inItemFSRef:
  845. * FSRef of the item about which acceptance is requested.
  846. *
  847. * inTargetRef:
  848. * FSRef of the potential target.
  849. *
  850. * inRoleMask:
  851. * The role(s) the target must claim in order to consider
  852. * acceptance.
  853. *
  854. * inFlags:
  855. * Use kLSAcceptDefault.
  856. *
  857. * outAcceptsItem:
  858. * Filled in with result. Must not be NULL.
  859. *
  860. * Availability:
  861. * Non-Carbon CFM: not available
  862. * CarbonLib: not available in CarbonLib 1.x
  863. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  864. }
  865. function LSCanRefAcceptItem(const (*var*) inItemFSRef: FSRef; const (*var*) inTargetRef: FSRef; inRoleMask: LSRolesMask; inFlags: LSAcceptanceFlags; var outAcceptsItem: boolean): OSStatus; external name '_LSCanRefAcceptItem';
  866. {
  867. * LSCanURLAcceptURL()
  868. *
  869. * Summary:
  870. * Determine whether an item can accept another item.
  871. *
  872. * Discussion:
  873. * Returns in outAcceptsItem whether inTargetURL can accept
  874. * inItemURL as in a drag and drop operation. If inRoleMask is other
  875. * than kLSRolesAll then make sure inTargetRef claims to fulfill the
  876. * requested role.
  877. *
  878. * Mac OS X threading:
  879. * Thread safe since version 10.2
  880. *
  881. * Parameters:
  882. *
  883. * inItemURL:
  884. * CFURLRef of the item about which acceptance is requested.
  885. *
  886. * inTargetURL:
  887. * CFURLRef of the potential target.
  888. *
  889. * inRoleMask:
  890. * The role(s) the target must claim in order to consider
  891. * acceptance.
  892. *
  893. * inFlags:
  894. * Use kLSAcceptDefault.
  895. *
  896. * outAcceptsItem:
  897. * Filled in with result. Must not be NULL.
  898. *
  899. * Availability:
  900. * Non-Carbon CFM: not available
  901. * CarbonLib: not available in CarbonLib 1.x
  902. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  903. }
  904. function LSCanURLAcceptURL(inItemURL: CFURLRef; inTargetURL: CFURLRef; inRoleMask: LSRolesMask; inFlags: LSAcceptanceFlags; var outAcceptsItem: boolean): OSStatus; external name '_LSCanURLAcceptURL';
  905. {
  906. * LSRegisterURL()
  907. *
  908. * Discussion:
  909. * If the specified URL refers to an application or other bundle
  910. * claiming to handle documents or URLs, add the bundle's document
  911. * and URL claims to the Launch Services database.
  912. *
  913. * Mac OS X threading:
  914. * Thread safe since version 10.3
  915. *
  916. * Parameters:
  917. *
  918. * inURL:
  919. * The CFURLRef of the item (a directory or file) to be registered.
  920. *
  921. * inUpdate:
  922. * When false, LSRegisterURL does not register the item if it has
  923. * already been registered and the current modification date of
  924. * the item has not changed from when it was last registered. When
  925. * true, the item's registered info is updated, even if the
  926. * modification has not changed.
  927. *
  928. * Result:
  929. * An OSStatus value: noErr - Success kLSNoRegistrationInfoErr - The
  930. * item does not contain info requiring registration kLSDataErr -
  931. * The item's property list info is malformed.
  932. *
  933. * Availability:
  934. * Mac OS X: in version 10.3 and later in ApplicationServices.framework
  935. * CarbonLib: not available in CarbonLib 1.x
  936. * Non-Carbon CFM: not available
  937. }
  938. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  939. function LSRegisterURL(
  940. inURL: CFURLRef;
  941. inUpdate: Boolean): OSStatus; external name '_LSRegisterURL';
  942. {
  943. * LSRegisterFSRef()
  944. *
  945. * Discussion:
  946. * If the specified FSRef refers to an application or other bundle
  947. * claiming to handle documents or URLs, add the bundle's document
  948. * and URL claims to the Launch Services database.
  949. *
  950. * Mac OS X threading:
  951. * Thread safe since version 10.3
  952. *
  953. * Parameters:
  954. *
  955. * inRef:
  956. * The FSRef of the item to be registered.
  957. *
  958. * inUpdate:
  959. * When false, LSRegisterFSRef does not register the item if it
  960. * has already been registered and the current modification date
  961. * of the item has not changed from when it was last registered.
  962. * When true, the item's registered info is updated, even if the
  963. * modification has not changed.
  964. *
  965. * Result:
  966. * An OSStatus value: noErr - Success kLSNoRegistrationInfoErr - The
  967. * item does not contain info requiring registration kLSDataErr -
  968. * The item's property list info is malformed.
  969. *
  970. * Availability:
  971. * Mac OS X: in version 10.3 and later in ApplicationServices.framework
  972. * CarbonLib: not available in CarbonLib 1.x
  973. * Non-Carbon CFM: not available
  974. }
  975. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  976. function LSRegisterFSRef(
  977. const (*var*) inRef: FSRef;
  978. inUpdate: Boolean): OSStatus; external name '_LSRegisterFSRef';
  979. {
  980. * LSCopyApplicationURLsForURL()
  981. *
  982. * Discussion:
  983. * Returns an array of URLs to applications that offer the requested
  984. * role(s) for the input item.
  985. *
  986. * Mac OS X threading:
  987. * Thread safe since version 10.3
  988. *
  989. * Parameters:
  990. *
  991. * inURL:
  992. * The CFURLRef of the item for which all suitable applications
  993. * are desired. If the URL is a file URL, it is treated as a
  994. * document, and applications are selected based on the document's
  995. * type information. Otherwise, applications are selected based on
  996. * the URL's scheme.
  997. *
  998. * inRoleMask:
  999. * The role(s) which must intersect with the role provided by an
  1000. * application for the specified item in order for the application
  1001. * to be included in the result. Pass kLSRolesAll if any role is
  1002. * acceptable.
  1003. *
  1004. * Result:
  1005. * An array of CFURLRefs, one for each application which can open
  1006. * inURL with at least one of the roles in inRoleMask, or NULL if no
  1007. * applications can open the item. When an array is returned, you
  1008. * must eventually release it.
  1009. *
  1010. * Availability:
  1011. * Mac OS X: in version 10.3 and later in ApplicationServices.framework
  1012. * CarbonLib: not available in CarbonLib 1.x
  1013. * Non-Carbon CFM: not available
  1014. }
  1015. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  1016. function LSCopyApplicationURLsForURL(
  1017. inURL: CFURLRef;
  1018. inRoleMask: LSRolesMask): CFArrayRef; external name '_LSCopyApplicationURLsForURL';
  1019. {
  1020. * LSOpenFSRef()
  1021. *
  1022. * Summary:
  1023. * Open an application, document, or folder.
  1024. *
  1025. * Discussion:
  1026. * Opens applications, documents, and folders. Applications are
  1027. * opened via an 'oapp' or 'rapp' event. Documents are opened in
  1028. * their user-overridden or default applications as appropriate.
  1029. * Folders are opened in the Finder. Use the more specific
  1030. * LSOpenFromRefSpec for more control over launching.
  1031. *
  1032. * Mac OS X threading:
  1033. * Thread safe since version 10.2
  1034. *
  1035. * Parameters:
  1036. *
  1037. * inRef:
  1038. * The FSRef of the item to launch.
  1039. *
  1040. * outLaunchedRef:
  1041. * The FSRef of the item actually launched. For inRefs that are
  1042. * documents, outLaunchedRef will be the application used to
  1043. * launch the document. Can be NULL.
  1044. *
  1045. * Availability:
  1046. * Non-Carbon CFM: not available
  1047. * CarbonLib: not available in CarbonLib 1.x
  1048. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1049. }
  1050. function LSOpenFSRef(const (*var*) inRef: FSRef; outLaunchedRef: FSRefPtr): OSStatus; external name '_LSOpenFSRef';
  1051. {
  1052. * LSOpenCFURLRef()
  1053. *
  1054. * Summary:
  1055. * Open an application, document, or folder.
  1056. *
  1057. * Discussion:
  1058. * Opens applications, documents, and folders. Applications are
  1059. * opened via an 'oapp' or 'rapp' event. Documents are opened in
  1060. * their user-overridden or default applications as appropriate.
  1061. * Folders are opened in the Finder. Use the more specific
  1062. * LSOpenFromURLSpec for more control over launching.
  1063. *
  1064. * Mac OS X threading:
  1065. * Thread safe since version 10.2
  1066. *
  1067. * Parameters:
  1068. *
  1069. * inURL:
  1070. * The CFURLRef of the item to launch.
  1071. *
  1072. * outLaunchedURL:
  1073. * The CFURLRef of the item actually launched. For inURLs that are
  1074. * documents, outLaunchedURL will be the application used to
  1075. * launch the document. Can be NULL. THIS FUNCTION, DESPITE ITS
  1076. * NAME, RETAINS THE URL REFERENCE ON BEHALF OF THE CALLER. THE
  1077. * CALLER MUST EVENTUALLY RELEASE THE RETURNED URL REFERENCE.
  1078. *
  1079. * Availability:
  1080. * Non-Carbon CFM: not available
  1081. * CarbonLib: not available in CarbonLib 1.x
  1082. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1083. }
  1084. function LSOpenCFURLRef(inURL: CFURLRef; outLaunchedURL: CFURLRefPtr): OSStatus; external name '_LSOpenCFURLRef';
  1085. {
  1086. * LSOpenFromRefSpec()
  1087. *
  1088. * Summary:
  1089. * Opens an application or one or more documents or folders.
  1090. *
  1091. * Discussion:
  1092. * Opens applications, documents, and folders.
  1093. *
  1094. * Mac OS X threading:
  1095. * Thread safe since version 10.2
  1096. *
  1097. * Parameters:
  1098. *
  1099. * inLaunchSpec:
  1100. * The specification of what to launch and how to launch it.
  1101. *
  1102. * outLaunchedRef:
  1103. * The FSRef of the item actually launched. For inRefs that are
  1104. * documents, outLaunchedRef will be the application used to
  1105. * launch the document. Can be NULL.
  1106. *
  1107. * Availability:
  1108. * Non-Carbon CFM: not available
  1109. * CarbonLib: not available in CarbonLib 1.x
  1110. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1111. }
  1112. function LSOpenFromRefSpec(const (*var*) inLaunchSpec: LSLaunchFSRefSpec; outLaunchedRef: FSRefPtr): OSStatus; external name '_LSOpenFromRefSpec';
  1113. {
  1114. * LSOpenFromURLSpec()
  1115. *
  1116. * Summary:
  1117. * Opens an application or one or more documents or folders.
  1118. *
  1119. * Discussion:
  1120. * Opens applications, documents, and folders.
  1121. *
  1122. * Mac OS X threading:
  1123. * Thread safe since version 10.2
  1124. *
  1125. * Parameters:
  1126. *
  1127. * inLaunchSpec:
  1128. * The specification of what to launch and how to launch it.
  1129. *
  1130. * outLaunchedURL:
  1131. * The CFURLRef of the item actually launched. For inURLs that are
  1132. * documents, outLaunchedURL will be the application used to
  1133. * launch the document. Can be NULL. THIS FUNCTION, DESPITE ITS
  1134. * NAME, RETAINS THE URL REFERENCE ON BEHALF OF THE CALLER. THE
  1135. * CALLER MUST EVENTUALLY RELEASE THE RETURNED URL REFERENCE.
  1136. *
  1137. * Availability:
  1138. * Non-Carbon CFM: not available
  1139. * CarbonLib: not available in CarbonLib 1.x
  1140. * Mac OS X: in version 10.0 and later
  1141. }
  1142. function LSOpenFromURLSpec(const (*var*) inLaunchSpec: LSLaunchURLSpec; outLaunchedURL: CFURLRefPtr): OSStatus; external name '_LSOpenFromURLSpec';
  1143. {$ALIGN MAC68K}
  1144. end.