LSOpen.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. {
  2. File: LaunchServices/LSOpen.h
  3. Contains: Public interfaces for LaunchServices.framework
  4. Version: LaunchServices-360.3~1
  5. Copyright: © 2001-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: Gorazd Krosl <[email protected]>, October 2009 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 308
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$calling mwpascal}
  22. unit LSOpen;
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  25. {$setc GAP_INTERFACES_VERSION := $0308}
  26. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  27. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  28. {$endc}
  29. {$ifc defined CPUPOWERPC and defined CPUI386}
  30. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  31. {$endc}
  32. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  33. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  34. {$endc}
  35. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  41. {$setc __ppc64__ := 1}
  42. {$elsec}
  43. {$setc __ppc64__ := 0}
  44. {$endc}
  45. {$ifc not defined __i386__ and defined CPUI386}
  46. {$setc __i386__ := 1}
  47. {$elsec}
  48. {$setc __i386__ := 0}
  49. {$endc}
  50. {$ifc not defined __x86_64__ and defined CPUX86_64}
  51. {$setc __x86_64__ := 1}
  52. {$elsec}
  53. {$setc __x86_64__ := 0}
  54. {$endc}
  55. {$ifc not defined __arm__ and defined CPUARM}
  56. {$setc __arm__ := 1}
  57. {$elsec}
  58. {$setc __arm__ := 0}
  59. {$endc}
  60. {$ifc defined cpu64}
  61. {$setc __LP64__ := 1}
  62. {$elsec}
  63. {$setc __LP64__ := 0}
  64. {$endc}
  65. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  66. {$error Conflicting definitions for __ppc__ and __i386__}
  67. {$endc}
  68. {$ifc defined __ppc__ and __ppc__}
  69. {$setc TARGET_CPU_PPC := TRUE}
  70. {$setc TARGET_CPU_PPC64 := FALSE}
  71. {$setc TARGET_CPU_X86 := FALSE}
  72. {$setc TARGET_CPU_X86_64 := FALSE}
  73. {$setc TARGET_CPU_ARM := FALSE}
  74. {$setc TARGET_OS_MAC := TRUE}
  75. {$setc TARGET_OS_IPHONE := FALSE}
  76. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  77. {$elifc defined __ppc64__ and __ppc64__}
  78. {$setc TARGET_CPU_PPC := FALSE}
  79. {$setc TARGET_CPU_PPC64 := TRUE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_OS_MAC := TRUE}
  84. {$setc TARGET_OS_IPHONE := FALSE}
  85. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  86. {$elifc defined __i386__ and __i386__}
  87. {$setc TARGET_CPU_PPC := FALSE}
  88. {$setc TARGET_CPU_PPC64 := FALSE}
  89. {$setc TARGET_CPU_X86 := TRUE}
  90. {$setc TARGET_CPU_X86_64 := FALSE}
  91. {$setc TARGET_CPU_ARM := FALSE}
  92. {$ifc defined(iphonesim)}
  93. {$setc TARGET_OS_MAC := FALSE}
  94. {$setc TARGET_OS_IPHONE := TRUE}
  95. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  96. {$elsec}
  97. {$setc TARGET_OS_MAC := TRUE}
  98. {$setc TARGET_OS_IPHONE := FALSE}
  99. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  100. {$endc}
  101. {$elifc defined __x86_64__ and __x86_64__}
  102. {$setc TARGET_CPU_PPC := FALSE}
  103. {$setc TARGET_CPU_PPC64 := FALSE}
  104. {$setc TARGET_CPU_X86 := FALSE}
  105. {$setc TARGET_CPU_X86_64 := TRUE}
  106. {$setc TARGET_CPU_ARM := FALSE}
  107. {$setc TARGET_OS_MAC := TRUE}
  108. {$setc TARGET_OS_IPHONE := FALSE}
  109. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  110. {$elifc defined __arm__ and __arm__}
  111. {$setc TARGET_CPU_PPC := FALSE}
  112. {$setc TARGET_CPU_PPC64 := FALSE}
  113. {$setc TARGET_CPU_X86 := FALSE}
  114. {$setc TARGET_CPU_X86_64 := FALSE}
  115. {$setc TARGET_CPU_ARM := TRUE}
  116. { will require compiler define when/if other Apple devices with ARM cpus ship }
  117. {$setc TARGET_OS_MAC := FALSE}
  118. {$setc TARGET_OS_IPHONE := TRUE}
  119. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  120. {$elsec}
  121. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  122. {$endc}
  123. {$ifc defined __LP64__ and __LP64__ }
  124. {$setc TARGET_CPU_64 := TRUE}
  125. {$elsec}
  126. {$setc TARGET_CPU_64 := FALSE}
  127. {$endc}
  128. {$ifc defined FPC_BIG_ENDIAN}
  129. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  130. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  131. {$elifc defined FPC_LITTLE_ENDIAN}
  132. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  133. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  134. {$elsec}
  135. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  136. {$endc}
  137. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  138. {$setc CALL_NOT_IN_CARBON := FALSE}
  139. {$setc OLDROUTINENAMES := FALSE}
  140. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  141. {$setc OPAQUE_UPP_TYPES := TRUE}
  142. {$setc OTCARBONAPPLICATION := TRUE}
  143. {$setc OTKERNEL := FALSE}
  144. {$setc PM_USE_SESSION_APIS := TRUE}
  145. {$setc TARGET_API_MAC_CARBON := TRUE}
  146. {$setc TARGET_API_MAC_OS8 := FALSE}
  147. {$setc TARGET_API_MAC_OSX := TRUE}
  148. {$setc TARGET_CARBON := TRUE}
  149. {$setc TARGET_CPU_68K := FALSE}
  150. {$setc TARGET_CPU_MIPS := FALSE}
  151. {$setc TARGET_CPU_SPARC := FALSE}
  152. {$setc TARGET_OS_UNIX := FALSE}
  153. {$setc TARGET_OS_WIN32 := FALSE}
  154. {$setc TARGET_RT_MAC_68881 := FALSE}
  155. {$setc TARGET_RT_MAC_CFM := FALSE}
  156. {$setc TARGET_RT_MAC_MACHO := TRUE}
  157. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  158. {$setc TYPE_BOOL := FALSE}
  159. {$setc TYPE_EXTENDED := FALSE}
  160. {$setc TYPE_LONGLONG := TRUE}
  161. uses MacTypes,CFBase,CFArray,CFDictionary,CFURL,Files,Processes,LSInfo,AEDataModel;
  162. {$endc} {not MACOSALLINCLUDE}
  163. {$ifc TARGET_OS_MAC}
  164. {$ALIGN MAC68K}
  165. { ======================================================================================================== }
  166. { LaunchServices Type & Constants }
  167. { ======================================================================================================== }
  168. type
  169. LSLaunchFlags = OptionBits;
  170. const
  171. kLSLaunchDefaults = $00000001; { Defaults = open, async, use Info.plist, start Classic}
  172. kLSLaunchAndPrint = $00000002; { Print items instead of open them}
  173. kLSLaunchReserved2 = $00000004;
  174. kLSLaunchReserved3 = $00000008;
  175. kLSLaunchReserved4 = $00000010;
  176. kLSLaunchReserved5 = $00000020;
  177. kLSLaunchAndDisplayErrors = $00000040; { Report launch/open failures in the UI}
  178. kLSLaunchInhibitBGOnly = $00000080; { Causes launch to fail if target is background-only.}
  179. kLSLaunchDontAddToRecents = $00000100; { Do not add app or documents to recents menus.}
  180. kLSLaunchDontSwitch = $00000200; { Do not bring new app to the foreground.}
  181. kLSLaunchNoParams = $00000800; { Use Info.plist to determine launch parameters}
  182. kLSLaunchAsync = $00010000; { Asynchronous launch; return as soon as the app starts launching.}
  183. kLSLaunchStartClassic = $00020000; { Start up Classic environment if required for app.}
  184. kLSLaunchInClassic = $00040000; { Force app to launch in Classic environment.}
  185. kLSLaunchNewInstance = $00080000; { Instantiate app even if it is already running.}
  186. kLSLaunchAndHide = $00100000; { Send child a "hide" request as soon as it checks in.}
  187. kLSLaunchAndHideOthers = $00200000; { Hide all other apps when the app checks in.}
  188. kLSLaunchHasUntrustedContents = $00400000; { Mark items to be opened as untrusted}
  189. type
  190. LSLaunchFSRefSpec = record
  191. appRef: {const} FSRefPtr; { app to use, can be NULL}
  192. numDocs: ItemCount; { items to open/print, can be zero}
  193. itemRefs: {const} FSRefPtr; { array of FSRefs, ignored when numDocs is zero}
  194. passThruParams: {const} AEDescPtr; { passed untouched to application as optional event parameter, }
  195. { with keyword keyAEPropData (can be NULL)}
  196. launchFlags: LSLaunchFlags;
  197. asyncRefCon: UnivPtr; { used if you register for app birth/death notification}
  198. end;
  199. type
  200. LSLaunchURLSpec = record
  201. appURL: CFURLRef; { app to use, can be NULL}
  202. itemURLs: CFArrayRef; { items to open/print, can be NULL}
  203. passThruParams: {const} AEDescPtr; { passed untouched to application as optional parameter (can be NULL)}
  204. launchFlags: LSLaunchFlags;
  205. asyncRefCon: UnivPtr; { used if you register for app birth/death notification}
  206. end;
  207. { ======================================================================================================== }
  208. { LaunchServices API }
  209. { ======================================================================================================== }
  210. {
  211. * LSOpenFSRef()
  212. *
  213. * Summary:
  214. * Open an application, document, or folder.
  215. *
  216. * Discussion:
  217. * Opens applications, documents, and folders. Applications are
  218. * opened via an 'oapp' or 'rapp' event. Documents are opened in
  219. * their user-overridden or default applications as appropriate.
  220. * Folders are opened in the Finder. Use the more specific
  221. * LSOpenFromRefSpec for more control over launching.
  222. *
  223. * Mac OS X threading:
  224. * Thread safe since version 10.2
  225. *
  226. * Parameters:
  227. *
  228. * inRef:
  229. * The FSRef of the item to launch.
  230. *
  231. * outLaunchedRef:
  232. * The FSRef of the item actually launched. For inRefs that are
  233. * documents, outLaunchedRef will be the application used to
  234. * launch the document. Can be NULL.
  235. *
  236. * Availability:
  237. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  238. * CarbonLib: not available in CarbonLib 1.x
  239. * Non-Carbon CFM: not available
  240. }
  241. function LSOpenFSRef( const (*var*) inRef: FSRef; outLaunchedRef: FSRefPtr { can be NULL } ): OSStatus; external name '_LSOpenFSRef';
  242. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  243. {
  244. * LSOpenCFURLRef()
  245. *
  246. * Summary:
  247. * Open an application, document, or folder.
  248. *
  249. * Discussion:
  250. * Opens applications, documents, and folders. Applications are
  251. * opened via an 'oapp' or 'rapp' event. Documents are opened in
  252. * their user-overridden or default applications as appropriate.
  253. * Folders are opened in the Finder. Use the more specific
  254. * LSOpenFromURLSpec for more control over launching.
  255. *
  256. * Mac OS X threading:
  257. * Thread safe since version 10.2
  258. *
  259. * Parameters:
  260. *
  261. * inURL:
  262. * The CFURLRef of the item to launch.
  263. *
  264. * outLaunchedURL:
  265. * The CFURLRef of the item actually launched. For inURLs that are
  266. * documents, outLaunchedURL will be the application used to
  267. * launch the document. Can be NULL. THIS FUNCTION, DESPITE ITS
  268. * NAME, RETAINS THE URL REFERENCE ON BEHALF OF THE CALLER. THE
  269. * CALLER MUST EVENTUALLY RELEASE THE RETURNED URL REFERENCE.
  270. *
  271. * Availability:
  272. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  273. * CarbonLib: not available in CarbonLib 1.x
  274. * Non-Carbon CFM: not available
  275. }
  276. function LSOpenCFURLRef( inURL: CFURLRef; outLaunchedURL: CFURLRefPtr { can be NULL } ): OSStatus; external name '_LSOpenCFURLRef';
  277. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  278. {
  279. * LSOpenFromRefSpec()
  280. *
  281. * Summary:
  282. * Opens an application or one or more documents or folders.
  283. *
  284. * Discussion:
  285. * Opens applications, documents, and folders.
  286. *
  287. * Mac OS X threading:
  288. * Thread safe since version 10.2
  289. *
  290. * Parameters:
  291. *
  292. * inLaunchSpec:
  293. * The specification of what to launch and how to launch it.
  294. *
  295. * outLaunchedRef:
  296. * The FSRef of the item actually launched. For inRefs that are
  297. * documents, outLaunchedRef will be the application used to
  298. * launch the document. Can be NULL.
  299. *
  300. * Availability:
  301. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  302. * CarbonLib: not available in CarbonLib 1.x
  303. * Non-Carbon CFM: not available
  304. }
  305. function LSOpenFromRefSpec( const (*var*) inLaunchSpec: LSLaunchFSRefSpec; outLaunchedRef: FSRefPtr { can be NULL } ): OSStatus; external name '_LSOpenFromRefSpec';
  306. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  307. {
  308. * LSOpenFromURLSpec()
  309. *
  310. * Summary:
  311. * Opens an application or one or more documents or folders.
  312. *
  313. * Discussion:
  314. * Opens applications, documents, and folders.
  315. *
  316. * Mac OS X threading:
  317. * Thread safe since version 10.2
  318. *
  319. * Parameters:
  320. *
  321. * inLaunchSpec:
  322. * The specification of what to launch and how to launch it.
  323. *
  324. * outLaunchedURL:
  325. * The CFURLRef of the item actually launched. For inURLs that are
  326. * documents, outLaunchedURL will be the application used to
  327. * launch the document. Can be NULL. THIS FUNCTION, DESPITE ITS
  328. * NAME, RETAINS THE URL REFERENCE ON BEHALF OF THE CALLER. THE
  329. * CALLER MUST EVENTUALLY RELEASE THE RETURNED URL REFERENCE.
  330. *
  331. * Availability:
  332. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  333. * CarbonLib: not available in CarbonLib 1.x
  334. * Non-Carbon CFM: not available
  335. }
  336. function LSOpenFromURLSpec( const (*var*) inLaunchSpec: LSLaunchURLSpec; outLaunchedURL: CFURLRefPtr { can be NULL } ): OSStatus; external name '_LSOpenFromURLSpec';
  337. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  338. { ================================================================================== }
  339. { API for opening with a specific role and additional parameters }
  340. { ================================================================================== }
  341. {
  342. * LSApplicationParameters
  343. *
  344. * This structure is used by the new LSOpen functions to specify
  345. * an application, launch flags, and additional parameters
  346. * controlling how an application is launched.
  347. *
  348. * A version field allows the structure to be extended in
  349. * future releases.
  350. }
  351. type
  352. LSApplicationParameters = record
  353. version: CFIndex; { This must be set to zero by the client }
  354. flags: LSLaunchFlags; { See the LSLaunchFlags enum }
  355. application: {const} FSRefPtr; { The application to open (and possibly handle documents/URLs) }
  356. asyncLaunchRefCon: UnivPtr; { The client refCon which will appear in subsequent launch notifications }
  357. environment: CFDictionaryRef; { Environment variables to set in the launched process }
  358. { (a dictionary of CFStringRef keys and values). Can be NULL. }
  359. argv: CFArrayRef; { Note: argv is ignored on 10.4. On 10.5 and later, the array elements }
  360. { (which must be CFStringRefs) are passed as arguments to main() in the launched process. }
  361. initialEvent: AppleEventPtr; { The first Apple Event to be sent to the launched process. Can be NULL. }
  362. end;
  363. type
  364. LSApplicationParametersPtr = ^LSApplicationParameters;
  365. {
  366. * LSOpenApplication()
  367. *
  368. * LSOpenApplication launches one application. This function
  369. * is an updated alternative to the Process Manager's LaunchApplication().
  370. *
  371. * Launch arguments are specified in the inAppParams argument, which
  372. * must be supplied. If the application is already running in the current
  373. * session, it will be made the front process (unless the kLSLaunchNewInstance
  374. * flag is used, which will always cause a new process to be created).
  375. *
  376. * If outPSN is not NULL, the structure it points to will contain the process
  377. * serial number of the launched (or activated) process. Note that for
  378. * asynchronous launches, the application may not have finished launching
  379. * when this function returns.
  380. }
  381. {
  382. * LSOpenApplication()
  383. *
  384. * Mac OS X threading:
  385. * Thread safe since version 10.4
  386. *
  387. * Availability:
  388. * Mac OS X: in version 10.4 and later in ApplicationServices.framework
  389. * CarbonLib: not available
  390. * Non-Carbon CFM: not available
  391. }
  392. function LSOpenApplication( const (*var*) appParams: LSApplicationParameters; outPSN: ProcessSerialNumberPtr { can be NULL } ): OSStatus; external name '_LSOpenApplication';
  393. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  394. {
  395. * LSOpenItemsWithRole()
  396. *
  397. * Opens the items specified as an array of FSRefs with the role
  398. * specified by inRoleMask. If the role doesn't matter, use kLSRolesAll.
  399. *
  400. * Clients can optionally specify the application and launch parameters
  401. * in inAppParams. If a specific application is given in inAppParams, then
  402. * inRoleMask is ignored and the application is launched (if necessary).
  403. * Otherwise, an application will be selected which can handle each input
  404. * item in the specified role(s).
  405. *
  406. * Each launched application will receive an 'odoc' Apple Event specifying
  407. * which items are to be opened.
  408. *
  409. * Note that if the input items array contains any applications, this
  410. * function will not launch them unless the kLSRolesShell bit is set
  411. * in the inRolesMask (in which case the application is its own shell).
  412. *
  413. * The optional inAEParam argument specifies an AEDesc to be attached to
  414. * the Apple Event(s) generated by Launch Services with the specified
  415. * AEKeyword.
  416. *
  417. * If not NULL, the outPSNs buffer will be filled with the PSN which
  418. * was used to open each item at the same index of the input FSRef array. The
  419. * PSN capacity of the output buffer is specified by inMaxPSNCount.
  420. }
  421. {
  422. * LSOpenItemsWithRole()
  423. *
  424. * Mac OS X threading:
  425. * Thread safe since version 10.4
  426. *
  427. * Availability:
  428. * Mac OS X: in version 10.4 and later in ApplicationServices.framework
  429. * CarbonLib: not available
  430. * Non-Carbon CFM: not available
  431. }
  432. function LSOpenItemsWithRole( const (*var*) inItems: FSRef; inItemCount: CFIndex; inRole: LSRolesMask; {const} inAEParam: AEKeyDescPtr { can be NULL }; {const} inAppParams: LSApplicationParametersPtr { can be NULL }; outPSNs: ProcessSerialNumberPtr { can be NULL }; inMaxPSNCount: CFIndex ): OSStatus; external name '_LSOpenItemsWithRole';
  433. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  434. {
  435. * LSOpenURLsWithRole()
  436. *
  437. * Opens the URLs specified by inURLs (an array of CFURLRefs) with the role
  438. * specified by inRoleMask. If the role doesn't matter, use kLSRolesAll.
  439. *
  440. * Clients can optionally specify the application and launch parameters
  441. * in inAppParams. If a specific application is given in inAppParams, then
  442. * inRoleMask is ignored and the application is launched (if necessary).
  443. * Otherwise, an application will be selected which can handle each input
  444. * URL in at least one of the specified role(s).
  445. *
  446. * Each launched application will receive one or more 'GURL' Apple Event
  447. * specifying the URLs to be opened. Clients may also pass file URLs, which
  448. * will be interpreted as file system items and opened in the manner of
  449. * LSOpenItemsWithRole (i.e., a handler will be selected base on the item's
  450. * metadata).
  451. *
  452. * Note that if the input array contains any application URLs, this
  453. * function will not launch them unless the kLSRolesShell bit is set
  454. * in the inRolesMask (in which case the application is its own shell).
  455. *
  456. * The optional inAEParam argument specifies an AEDesc to be attached to
  457. * the Apple Event(s) generated by Launch Services with the specified
  458. * AEKeyword.
  459. *
  460. * If not NULL, the outPSNs buffer will be filled with the PSN which
  461. * was used to open each URL at the same index of the input URL array. The
  462. * PSN capacity of the output buffer is specified by inMaxPSNCount.
  463. }
  464. {
  465. * LSOpenURLsWithRole()
  466. *
  467. * Mac OS X threading:
  468. * Thread safe since version 10.4
  469. *
  470. * Availability:
  471. * Mac OS X: in version 10.4 and later in ApplicationServices.framework
  472. * CarbonLib: not available
  473. * Non-Carbon CFM: not available
  474. }
  475. function LSOpenURLsWithRole( inURLs: CFArrayRef; inRole: LSRolesMask; {const} inAEParam: AEKeyDescPtr { can be NULL }; {const} inAppParams: LSApplicationParametersPtr { can be NULL }; outPSNs: ProcessSerialNumberPtr { can be NULL }; inMaxPSNCount: CFIndex ): OSStatus; external name '_LSOpenURLsWithRole';
  476. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  477. {$endc} {TARGET_OS_MAC}
  478. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  479. end.
  480. {$endc} {not MACOSALLINCLUDE}