CFTree.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. { CFTree.h
  2. Copyright (c) 1998-2013, Apple Inc. All rights reserved.
  3. }
  4. {
  5. Modified for use with Free Pascal
  6. Version 308
  7. Please report any bugs to <[email protected]>
  8. }
  9. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  10. {$mode macpas}
  11. {$modeswitch cblocks}
  12. {$packenum 1}
  13. {$macro on}
  14. {$inline on}
  15. {$calling mwpascal}
  16. unit CFTree;
  17. interface
  18. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  19. {$setc GAP_INTERFACES_VERSION := $0308}
  20. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  21. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  22. {$endc}
  23. {$ifc defined CPUPOWERPC and defined CPUI386}
  24. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  25. {$endc}
  26. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  27. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  28. {$endc}
  29. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  30. {$setc __ppc__ := 1}
  31. {$elsec}
  32. {$setc __ppc__ := 0}
  33. {$endc}
  34. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  35. {$setc __ppc64__ := 1}
  36. {$elsec}
  37. {$setc __ppc64__ := 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 not defined __x86_64__ and defined CPUX86_64}
  45. {$setc __x86_64__ := 1}
  46. {$elsec}
  47. {$setc __x86_64__ := 0}
  48. {$endc}
  49. {$ifc not defined __arm__ and defined CPUARM}
  50. {$setc __arm__ := 1}
  51. {$elsec}
  52. {$setc __arm__ := 0}
  53. {$endc}
  54. {$ifc not defined __arm64__ and defined CPUAARCH64}
  55. {$setc __arm64__ := 1}
  56. {$elsec}
  57. {$setc __arm64__ := 0}
  58. {$endc}
  59. {$ifc defined cpu64}
  60. {$setc __LP64__ := 1}
  61. {$elsec}
  62. {$setc __LP64__ := 0}
  63. {$endc}
  64. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  65. {$error Conflicting definitions for __ppc__ and __i386__}
  66. {$endc}
  67. {$ifc defined __ppc__ and __ppc__}
  68. {$setc TARGET_CPU_PPC := TRUE}
  69. {$setc TARGET_CPU_PPC64 := FALSE}
  70. {$setc TARGET_CPU_X86 := FALSE}
  71. {$setc TARGET_CPU_X86_64 := FALSE}
  72. {$setc TARGET_CPU_ARM := FALSE}
  73. {$setc TARGET_CPU_ARM64 := FALSE}
  74. {$setc TARGET_OS_MAC := TRUE}
  75. {$setc TARGET_OS_IPHONE := FALSE}
  76. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  77. {$setc TARGET_OS_EMBEDDED := FALSE}
  78. {$elifc defined __ppc64__ and __ppc64__}
  79. {$setc TARGET_CPU_PPC := FALSE}
  80. {$setc TARGET_CPU_PPC64 := TRUE}
  81. {$setc TARGET_CPU_X86 := FALSE}
  82. {$setc TARGET_CPU_X86_64 := FALSE}
  83. {$setc TARGET_CPU_ARM := FALSE}
  84. {$setc TARGET_CPU_ARM64 := FALSE}
  85. {$setc TARGET_OS_MAC := TRUE}
  86. {$setc TARGET_OS_IPHONE := FALSE}
  87. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  88. {$setc TARGET_OS_EMBEDDED := FALSE}
  89. {$elifc defined __i386__ and __i386__}
  90. {$setc TARGET_CPU_PPC := FALSE}
  91. {$setc TARGET_CPU_PPC64 := FALSE}
  92. {$setc TARGET_CPU_X86 := TRUE}
  93. {$setc TARGET_CPU_X86_64 := FALSE}
  94. {$setc TARGET_CPU_ARM := FALSE}
  95. {$setc TARGET_CPU_ARM64 := 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_CPU_ARM64 := FALSE}
  113. {$ifc defined iphonesim}
  114. {$setc TARGET_OS_MAC := FALSE}
  115. {$setc TARGET_OS_IPHONE := TRUE}
  116. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  117. {$elsec}
  118. {$setc TARGET_OS_MAC := TRUE}
  119. {$setc TARGET_OS_IPHONE := FALSE}
  120. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  121. {$endc}
  122. {$setc TARGET_OS_EMBEDDED := FALSE}
  123. {$elifc defined __arm__ and __arm__}
  124. {$setc TARGET_CPU_PPC := FALSE}
  125. {$setc TARGET_CPU_PPC64 := FALSE}
  126. {$setc TARGET_CPU_X86 := FALSE}
  127. {$setc TARGET_CPU_X86_64 := FALSE}
  128. {$setc TARGET_CPU_ARM := TRUE}
  129. {$setc TARGET_CPU_ARM64 := FALSE}
  130. {$setc TARGET_OS_MAC := FALSE}
  131. {$setc TARGET_OS_IPHONE := TRUE}
  132. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  133. {$setc TARGET_OS_EMBEDDED := TRUE}
  134. {$elifc defined __arm64__ and __arm64__}
  135. {$setc TARGET_CPU_PPC := FALSE}
  136. {$setc TARGET_CPU_PPC64 := FALSE}
  137. {$setc TARGET_CPU_X86 := FALSE}
  138. {$setc TARGET_CPU_X86_64 := FALSE}
  139. {$setc TARGET_CPU_ARM := FALSE}
  140. {$setc TARGET_CPU_ARM64 := TRUE}
  141. {$ifc defined ios}
  142. {$setc TARGET_OS_MAC := FALSE}
  143. {$setc TARGET_OS_IPHONE := TRUE}
  144. {$setc TARGET_OS_EMBEDDED := TRUE}
  145. {$elsec}
  146. {$setc TARGET_OS_MAC := TRUE}
  147. {$setc TARGET_OS_IPHONE := FALSE}
  148. {$setc TARGET_OS_EMBEDDED := FALSE}
  149. {$endc}
  150. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  151. {$elsec}
  152. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  153. {$endc}
  154. {$ifc defined __LP64__ and __LP64__ }
  155. {$setc TARGET_CPU_64 := TRUE}
  156. {$elsec}
  157. {$setc TARGET_CPU_64 := FALSE}
  158. {$endc}
  159. {$ifc defined FPC_BIG_ENDIAN}
  160. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  161. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  162. {$elifc defined FPC_LITTLE_ENDIAN}
  163. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  164. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  165. {$elsec}
  166. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  167. {$endc}
  168. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  169. {$setc CALL_NOT_IN_CARBON := FALSE}
  170. {$setc OLDROUTINENAMES := FALSE}
  171. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  172. {$setc OPAQUE_UPP_TYPES := TRUE}
  173. {$setc OTCARBONAPPLICATION := TRUE}
  174. {$setc OTKERNEL := FALSE}
  175. {$setc PM_USE_SESSION_APIS := TRUE}
  176. {$setc TARGET_API_MAC_CARBON := TRUE}
  177. {$setc TARGET_API_MAC_OS8 := FALSE}
  178. {$setc TARGET_API_MAC_OSX := TRUE}
  179. {$setc TARGET_CARBON := TRUE}
  180. {$setc TARGET_CPU_68K := FALSE}
  181. {$setc TARGET_CPU_MIPS := FALSE}
  182. {$setc TARGET_CPU_SPARC := FALSE}
  183. {$setc TARGET_OS_UNIX := FALSE}
  184. {$setc TARGET_OS_WIN32 := FALSE}
  185. {$setc TARGET_RT_MAC_68881 := FALSE}
  186. {$setc TARGET_RT_MAC_CFM := FALSE}
  187. {$setc TARGET_RT_MAC_MACHO := TRUE}
  188. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  189. {$setc TYPE_BOOL := FALSE}
  190. {$setc TYPE_EXTENDED := FALSE}
  191. {$setc TYPE_LONGLONG := TRUE}
  192. uses MacTypes,CFBase;
  193. {$endc} {not MACOSALLINCLUDE}
  194. {$ALIGN POWER}
  195. {!
  196. @header CFTree
  197. CFTree implements a container which stores references to other CFTrees.
  198. Each tree may have a parent, and a variable number of children.
  199. }
  200. {!
  201. @typedef CFTreeRetainCallBack
  202. Type of the callback function used to add a retain to the user-specified
  203. info parameter. This callback may returns the value to use whenever the
  204. info parameter is retained, which is usually the value parameter passed
  205. to this callback, but may be a different value if a different value
  206. should be used.
  207. @param info A user-supplied info parameter provided in a CFTreeContext.
  208. @result The retained info parameter.
  209. }
  210. type
  211. CFTreeRetainCallBack = function( info: {const} UnivPtr ): UnivPtr;
  212. {!
  213. @typedef CFTreeReleaseCallBack
  214. Type of the callback function used to remove a retain previously
  215. added to the user-specified info parameter.
  216. @param info A user-supplied info parameter provided in a CFTreeContext.
  217. }
  218. type
  219. CFTreeReleaseCallBack = procedure( info: {const} UnivPtr );
  220. {!
  221. @typedef CFTreeCopyDescriptionCallBack
  222. Type of the callback function used to provide a description of the
  223. user-specified info parameter.
  224. @param info A user-supplied info parameter provided in a CFTreeContext.
  225. @result A description of the info parameter.
  226. }
  227. type
  228. CFTreeCopyDescriptionCallBack = function( info: {const} UnivPtr ): CFStringRef;
  229. {!
  230. @typedef CFTreeContext
  231. Structure containing user-specified data and callbacks for a CFTree.
  232. @field version The version number of the structure type being passed
  233. in as a parameter to the CFTree creation function.
  234. This structure is version 0.
  235. @field info A C pointer to a user-specified block of data.
  236. @field retain The callback used to add a retain for the info field.
  237. If this parameter is not a pointer to a function of the correct
  238. prototype, the behavior is undefined. The value may be NULL.
  239. @field release The calllback used to remove a retain previously added
  240. for the info field. If this parameter is not a pointer to a
  241. function of the correct prototype, the behavior is undefined.
  242. The value may be NULL.
  243. @field copyDescription The callback used to provide a description of
  244. the info field.
  245. }
  246. type
  247. CFTreeContext = record
  248. version: CFIndex;
  249. info: UnivPtr;
  250. retain: CFTreeRetainCallBack;
  251. release: CFTreeReleaseCallBack;
  252. copyDescription: CFTreeCopyDescriptionCallBack;
  253. end;
  254. CFTreeContextPtr = ^CFTreeContext;
  255. {!
  256. @typedef CFTreeApplierFunction
  257. Type of the callback function used by the apply functions of
  258. CFTree.
  259. @param value The current value from the CFTree
  260. @param context The user-defined context parameter give to the apply
  261. function.
  262. }
  263. type
  264. CFTreeApplierFunction = procedure( value: {const} UnivPtr; context: UnivPtr );
  265. {!
  266. @typedef CFTreeRef
  267. This is the type of a reference to CFTrees.
  268. }
  269. type
  270. CFTreeRef = ^__CFTree; { an opaque type }
  271. __CFTree = record end;
  272. CFTreeRefPtr = ^CFTreeRef;
  273. {!
  274. @function CFTreeGetTypeID
  275. Returns the type identifier of all CFTree instances.
  276. }
  277. function CFTreeGetTypeID: CFTypeID; external name '_CFTreeGetTypeID';
  278. {!
  279. @function CFTreeCreate
  280. Creates a new mutable tree.
  281. @param allocator The CFAllocator which should be used to allocate
  282. memory for the tree and storage for its children. This
  283. parameter may be NULL in which case the current default
  284. CFAllocator is used. If this reference is not a valid
  285. CFAllocator, the behavior is undefined.
  286. @param context A C pointer to a CFTreeContext structure to be copied
  287. and used as the context of the new tree. The info parameter
  288. will be retained by the tree if a retain function is provided.
  289. If this value is not a valid C pointer to a CFTreeContext
  290. structure-sized block of storage, the result is undefined.
  291. If the version number of the storage is not a valid CFTreeContext
  292. version number, the result is undefined.
  293. @result A reference to the new CFTree.
  294. }
  295. function CFTreeCreate( allocator: CFAllocatorRef; const (*var*) context: CFTreeContext ): CFTreeRef; external name '_CFTreeCreate';
  296. {!
  297. @function CFTreeGetParent
  298. Returns the parent of the specified tree.
  299. @param tree The tree to be queried. If this parameter is not a valid
  300. CFTree, the behavior is undefined.
  301. @result The parent of the tree.
  302. }
  303. function CFTreeGetParent( tree: CFTreeRef ): CFTreeRef; external name '_CFTreeGetParent';
  304. {!
  305. @function CFTreeGetNextSibling
  306. Returns the sibling after the specified tree in the parent tree's list.
  307. @param tree The tree to be queried. If this parameter is not a valid
  308. CFTree, the behavior is undefined.
  309. @result The next sibling of the tree.
  310. }
  311. function CFTreeGetNextSibling( tree: CFTreeRef ): CFTreeRef; external name '_CFTreeGetNextSibling';
  312. {!
  313. @function CFTreeGetFirstChild
  314. Returns the first child of the tree.
  315. @param tree The tree to be queried. If this parameter is not a valid
  316. CFTree, the behavior is undefined.
  317. @result The first child of the tree.
  318. }
  319. function CFTreeGetFirstChild( tree: CFTreeRef ): CFTreeRef; external name '_CFTreeGetFirstChild';
  320. {!
  321. @function CFTreeGetContext
  322. Returns the context of the specified tree.
  323. @param tree The tree to be queried. If this parameter is not a valid
  324. CFTree, the behavior is undefined.
  325. @param context A C pointer to a CFTreeContext structure to be filled in with
  326. the context of the specified tree. If this value is not a valid C
  327. pointer to a CFTreeContext structure-sized block of storage, the
  328. result is undefined. If the version number of the storage is not
  329. a valid CFTreeContext version number, the result is undefined.
  330. }
  331. procedure CFTreeGetContext( tree: CFTreeRef; var context: CFTreeContext ); external name '_CFTreeGetContext';
  332. {!
  333. @function CFTreeGetChildCount
  334. Returns the number of children of the specified tree.
  335. @param tree The tree to be queried. If this parameter is not a valid
  336. CFTree, the behavior is undefined.
  337. @result The number of children.
  338. }
  339. function CFTreeGetChildCount( tree: CFTreeRef ): CFIndex; external name '_CFTreeGetChildCount';
  340. {!
  341. @function CFTreeGetChildAtIndex
  342. Returns the nth child of the specified tree.
  343. @param tree The tree to be queried. If this parameter is not a valid
  344. CFTree, the behavior is undefined.
  345. @param idx The index of the child tree to be returned. If this parameter
  346. is less than zero or greater than the number of children of the
  347. tree, the result is undefined.
  348. @result A reference to the specified child tree.
  349. }
  350. function CFTreeGetChildAtIndex( tree: CFTreeRef; idx: CFIndex ): CFTreeRef; external name '_CFTreeGetChildAtIndex';
  351. {!
  352. @function CFTreeGetChildren
  353. Fills the buffer with children from the tree.
  354. @param tree The tree to be queried. If this parameter is not a valid
  355. CFTree, the behavior is undefined.
  356. @param children A C array of pointer-sized values to be filled with
  357. children from the tree. If this parameter is not a valid pointer to a
  358. C array of at least CFTreeGetChildCount() pointers, the behavior is undefined.
  359. @result A reference to the specified child tree.
  360. }
  361. procedure CFTreeGetChildren( tree: CFTreeRef; var children: CFTreeRef ); external name '_CFTreeGetChildren';
  362. {!
  363. @function CFTreeApplyFunctionToChildren
  364. Calls a function once for each child of the tree. Note that the applier
  365. only operates one level deep, and does not operate on descendents further
  366. removed than the immediate children of the tree.
  367. @param heap The tree to be operated upon. If this parameter is not a
  368. valid CFTree, the behavior is undefined.
  369. @param applier The callback function to call once for each child of
  370. the given tree. If this parameter is not a pointer to a
  371. function of the correct prototype, the behavior is undefined.
  372. If there are values in the tree which the applier function does
  373. not expect or cannot properly apply to, the behavior is undefined.
  374. @param context A pointer-sized user-defined value, which is passed
  375. as the second parameter to the applier function, but is
  376. otherwise unused by this function. If the context is not
  377. what is expected by the applier function, the behavior is
  378. undefined.
  379. }
  380. procedure CFTreeApplyFunctionToChildren( tree: CFTreeRef; applier: CFTreeApplierFunction; context: UnivPtr ); external name '_CFTreeApplyFunctionToChildren';
  381. {!
  382. @function CFTreeFindRoot
  383. Returns the root tree of which the specified tree is a descendent.
  384. @param tree The tree to be queried. If this parameter is not a valid
  385. CFTree, the behavior is undefined.
  386. @result A reference to the root of the tree.
  387. }
  388. function CFTreeFindRoot( tree: CFTreeRef ): CFTreeRef; external name '_CFTreeFindRoot';
  389. {!
  390. @function CFTreeSetContext
  391. Replaces the context of a tree. The tree releases its retain on the
  392. info of the previous context, and retains the info of the new context.
  393. @param tree The tree to be operated on. If this parameter is not a valid
  394. CFTree, the behavior is undefined.
  395. @param context A C pointer to a CFTreeContext structure to be copied
  396. and used as the context of the new tree. The info parameter
  397. will be retained by the tree if a retain function is provided.
  398. If this value is not a valid C pointer to a CFTreeContext
  399. structure-sized block of storage, the result is undefined.
  400. If the version number of the storage is not a valid CFTreeContext
  401. version number, the result is undefined.
  402. }
  403. procedure CFTreeSetContext( tree: CFTreeRef; const (*var*) context: CFTreeContext ); external name '_CFTreeSetContext';
  404. {!
  405. @function CFTreePrependChild
  406. Adds the newChild to the specified tree as the first in its list of children.
  407. @param tree The tree to be operated on. If this parameter is not a valid
  408. CFTree, the behavior is undefined.
  409. @param newChild The child to be added.
  410. If this parameter is not a valid CFTree, the behavior is undefined.
  411. If this parameter is a tree which is already a child of any tree,
  412. the behavior is undefined.
  413. }
  414. procedure CFTreePrependChild( tree: CFTreeRef; newChild: CFTreeRef ); external name '_CFTreePrependChild';
  415. {!
  416. @function CFTreeAppendChild
  417. Adds the newChild to the specified tree as the last in its list of children.
  418. @param tree The tree to be operated on. If this parameter is not a valid
  419. CFTree, the behavior is undefined.
  420. @param newChild The child to be added.
  421. If this parameter is not a valid CFTree, the behavior is undefined.
  422. If this parameter is a tree which is already a child of any tree,
  423. the behavior is undefined.
  424. }
  425. procedure CFTreeAppendChild( tree: CFTreeRef; newChild: CFTreeRef ); external name '_CFTreeAppendChild';
  426. {!
  427. @function CFTreeInsertSibling
  428. Inserts newSibling into the the parent tree's linked list of children after
  429. tree. The newSibling will have the same parent as tree.
  430. @param tree The tree to insert newSibling after. If this parameter is not a valid
  431. CFTree, the behavior is undefined. If the tree does not have a
  432. parent, the behavior is undefined.
  433. @param newSibling The sibling to be added.
  434. If this parameter is not a valid CFTree, the behavior is undefined.
  435. If this parameter is a tree which is already a child of any tree,
  436. the behavior is undefined.
  437. }
  438. procedure CFTreeInsertSibling( tree: CFTreeRef; newSibling: CFTreeRef ); external name '_CFTreeInsertSibling';
  439. {!
  440. @function CFTreeRemove
  441. Removes the tree from its parent.
  442. @param tree The tree to be removed. If this parameter is not a valid
  443. CFTree, the behavior is undefined.
  444. }
  445. procedure CFTreeRemove( tree: CFTreeRef ); external name '_CFTreeRemove';
  446. {!
  447. @function CFTreeRemoveAllChildren
  448. Removes all the children of the tree.
  449. @param tree The tree to remove all children from. If this parameter is not a valid
  450. CFTree, the behavior is undefined.
  451. }
  452. procedure CFTreeRemoveAllChildren( tree: CFTreeRef ); external name '_CFTreeRemoveAllChildren';
  453. {!
  454. @function CFTreeSortChildren
  455. Sorts the children of the specified tree using the specified comparator function.
  456. @param tree The tree to be operated on. If this parameter is not a valid
  457. CFTree, the behavior is undefined.
  458. @param comparator The function with the comparator function type
  459. signature which is used in the sort operation to compare
  460. children of the tree with the given value. If this parameter
  461. is not a pointer to a function of the correct prototype, the
  462. the behavior is undefined. The children of the tree are sorted
  463. from least to greatest according to this function.
  464. @param context A pointer-sized user-defined value, which is passed
  465. as the third parameter to the comparator function, but is
  466. otherwise unused by this function. If the context is not
  467. what is expected by the comparator function, the behavior is
  468. undefined.
  469. }
  470. procedure CFTreeSortChildren( tree: CFTreeRef; comparator: CFComparatorFunction; context: UnivPtr ); external name '_CFTreeSortChildren';
  471. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  472. end.
  473. {$endc} {not MACOSALLINCLUDE}