SKAnalysis.pas 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. {
  2. File: SearchKit/SKAnalysis.h
  3. Contains: SearchKit Interfaces.
  4. Version: SearchKit-407~38
  5. Copyright: © 2003-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://developer.apple.com/bugreporter/
  9. }
  10. {
  11. Modified for use with Free Pascal
  12. Version 308
  13. Please report any bugs to <[email protected]>
  14. }
  15. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  16. {$mode macpas}
  17. {$modeswitch cblocks}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$calling mwpascal}
  22. {$IFNDEF FPC_DOTTEDUNITS}
  23. unit SKAnalysis;
  24. {$ENDIF FPC_DOTTEDUNITS}
  25. interface
  26. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  27. {$setc GAP_INTERFACES_VERSION := $0308}
  28. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  29. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  30. {$endc}
  31. {$ifc defined CPUPOWERPC and defined CPUI386}
  32. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  33. {$endc}
  34. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  35. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  36. {$endc}
  37. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  38. {$setc __ppc__ := 1}
  39. {$elsec}
  40. {$setc __ppc__ := 0}
  41. {$endc}
  42. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  43. {$setc __ppc64__ := 1}
  44. {$elsec}
  45. {$setc __ppc64__ := 0}
  46. {$endc}
  47. {$ifc not defined __i386__ and defined CPUI386}
  48. {$setc __i386__ := 1}
  49. {$elsec}
  50. {$setc __i386__ := 0}
  51. {$endc}
  52. {$ifc not defined __x86_64__ and defined CPUX86_64}
  53. {$setc __x86_64__ := 1}
  54. {$elsec}
  55. {$setc __x86_64__ := 0}
  56. {$endc}
  57. {$ifc not defined __arm__ and defined CPUARM}
  58. {$setc __arm__ := 1}
  59. {$elsec}
  60. {$setc __arm__ := 0}
  61. {$endc}
  62. {$ifc not defined __arm64__ and defined CPUAARCH64}
  63. {$setc __arm64__ := 1}
  64. {$elsec}
  65. {$setc __arm64__ := 0}
  66. {$endc}
  67. {$ifc defined cpu64}
  68. {$setc __LP64__ := 1}
  69. {$elsec}
  70. {$setc __LP64__ := 0}
  71. {$endc}
  72. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  73. {$error Conflicting definitions for __ppc__ and __i386__}
  74. {$endc}
  75. {$ifc defined __ppc__ and __ppc__}
  76. {$setc TARGET_CPU_PPC := TRUE}
  77. {$setc TARGET_CPU_PPC64 := FALSE}
  78. {$setc TARGET_CPU_X86 := FALSE}
  79. {$setc TARGET_CPU_X86_64 := FALSE}
  80. {$setc TARGET_CPU_ARM := FALSE}
  81. {$setc TARGET_CPU_ARM64 := FALSE}
  82. {$setc TARGET_OS_MAC := TRUE}
  83. {$setc TARGET_OS_IPHONE := FALSE}
  84. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  85. {$setc TARGET_OS_EMBEDDED := FALSE}
  86. {$elifc defined __ppc64__ and __ppc64__}
  87. {$setc TARGET_CPU_PPC := FALSE}
  88. {$setc TARGET_CPU_PPC64 := TRUE}
  89. {$setc TARGET_CPU_X86 := FALSE}
  90. {$setc TARGET_CPU_X86_64 := FALSE}
  91. {$setc TARGET_CPU_ARM := FALSE}
  92. {$setc TARGET_CPU_ARM64 := FALSE}
  93. {$setc TARGET_OS_MAC := TRUE}
  94. {$setc TARGET_OS_IPHONE := FALSE}
  95. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  96. {$setc TARGET_OS_EMBEDDED := FALSE}
  97. {$elifc defined __i386__ and __i386__}
  98. {$setc TARGET_CPU_PPC := FALSE}
  99. {$setc TARGET_CPU_PPC64 := FALSE}
  100. {$setc TARGET_CPU_X86 := TRUE}
  101. {$setc TARGET_CPU_X86_64 := FALSE}
  102. {$setc TARGET_CPU_ARM := FALSE}
  103. {$setc TARGET_CPU_ARM64 := FALSE}
  104. {$ifc defined iphonesim}
  105. {$setc TARGET_OS_MAC := FALSE}
  106. {$setc TARGET_OS_IPHONE := TRUE}
  107. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  108. {$elsec}
  109. {$setc TARGET_OS_MAC := TRUE}
  110. {$setc TARGET_OS_IPHONE := FALSE}
  111. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  112. {$endc}
  113. {$setc TARGET_OS_EMBEDDED := FALSE}
  114. {$elifc defined __x86_64__ and __x86_64__}
  115. {$setc TARGET_CPU_PPC := FALSE}
  116. {$setc TARGET_CPU_PPC64 := FALSE}
  117. {$setc TARGET_CPU_X86 := FALSE}
  118. {$setc TARGET_CPU_X86_64 := TRUE}
  119. {$setc TARGET_CPU_ARM := FALSE}
  120. {$setc TARGET_CPU_ARM64 := FALSE}
  121. {$ifc defined iphonesim}
  122. {$setc TARGET_OS_MAC := FALSE}
  123. {$setc TARGET_OS_IPHONE := TRUE}
  124. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  125. {$elsec}
  126. {$setc TARGET_OS_MAC := TRUE}
  127. {$setc TARGET_OS_IPHONE := FALSE}
  128. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  129. {$endc}
  130. {$setc TARGET_OS_EMBEDDED := FALSE}
  131. {$elifc defined __arm__ and __arm__}
  132. {$setc TARGET_CPU_PPC := FALSE}
  133. {$setc TARGET_CPU_PPC64 := FALSE}
  134. {$setc TARGET_CPU_X86 := FALSE}
  135. {$setc TARGET_CPU_X86_64 := FALSE}
  136. {$setc TARGET_CPU_ARM := TRUE}
  137. {$setc TARGET_CPU_ARM64 := FALSE}
  138. {$setc TARGET_OS_MAC := FALSE}
  139. {$setc TARGET_OS_IPHONE := TRUE}
  140. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  141. {$setc TARGET_OS_EMBEDDED := TRUE}
  142. {$elifc defined __arm64__ and __arm64__}
  143. {$setc TARGET_CPU_PPC := FALSE}
  144. {$setc TARGET_CPU_PPC64 := FALSE}
  145. {$setc TARGET_CPU_X86 := FALSE}
  146. {$setc TARGET_CPU_X86_64 := FALSE}
  147. {$setc TARGET_CPU_ARM := FALSE}
  148. {$setc TARGET_CPU_ARM64 := TRUE}
  149. {$ifc defined ios}
  150. {$setc TARGET_OS_MAC := FALSE}
  151. {$setc TARGET_OS_IPHONE := TRUE}
  152. {$setc TARGET_OS_EMBEDDED := TRUE}
  153. {$elsec}
  154. {$setc TARGET_OS_MAC := TRUE}
  155. {$setc TARGET_OS_IPHONE := FALSE}
  156. {$setc TARGET_OS_EMBEDDED := FALSE}
  157. {$endc}
  158. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  159. {$elsec}
  160. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  161. {$endc}
  162. {$ifc defined __LP64__ and __LP64__ }
  163. {$setc TARGET_CPU_64 := TRUE}
  164. {$elsec}
  165. {$setc TARGET_CPU_64 := FALSE}
  166. {$endc}
  167. {$ifc defined FPC_BIG_ENDIAN}
  168. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  169. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  170. {$elifc defined FPC_LITTLE_ENDIAN}
  171. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  172. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  173. {$elsec}
  174. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  175. {$endc}
  176. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  177. {$setc CALL_NOT_IN_CARBON := FALSE}
  178. {$setc OLDROUTINENAMES := FALSE}
  179. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  180. {$setc OPAQUE_UPP_TYPES := TRUE}
  181. {$setc OTCARBONAPPLICATION := TRUE}
  182. {$setc OTKERNEL := FALSE}
  183. {$setc PM_USE_SESSION_APIS := TRUE}
  184. {$setc TARGET_API_MAC_CARBON := TRUE}
  185. {$setc TARGET_API_MAC_OS8 := FALSE}
  186. {$setc TARGET_API_MAC_OSX := TRUE}
  187. {$setc TARGET_CARBON := TRUE}
  188. {$setc TARGET_CPU_68K := FALSE}
  189. {$setc TARGET_CPU_MIPS := FALSE}
  190. {$setc TARGET_CPU_SPARC := FALSE}
  191. {$setc TARGET_OS_UNIX := FALSE}
  192. {$setc TARGET_OS_WIN32 := FALSE}
  193. {$setc TARGET_RT_MAC_68881 := FALSE}
  194. {$setc TARGET_RT_MAC_CFM := FALSE}
  195. {$setc TARGET_RT_MAC_MACHO := TRUE}
  196. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  197. {$setc TYPE_BOOL := FALSE}
  198. {$setc TYPE_EXTENDED := FALSE}
  199. {$setc TYPE_LONGLONG := TRUE}
  200. {$IFDEF FPC_DOTTEDUNITS}
  201. uses MacOsApi.MacTypes,MacOsApi.CFBase,MacOsApi.CFString;
  202. {$ELSE FPC_DOTTEDUNITS}
  203. uses MacTypes,CFBase,CFString;
  204. {$ENDIF FPC_DOTTEDUNITS}
  205. {$endc} {not MACOSALLINCLUDE}
  206. {$ALIGN POWER}
  207. {$ifc TARGET_OS_MAC}
  208. {
  209. The possible text analysis properties of an index, used by
  210. SKIndexCreateWithURL or SKIndexCreateWithMutableData.
  211. }
  212. {
  213. * kSKMinTermLength
  214. *
  215. * Summary:
  216. * The minimum term length to index.
  217. *
  218. * Discussion:
  219. * The kSKMinTermLength constant is an optional key in the text
  220. * analysis properties dictionary whose corresponding value is a
  221. * CFNumber object containing the minimum term length to index. If
  222. * this key is not present, SearchKit indexing defaults to a minimum
  223. * term length of 1.
  224. *
  225. * Availability:
  226. * Mac OS X: in version 10.3 and later in CoreServices.framework
  227. * CarbonLib: not available
  228. * Non-Carbon CFM: not available
  229. }
  230. var kSKMinTermLength: CFStringRef; external name '_kSKMinTermLength'; (* attribute const *)
  231. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  232. {
  233. * kSKSubstitutions
  234. *
  235. * Summary:
  236. * A dictionary of term substitutions.
  237. *
  238. * Discussion:
  239. * The kSKSubstitutions constant is an optional key in the text
  240. * analysis properties dictionary whose corresponding value is a
  241. * CFDictionary object containing term substitutions.
  242. *
  243. * Availability:
  244. * Mac OS X: in version 10.3 and later in CoreServices.framework
  245. * CarbonLib: not available
  246. * Non-Carbon CFM: not available
  247. }
  248. var kSKSubstitutions: CFStringRef; external name '_kSKSubstitutions'; (* attribute const *)
  249. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  250. {
  251. * kSKStopWords
  252. *
  253. * Summary:
  254. * A set of stop words--words not to index.
  255. *
  256. * Discussion:
  257. * The kSKStopWords constant is an optional key in the text analysis
  258. * properties dictionary whose corresponding value is a CFSet object
  259. * containing words not to index.
  260. *
  261. * Availability:
  262. * Mac OS X: in version 10.3 and later in CoreServices.framework
  263. * CarbonLib: not available
  264. * Non-Carbon CFM: not available
  265. }
  266. var kSKStopWords: CFStringRef; external name '_kSKStopWords'; (* attribute const *)
  267. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  268. {
  269. * kSKProximityIndexing
  270. *
  271. * Summary:
  272. * The proximity indexing option.
  273. *
  274. * Discussion:
  275. * The kSKProximityIndexing constant is an optional key in the text
  276. * analysis properties dictionary whose corresponding value is a
  277. * CFBoolean object containing the proximity indexing option. If
  278. * this key is not present, SearchKit indexing defaults to not doing
  279. * proximity indexing.
  280. *
  281. * Availability:
  282. * Mac OS X: in version 10.4 and later in CoreServices.framework
  283. * CarbonLib: not available
  284. * Non-Carbon CFM: not available
  285. }
  286. var kSKProximityIndexing: CFStringRef; external name '_kSKProximityIndexing'; (* attribute const *)
  287. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  288. {
  289. * kSKMaximumTerms
  290. *
  291. * Summary:
  292. * The maximum unique terms per document to index.
  293. *
  294. * Discussion:
  295. * The kSKMaximumTerms constant is an optional key in the text
  296. * analysis properties dictionary whose corresponding value is a
  297. * CFNumber object containing the maximum unique terms per document
  298. * to index. If this key is not present, SearchKit indexing defaults
  299. * to 2000. If the value of this key is zero, there is no limit of
  300. * the maximum unique terms per document to index.
  301. *
  302. * Availability:
  303. * Mac OS X: in version 10.4 and later in CoreServices.framework
  304. * CarbonLib: not available
  305. * Non-Carbon CFM: not available
  306. }
  307. var kSKMaximumTerms: CFStringRef; external name '_kSKMaximumTerms'; (* attribute const *)
  308. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  309. {
  310. * kSKTermChars
  311. *
  312. * Summary:
  313. * The extra valid characters for indexing.
  314. *
  315. * Discussion:
  316. * The kSKTermCharSet constant is an optional key in the text
  317. * analysis properties dictionary whose corresponding value is a
  318. * CFString object containing the extra valid characters that a
  319. * valid term (word) can contain. Used for indexing and query
  320. * processing.
  321. *
  322. * Availability:
  323. * Mac OS X: in version 10.4 and later in CoreServices.framework
  324. * CarbonLib: not available
  325. * Non-Carbon CFM: not available
  326. }
  327. var kSKTermChars: CFStringRef; external name '_kSKTermChars'; (* attribute const *)
  328. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  329. {
  330. * kSKStartTermChars
  331. *
  332. * Summary:
  333. * The extra valid characters for indexing.
  334. *
  335. * Discussion:
  336. * The kSKStartTermChars constant is an optional key in the text
  337. * analysis properties dictionary whose corresponding value is a
  338. * CFString object containing the extra valid characters that can
  339. * occur as the first character of a term. Overrides the
  340. * kSKTermChars for the first character of a term.
  341. *
  342. * Availability:
  343. * Mac OS X: in version 10.4 and later in CoreServices.framework
  344. * CarbonLib: not available
  345. * Non-Carbon CFM: not available
  346. }
  347. var kSKStartTermChars: CFStringRef; external name '_kSKStartTermChars'; (* attribute const *)
  348. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  349. {
  350. * kSKEndTermChars
  351. *
  352. * Summary:
  353. * The extra valid characters for indexing.
  354. *
  355. * Discussion:
  356. * The kSKEndTermChars constant is an optional key in the text
  357. * analysis properties dictionary whose corresponding value is a
  358. * CFString object containing the extra valid characters that can
  359. * occur as the last character of a term. Overrides the kSKTermChars
  360. * for the last character of a term.
  361. *
  362. * Availability:
  363. * Mac OS X: in version 10.4 and later in CoreServices.framework
  364. * CarbonLib: not available
  365. * Non-Carbon CFM: not available
  366. }
  367. var kSKEndTermChars: CFStringRef; external name '_kSKEndTermChars'; (* attribute const *)
  368. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  369. {
  370. * kSKLanguageTypes *** DEPRECATED ***
  371. *
  372. * Summary:
  373. * An array of string objects that specify the languages to use for
  374. * indexing.
  375. *
  376. * Discussion:
  377. * The kSKLanguageTypes constant is an optional key in the text
  378. * analysis properties dictionary whose corresponding value is an
  379. * array of string objects that together specify the languages to
  380. * use for indexing. Each string should be a two character ISO 639-1
  381. * code indicating a language to use. For example, 'en' for English,
  382. * 'ja' for Japanese, and so on. If this key is not present,
  383. * SearchKit uses the Mac OS X preferences system to determine the
  384. * primary language from the user's locale.
  385. *
  386. * Availability:
  387. * Mac OS X: in version 10.3 and later in CoreServices.framework but deprecated in 10.4
  388. * CarbonLib: not available
  389. * Non-Carbon CFM: not available
  390. }
  391. var kSKLanguageTypes: CFStringRef; external name '_kSKLanguageTypes'; (* attribute const *)
  392. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  393. {$endc} {TARGET_OS_MAC}
  394. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  395. end.
  396. {$endc} {not MACOSALLINCLUDE}