CFCharacterSet.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. { CFCharacterSet.h
  2. Copyright (c) 1999-2009, Apple, Inc. All rights reserved.
  3. }
  4. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, September 2005 }
  5. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  6. {
  7. Modified for use with Free Pascal
  8. Version 308
  9. Please report any bugs to <[email protected]>
  10. }
  11. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  12. {$mode macpas}
  13. {$packenum 1}
  14. {$macro on}
  15. {$inline on}
  16. {$calling mwpascal}
  17. unit CFCharacterSet;
  18. interface
  19. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  20. {$setc GAP_INTERFACES_VERSION := $0308}
  21. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  22. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  23. {$endc}
  24. {$ifc defined CPUPOWERPC and defined CPUI386}
  25. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  26. {$endc}
  27. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  28. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  29. {$endc}
  30. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  31. {$setc __ppc__ := 1}
  32. {$elsec}
  33. {$setc __ppc__ := 0}
  34. {$endc}
  35. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  36. {$setc __ppc64__ := 1}
  37. {$elsec}
  38. {$setc __ppc64__ := 0}
  39. {$endc}
  40. {$ifc not defined __i386__ and defined CPUI386}
  41. {$setc __i386__ := 1}
  42. {$elsec}
  43. {$setc __i386__ := 0}
  44. {$endc}
  45. {$ifc not defined __x86_64__ and defined CPUX86_64}
  46. {$setc __x86_64__ := 1}
  47. {$elsec}
  48. {$setc __x86_64__ := 0}
  49. {$endc}
  50. {$ifc not defined __arm__ and defined CPUARM}
  51. {$setc __arm__ := 1}
  52. {$elsec}
  53. {$setc __arm__ := 0}
  54. {$endc}
  55. {$ifc defined cpu64}
  56. {$setc __LP64__ := 1}
  57. {$elsec}
  58. {$setc __LP64__ := 0}
  59. {$endc}
  60. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  61. {$error Conflicting definitions for __ppc__ and __i386__}
  62. {$endc}
  63. {$ifc defined __ppc__ and __ppc__}
  64. {$setc TARGET_CPU_PPC := TRUE}
  65. {$setc TARGET_CPU_PPC64 := FALSE}
  66. {$setc TARGET_CPU_X86 := FALSE}
  67. {$setc TARGET_CPU_X86_64 := FALSE}
  68. {$setc TARGET_CPU_ARM := FALSE}
  69. {$setc TARGET_OS_MAC := TRUE}
  70. {$setc TARGET_OS_IPHONE := FALSE}
  71. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  72. {$elifc defined __ppc64__ and __ppc64__}
  73. {$setc TARGET_CPU_PPC := TFALSE}
  74. {$setc TARGET_CPU_PPC64 := TRUE}
  75. {$setc TARGET_CPU_X86 := FALSE}
  76. {$setc TARGET_CPU_X86_64 := FALSE}
  77. {$setc TARGET_CPU_ARM := FALSE}
  78. {$setc TARGET_OS_MAC := TRUE}
  79. {$setc TARGET_OS_IPHONE := FALSE}
  80. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  81. {$elifc defined __i386__ and __i386__}
  82. {$setc TARGET_CPU_PPC := FALSE}
  83. {$setc TARGET_CPU_PPC64 := FALSE}
  84. {$setc TARGET_CPU_X86 := TRUE}
  85. {$setc TARGET_CPU_X86_64 := FALSE}
  86. {$setc TARGET_CPU_ARM := FALSE}
  87. {$ifc defined(iphonesim)}
  88. {$setc TARGET_OS_MAC := FALSE}
  89. {$setc TARGET_OS_IPHONE := TRUE}
  90. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  91. {$elsec}
  92. {$setc TARGET_OS_MAC := TRUE}
  93. {$setc TARGET_OS_IPHONE := FALSE}
  94. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  95. {$endc}
  96. {$elifc defined __x86_64__ and __x86_64__}
  97. {$setc TARGET_CPU_PPC := FALSE}
  98. {$setc TARGET_CPU_PPC64 := FALSE}
  99. {$setc TARGET_CPU_X86 := FALSE}
  100. {$setc TARGET_CPU_X86_64 := TRUE}
  101. {$setc TARGET_CPU_ARM := FALSE}
  102. {$setc TARGET_OS_MAC := TRUE}
  103. {$setc TARGET_OS_IPHONE := FALSE}
  104. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  105. {$elifc defined __arm__ and __arm__}
  106. {$setc TARGET_CPU_PPC := FALSE}
  107. {$setc TARGET_CPU_PPC64 := FALSE}
  108. {$setc TARGET_CPU_X86 := FALSE}
  109. {$setc TARGET_CPU_X86_64 := FALSE}
  110. {$setc TARGET_CPU_ARM := TRUE}
  111. { will require compiler define when/if other Apple devices with ARM cpus ship }
  112. {$setc TARGET_OS_MAC := FALSE}
  113. {$setc TARGET_OS_IPHONE := TRUE}
  114. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  115. {$elsec}
  116. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  117. {$endc}
  118. {$ifc defined __LP64__ and __LP64__ }
  119. {$setc TARGET_CPU_64 := TRUE}
  120. {$elsec}
  121. {$setc TARGET_CPU_64 := FALSE}
  122. {$endc}
  123. {$ifc defined FPC_BIG_ENDIAN}
  124. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  125. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  126. {$elifc defined FPC_LITTLE_ENDIAN}
  127. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  128. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  129. {$elsec}
  130. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  131. {$endc}
  132. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  133. {$setc CALL_NOT_IN_CARBON := FALSE}
  134. {$setc OLDROUTINENAMES := FALSE}
  135. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  136. {$setc OPAQUE_UPP_TYPES := TRUE}
  137. {$setc OTCARBONAPPLICATION := TRUE}
  138. {$setc OTKERNEL := FALSE}
  139. {$setc PM_USE_SESSION_APIS := TRUE}
  140. {$setc TARGET_API_MAC_CARBON := TRUE}
  141. {$setc TARGET_API_MAC_OS8 := FALSE}
  142. {$setc TARGET_API_MAC_OSX := TRUE}
  143. {$setc TARGET_CARBON := TRUE}
  144. {$setc TARGET_CPU_68K := FALSE}
  145. {$setc TARGET_CPU_MIPS := FALSE}
  146. {$setc TARGET_CPU_SPARC := FALSE}
  147. {$setc TARGET_OS_UNIX := FALSE}
  148. {$setc TARGET_OS_WIN32 := FALSE}
  149. {$setc TARGET_RT_MAC_68881 := FALSE}
  150. {$setc TARGET_RT_MAC_CFM := FALSE}
  151. {$setc TARGET_RT_MAC_MACHO := TRUE}
  152. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  153. {$setc TYPE_BOOL := FALSE}
  154. {$setc TYPE_EXTENDED := FALSE}
  155. {$setc TYPE_LONGLONG := TRUE}
  156. uses MacTypes,CFBase,CFData;
  157. {$endc} {not MACOSALLINCLUDE}
  158. {$ALIGN POWER}
  159. {!
  160. @header CFCharacterSet
  161. CFCharacterSet represents a set, or a bag, of Unicode characters.
  162. The API consists of 3 groups:
  163. 1) creation/manipulation of CFCharacterSet instances,
  164. 2) query of a single Unicode character membership,
  165. and 3) bitmap representation related (reading/writing).
  166. Conceptually, CFCharacterSet is a 136K byte bitmap array of
  167. which each bit represents a Unicode code point. It could
  168. contain the Unicode characters in ISO 10646 Basic Multilingual
  169. Plane (BMP) and characters in Plane 1 through Plane 16
  170. accessible via surrogate paris in the Unicode Transformation
  171. Format, 16-bit encoding form (UTF-16). In other words, it can
  172. store values from 0x00000 to 0x10FFFF in the Unicode
  173. Transformation Format, 32-bit encoding form (UTF-32). However,
  174. in general, how CFCharacterSet stores the information is an
  175. implementation detail. Note even CFData used for the external
  176. bitmap representation rarely has 136K byte. For detailed
  177. discussion of the external bitmap representation, refer to the
  178. comments for CFCharacterSetCreateWithBitmapRepresentation below.
  179. Note that the existance of non-BMP characters in a character set
  180. does not imply the membership of the corresponding surrogate
  181. characters. For example, a character set with U+10000 does not
  182. match with U+D800.
  183. }
  184. {!
  185. @typedef CFCharacterSetRef
  186. This is the type of a reference to immutable CFCharacterSets.
  187. }
  188. type
  189. CFCharacterSetRef = ^SInt32; { an opaque type }
  190. CFCharacterSetRefPtr = ^CFCharacterSetRef;
  191. {!
  192. @typedef CFMutableCharacterSetRef
  193. This is the type of a reference to mutable CFMutableCharacterSets.
  194. }
  195. type
  196. CFMutableCharacterSetRef = CFCharacterSetRef;
  197. CFMutableCharacterSetRefPtr = ^CFMutableCharacterSetRef;
  198. {!
  199. @typedef CFCharacterSetPredefinedSet
  200. Type of the predefined CFCharacterSet selector values.
  201. }
  202. type
  203. CFCharacterSetPredefinedSet = SIGNEDLONG;
  204. const
  205. kCFCharacterSetControl = 1; { Control character set (Unicode General Category Cc and Cf) }
  206. kCFCharacterSetWhitespace = 2; { Whitespace character set (Unicode General Category Zs and U0009 CHARACTER TABULATION) }
  207. kCFCharacterSetWhitespaceAndNewline = 3; { Whitespace and Newline character set (Unicode General Category Z*, U000A ~ U000D, and U0085) }
  208. kCFCharacterSetDecimalDigit = 4; { Decimal digit character set }
  209. kCFCharacterSetLetter = 5; { Letter character set (Unicode General Category L* & M*) }
  210. kCFCharacterSetLowercaseLetter = 6; { Lowercase character set (Unicode General Category Ll) }
  211. kCFCharacterSetUppercaseLetter = 7; { Uppercase character set (Unicode General Category Lu and Lt) }
  212. kCFCharacterSetNonBase = 8; { Non-base character set (Unicode General Category M*) }
  213. kCFCharacterSetDecomposable = 9; { Canonically decomposable character set }
  214. kCFCharacterSetAlphaNumeric = 10; { Alpha Numeric character set (Unicode General Category L*, M*, & N*) }
  215. kCFCharacterSetPunctuation = 11; { Punctuation character set (Unicode General Category P*) }
  216. kCFCharacterSetIllegal = 12; { Illegal character set }
  217. {#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
  218. kCFCharacterSetCapitalizedLetter = 13; { Titlecase character set (Unicode General Category Lt) }
  219. {#endif}
  220. {#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
  221. kCFCharacterSetSymbol = 14; { Symbol character set (Unicode General Category S*) }
  222. {#endif}
  223. {!
  224. @function CFCharacterSetGetTypeID
  225. Returns the type identifier of all CFCharacterSet instances.
  226. }
  227. function CFCharacterSetGetTypeID: CFTypeID; external name '_CFCharacterSetGetTypeID';
  228. {!
  229. @function CFCharacterSetGetPredefined
  230. Returns a predefined CFCharacterSet instance.
  231. @param theSetIdentifier The CFCharacterSetPredefinedSet selector
  232. which specifies the predefined character set. If the
  233. value is not in CFCharacterSetPredefinedSet, the behavior
  234. is undefined.
  235. @result A reference to the predefined immutable CFCharacterSet.
  236. This instance is owned by CF.
  237. }
  238. function CFCharacterSetGetPredefined( theSetIdentifier: CFCharacterSetPredefinedSet ): CFCharacterSetRef; external name '_CFCharacterSetGetPredefined';
  239. {!
  240. @function CFCharacterSetCreateWithCharactersInRange
  241. Creates a new immutable character set with the values from the given range.
  242. @param alloc The CFAllocator which should be used to allocate
  243. memory for the array and its storage for values. This
  244. parameter may be NULL in which case the current default
  245. CFAllocator is used. If this reference is not a valid
  246. CFAllocator, the behavior is undefined.
  247. @param theRange The CFRange which should be used to specify the
  248. Unicode range the character set is filled with. It
  249. accepts the range in 32-bit in the UTF-32 format. The
  250. valid character point range is from 0x00000 to 0x10FFFF.
  251. If the range is outside of the valid Unicode character
  252. point, the behavior is undefined.
  253. @result A reference to the new immutable CFCharacterSet.
  254. }
  255. function CFCharacterSetCreateWithCharactersInRange( alloc: CFAllocatorRef; theRange: CFRange ): CFCharacterSetRef; external name '_CFCharacterSetCreateWithCharactersInRange';
  256. {!
  257. @function CFCharacterSetCreateWithCharactersInString
  258. Creates a new immutable character set with the values in the given string.
  259. @param alloc The CFAllocator which should be used to allocate
  260. memory for the array and its storage for values. This
  261. parameter may be NULL in which case the current default
  262. CFAllocator is used. If this reference is not a valid
  263. CFAllocator, the behavior is undefined.
  264. @param theString The CFString which should be used to specify
  265. the Unicode characters the character set is filled with.
  266. If this parameter is not a valid CFString, the behavior
  267. is undefined.
  268. @result A reference to the new immutable CFCharacterSet.
  269. }
  270. function CFCharacterSetCreateWithCharactersInString( alloc: CFAllocatorRef; theString: CFStringRef ): CFCharacterSetRef; external name '_CFCharacterSetCreateWithCharactersInString';
  271. {!
  272. @function CFCharacterSetCreateWithBitmapRepresentation
  273. Creates a new immutable character set with the bitmap representtion in the given data.
  274. @param alloc The CFAllocator which should be used to allocate
  275. memory for the array and its storage for values. This
  276. parameter may be NULL in which case the current default
  277. CFAllocator is used. If this reference is not a valid
  278. CFAllocator, the behavior is undefined.
  279. @param theData The CFData which should be used to specify the
  280. bitmap representation of the Unicode character points
  281. the character set is filled with. The bitmap
  282. representation could contain all the Unicode character
  283. range starting from BMP to Plane 16. The first 8192 bytes
  284. of the data represents the BMP range. The BMP range 8192
  285. bytes can be followed by zero to sixteen 8192 byte
  286. bitmaps, each one with the plane index byte prepended.
  287. For example, the bitmap representing the BMP and Plane 2
  288. has the size of 16385 bytes (8192 bytes for BMP, 1 byte
  289. index + 8192 bytes bitmap for Plane 2). The plane index
  290. byte, in this case, contains the integer value two. If
  291. this parameter is not a valid CFData or it contains a
  292. Plane index byte outside of the valid Plane range
  293. (1 to 16), the behavior is undefined.
  294. @result A reference to the new immutable CFCharacterSet.
  295. }
  296. function CFCharacterSetCreateWithBitmapRepresentation( alloc: CFAllocatorRef; theData: CFDataRef ): CFCharacterSetRef; external name '_CFCharacterSetCreateWithBitmapRepresentation';
  297. {#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
  298. {!
  299. @function CFCharacterSetCreateInvertedSet
  300. Creates a new immutable character set that is the invert of the specified character set.
  301. @param alloc The CFAllocator which should be used to allocate
  302. memory for the array and its storage for values. This
  303. parameter may be NULL in which case the current default
  304. CFAllocator is used. If this reference is not a valid
  305. CFAllocator, the behavior is undefined.
  306. @param theSet The CFCharacterSet which is to be inverted. If this
  307. parameter is not a valid CFCharacterSet, the behavior is
  308. undefined.
  309. @result A reference to the new immutable CFCharacterSet.
  310. }
  311. function CFCharacterSetCreateInvertedSet( alloc: CFAllocatorRef; theSet: CFCharacterSetRef ): CFCharacterSetRef; external name '_CFCharacterSetCreateInvertedSet';
  312. {!
  313. @function CFCharacterSetIsSupersetOfSet
  314. Reports whether or not the character set is a superset of the character set specified as the second parameter.
  315. @param theSet The character set to be checked for the membership of theOtherSet.
  316. If this parameter is not a valid CFCharacterSet, the behavior is undefined.
  317. @param theOtherset The character set to be checked whether or not it is a subset of theSet.
  318. If this parameter is not a valid CFCharacterSet, the behavior is undefined.
  319. }
  320. function CFCharacterSetIsSupersetOfSet( theSet: CFCharacterSetRef; theOtherset: CFCharacterSetRef ): Boolean; external name '_CFCharacterSetIsSupersetOfSet';
  321. {!
  322. @function CFCharacterSetHasMemberInPlane
  323. Reports whether or not the character set contains at least one member character in the specified plane.
  324. @param theSet The character set to be checked for the membership. If this
  325. parameter is not a valid CFCharacterSet, the behavior is undefined.
  326. @param thePlane The plane number to be checked for the membership.
  327. The valid value range is from 0 to 16. If the value is outside of the valid
  328. plane number range, the behavior is undefined.
  329. }
  330. function CFCharacterSetHasMemberInPlane( theSet: CFCharacterSetRef; thePlane: CFIndex ): Boolean; external name '_CFCharacterSetHasMemberInPlane';
  331. {#endif}
  332. {!
  333. @function CFCharacterSetCreateMutable
  334. Creates a new empty mutable character set.
  335. @param allocator The CFAllocator which should be used to allocate
  336. memory for the array and its storage for values. This
  337. parameter may be NULL in which case the current default
  338. CFAllocator is used. If this reference is not a valid
  339. CFAllocator, the behavior is undefined.
  340. @result A reference to the new mutable CFCharacterSet.
  341. }
  342. function CFCharacterSetCreateMutable( alloc: CFAllocatorRef ): CFMutableCharacterSetRef; external name '_CFCharacterSetCreateMutable';
  343. {#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
  344. {!
  345. @function CFCharacterSetCreateCopy
  346. Creates a new character set with the values from the given character set. This function tries to compact the backing store where applicable.
  347. @param allocator The CFAllocator which should be used to allocate
  348. memory for the array and its storage for values. This
  349. parameter may be NULL in which case the current default
  350. CFAllocator is used. If this reference is not a valid
  351. CFAllocator, the behavior is undefined.
  352. @param theSet The CFCharacterSet which is to be copied. If this
  353. parameter is not a valid CFCharacterSet, the behavior is
  354. undefined.
  355. @result A reference to the new CFCharacterSet.
  356. }
  357. function CFCharacterSetCreateCopy( alloc: CFAllocatorRef; theSet: CFCharacterSetRef ): CFCharacterSetRef; external name '_CFCharacterSetCreateCopy';
  358. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  359. {#endif} { MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED }
  360. {!
  361. @function CFCharacterSetCreateMutableCopy
  362. Creates a new mutable character set with the values from the given character set.
  363. @param allocator The CFAllocator which should be used to allocate
  364. memory for the array and its storage for values. This
  365. parameter may be NULL in which case the current default
  366. CFAllocator is used. If this reference is not a valid
  367. CFAllocator, the behavior is undefined.
  368. @param theSet The CFCharacterSet which is to be copied. If this
  369. parameter is not a valid CFCharacterSet, the behavior is
  370. undefined.
  371. @result A reference to the new mutable CFCharacterSet.
  372. }
  373. function CFCharacterSetCreateMutableCopy( alloc: CFAllocatorRef; theSet: CFCharacterSetRef ): CFMutableCharacterSetRef; external name '_CFCharacterSetCreateMutableCopy';
  374. {!
  375. @function CFCharacterSetIsCharacterMember
  376. Reports whether or not the Unicode character is in the character set.
  377. @param theSet The character set to be searched. If this parameter
  378. is not a valid CFCharacterSet, the behavior is undefined.
  379. @param theChar The Unicode character for which to test against the
  380. character set. Note that this function takes 16-bit Unicode
  381. character value; hence, it does not support access to the
  382. non-BMP planes.
  383. @result true, if the value is in the character set, otherwise false.
  384. }
  385. function CFCharacterSetIsCharacterMember( theSet: CFCharacterSetRef; theChar: UniChar ): Boolean; external name '_CFCharacterSetIsCharacterMember';
  386. {#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
  387. {!
  388. @function CFCharacterSetIsLongCharacterMember
  389. Reports whether or not the UTF-32 character is in the character set.
  390. @param theSet The character set to be searched. If this parameter
  391. is not a valid CFCharacterSet, the behavior is undefined.
  392. @param theChar The UTF-32 character for which to test against the
  393. character set.
  394. @result true, if the value is in the character set, otherwise false.
  395. }
  396. function CFCharacterSetIsLongCharacterMember( theSet: CFCharacterSetRef; theChar: UTF32Char ): Boolean; external name '_CFCharacterSetIsLongCharacterMember';
  397. {#endif}
  398. {!
  399. @function CFCharacterSetCreateBitmapRepresentation
  400. Creates a new immutable data with the bitmap representation from the given character set.
  401. @param allocator The CFAllocator which should be used to allocate
  402. memory for the array and its storage for values. This
  403. parameter may be NULL in which case the current default
  404. CFAllocator is used. If this reference is not a valid
  405. CFAllocator, the behavior is undefined.
  406. @param theSet The CFCharacterSet which is to be used create the
  407. bitmap representation from. Refer to the comments for
  408. CFCharacterSetCreateWithBitmapRepresentation for the
  409. detailed discussion of the bitmap representation format.
  410. If this parameter is not a valid CFCharacterSet, the
  411. behavior is undefined.
  412. @result A reference to the new immutable CFData.
  413. }
  414. function CFCharacterSetCreateBitmapRepresentation( alloc: CFAllocatorRef; theSet: CFCharacterSetRef ): CFDataRef; external name '_CFCharacterSetCreateBitmapRepresentation';
  415. {!
  416. @function CFCharacterSetAddCharactersInRange
  417. Adds the given range to the charaacter set.
  418. @param theSet The character set to which the range is to be added.
  419. If this parameter is not a valid mutable CFCharacterSet,
  420. the behavior is undefined.
  421. @param theRange The range to add to the character set. It accepts
  422. the range in 32-bit in the UTF-32 format. The valid
  423. character point range is from 0x00000 to 0x10FFFF. If the
  424. range is outside of the valid Unicode character point,
  425. the behavior is undefined.
  426. }
  427. procedure CFCharacterSetAddCharactersInRange( theSet: CFMutableCharacterSetRef; theRange: CFRange ); external name '_CFCharacterSetAddCharactersInRange';
  428. {!
  429. @function CFCharacterSetRemoveCharactersInRange
  430. Removes the given range from the charaacter set.
  431. @param theSet The character set from which the range is to be
  432. removed. If this parameter is not a valid mutable
  433. CFCharacterSet, the behavior is undefined.
  434. @param theRange The range to remove from the character set.
  435. It accepts the range in 32-bit in the UTF-32 format.
  436. The valid character point range is from 0x00000 to 0x10FFFF.
  437. If the range is outside of the valid Unicode character point,
  438. the behavior is undefined.
  439. }
  440. procedure CFCharacterSetRemoveCharactersInRange( theSet: CFMutableCharacterSetRef; theRange: CFRange ); external name '_CFCharacterSetRemoveCharactersInRange';
  441. {!
  442. @function CFCharacterSetAddCharactersInString
  443. Adds the characters in the given string to the charaacter set.
  444. @param theSet The character set to which the characters in the
  445. string are to be added. If this parameter is not a
  446. valid mutable CFCharacterSet, the behavior is undefined.
  447. @param theString The string to add to the character set.
  448. If this parameter is not a valid CFString, the behavior
  449. is undefined.
  450. }
  451. procedure CFCharacterSetAddCharactersInString( theSet: CFMutableCharacterSetRef; theString: CFStringRef ); external name '_CFCharacterSetAddCharactersInString';
  452. {!
  453. @function CFCharacterSetRemoveCharactersInString
  454. Removes the characters in the given string from the charaacter set.
  455. @param theSet The character set from which the characters in the
  456. string are to be remove. If this parameter is not a
  457. valid mutable CFCharacterSet, the behavior is undefined.
  458. @param theString The string to remove from the character set.
  459. If this parameter is not a valid CFString, the behavior
  460. is undefined.
  461. }
  462. procedure CFCharacterSetRemoveCharactersInString( theSet: CFMutableCharacterSetRef; theString: CFStringRef ); external name '_CFCharacterSetRemoveCharactersInString';
  463. {!
  464. @function CFCharacterSetUnion
  465. Forms the union with the given character set.
  466. @param theSet The destination character set into which the
  467. union of the two character sets is stored. If this
  468. parameter is not a valid mutable CFCharacterSet, the
  469. behavior is undefined.
  470. @param theOtherSet The character set with which the union is
  471. formed. If this parameter is not a valid CFCharacterSet,
  472. the behavior is undefined.
  473. }
  474. procedure CFCharacterSetUnion( theSet: CFMutableCharacterSetRef; theOtherSet: CFCharacterSetRef ); external name '_CFCharacterSetUnion';
  475. {!
  476. @function CFCharacterSetIntersect
  477. Forms the intersection with the given character set.
  478. @param theSet The destination character set into which the
  479. intersection of the two character sets is stored.
  480. If this parameter is not a valid mutable CFCharacterSet,
  481. the behavior is undefined.
  482. @param theOtherSet The character set with which the intersection
  483. is formed. If this parameter is not a valid CFCharacterSet,
  484. the behavior is undefined.
  485. }
  486. procedure CFCharacterSetIntersect( theSet: CFMutableCharacterSetRef; theOtherSet: CFCharacterSetRef ); external name '_CFCharacterSetIntersect';
  487. {!
  488. @function CFCharacterSetInvert
  489. Inverts the content of the given character set.
  490. @param theSet The character set to be inverted.
  491. If this parameter is not a valid mutable CFCharacterSet,
  492. the behavior is undefined.
  493. }
  494. procedure CFCharacterSetInvert( theSet: CFMutableCharacterSetRef ); external name '_CFCharacterSetInvert';
  495. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  496. end.
  497. {$endc} {not MACOSALLINCLUDE}