@swiftbrowser/wasm-sdk-foundation 0.0.0-stage → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/LICENSE.txt +1445 -0
  2. package/README.md +24 -2
  3. package/files.json +366 -0
  4. package/package.json +18 -4
  5. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/HTMLparser.h +320 -0
  6. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/HTMLtree.h +147 -0
  7. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/SAX.h +204 -0
  8. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/SAX2.h +173 -0
  9. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/c14n.h +128 -0
  10. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/catalog.h +182 -0
  11. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/chvalid.h +230 -0
  12. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/debugXML.h +217 -0
  13. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/dict.h +81 -0
  14. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/encoding.h +233 -0
  15. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/entities.h +151 -0
  16. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/globals.h +529 -0
  17. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/hash.h +236 -0
  18. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/list.h +137 -0
  19. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/nanoftp.h +186 -0
  20. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/nanohttp.h +81 -0
  21. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/parser.h +1265 -0
  22. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/parserInternals.h +662 -0
  23. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/pattern.h +100 -0
  24. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/relaxng.h +218 -0
  25. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/schemasInternals.h +958 -0
  26. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/schematron.h +142 -0
  27. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/threads.h +94 -0
  28. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/tree.h +1314 -0
  29. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/uri.h +94 -0
  30. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/valid.h +448 -0
  31. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xinclude.h +129 -0
  32. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xlink.h +189 -0
  33. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlIO.h +369 -0
  34. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlautomata.h +146 -0
  35. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlerror.h +919 -0
  36. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlexports.h +50 -0
  37. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlmemory.h +228 -0
  38. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlmodule.h +57 -0
  39. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlreader.h +428 -0
  40. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlregexp.h +222 -0
  41. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlsave.h +88 -0
  42. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlschemas.h +246 -0
  43. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlschemastypes.h +152 -0
  44. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlstring.h +140 -0
  45. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlunicode.h +202 -0
  46. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlversion.h +526 -0
  47. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlwriter.h +488 -0
  48. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xpath.h +575 -0
  49. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xpathInternals.h +632 -0
  50. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xpointer.h +137 -0
  51. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFArray.h +673 -0
  52. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFAttributedString.h +157 -0
  53. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFAttributedStringPriv.h +25 -0
  54. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFAvailability.h +236 -0
  55. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBag.h +97 -0
  56. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBase.h +702 -0
  57. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBigNumber.h +76 -0
  58. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBinaryHeap.h +294 -0
  59. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBitVector.h +49 -0
  60. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBundle.h +349 -0
  61. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBundlePriv.h +334 -0
  62. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBundle_BinaryTypes.h +61 -0
  63. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBurstTrie.h +181 -0
  64. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFByteOrder.h +305 -0
  65. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCalendar.h +116 -0
  66. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCalendarPriv.h +52 -0
  67. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCharacterSet.h +387 -0
  68. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCharacterSetPriv.h +78 -0
  69. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFConstantKeys.h +128 -0
  70. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFData.h +79 -0
  71. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDate.h +113 -0
  72. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateComponents.h +92 -0
  73. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateFormatter.h +193 -0
  74. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateFormatter_Private.h +31 -0
  75. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateInterval.h +62 -0
  76. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateIntervalFormatter.h +96 -0
  77. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDictionary.h +674 -0
  78. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFError.h +183 -0
  79. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFError_Private.h +27 -0
  80. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFKnownLocations.h +42 -0
  81. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFListFormatter.h +32 -0
  82. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLocale.h +204 -0
  83. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLocale_Private.h +35 -0
  84. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLocking.h +124 -0
  85. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLogUtilities.h +52 -0
  86. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFMachPort.h +53 -0
  87. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFMessagePort.h +66 -0
  88. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNotificationCenter.h +81 -0
  89. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNumber.h +129 -0
  90. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNumberFormatter.h +174 -0
  91. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNumber_Private.h +30 -0
  92. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFOverflow.h +88 -0
  93. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPlugIn.h +124 -0
  94. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPlugInCOM.h +117 -0
  95. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPreferences.h +130 -0
  96. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPriv.h +721 -0
  97. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPropertyList.h +151 -0
  98. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPropertyList_Private.h +19 -0
  99. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRegularExpression.h +68 -0
  100. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRelativeDateTimeFormatter.h +61 -0
  101. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRunArray.h +57 -0
  102. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRunLoop.h +203 -0
  103. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRuntime.h +281 -0
  104. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFSet.h +491 -0
  105. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFSocket.h +220 -0
  106. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStorage.h +296 -0
  107. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStream.h +505 -0
  108. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStreamAbstract.h +181 -0
  109. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStreamPriv.h +126 -0
  110. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFString.h +915 -0
  111. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringDefaultEncoding.h +45 -0
  112. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingConverter.h +82 -0
  113. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingConverterExt.h +121 -0
  114. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingConverterPriv.h +47 -0
  115. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingDatabase.h +23 -0
  116. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingExt.h +184 -0
  117. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFString_Private.h +32 -0
  118. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFTargetConditionals.h +284 -0
  119. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFTimeZone.h +98 -0
  120. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFTree.h +330 -0
  121. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURL.h +1256 -0
  122. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURLAccess.h +128 -0
  123. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURLComponents.h +123 -0
  124. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURLPriv.h +879 -0
  125. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUUID.h +78 -0
  126. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUniChar.h +244 -0
  127. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUnicodeDecomposition.h +35 -0
  128. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUnicodePrecomposition.h +23 -0
  129. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUserNotification.h +185 -0
  130. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUtilities.h +27 -0
  131. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CoreFoundation.h +105 -0
  132. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/ForFoundationOnly.h +816 -0
  133. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/ForSwiftFoundationOnly.h +689 -0
  134. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/module.modulemap +8 -0
  135. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/static-module.map +7 -0
  136. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/CFUniCharBitmapData.h +17 -0
  137. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/CFUniCharBitmapData.inc.h +14707 -0
  138. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/CFUniCharBitmapDataAccess.h +16 -0
  139. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_CShimsMacros.h +24 -0
  140. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_CShimsTargetConditionals.h +56 -0
  141. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_CStdlib.h +169 -0
  142. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_FoundationCShims.h +32 -0
  143. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/bplist_shims.h +19 -0
  144. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/filemanager_shims.h +156 -0
  145. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/io_shims.h +89 -0
  146. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/module.modulemap +5 -0
  147. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/platform_shims.h +112 -0
  148. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/string_shims.h +52 -0
  149. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/uuid.h +81 -0
  150. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/alphaindex.h +766 -0
  151. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/appendable.h +239 -0
  152. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/basictz.h +248 -0
  153. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/brkiter.h +694 -0
  154. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/bytestream.h +307 -0
  155. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/bytestrie.h +568 -0
  156. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/bytestriebuilder.h +193 -0
  157. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/calendar.h +2609 -0
  158. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/caniter.h +215 -0
  159. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/casemap.h +497 -0
  160. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/char16ptr.h +384 -0
  161. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/chariter.h +734 -0
  162. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/choicfmt.h +601 -0
  163. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/coleitr.h +411 -0
  164. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/coll.h +1387 -0
  165. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/compactdecimalformat.h +196 -0
  166. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/curramt.h +133 -0
  167. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/currpinf.h +274 -0
  168. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/currunit.h +146 -0
  169. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/datefmt.h +968 -0
  170. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dbbi.h +48 -0
  171. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dcfmtsym.h +636 -0
  172. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/decimfmt.h +2233 -0
  173. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/displayoptions.h +270 -0
  174. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/docmain.h +247 -0
  175. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtfmtsym.h +1055 -0
  176. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtintrv.h +163 -0
  177. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtitvfmt.h +1231 -0
  178. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtitvinf.h +524 -0
  179. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtptngen.h +676 -0
  180. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtrule.h +256 -0
  181. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/edits.h +531 -0
  182. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/enumset.h +69 -0
  183. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/errorcode.h +144 -0
  184. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/fieldpos.h +298 -0
  185. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/filteredbrk.h +152 -0
  186. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/fmtable.h +758 -0
  187. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/format.h +316 -0
  188. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/formattednumber.h +215 -0
  189. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/formattedvalue.h +318 -0
  190. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/fpositer.h +124 -0
  191. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/gender.h +122 -0
  192. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/gregocal.h +737 -0
  193. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/icudataver.h +43 -0
  194. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/icuplug.h +391 -0
  195. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/idna.h +333 -0
  196. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/listformatter.h +291 -0
  197. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/localebuilder.h +309 -0
  198. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/localematcher.h +710 -0
  199. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/localpointer.h +609 -0
  200. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/locdspnm.h +211 -0
  201. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/locid.h +1293 -0
  202. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/measfmt.h +501 -0
  203. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/measunit.h +3928 -0
  204. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/measure.h +174 -0
  205. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/messagepattern.h +950 -0
  206. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/module.modulemap +209 -0
  207. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/msgfmt.h +1117 -0
  208. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/normalizer2.h +791 -0
  209. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/normlzr.h +816 -0
  210. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/nounit.h +86 -0
  211. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numberformatter.h +2862 -0
  212. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numberrangeformatter.h +802 -0
  213. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numfmt.h +1299 -0
  214. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numsys.h +220 -0
  215. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/parseerr.h +94 -0
  216. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/parsepos.h +237 -0
  217. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/platform.h +874 -0
  218. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/plurfmt.h +601 -0
  219. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/plurrule.h +591 -0
  220. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ptypes.h +66 -0
  221. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/putil.h +183 -0
  222. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rbbi.h +902 -0
  223. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rbnf.h +1153 -0
  224. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rbtz.h +373 -0
  225. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/regex.h +1882 -0
  226. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/region.h +229 -0
  227. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/reldatefmt.h +758 -0
  228. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rep.h +266 -0
  229. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/resbund.h +489 -0
  230. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/schriter.h +187 -0
  231. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/scientificnumberformatter.h +222 -0
  232. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/search.h +580 -0
  233. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/selfmt.h +374 -0
  234. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/simpleformatter.h +414 -0
  235. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/simplenumberformatter.h +326 -0
  236. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/simpletz.h +940 -0
  237. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/smpdtfmt.h +1383 -0
  238. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/sortkey.h +344 -0
  239. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/std_string.h +41 -0
  240. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/strenum.h +281 -0
  241. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stringoptions.h +190 -0
  242. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stringpiece.h +354 -0
  243. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stringtriebuilder.h +426 -0
  244. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stsearch.h +509 -0
  245. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/symtable.h +119 -0
  246. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tblcoll.h +886 -0
  247. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/timezone.h +1067 -0
  248. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tmunit.h +142 -0
  249. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tmutamt.h +174 -0
  250. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tmutfmt.h +238 -0
  251. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/translit.h +1593 -0
  252. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tzfmt.h +1102 -0
  253. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tznames.h +419 -0
  254. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tzrule.h +820 -0
  255. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tztrans.h +201 -0
  256. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ualoc.h +372 -0
  257. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uameasureformat.h +487 -0
  258. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uameasureunit.h +249 -0
  259. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uatimeunitformat.h +377 -0
  260. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uatimezone.h +114 -0
  261. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ubidi.h +2368 -0
  262. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ubiditransform.h +326 -0
  263. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ubrk.h +684 -0
  264. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucal.h +1825 -0
  265. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucasemap.h +388 -0
  266. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucat.h +160 -0
  267. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uchar.h +4410 -0
  268. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucharstrie.h +623 -0
  269. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucharstriebuilder.h +193 -0
  270. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uchriter.h +393 -0
  271. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uclean.h +262 -0
  272. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnv.h +2053 -0
  273. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnv_cb.h +164 -0
  274. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnv_err.h +465 -0
  275. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnvsel.h +193 -0
  276. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucol.h +1649 -0
  277. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucoleitr.h +344 -0
  278. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uconfig.h +501 -0
  279. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucpmap.h +158 -0
  280. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucptrie.h +645 -0
  281. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucsdet.h +426 -0
  282. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucurr.h +466 -0
  283. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udat.h +1767 -0
  284. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udata.h +454 -0
  285. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udateintervalformat.h +458 -0
  286. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udatintv.h +146 -0
  287. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udatpg.h +806 -0
  288. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udisplaycontext.h +233 -0
  289. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udisplayoptions.h +321 -0
  290. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uenum.h +209 -0
  291. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ufieldpositer.h +123 -0
  292. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uformattable.h +290 -0
  293. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uformattednumber.h +224 -0
  294. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uformattedvalue.h +445 -0
  295. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ugender.h +86 -0
  296. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uidna.h +794 -0
  297. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uiter.h +709 -0
  298. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uldnames.h +307 -0
  299. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulistformatter.h +333 -0
  300. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uloc.h +1437 -0
  301. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulocale.h +226 -0
  302. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulocbuilder.h +437 -0
  303. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulocdata.h +299 -0
  304. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umachine.h +491 -0
  305. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umisc.h +62 -0
  306. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umsg.h +628 -0
  307. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umutablecptrie.h +240 -0
  308. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unifilt.h +136 -0
  309. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unifunct.h +132 -0
  310. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unimatch.h +168 -0
  311. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unirepl.h +103 -0
  312. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uniset.h +1909 -0
  313. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unistr.h +5095 -0
  314. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unorm.h +476 -0
  315. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unorm2.h +626 -0
  316. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unum.h +1524 -0
  317. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumberformatter.h +576 -0
  318. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumberoptions.h +173 -0
  319. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumberrangeformatter.h +471 -0
  320. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumsys.h +176 -0
  321. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uobject.h +324 -0
  322. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uplrule.h +82 -0
  323. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/upluralrules.h +263 -0
  324. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/urbtok.h +276 -0
  325. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uregex.h +1617 -0
  326. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uregion.h +252 -0
  327. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ureldatefmt.h +510 -0
  328. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/urename.h +4026 -0
  329. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/urep.h +157 -0
  330. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ures.h +912 -0
  331. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uscript.h +742 -0
  332. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usearch.h +911 -0
  333. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uset.h +1898 -0
  334. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usetiter.h +323 -0
  335. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ushape.h +476 -0
  336. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usimplenumberformatter.h +297 -0
  337. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uspoof.h +1852 -0
  338. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usprep.h +274 -0
  339. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustdio.h +1021 -0
  340. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustream.h +69 -0
  341. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustring.h +1719 -0
  342. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustringtrie.h +97 -0
  343. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utext.h +1613 -0
  344. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf.h +225 -0
  345. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf16.h +740 -0
  346. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf32.h +25 -0
  347. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf8.h +882 -0
  348. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf_old.h +1207 -0
  349. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utmscale.h +490 -0
  350. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utrace.h +506 -0
  351. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utrans.h +660 -0
  352. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utypes.h +826 -0
  353. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uvernum.h +191 -0
  354. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uversion.h +230 -0
  355. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/vtzone.h +471 -0
  356. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/Foundation.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  357. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/FoundationEssentials.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  358. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/FoundationInternationalization.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  359. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/FoundationXML.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  360. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/_FoundationCollections.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  361. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libCoreFoundation.a +0 -0
  362. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundation.a +0 -0
  363. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundationEssentials.a +0 -0
  364. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundationInternationalization.a +0 -0
  365. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundationXML.a +0 -0
  366. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/lib_CFXMLInterface.a +0 -0
  367. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/lib_FoundationCShims.a +0 -0
  368. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/lib_FoundationCollections.a +0 -0
@@ -0,0 +1,2368 @@
1
+ // © 2016 and later: Unicode, Inc. and others.
2
+ // License & terms of use: http://www.unicode.org/copyright.html
3
+ /*
4
+ ******************************************************************************
5
+ *
6
+ * Copyright (C) 1999-2013, International Business Machines
7
+ * Corporation and others. All Rights Reserved.
8
+ *
9
+ ******************************************************************************
10
+ * file name: ubidi.h
11
+ * encoding: UTF-8
12
+ * tab size: 8 (not used)
13
+ * indentation:4
14
+ *
15
+ * created on: 1999jul27
16
+ * created by: Markus W. Scherer, updated by Matitiahu Allouche
17
+ */
18
+
19
+ #ifndef UBIDI_H
20
+ #define UBIDI_H
21
+
22
+ #include <_foundation_unicode/utypes.h>
23
+ #include <_foundation_unicode/uchar.h>
24
+
25
+ #if U_SHOW_CPLUSPLUS_API
26
+ #include <_foundation_unicode/localpointer.h>
27
+ #endif // U_SHOW_CPLUSPLUS_API
28
+
29
+ /**
30
+ *\file
31
+ * \brief C API: Bidi algorithm
32
+ *
33
+ * <h2>Bidi algorithm for ICU</h2>
34
+ *
35
+ * This is an implementation of the Unicode Bidirectional Algorithm.
36
+ * The algorithm is defined in the
37
+ * <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>.<p>
38
+ *
39
+ * Note: Libraries that perform a bidirectional algorithm and
40
+ * reorder strings accordingly are sometimes called "Storage Layout Engines".
41
+ * ICU's Bidi and shaping (u_shapeArabic()) APIs can be used at the core of such
42
+ * "Storage Layout Engines".
43
+ *
44
+ * <h3>General remarks about the API:</h3>
45
+ *
46
+ * In functions with an error code parameter,
47
+ * the <code>pErrorCode</code> pointer must be valid
48
+ * and the value that it points to must not indicate a failure before
49
+ * the function call. Otherwise, the function returns immediately.
50
+ * After the function call, the value indicates success or failure.<p>
51
+ *
52
+ * The &quot;limit&quot; of a sequence of characters is the position just after their
53
+ * last character, i.e., one more than that position.<p>
54
+ *
55
+ * Some of the API functions provide access to &quot;runs&quot;.
56
+ * Such a &quot;run&quot; is defined as a sequence of characters
57
+ * that are at the same embedding level
58
+ * after performing the Bidi algorithm.<p>
59
+ *
60
+ * @author Markus W. Scherer
61
+ * @version 1.0
62
+ *
63
+ *
64
+ * <h4> Sample code for the ICU Bidi API </h4>
65
+ *
66
+ * <h5>Rendering a paragraph with the ICU Bidi API</h5>
67
+ *
68
+ * This is (hypothetical) sample code that illustrates
69
+ * how the ICU Bidi API could be used to render a paragraph of text.
70
+ * Rendering code depends highly on the graphics system,
71
+ * therefore this sample code must make a lot of assumptions,
72
+ * which may or may not match any existing graphics system's properties.
73
+ *
74
+ * <p>The basic assumptions are:</p>
75
+ * <ul>
76
+ * <li>Rendering is done from left to right on a horizontal line.</li>
77
+ * <li>A run of single-style, unidirectional text can be rendered at once.</li>
78
+ * <li>Such a run of text is passed to the graphics system with
79
+ * characters (code units) in logical order.</li>
80
+ * <li>The line-breaking algorithm is very complicated
81
+ * and Locale-dependent -
82
+ * and therefore its implementation omitted from this sample code.</li>
83
+ * </ul>
84
+ *
85
+ * <pre>
86
+ * \code
87
+ *#include <_foundation_unicode/ubidi.h>
88
+ *
89
+ *typedef enum {
90
+ * styleNormal=0, styleSelected=1,
91
+ * styleBold=2, styleItalics=4,
92
+ * styleSuper=8, styleSub=16
93
+ *} Style;
94
+ *
95
+ *typedef struct { int32_t limit; Style style; } StyleRun;
96
+ *
97
+ *int getTextWidth(const UChar *text, int32_t start, int32_t limit,
98
+ * const StyleRun *styleRuns, int styleRunCount);
99
+ *
100
+ * // set *pLimit and *pStyleRunLimit for a line
101
+ * // from text[start] and from styleRuns[styleRunStart]
102
+ * // using ubidi_getLogicalRun(para, ...)
103
+ *void getLineBreak(const UChar *text, int32_t start, int32_t *pLimit,
104
+ * UBiDi *para,
105
+ * const StyleRun *styleRuns, int styleRunStart, int *pStyleRunLimit,
106
+ * int *pLineWidth);
107
+ *
108
+ * // render runs on a line sequentially, always from left to right
109
+ *
110
+ * // prepare rendering a new line
111
+ * void startLine(UBiDiDirection textDirection, int lineWidth);
112
+ *
113
+ * // render a run of text and advance to the right by the run width
114
+ * // the text[start..limit-1] is always in logical order
115
+ * void renderRun(const UChar *text, int32_t start, int32_t limit,
116
+ * UBiDiDirection textDirection, Style style);
117
+ *
118
+ * // We could compute a cross-product
119
+ * // from the style runs with the directional runs
120
+ * // and then reorder it.
121
+ * // Instead, here we iterate over each run type
122
+ * // and render the intersections -
123
+ * // with shortcuts in simple (and common) cases.
124
+ * // renderParagraph() is the main function.
125
+ *
126
+ * // render a directional run with
127
+ * // (possibly) multiple style runs intersecting with it
128
+ * void renderDirectionalRun(const UChar *text,
129
+ * int32_t start, int32_t limit,
130
+ * UBiDiDirection direction,
131
+ * const StyleRun *styleRuns, int styleRunCount) {
132
+ * int i;
133
+ *
134
+ * // iterate over style runs
135
+ * if(direction==UBIDI_LTR) {
136
+ * int styleLimit;
137
+ *
138
+ * for(i=0; i<styleRunCount; ++i) {
139
+ * styleLimit=styleRuns[i].limit;
140
+ * if(start<styleLimit) {
141
+ * if(styleLimit>limit) { styleLimit=limit; }
142
+ * renderRun(text, start, styleLimit,
143
+ * direction, styleRuns[i].style);
144
+ * if(styleLimit==limit) { break; }
145
+ * start=styleLimit;
146
+ * }
147
+ * }
148
+ * } else {
149
+ * int styleStart;
150
+ *
151
+ * for(i=styleRunCount-1; i>=0; --i) {
152
+ * if(i>0) {
153
+ * styleStart=styleRuns[i-1].limit;
154
+ * } else {
155
+ * styleStart=0;
156
+ * }
157
+ * if(limit>=styleStart) {
158
+ * if(styleStart<start) { styleStart=start; }
159
+ * renderRun(text, styleStart, limit,
160
+ * direction, styleRuns[i].style);
161
+ * if(styleStart==start) { break; }
162
+ * limit=styleStart;
163
+ * }
164
+ * }
165
+ * }
166
+ * }
167
+ *
168
+ * // the line object represents text[start..limit-1]
169
+ * void renderLine(UBiDi *line, const UChar *text,
170
+ * int32_t start, int32_t limit,
171
+ * const StyleRun *styleRuns, int styleRunCount,
172
+ * UErrorCode *pErrorCode) {
173
+ * UBiDiDirection direction=ubidi_getDirection(line);
174
+ * if(direction!=UBIDI_MIXED) {
175
+ * // unidirectional
176
+ * if(styleRunCount<=1) {
177
+ * renderRun(text, start, limit, direction, styleRuns[0].style);
178
+ * } else {
179
+ * renderDirectionalRun(text, start, limit,
180
+ * direction, styleRuns, styleRunCount);
181
+ * }
182
+ * } else {
183
+ * // mixed-directional
184
+ * int32_t count, i, length;
185
+ * UBiDiLevel level;
186
+ *
187
+ * count=ubidi_countRuns(line, pErrorCode);
188
+ * if(U_SUCCESS(*pErrorCode)) {
189
+ * if(styleRunCount<=1) {
190
+ * Style style=styleRuns[0].style;
191
+ *
192
+ * // iterate over directional runs
193
+ * for(i=0; i<count; ++i) {
194
+ * direction=ubidi_getVisualRun(line, i, &start, &length);
195
+ * renderRun(text, start, start+length, direction, style);
196
+ * }
197
+ * } else {
198
+ * int32_t j;
199
+ *
200
+ * // iterate over both directional and style runs
201
+ * for(i=0; i<count; ++i) {
202
+ * direction=ubidi_getVisualRun(line, i, &start, &length);
203
+ * renderDirectionalRun(text, start, start+length,
204
+ * direction, styleRuns, styleRunCount);
205
+ * }
206
+ * }
207
+ * }
208
+ * }
209
+ * }
210
+ *
211
+ *void renderParagraph(const UChar *text, int32_t length,
212
+ * UBiDiDirection textDirection,
213
+ * const StyleRun *styleRuns, int styleRunCount,
214
+ * int lineWidth,
215
+ * UErrorCode *pErrorCode) {
216
+ * UBiDi *para;
217
+ *
218
+ * if(pErrorCode==NULL || U_FAILURE(*pErrorCode) || length<=0) {
219
+ * return;
220
+ * }
221
+ *
222
+ * para=ubidi_openSized(length, 0, pErrorCode);
223
+ * if(para==NULL) { return; }
224
+ *
225
+ * ubidi_setPara(para, text, length,
226
+ * textDirection ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR,
227
+ * NULL, pErrorCode);
228
+ * if(U_SUCCESS(*pErrorCode)) {
229
+ * UBiDiLevel paraLevel=1&ubidi_getParaLevel(para);
230
+ * StyleRun styleRun={ length, styleNormal };
231
+ * int width;
232
+ *
233
+ * if(styleRuns==NULL || styleRunCount<=0) {
234
+ * styleRunCount=1;
235
+ * styleRuns=&styleRun;
236
+ * }
237
+ *
238
+ * // assume styleRuns[styleRunCount-1].limit>=length
239
+ *
240
+ * width=getTextWidth(text, 0, length, styleRuns, styleRunCount);
241
+ * if(width<=lineWidth) {
242
+ * // everything fits onto one line
243
+ *
244
+ * // prepare rendering a new line from either left or right
245
+ * startLine(paraLevel, width);
246
+ *
247
+ * renderLine(para, text, 0, length,
248
+ * styleRuns, styleRunCount, pErrorCode);
249
+ * } else {
250
+ * UBiDi *line;
251
+ *
252
+ * // we need to render several lines
253
+ * line=ubidi_openSized(length, 0, pErrorCode);
254
+ * if(line!=NULL) {
255
+ * int32_t start=0, limit;
256
+ * int styleRunStart=0, styleRunLimit;
257
+ *
258
+ * for(;;) {
259
+ * limit=length;
260
+ * styleRunLimit=styleRunCount;
261
+ * getLineBreak(text, start, &limit, para,
262
+ * styleRuns, styleRunStart, &styleRunLimit,
263
+ * &width);
264
+ * ubidi_setLine(para, start, limit, line, pErrorCode);
265
+ * if(U_SUCCESS(*pErrorCode)) {
266
+ * // prepare rendering a new line
267
+ * // from either left or right
268
+ * startLine(paraLevel, width);
269
+ *
270
+ * renderLine(line, text, start, limit,
271
+ * styleRuns+styleRunStart,
272
+ * styleRunLimit-styleRunStart, pErrorCode);
273
+ * }
274
+ * if(limit==length) { break; }
275
+ * start=limit;
276
+ * styleRunStart=styleRunLimit-1;
277
+ * if(start>=styleRuns[styleRunStart].limit) {
278
+ * ++styleRunStart;
279
+ * }
280
+ * }
281
+ *
282
+ * ubidi_close(line);
283
+ * }
284
+ * }
285
+ * }
286
+ *
287
+ * ubidi_close(para);
288
+ *}
289
+ *\endcode
290
+ * </pre>
291
+ */
292
+
293
+ /*DOCXX_TAG*/
294
+ /*@{*/
295
+
296
+ /**
297
+ * UBiDiLevel is the type of the level values in this
298
+ * Bidi implementation.
299
+ * It holds an embedding level and indicates the visual direction
300
+ * by its bit&nbsp;0 (even/odd value).<p>
301
+ *
302
+ * It can also hold non-level values for the
303
+ * <code>paraLevel</code> and <code>embeddingLevels</code>
304
+ * arguments of <code>ubidi_setPara()</code>; there:
305
+ * <ul>
306
+ * <li>bit&nbsp;7 of an <code>embeddingLevels[]</code>
307
+ * value indicates whether the using application is
308
+ * specifying the level of a character to <i>override</i> whatever the
309
+ * Bidi implementation would resolve it to.</li>
310
+ * <li><code>paraLevel</code> can be set to the
311
+ * pseudo-level values <code>UBIDI_DEFAULT_LTR</code>
312
+ * and <code>UBIDI_DEFAULT_RTL</code>.</li>
313
+ * </ul>
314
+ *
315
+ * @see ubidi_setPara
316
+ *
317
+ * <p>The related constants are not real, valid level values.
318
+ * <code>UBIDI_DEFAULT_XXX</code> can be used to specify
319
+ * a default for the paragraph level for
320
+ * when the <code>ubidi_setPara()</code> function
321
+ * shall determine it but there is no
322
+ * strongly typed character in the input.<p>
323
+ *
324
+ * Note that the value for <code>UBIDI_DEFAULT_LTR</code> is even
325
+ * and the one for <code>UBIDI_DEFAULT_RTL</code> is odd,
326
+ * just like with normal LTR and RTL level values -
327
+ * these special values are designed that way. Also, the implementation
328
+ * assumes that UBIDI_MAX_EXPLICIT_LEVEL is odd.
329
+ *
330
+ * Note: The numeric values of the related constants will not change:
331
+ * They are tied to the use of 7-bit byte values (plus the override bit)
332
+ * and of the UBiDiLevel=uint8_t data type in this API.
333
+ *
334
+ * @see UBIDI_DEFAULT_LTR
335
+ * @see UBIDI_DEFAULT_RTL
336
+ * @see UBIDI_LEVEL_OVERRIDE
337
+ * @see UBIDI_MAX_EXPLICIT_LEVEL
338
+ * @stable ICU 2.0
339
+ */
340
+ typedef uint8_t UBiDiLevel;
341
+
342
+ /** Paragraph level setting.<p>
343
+ *
344
+ * Constant indicating that the base direction depends on the first strong
345
+ * directional character in the text according to the Unicode Bidirectional
346
+ * Algorithm. If no strong directional character is present,
347
+ * then set the paragraph level to 0 (left-to-right).<p>
348
+ *
349
+ * If this value is used in conjunction with reordering modes
350
+ * <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or
351
+ * <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder
352
+ * is assumed to be visual LTR, and the text after reordering is required
353
+ * to be the corresponding logical string with appropriate contextual
354
+ * direction. The direction of the result string will be RTL if either
355
+ * the righmost or leftmost strong character of the source text is RTL
356
+ * or Arabic Letter, the direction will be LTR otherwise.<p>
357
+ *
358
+ * If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may
359
+ * be added at the beginning of the result string to ensure round trip
360
+ * (that the result string, when reordered back to visual, will produce
361
+ * the original source text).
362
+ * @see UBIDI_REORDER_INVERSE_LIKE_DIRECT
363
+ * @see UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL
364
+ * @stable ICU 2.0
365
+ */
366
+ #define UBIDI_DEFAULT_LTR 0xfe
367
+
368
+ /** Paragraph level setting.<p>
369
+ *
370
+ * Constant indicating that the base direction depends on the first strong
371
+ * directional character in the text according to the Unicode Bidirectional
372
+ * Algorithm. If no strong directional character is present,
373
+ * then set the paragraph level to 1 (right-to-left).<p>
374
+ *
375
+ * If this value is used in conjunction with reordering modes
376
+ * <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or
377
+ * <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder
378
+ * is assumed to be visual LTR, and the text after reordering is required
379
+ * to be the corresponding logical string with appropriate contextual
380
+ * direction. The direction of the result string will be RTL if either
381
+ * the righmost or leftmost strong character of the source text is RTL
382
+ * or Arabic Letter, or if the text contains no strong character;
383
+ * the direction will be LTR otherwise.<p>
384
+ *
385
+ * If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may
386
+ * be added at the beginning of the result string to ensure round trip
387
+ * (that the result string, when reordered back to visual, will produce
388
+ * the original source text).
389
+ * @see UBIDI_REORDER_INVERSE_LIKE_DIRECT
390
+ * @see UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL
391
+ * @stable ICU 2.0
392
+ */
393
+ #define UBIDI_DEFAULT_RTL 0xff
394
+
395
+ /**
396
+ * Maximum explicit embedding level.
397
+ * Same as the max_depth value in the
398
+ * <a href="http://www.unicode.org/reports/tr9/#BD2">Unicode Bidirectional Algorithm</a>.
399
+ * (The maximum resolved level can be up to <code>UBIDI_MAX_EXPLICIT_LEVEL+1</code>).
400
+ * @stable ICU 2.0
401
+ */
402
+ #define UBIDI_MAX_EXPLICIT_LEVEL 125
403
+
404
+ /** Bit flag for level input.
405
+ * Overrides directional properties.
406
+ * @stable ICU 2.0
407
+ */
408
+ #define UBIDI_LEVEL_OVERRIDE 0x80
409
+
410
+ /**
411
+ * Special value which can be returned by the mapping functions when a logical
412
+ * index has no corresponding visual index or vice-versa. This may happen
413
+ * for the logical-to-visual mapping of a Bidi control when option
414
+ * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> is specified. This can also happen
415
+ * for the visual-to-logical mapping of a Bidi mark (LRM or RLM) inserted
416
+ * by option <code>#UBIDI_OPTION_INSERT_MARKS</code>.
417
+ * @see ubidi_getVisualIndex
418
+ * @see ubidi_getVisualMap
419
+ * @see ubidi_getLogicalIndex
420
+ * @see ubidi_getLogicalMap
421
+ * @stable ICU 3.6
422
+ */
423
+ #define UBIDI_MAP_NOWHERE (-1)
424
+
425
+ /**
426
+ * <code>UBiDiDirection</code> values indicate the text direction.
427
+ * @stable ICU 2.0
428
+ */
429
+ enum UBiDiDirection {
430
+ /** Left-to-right text. This is a 0 value.
431
+ * <ul>
432
+ * <li>As return value for <code>ubidi_getDirection()</code>, it means
433
+ * that the source string contains no right-to-left characters, or
434
+ * that the source string is empty and the paragraph level is even.
435
+ * <li> As return value for <code>ubidi_getBaseDirection()</code>, it
436
+ * means that the first strong character of the source string has
437
+ * a left-to-right direction.
438
+ * </ul>
439
+ * @stable ICU 2.0
440
+ */
441
+ UBIDI_LTR,
442
+ /** Right-to-left text. This is a 1 value.
443
+ * <ul>
444
+ * <li>As return value for <code>ubidi_getDirection()</code>, it means
445
+ * that the source string contains no left-to-right characters, or
446
+ * that the source string is empty and the paragraph level is odd.
447
+ * <li> As return value for <code>ubidi_getBaseDirection()</code>, it
448
+ * means that the first strong character of the source string has
449
+ * a right-to-left direction.
450
+ * </ul>
451
+ * @stable ICU 2.0
452
+ */
453
+ UBIDI_RTL,
454
+ /** Mixed-directional text.
455
+ * <p>As return value for <code>ubidi_getDirection()</code>, it means
456
+ * that the source string contains both left-to-right and
457
+ * right-to-left characters.
458
+ * @stable ICU 2.0
459
+ */
460
+ UBIDI_MIXED,
461
+ /** No strongly directional text.
462
+ * <p>As return value for <code>ubidi_getBaseDirection()</code>, it means
463
+ * that the source string is missing or empty, or contains neither left-to-right
464
+ * nor right-to-left characters.
465
+ * @stable ICU 4.6
466
+ */
467
+ UBIDI_NEUTRAL
468
+ };
469
+
470
+ /** @stable ICU 2.0 */
471
+ typedef enum UBiDiDirection UBiDiDirection;
472
+
473
+ /**
474
+ * Forward declaration of the <code>UBiDi</code> structure for the declaration of
475
+ * the API functions. Its fields are implementation-specific.<p>
476
+ * This structure holds information about a paragraph (or multiple paragraphs)
477
+ * of text with Bidi-algorithm-related details, or about one line of
478
+ * such a paragraph.<p>
479
+ * Reordering can be done on a line, or on one or more paragraphs which are
480
+ * then interpreted each as one single line.
481
+ * @stable ICU 2.0
482
+ */
483
+ struct UBiDi;
484
+
485
+ /** @stable ICU 2.0 */
486
+ typedef struct UBiDi UBiDi;
487
+
488
+ /**
489
+ * Allocate a <code>UBiDi</code> structure.
490
+ * Such an object is initially empty. It is assigned
491
+ * the Bidi properties of a piece of text containing one or more paragraphs
492
+ * by <code>ubidi_setPara()</code>
493
+ * or the Bidi properties of a line within a paragraph by
494
+ * <code>ubidi_setLine()</code>.<p>
495
+ * This object can be reused for as long as it is not deallocated
496
+ * by calling <code>ubidi_close()</code>.<p>
497
+ * <code>ubidi_setPara()</code> and <code>ubidi_setLine()</code> will allocate
498
+ * additional memory for internal structures as necessary.
499
+ *
500
+ * @return An empty <code>UBiDi</code> object.
501
+ * @stable ICU 2.0
502
+ */
503
+ U_CAPI UBiDi * U_EXPORT2
504
+ ubidi_open(void);
505
+
506
+ /**
507
+ * Allocate a <code>UBiDi</code> structure with preallocated memory
508
+ * for internal structures.
509
+ * This function provides a <code>UBiDi</code> object like <code>ubidi_open()</code>
510
+ * with no arguments, but it also preallocates memory for internal structures
511
+ * according to the sizings supplied by the caller.<p>
512
+ * Subsequent functions will not allocate any more memory, and are thus
513
+ * guaranteed not to fail because of lack of memory.<p>
514
+ * The preallocation can be limited to some of the internal memory
515
+ * by setting some values to 0 here. That means that if, e.g.,
516
+ * <code>maxRunCount</code> cannot be reasonably predetermined and should not
517
+ * be set to <code>maxLength</code> (the only failproof value) to avoid
518
+ * wasting memory, then <code>maxRunCount</code> could be set to 0 here
519
+ * and the internal structures that are associated with it will be allocated
520
+ * on demand, just like with <code>ubidi_open()</code>.
521
+ *
522
+ * @param maxLength is the maximum text or line length that internal memory
523
+ * will be preallocated for. An attempt to associate this object with a
524
+ * longer text will fail, unless this value is 0, which leaves the allocation
525
+ * up to the implementation.
526
+ *
527
+ * @param maxRunCount is the maximum anticipated number of same-level runs
528
+ * that internal memory will be preallocated for. An attempt to access
529
+ * visual runs on an object that was not preallocated for as many runs
530
+ * as the text was actually resolved to will fail,
531
+ * unless this value is 0, which leaves the allocation up to the implementation.<br><br>
532
+ * The number of runs depends on the actual text and maybe anywhere between
533
+ * 1 and <code>maxLength</code>. It is typically small.
534
+ *
535
+ * @param pErrorCode must be a valid pointer to an error code value.
536
+ *
537
+ * @return An empty <code>UBiDi</code> object with preallocated memory.
538
+ * @stable ICU 2.0
539
+ */
540
+ U_CAPI UBiDi * U_EXPORT2
541
+ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode);
542
+
543
+ /**
544
+ * <code>ubidi_close()</code> must be called to free the memory
545
+ * associated with a UBiDi object.<p>
546
+ *
547
+ * <strong>Important: </strong>
548
+ * A parent <code>UBiDi</code> object must not be destroyed or reused if
549
+ * it still has children.
550
+ * If a <code>UBiDi</code> object has become the <i>child</i>
551
+ * of another one (its <i>parent</i>) by calling
552
+ * <code>ubidi_setLine()</code>, then the child object must
553
+ * be destroyed (closed) or reused (by calling
554
+ * <code>ubidi_setPara()</code> or <code>ubidi_setLine()</code>)
555
+ * before the parent object.
556
+ *
557
+ * @param pBiDi is a <code>UBiDi</code> object.
558
+ *
559
+ * @see ubidi_setPara
560
+ * @see ubidi_setLine
561
+ * @stable ICU 2.0
562
+ */
563
+ U_CAPI void U_EXPORT2
564
+ ubidi_close(UBiDi *pBiDi);
565
+
566
+ #if U_SHOW_CPLUSPLUS_API
567
+
568
+ U_NAMESPACE_BEGIN
569
+
570
+ /**
571
+ * \class LocalUBiDiPointer
572
+ * "Smart pointer" class, closes a UBiDi via ubidi_close().
573
+ * For most methods see the LocalPointerBase base class.
574
+ *
575
+ * @see LocalPointerBase
576
+ * @see LocalPointer
577
+ * @stable ICU 4.4
578
+ */
579
+ U_DEFINE_LOCAL_OPEN_POINTER(LocalUBiDiPointer, UBiDi, ubidi_close);
580
+
581
+ U_NAMESPACE_END
582
+
583
+ #endif
584
+
585
+ /**
586
+ * Modify the operation of the Bidi algorithm such that it
587
+ * approximates an "inverse Bidi" algorithm. This function
588
+ * must be called before <code>ubidi_setPara()</code>.
589
+ *
590
+ * <p>The normal operation of the Bidi algorithm as described
591
+ * in the Unicode Technical Report is to take text stored in logical
592
+ * (keyboard, typing) order and to determine the reordering of it for visual
593
+ * rendering.
594
+ * Some legacy systems store text in visual order, and for operations
595
+ * with standard, Unicode-based algorithms, the text needs to be transformed
596
+ * to logical order. This is effectively the inverse algorithm of the
597
+ * described Bidi algorithm. Note that there is no standard algorithm for
598
+ * this "inverse Bidi" and that the current implementation provides only an
599
+ * approximation of "inverse Bidi".</p>
600
+ *
601
+ * <p>With <code>isInverse</code> set to <code>true</code>,
602
+ * this function changes the behavior of some of the subsequent functions
603
+ * in a way that they can be used for the inverse Bidi algorithm.
604
+ * Specifically, runs of text with numeric characters will be treated in a
605
+ * special way and may need to be surrounded with LRM characters when they are
606
+ * written in reordered sequence.</p>
607
+ *
608
+ * <p>Output runs should be retrieved using <code>ubidi_getVisualRun()</code>.
609
+ * Since the actual input for "inverse Bidi" is visually ordered text and
610
+ * <code>ubidi_getVisualRun()</code> gets the reordered runs, these are actually
611
+ * the runs of the logically ordered output.</p>
612
+ *
613
+ * <p>Calling this function with argument <code>isInverse</code> set to
614
+ * <code>true</code> is equivalent to calling
615
+ * <code>ubidi_setReorderingMode</code> with argument
616
+ * <code>reorderingMode</code>
617
+ * set to <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.<br>
618
+ * Calling this function with argument <code>isInverse</code> set to
619
+ * <code>false</code> is equivalent to calling
620
+ * <code>ubidi_setReorderingMode</code> with argument
621
+ * <code>reorderingMode</code>
622
+ * set to <code>#UBIDI_REORDER_DEFAULT</code>.
623
+ *
624
+ * @param pBiDi is a <code>UBiDi</code> object.
625
+ *
626
+ * @param isInverse specifies "forward" or "inverse" Bidi operation.
627
+ *
628
+ * @see ubidi_setPara
629
+ * @see ubidi_writeReordered
630
+ * @see ubidi_setReorderingMode
631
+ * @stable ICU 2.0
632
+ */
633
+ U_CAPI void U_EXPORT2
634
+ ubidi_setInverse(UBiDi *pBiDi, UBool isInverse);
635
+
636
+ /**
637
+ * Is this Bidi object set to perform the inverse Bidi algorithm?
638
+ * <p>Note: calling this function after setting the reordering mode with
639
+ * <code>ubidi_setReorderingMode</code> will return <code>true</code> if the
640
+ * reordering mode was set to <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>,
641
+ * <code>false</code> for all other values.</p>
642
+ *
643
+ * @param pBiDi is a <code>UBiDi</code> object.
644
+ * @return true if the Bidi object is set to perform the inverse Bidi algorithm
645
+ * by handling numbers as L.
646
+ *
647
+ * @see ubidi_setInverse
648
+ * @see ubidi_setReorderingMode
649
+ * @stable ICU 2.0
650
+ */
651
+
652
+ U_CAPI UBool U_EXPORT2
653
+ ubidi_isInverse(UBiDi *pBiDi);
654
+
655
+ /**
656
+ * Specify whether block separators must be allocated level zero,
657
+ * so that successive paragraphs will progress from left to right.
658
+ * This function must be called before <code>ubidi_setPara()</code>.
659
+ * Paragraph separators (B) may appear in the text. Setting them to level zero
660
+ * means that all paragraph separators (including one possibly appearing
661
+ * in the last text position) are kept in the reordered text after the text
662
+ * that they follow in the source text.
663
+ * When this feature is not enabled, a paragraph separator at the last
664
+ * position of the text before reordering will go to the first position
665
+ * of the reordered text when the paragraph level is odd.
666
+ *
667
+ * @param pBiDi is a <code>UBiDi</code> object.
668
+ *
669
+ * @param orderParagraphsLTR specifies whether paragraph separators (B) must
670
+ * receive level 0, so that successive paragraphs progress from left to right.
671
+ *
672
+ * @see ubidi_setPara
673
+ * @stable ICU 3.4
674
+ */
675
+ U_CAPI void U_EXPORT2
676
+ ubidi_orderParagraphsLTR(UBiDi *pBiDi, UBool orderParagraphsLTR);
677
+
678
+ /**
679
+ * Is this Bidi object set to allocate level 0 to block separators so that
680
+ * successive paragraphs progress from left to right?
681
+ *
682
+ * @param pBiDi is a <code>UBiDi</code> object.
683
+ * @return true if the Bidi object is set to allocate level 0 to block
684
+ * separators.
685
+ *
686
+ * @see ubidi_orderParagraphsLTR
687
+ * @stable ICU 3.4
688
+ */
689
+ U_CAPI UBool U_EXPORT2
690
+ ubidi_isOrderParagraphsLTR(UBiDi *pBiDi);
691
+
692
+ /**
693
+ * <code>UBiDiReorderingMode</code> values indicate which variant of the Bidi
694
+ * algorithm to use.
695
+ *
696
+ * @see ubidi_setReorderingMode
697
+ * @stable ICU 3.6
698
+ */
699
+ typedef enum UBiDiReorderingMode {
700
+ /** Regular Logical to Visual Bidi algorithm according to Unicode.
701
+ * This is a 0 value.
702
+ * @stable ICU 3.6 */
703
+ UBIDI_REORDER_DEFAULT = 0,
704
+ /** Logical to Visual algorithm which handles numbers in a way which
705
+ * mimics the behavior of Windows XP.
706
+ * @stable ICU 3.6 */
707
+ UBIDI_REORDER_NUMBERS_SPECIAL,
708
+ /** Logical to Visual algorithm grouping numbers with adjacent R characters
709
+ * (reversible algorithm).
710
+ * @stable ICU 3.6 */
711
+ UBIDI_REORDER_GROUP_NUMBERS_WITH_R,
712
+ /** Reorder runs only to transform a Logical LTR string to the Logical RTL
713
+ * string with the same display, or vice-versa.<br>
714
+ * If this mode is set together with option
715
+ * <code>#UBIDI_OPTION_INSERT_MARKS</code>, some Bidi controls in the source
716
+ * text may be removed and other controls may be added to produce the
717
+ * minimum combination which has the required display.
718
+ * @stable ICU 3.6 */
719
+ UBIDI_REORDER_RUNS_ONLY,
720
+ /** Visual to Logical algorithm which handles numbers like L
721
+ * (same algorithm as selected by <code>ubidi_setInverse(true)</code>.
722
+ * @see ubidi_setInverse
723
+ * @stable ICU 3.6 */
724
+ UBIDI_REORDER_INVERSE_NUMBERS_AS_L,
725
+ /** Visual to Logical algorithm equivalent to the regular Logical to Visual
726
+ * algorithm.
727
+ * @stable ICU 3.6 */
728
+ UBIDI_REORDER_INVERSE_LIKE_DIRECT,
729
+ /** Inverse Bidi (Visual to Logical) algorithm for the
730
+ * <code>UBIDI_REORDER_NUMBERS_SPECIAL</code> Bidi algorithm.
731
+ * @stable ICU 3.6 */
732
+ UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
733
+ #ifndef U_HIDE_DEPRECATED_API
734
+ /**
735
+ * Number of values for reordering mode.
736
+ * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
737
+ */
738
+ UBIDI_REORDER_COUNT
739
+ #endif // U_HIDE_DEPRECATED_API
740
+ } UBiDiReorderingMode;
741
+
742
+ /**
743
+ * Modify the operation of the Bidi algorithm such that it implements some
744
+ * variant to the basic Bidi algorithm or approximates an "inverse Bidi"
745
+ * algorithm, depending on different values of the "reordering mode".
746
+ * This function must be called before <code>ubidi_setPara()</code>, and stays
747
+ * in effect until called again with a different argument.
748
+ *
749
+ * <p>The normal operation of the Bidi algorithm as described
750
+ * in the Unicode Standard Annex #9 is to take text stored in logical
751
+ * (keyboard, typing) order and to determine how to reorder it for visual
752
+ * rendering.</p>
753
+ *
754
+ * <p>With the reordering mode set to a value other than
755
+ * <code>#UBIDI_REORDER_DEFAULT</code>, this function changes the behavior of
756
+ * some of the subsequent functions in a way such that they implement an
757
+ * inverse Bidi algorithm or some other algorithm variants.</p>
758
+ *
759
+ * <p>Some legacy systems store text in visual order, and for operations
760
+ * with standard, Unicode-based algorithms, the text needs to be transformed
761
+ * into logical order. This is effectively the inverse algorithm of the
762
+ * described Bidi algorithm. Note that there is no standard algorithm for
763
+ * this "inverse Bidi", so a number of variants are implemented here.</p>
764
+ *
765
+ * <p>In other cases, it may be desirable to emulate some variant of the
766
+ * Logical to Visual algorithm (e.g. one used in MS Windows), or perform a
767
+ * Logical to Logical transformation.</p>
768
+ *
769
+ * <ul>
770
+ * <li>When the reordering mode is set to <code>#UBIDI_REORDER_DEFAULT</code>,
771
+ * the standard Bidi Logical to Visual algorithm is applied.</li>
772
+ *
773
+ * <li>When the reordering mode is set to
774
+ * <code>#UBIDI_REORDER_NUMBERS_SPECIAL</code>,
775
+ * the algorithm used to perform Bidi transformations when calling
776
+ * <code>ubidi_setPara</code> should approximate the algorithm used in
777
+ * Microsoft Windows XP rather than strictly conform to the Unicode Bidi
778
+ * algorithm.
779
+ * <br>
780
+ * The differences between the basic algorithm and the algorithm addressed
781
+ * by this option are as follows:
782
+ * <ul>
783
+ * <li>Within text at an even embedding level, the sequence "123AB"
784
+ * (where AB represent R or AL letters) is transformed to "123BA" by the
785
+ * Unicode algorithm and to "BA123" by the Windows algorithm.</li>
786
+ * <li>Arabic-Indic numbers (AN) are handled by the Windows algorithm just
787
+ * like regular numbers (EN).</li>
788
+ * </ul></li>
789
+ *
790
+ * <li>When the reordering mode is set to
791
+ * <code>#UBIDI_REORDER_GROUP_NUMBERS_WITH_R</code>,
792
+ * numbers located between LTR text and RTL text are associated with the RTL
793
+ * text. For instance, an LTR paragraph with content "abc 123 DEF" (where
794
+ * upper case letters represent RTL characters) will be transformed to
795
+ * "abc FED 123" (and not "abc 123 FED"), "DEF 123 abc" will be transformed
796
+ * to "123 FED abc" and "123 FED abc" will be transformed to "DEF 123 abc".
797
+ * This makes the algorithm reversible and makes it useful when round trip
798
+ * (from visual to logical and back to visual) must be achieved without
799
+ * adding LRM characters. However, this is a variation from the standard
800
+ * Unicode Bidi algorithm.<br>
801
+ * The source text should not contain Bidi control characters other than LRM
802
+ * or RLM.</li>
803
+ *
804
+ * <li>When the reordering mode is set to
805
+ * <code>#UBIDI_REORDER_RUNS_ONLY</code>,
806
+ * a "Logical to Logical" transformation must be performed:
807
+ * <ul>
808
+ * <li>If the default text level of the source text (argument <code>paraLevel</code>
809
+ * in <code>ubidi_setPara</code>) is even, the source text will be handled as
810
+ * LTR logical text and will be transformed to the RTL logical text which has
811
+ * the same LTR visual display.</li>
812
+ * <li>If the default level of the source text is odd, the source text
813
+ * will be handled as RTL logical text and will be transformed to the
814
+ * LTR logical text which has the same LTR visual display.</li>
815
+ * </ul>
816
+ * This mode may be needed when logical text which is basically Arabic or
817
+ * Hebrew, with possible included numbers or phrases in English, has to be
818
+ * displayed as if it had an even embedding level (this can happen if the
819
+ * displaying application treats all text as if it was basically LTR).
820
+ * <br>
821
+ * This mode may also be needed in the reverse case, when logical text which is
822
+ * basically English, with possible included phrases in Arabic or Hebrew, has to
823
+ * be displayed as if it had an odd embedding level.
824
+ * <br>
825
+ * Both cases could be handled by adding LRE or RLE at the head of the text,
826
+ * if the display subsystem supports these formatting controls. If it does not,
827
+ * the problem may be handled by transforming the source text in this mode
828
+ * before displaying it, so that it will be displayed properly.<br>
829
+ * The source text should not contain Bidi control characters other than LRM
830
+ * or RLM.</li>
831
+ *
832
+ * <li>When the reordering mode is set to
833
+ * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>, an "inverse Bidi" algorithm
834
+ * is applied.
835
+ * Runs of text with numeric characters will be treated like LTR letters and
836
+ * may need to be surrounded with LRM characters when they are written in
837
+ * reordered sequence (the option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> can
838
+ * be used with function <code>ubidi_writeReordered</code> to this end. This
839
+ * mode is equivalent to calling <code>ubidi_setInverse()</code> with
840
+ * argument <code>isInverse</code> set to <code>true</code>.</li>
841
+ *
842
+ * <li>When the reordering mode is set to
843
+ * <code>#UBIDI_REORDER_INVERSE_LIKE_DIRECT</code>, the "direct" Logical to Visual
844
+ * Bidi algorithm is used as an approximation of an "inverse Bidi" algorithm.
845
+ * This mode is similar to mode <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>
846
+ * but is closer to the regular Bidi algorithm.
847
+ * <br>
848
+ * For example, an LTR paragraph with the content "FED 123 456 CBA" (where
849
+ * upper case represents RTL characters) will be transformed to
850
+ * "ABC 456 123 DEF", as opposed to "DEF 123 456 ABC"
851
+ * with mode <code>UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.<br>
852
+ * When used in conjunction with option
853
+ * <code>#UBIDI_OPTION_INSERT_MARKS</code>, this mode generally
854
+ * adds Bidi marks to the output significantly more sparingly than mode
855
+ * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> with option
856
+ * <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls to
857
+ * <code>ubidi_writeReordered</code>.</li>
858
+ *
859
+ * <li>When the reordering mode is set to
860
+ * <code>#UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the Logical to Visual
861
+ * Bidi algorithm used in Windows XP is used as an approximation of an "inverse Bidi" algorithm.
862
+ * <br>
863
+ * For example, an LTR paragraph with the content "abc FED123" (where
864
+ * upper case represents RTL characters) will be transformed to "abc 123DEF."</li>
865
+ * </ul>
866
+ *
867
+ * <p>In all the reordering modes specifying an "inverse Bidi" algorithm
868
+ * (i.e. those with a name starting with <code>UBIDI_REORDER_INVERSE</code>),
869
+ * output runs should be retrieved using
870
+ * <code>ubidi_getVisualRun()</code>, and the output text with
871
+ * <code>ubidi_writeReordered()</code>. The caller should keep in mind that in
872
+ * "inverse Bidi" modes the input is actually visually ordered text and
873
+ * reordered output returned by <code>ubidi_getVisualRun()</code> or
874
+ * <code>ubidi_writeReordered()</code> are actually runs or character string
875
+ * of logically ordered output.<br>
876
+ * For all the "inverse Bidi" modes, the source text should not contain
877
+ * Bidi control characters other than LRM or RLM.</p>
878
+ *
879
+ * <p>Note that option <code>#UBIDI_OUTPUT_REVERSE</code> of
880
+ * <code>ubidi_writeReordered</code> has no useful meaning and should not be
881
+ * used in conjunction with any value of the reordering mode specifying
882
+ * "inverse Bidi" or with value <code>UBIDI_REORDER_RUNS_ONLY</code>.
883
+ *
884
+ * @param pBiDi is a <code>UBiDi</code> object.
885
+ * @param reorderingMode specifies the required variant of the Bidi algorithm.
886
+ *
887
+ * @see UBiDiReorderingMode
888
+ * @see ubidi_setInverse
889
+ * @see ubidi_setPara
890
+ * @see ubidi_writeReordered
891
+ * @stable ICU 3.6
892
+ */
893
+ U_CAPI void U_EXPORT2
894
+ ubidi_setReorderingMode(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode);
895
+
896
+ /**
897
+ * What is the requested reordering mode for a given Bidi object?
898
+ *
899
+ * @param pBiDi is a <code>UBiDi</code> object.
900
+ * @return the current reordering mode of the Bidi object
901
+ * @see ubidi_setReorderingMode
902
+ * @stable ICU 3.6
903
+ */
904
+ U_CAPI UBiDiReorderingMode U_EXPORT2
905
+ ubidi_getReorderingMode(UBiDi *pBiDi);
906
+
907
+ /**
908
+ * <code>UBiDiReorderingOption</code> values indicate which options are
909
+ * specified to affect the Bidi algorithm.
910
+ *
911
+ * @see ubidi_setReorderingOptions
912
+ * @stable ICU 3.6
913
+ */
914
+ typedef enum UBiDiReorderingOption {
915
+ /**
916
+ * option value for <code>ubidi_setReorderingOptions</code>:
917
+ * disable all the options which can be set with this function
918
+ * @see ubidi_setReorderingOptions
919
+ * @stable ICU 3.6
920
+ */
921
+ UBIDI_OPTION_DEFAULT = 0,
922
+
923
+ /**
924
+ * option bit for <code>ubidi_setReorderingOptions</code>:
925
+ * insert Bidi marks (LRM or RLM) when needed to ensure correct result of
926
+ * a reordering to a Logical order
927
+ *
928
+ * <p>This option must be set or reset before calling
929
+ * <code>ubidi_setPara</code>.</p>
930
+ *
931
+ * <p>This option is significant only with reordering modes which generate
932
+ * a result with Logical order, specifically:</p>
933
+ * <ul>
934
+ * <li><code>#UBIDI_REORDER_RUNS_ONLY</code></li>
935
+ * <li><code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code></li>
936
+ * <li><code>#UBIDI_REORDER_INVERSE_LIKE_DIRECT</code></li>
937
+ * <li><code>#UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code></li>
938
+ * </ul>
939
+ *
940
+ * <p>If this option is set in conjunction with reordering mode
941
+ * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> or with calling
942
+ * <code>ubidi_setInverse(true)</code>, it implies
943
+ * option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code>
944
+ * in calls to function <code>ubidi_writeReordered()</code>.</p>
945
+ *
946
+ * <p>For other reordering modes, a minimum number of LRM or RLM characters
947
+ * will be added to the source text after reordering it so as to ensure
948
+ * round trip, i.e. when applying the inverse reordering mode on the
949
+ * resulting logical text with removal of Bidi marks
950
+ * (option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> set before calling
951
+ * <code>ubidi_setPara()</code> or option <code>#UBIDI_REMOVE_BIDI_CONTROLS</code>
952
+ * in <code>ubidi_writeReordered</code>), the result will be identical to the
953
+ * source text in the first transformation.
954
+ *
955
+ * <p>This option will be ignored if specified together with option
956
+ * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>. It inhibits option
957
+ * <code>UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to function
958
+ * <code>ubidi_writeReordered()</code> and it implies option
959
+ * <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls to function
960
+ * <code>ubidi_writeReordered()</code> if the reordering mode is
961
+ * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.</p>
962
+ *
963
+ * @see ubidi_setReorderingMode
964
+ * @see ubidi_setReorderingOptions
965
+ * @stable ICU 3.6
966
+ */
967
+ UBIDI_OPTION_INSERT_MARKS = 1,
968
+
969
+ /**
970
+ * option bit for <code>ubidi_setReorderingOptions</code>:
971
+ * remove Bidi control characters
972
+ *
973
+ * <p>This option must be set or reset before calling
974
+ * <code>ubidi_setPara</code>.</p>
975
+ *
976
+ * <p>This option nullifies option <code>#UBIDI_OPTION_INSERT_MARKS</code>.
977
+ * It inhibits option <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code> in calls
978
+ * to function <code>ubidi_writeReordered()</code> and it implies option
979
+ * <code>#UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to that function.</p>
980
+ *
981
+ * @see ubidi_setReorderingMode
982
+ * @see ubidi_setReorderingOptions
983
+ * @stable ICU 3.6
984
+ */
985
+ UBIDI_OPTION_REMOVE_CONTROLS = 2,
986
+
987
+ /**
988
+ * option bit for <code>ubidi_setReorderingOptions</code>:
989
+ * process the output as part of a stream to be continued
990
+ *
991
+ * <p>This option must be set or reset before calling
992
+ * <code>ubidi_setPara</code>.</p>
993
+ *
994
+ * <p>This option specifies that the caller is interested in processing large
995
+ * text object in parts.
996
+ * The results of the successive calls are expected to be concatenated by the
997
+ * caller. Only the call for the last part will have this option bit off.</p>
998
+ *
999
+ * <p>When this option bit is on, <code>ubidi_setPara()</code> may process
1000
+ * less than the full source text in order to truncate the text at a meaningful
1001
+ * boundary. The caller should call <code>ubidi_getProcessedLength()</code>
1002
+ * immediately after calling <code>ubidi_setPara()</code> in order to
1003
+ * determine how much of the source text has been processed.
1004
+ * Source text beyond that length should be resubmitted in following calls to
1005
+ * <code>ubidi_setPara</code>. The processed length may be less than
1006
+ * the length of the source text if a character preceding the last character of
1007
+ * the source text constitutes a reasonable boundary (like a block separator)
1008
+ * for text to be continued.<br>
1009
+ * If the last character of the source text constitutes a reasonable
1010
+ * boundary, the whole text will be processed at once.<br>
1011
+ * If nowhere in the source text there exists
1012
+ * such a reasonable boundary, the processed length will be zero.<br>
1013
+ * The caller should check for such an occurrence and do one of the following:
1014
+ * <ul><li>submit a larger amount of text with a better chance to include
1015
+ * a reasonable boundary.</li>
1016
+ * <li>resubmit the same text after turning off option
1017
+ * <code>UBIDI_OPTION_STREAMING</code>.</li></ul>
1018
+ * In all cases, this option should be turned off before processing the last
1019
+ * part of the text.</p>
1020
+ *
1021
+ * <p>When the <code>UBIDI_OPTION_STREAMING</code> option is used,
1022
+ * it is recommended to call <code>ubidi_orderParagraphsLTR()</code> with
1023
+ * argument <code>orderParagraphsLTR</code> set to <code>true</code> before
1024
+ * calling <code>ubidi_setPara</code> so that later paragraphs may be
1025
+ * concatenated to previous paragraphs on the right.</p>
1026
+ *
1027
+ * @see ubidi_setReorderingMode
1028
+ * @see ubidi_setReorderingOptions
1029
+ * @see ubidi_getProcessedLength
1030
+ * @see ubidi_orderParagraphsLTR
1031
+ * @stable ICU 3.6
1032
+ */
1033
+ UBIDI_OPTION_STREAMING = 4
1034
+ } UBiDiReorderingOption;
1035
+
1036
+ /**
1037
+ * Specify which of the reordering options
1038
+ * should be applied during Bidi transformations.
1039
+ *
1040
+ * @param pBiDi is a <code>UBiDi</code> object.
1041
+ * @param reorderingOptions is a combination of zero or more of the following
1042
+ * options:
1043
+ * <code>#UBIDI_OPTION_DEFAULT</code>, <code>#UBIDI_OPTION_INSERT_MARKS</code>,
1044
+ * <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>, <code>#UBIDI_OPTION_STREAMING</code>.
1045
+ *
1046
+ * @see ubidi_getReorderingOptions
1047
+ * @stable ICU 3.6
1048
+ */
1049
+ U_CAPI void U_EXPORT2
1050
+ ubidi_setReorderingOptions(UBiDi *pBiDi, uint32_t reorderingOptions);
1051
+
1052
+ /**
1053
+ * What are the reordering options applied to a given Bidi object?
1054
+ *
1055
+ * @param pBiDi is a <code>UBiDi</code> object.
1056
+ * @return the current reordering options of the Bidi object
1057
+ * @see ubidi_setReorderingOptions
1058
+ * @stable ICU 3.6
1059
+ */
1060
+ U_CAPI uint32_t U_EXPORT2
1061
+ ubidi_getReorderingOptions(UBiDi *pBiDi);
1062
+
1063
+ /**
1064
+ * Set the context before a call to ubidi_setPara().<p>
1065
+ *
1066
+ * ubidi_setPara() computes the left-right directionality for a given piece
1067
+ * of text which is supplied as one of its arguments. Sometimes this piece
1068
+ * of text (the "main text") should be considered in context, because text
1069
+ * appearing before ("prologue") and/or after ("epilogue") the main text
1070
+ * may affect the result of this computation.<p>
1071
+ *
1072
+ * This function specifies the prologue and/or the epilogue for the next
1073
+ * call to ubidi_setPara(). The characters specified as prologue and
1074
+ * epilogue should not be modified by the calling program until the call
1075
+ * to ubidi_setPara() has returned. If successive calls to ubidi_setPara()
1076
+ * all need specification of a context, ubidi_setContext() must be called
1077
+ * before each call to ubidi_setPara(). In other words, a context is not
1078
+ * "remembered" after the following successful call to ubidi_setPara().<p>
1079
+ *
1080
+ * If a call to ubidi_setPara() specifies UBIDI_DEFAULT_LTR or
1081
+ * UBIDI_DEFAULT_RTL as paraLevel and is preceded by a call to
1082
+ * ubidi_setContext() which specifies a prologue, the paragraph level will
1083
+ * be computed taking in consideration the text in the prologue.<p>
1084
+ *
1085
+ * When ubidi_setPara() is called without a previous call to
1086
+ * ubidi_setContext, the main text is handled as if preceded and followed
1087
+ * by strong directional characters at the current paragraph level.
1088
+ * Calling ubidi_setContext() with specification of a prologue will change
1089
+ * this behavior by handling the main text as if preceded by the last
1090
+ * strong character appearing in the prologue, if any.
1091
+ * Calling ubidi_setContext() with specification of an epilogue will change
1092
+ * the behavior of ubidi_setPara() by handling the main text as if followed
1093
+ * by the first strong character or digit appearing in the epilogue, if any.<p>
1094
+ *
1095
+ * Note 1: if <code>ubidi_setContext</code> is called repeatedly without
1096
+ * calling <code>ubidi_setPara</code>, the earlier calls have no effect,
1097
+ * only the last call will be remembered for the next call to
1098
+ * <code>ubidi_setPara</code>.<p>
1099
+ *
1100
+ * Note 2: calling <code>ubidi_setContext(pBiDi, NULL, 0, NULL, 0, &errorCode)</code>
1101
+ * cancels any previous setting of non-empty prologue or epilogue.
1102
+ * The next call to <code>ubidi_setPara()</code> will process no
1103
+ * prologue or epilogue.<p>
1104
+ *
1105
+ * Note 3: users must be aware that even after setting the context
1106
+ * before a call to ubidi_setPara() to perform e.g. a logical to visual
1107
+ * transformation, the resulting string may not be identical to what it
1108
+ * would have been if all the text, including prologue and epilogue, had
1109
+ * been processed together.<br>
1110
+ * Example (upper case letters represent RTL characters):<br>
1111
+ * &nbsp;&nbsp;prologue = "<code>abc DE</code>"<br>
1112
+ * &nbsp;&nbsp;epilogue = none<br>
1113
+ * &nbsp;&nbsp;main text = "<code>FGH xyz</code>"<br>
1114
+ * &nbsp;&nbsp;paraLevel = UBIDI_LTR<br>
1115
+ * &nbsp;&nbsp;display without prologue = "<code>HGF xyz</code>"
1116
+ * ("HGF" is adjacent to "xyz")<br>
1117
+ * &nbsp;&nbsp;display with prologue = "<code>abc HGFED xyz</code>"
1118
+ * ("HGF" is not adjacent to "xyz")<br>
1119
+ *
1120
+ * @param pBiDi is a paragraph <code>UBiDi</code> object.
1121
+ *
1122
+ * @param prologue is a pointer to the text which precedes the text that
1123
+ * will be specified in a coming call to ubidi_setPara().
1124
+ * If there is no prologue to consider, then <code>proLength</code>
1125
+ * must be zero and this pointer can be NULL.
1126
+ *
1127
+ * @param proLength is the length of the prologue; if <code>proLength==-1</code>
1128
+ * then the prologue must be zero-terminated.
1129
+ * Otherwise proLength must be >= 0. If <code>proLength==0</code>, it means
1130
+ * that there is no prologue to consider.
1131
+ *
1132
+ * @param epilogue is a pointer to the text which follows the text that
1133
+ * will be specified in a coming call to ubidi_setPara().
1134
+ * If there is no epilogue to consider, then <code>epiLength</code>
1135
+ * must be zero and this pointer can be NULL.
1136
+ *
1137
+ * @param epiLength is the length of the epilogue; if <code>epiLength==-1</code>
1138
+ * then the epilogue must be zero-terminated.
1139
+ * Otherwise epiLength must be >= 0. If <code>epiLength==0</code>, it means
1140
+ * that there is no epilogue to consider.
1141
+ *
1142
+ * @param pErrorCode must be a valid pointer to an error code value.
1143
+ *
1144
+ * @see ubidi_setPara
1145
+ * @stable ICU 4.8
1146
+ */
1147
+ U_CAPI void U_EXPORT2
1148
+ ubidi_setContext(UBiDi *pBiDi,
1149
+ const UChar *prologue, int32_t proLength,
1150
+ const UChar *epilogue, int32_t epiLength,
1151
+ UErrorCode *pErrorCode);
1152
+
1153
+ /**
1154
+ * Perform the Unicode Bidi algorithm. It is defined in the
1155
+ * <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>,
1156
+ * Unicode 8.0.0 / revision 33,
1157
+ * also described in The Unicode Standard, Version 8.0 .<p>
1158
+ *
1159
+ * This function takes a piece of plain text containing one or more paragraphs,
1160
+ * with or without externally specified embedding levels from <i>styled</i>
1161
+ * text and computes the left-right-directionality of each character.<p>
1162
+ *
1163
+ * If the entire text is all of the same directionality, then
1164
+ * the function may not perform all the steps described by the algorithm,
1165
+ * i.e., some levels may not be the same as if all steps were performed.
1166
+ * This is not relevant for unidirectional text.<br>
1167
+ * For example, in pure LTR text with numbers the numbers would get
1168
+ * a resolved level of 2 higher than the surrounding text according to
1169
+ * the algorithm. This implementation may set all resolved levels to
1170
+ * the same value in such a case.<p>
1171
+ *
1172
+ * The text can be composed of multiple paragraphs. Occurrence of a block
1173
+ * separator in the text terminates a paragraph, and whatever comes next starts
1174
+ * a new paragraph. The exception to this rule is when a Carriage Return (CR)
1175
+ * is followed by a Line Feed (LF). Both CR and LF are block separators, but
1176
+ * in that case, the pair of characters is considered as terminating the
1177
+ * preceding paragraph, and a new paragraph will be started by a character
1178
+ * coming after the LF.
1179
+ *
1180
+ * @param pBiDi A <code>UBiDi</code> object allocated with <code>ubidi_open()</code>
1181
+ * which will be set to contain the reordering information,
1182
+ * especially the resolved levels for all the characters in <code>text</code>.
1183
+ *
1184
+ * @param text is a pointer to the text that the Bidi algorithm will be performed on.
1185
+ * This pointer is stored in the UBiDi object and can be retrieved
1186
+ * with <code>ubidi_getText()</code>.<br>
1187
+ * <strong>Note:</strong> the text must be (at least) <code>length</code> long.
1188
+ *
1189
+ * @param length is the length of the text; if <code>length==-1</code> then
1190
+ * the text must be zero-terminated.
1191
+ *
1192
+ * @param paraLevel specifies the default level for the text;
1193
+ * it is typically 0 (LTR) or 1 (RTL).
1194
+ * If the function shall determine the paragraph level from the text,
1195
+ * then <code>paraLevel</code> can be set to
1196
+ * either <code>#UBIDI_DEFAULT_LTR</code>
1197
+ * or <code>#UBIDI_DEFAULT_RTL</code>; if the text contains multiple
1198
+ * paragraphs, the paragraph level shall be determined separately for
1199
+ * each paragraph; if a paragraph does not include any strongly typed
1200
+ * character, then the desired default is used (0 for LTR or 1 for RTL).
1201
+ * Any other value between 0 and <code>#UBIDI_MAX_EXPLICIT_LEVEL</code>
1202
+ * is also valid, with odd levels indicating RTL.
1203
+ *
1204
+ * @param embeddingLevels (in) may be used to preset the embedding and override levels,
1205
+ * ignoring characters like LRE and PDF in the text.
1206
+ * A level overrides the directional property of its corresponding
1207
+ * (same index) character if the level has the
1208
+ * <code>#UBIDI_LEVEL_OVERRIDE</code> bit set.<br><br>
1209
+ * Aside from that bit, it must be
1210
+ * <code>paraLevel<=embeddingLevels[]<=UBIDI_MAX_EXPLICIT_LEVEL</code>,
1211
+ * except that level 0 is always allowed.
1212
+ * Level 0 for a paragraph separator prevents reordering of paragraphs;
1213
+ * this only works reliably if <code>#UBIDI_LEVEL_OVERRIDE</code>
1214
+ * is also set for paragraph separators.
1215
+ * Level 0 for other characters is treated as a wildcard
1216
+ * and is lifted up to the resolved level of the surrounding paragraph.<br><br>
1217
+ * <strong>Caution: </strong>A copy of this pointer, not of the levels,
1218
+ * will be stored in the <code>UBiDi</code> object;
1219
+ * the <code>embeddingLevels</code> array must not be
1220
+ * deallocated before the <code>UBiDi</code> structure is destroyed or reused,
1221
+ * and the <code>embeddingLevels</code>
1222
+ * should not be modified to avoid unexpected results on subsequent Bidi operations.
1223
+ * However, the <code>ubidi_setPara()</code> and
1224
+ * <code>ubidi_setLine()</code> functions may modify some or all of the levels.<br><br>
1225
+ * After the <code>UBiDi</code> object is reused or destroyed, the caller
1226
+ * must take care of the deallocation of the <code>embeddingLevels</code> array.<br><br>
1227
+ * <strong>Note:</strong> the <code>embeddingLevels</code> array must be
1228
+ * at least <code>length</code> long.
1229
+ * This pointer can be <code>NULL</code> if this
1230
+ * value is not necessary.
1231
+ *
1232
+ * @param pErrorCode must be a valid pointer to an error code value.
1233
+ * @stable ICU 2.0
1234
+ */
1235
+ U_CAPI void U_EXPORT2
1236
+ ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
1237
+ UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels,
1238
+ UErrorCode *pErrorCode);
1239
+
1240
+ #if APPLE_ICU_CHANGES
1241
+ // rdar://22875147 72013ab67a.. Sub-TLF: ICU enhancements to enable single bidi engine across Apple: initial work
1242
+ // rdar://22875147 cb03b4026c.. Sub-TLF: ICU enhancements to enable single bidi engine across Apple: finish
1243
+ #ifndef U_HIDE_INTERNAL_API
1244
+ /**
1245
+ * Perform the Unicode Bidi algorithm. It is defined in the
1246
+ * <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>,
1247
+ * Unicode 8.0.0 / revision 33,
1248
+ * also described in The Unicode Standard, Version 8.0 .<p>
1249
+ *
1250
+ * This function takes a piece of plain text containing one or more paragraphs,
1251
+ * with or without externally specified direction overrides (in the form of
1252
+ * sequences of one or more bidi control characters for
1253
+ * embeddings/overrides/isolates to be effectively inserted at specified points
1254
+ * in the text), and computes the left-right-directionality of each character.
1255
+ * Note that ubidi_setContext may be used to set the context before or after the
1256
+ * text passed to ubidi_setPara, so ubidi_setParaWithControls is only needed if
1257
+ * externally specified direction overrides need to be effectively inserted at
1258
+ * other locations in the text.<p>
1259
+ *
1260
+ * Note: Currently the external specified direction overrides are only supported
1261
+ * for the Logical to Visual values of UBiDiReorderingMode: UBIDI_REORDER_DEFAULT,
1262
+ * UBIDI_REORDER_NUMBERS_SPECIAL, UBIDI_REORDER_GROUP_NUMBERS_WITH_R. With other
1263
+ * UBiDiReorderingMode settings, this function behaves as if offsetCount is 0.<p>
1264
+ *
1265
+ * If the entire text is all of the same directionality, then the function may
1266
+ * not perform all the steps described by the algorithm, i.e., some levels may
1267
+ * not be the same as if all steps were performed. This is not relevant for
1268
+ * unidirectional text.<br>
1269
+ * For example, in pure LTR text with numbers the numbers would get a resolved
1270
+ * level of 2 higher than the surrounding text according to the algorithm. This
1271
+ * implementation may set all resolved levels to the same value in such a case.<p>
1272
+ *
1273
+ * The text can be composed of multiple paragraphs. Occurrence of a block
1274
+ * separator in the text terminates a paragraph, and whatever comes next starts
1275
+ * a new paragraph. The exception to this rule is when a Carriage Return (CR)
1276
+ * is followed by a Line Feed (LF). Both CR and LF are block separators, but
1277
+ * in that case, the pair of characters is considered as terminating the
1278
+ * preceding paragraph, and a new paragraph will be started by a character
1279
+ * coming after the LF.<p>
1280
+ *
1281
+ * @param pBiDi A <code>UBiDi</code> object allocated with <code>ubidi_open()</code>
1282
+ * which will be set to contain the reordering information,
1283
+ * especially the resolved levels for all the characters in <code>text</code>.
1284
+ *
1285
+ * @param text is a pointer to the text that the Bidi algorithm will be performed on.
1286
+ * This pointer is stored in the UBiDi object and can be retrieved
1287
+ * with <code>ubidi_getText()</code>.<br>
1288
+ * <strong>Note:</strong> the text must be (at least) <code>length</code> long.
1289
+ *
1290
+ * @param length is the length of the text; if <code>length==-1</code> then
1291
+ * the text must be zero-terminated.
1292
+ *
1293
+ * @param paraLevel specifies the default level for the text;
1294
+ * it is typically 0 (LTR) or 1 (RTL).
1295
+ * If the function shall determine the paragraph level from the text,
1296
+ * then <code>paraLevel</code> can be set to
1297
+ * either <code>#UBIDI_DEFAULT_LTR</code>
1298
+ * or <code>#UBIDI_DEFAULT_RTL</code>; if the text contains multiple
1299
+ * paragraphs, the paragraph level shall be determined separately for
1300
+ * each paragraph; if a paragraph does not include any strongly typed
1301
+ * character, then the desired default is used (0 for LTR or 1 for RTL).
1302
+ * Any other value between 0 and <code>#UBIDI_MAX_EXPLICIT_LEVEL</code>
1303
+ * is also valid, with odd levels indicating RTL.
1304
+ *
1305
+ * @param offsets Array of text offsets at which sequences of one or more
1306
+ * bidi controls are to be effectively inserted. The offset values must
1307
+ * be >= 0 and < <code>length</code> (use <code>ubidi_setContext</code>
1308
+ * to provide the effect of inserting controls after the last character
1309
+ * of the text). This must be non-NULL if <code>offsetCount</code> > 0.
1310
+ *
1311
+ * @param offsetCount The number of entries in the offsets array, and in the
1312
+ * controlStringIndices array if the latter is present (non NULL). If
1313
+ * <code>offsetCount</code> is 0, then no controls will be inserted and
1314
+ * the parameters <code>offsets</code>, <code>controlStringIndices</code>
1315
+ * and <code>controlStrings</code> will be ignored.
1316
+ *
1317
+ * @param controlStringIndices If not NULL, this array must have the same
1318
+ * number of entries as the offsets array; each entry in this array
1319
+ * maps from the corresponding offset to the index in controlStrings
1320
+ * of the control sequence that is to be effectively inserted at that
1321
+ * offset. This indirection is useful when certain control sequences
1322
+ * are to be effectively inserted in many different places in the text.
1323
+ * If this array is NULL, then the entries in controlStrings correspond
1324
+ * directly to the entries in the offsets array.
1325
+ *
1326
+ * @param controlStrings Array of const pointers to zero-terminated
1327
+ * const UChar strings each consisting of zero or more characters that
1328
+ * are bidi controls for embeddings, overrides, or isolates (see list
1329
+ * below). Other characters that might be supported in the future
1330
+ * (depending on need) include bidi marks an characters with
1331
+ * bidi class B (block separator) or class S (segment separator).
1332
+ * The characters in these strings only affect the bidi levels assigned
1333
+ * to the characters in he text array, they are not used for any other
1334
+ * purpose.<br>
1335
+ * If controlStringIndices is NULL, then controlStrings must have the
1336
+ * same number of entries as the offsets array, and each entry provides
1337
+ * the UChar string that is effectively inserted at the corresponding
1338
+ * offset. If controlStringIndices is not NULL, then controlStrings must
1339
+ * have at least enough entries to accommodate to all of the index values
1340
+ * in the controlStringIndices array. This must be non-NULL if
1341
+ * offsetCount > 0.<br>
1342
+ * Current limitations:<br>
1343
+ * Each zero-terminated const UChar string is limited a maximum length
1344
+ * of 4, not including the zero terminator.<br>
1345
+ * Each zero-terminated const UChar string may contain at most one
1346
+ * instance of FSI, LRI, or RLI.<br>
1347
+ *
1348
+ * @param pErrorCode must be a valid pointer to an error code value.
1349
+ *
1350
+ * @discussion
1351
+ * <pre>
1352
+ * Supported bidi controls for embeddings / overrides / isolates as of Unicode 8.0:
1353
+ * LRE U+202A LEFT-TO-RIGHT EMBEDDING
1354
+ * RLE U+202B RIGHT-TO-LEFT EMBEDDING
1355
+ * PDF U+202C POP DIRECTIONAL FORMATTING
1356
+ * LRO U+202D LEFT-TO-RIGHT OVERRIDE
1357
+ * RLO U+202E RIGHT-TO-LEFT OVERRIDE
1358
+ * #
1359
+ * LRI U+2066 LEFT‑TO‑RIGHT ISOLATE
1360
+ * RLI U+2067 RIGHT‑TO‑LEFT ISOLATE
1361
+ * FSI U+2068 FIRST STRONG ISOLATE
1362
+ * PDI U+2069 POP DIRECTIONAL ISOLATE
1363
+ *
1364
+ * Bidi marks as of Unicode 8.0:
1365
+ * ALM U+061C ARABIC LETTER MARK (bidi class AL)
1366
+ * LRM U+200E LEFT-TO-RIGHT MARK (bidi class L)
1367
+ * RLM U+200F RIGHT-TO-LEFT MARK (bidi class R)
1368
+ * Characters with bidi class B (block separator) as of Unicode 8.0:
1369
+ * B U+000A LINE FEED (LF)
1370
+ * B U+000D CARRIAGE RETURN (CR)
1371
+ * B U+001C INFORMATION SEPARATOR FOUR
1372
+ * B U+001D INFORMATION SEPARATOR THREE
1373
+ * B U+001E INFORMATION SEPARATOR TWO
1374
+ * B U+0085 NEXT LINE (NEL)
1375
+ * B U+2029 PARAGRAPH SEPARATOR
1376
+ * Characters with bidi class S (segment separator) as of Unicode 8.0:
1377
+ * S U+0009 CHARACTER TABULATION
1378
+ * S U+000B LINE TABULATION
1379
+ * S U+001F INFORMATION SEPARATOR ONE
1380
+ * </pre>
1381
+ *
1382
+ * @see ubidi_setContext
1383
+ * @internal technology preview as of ICU 57
1384
+ */
1385
+ U_INTERNAL void U_EXPORT2
1386
+ ubidi_setParaWithControls(UBiDi *pBiDi,
1387
+ const UChar *text, int32_t length,
1388
+ UBiDiLevel paraLevel,
1389
+ const int32_t *offsets, int32_t offsetCount,
1390
+ const int32_t *controlStringIndices,
1391
+ const UChar * const * controlStrings,
1392
+ UErrorCode *pErrorCode);
1393
+
1394
+ #endif /* U_HIDE_INTERNAL_API */
1395
+ #endif // APPLE_ICU_CHANGES
1396
+
1397
+ /**
1398
+ * <code>ubidi_setLine()</code> sets a <code>UBiDi</code> to
1399
+ * contain the reordering information, especially the resolved levels,
1400
+ * for all the characters in a line of text. This line of text is
1401
+ * specified by referring to a <code>UBiDi</code> object representing
1402
+ * this information for a piece of text containing one or more paragraphs,
1403
+ * and by specifying a range of indexes in this text.<p>
1404
+ * In the new line object, the indexes will range from 0 to <code>limit-start-1</code>.<p>
1405
+ *
1406
+ * This is used after calling <code>ubidi_setPara()</code>
1407
+ * for a piece of text, and after line-breaking on that text.
1408
+ * It is not necessary if each paragraph is treated as a single line.<p>
1409
+ *
1410
+ * After line-breaking, rules (L1) and (L2) for the treatment of
1411
+ * trailing WS and for reordering are performed on
1412
+ * a <code>UBiDi</code> object that represents a line.<p>
1413
+ *
1414
+ * <strong>Important: </strong><code>pLineBiDi</code> shares data with
1415
+ * <code>pParaBiDi</code>.
1416
+ * You must destroy or reuse <code>pLineBiDi</code> before <code>pParaBiDi</code>.
1417
+ * In other words, you must destroy or reuse the <code>UBiDi</code> object for a line
1418
+ * before the object for its parent paragraph.<p>
1419
+ *
1420
+ * The text pointer that was stored in <code>pParaBiDi</code> is also copied,
1421
+ * and <code>start</code> is added to it so that it points to the beginning of the
1422
+ * line for this object.
1423
+ *
1424
+ * @param pParaBiDi is the parent paragraph object. It must have been set
1425
+ * by a successful call to ubidi_setPara.
1426
+ *
1427
+ * @param start is the line's first index into the text.
1428
+ *
1429
+ * @param limit is just behind the line's last index into the text
1430
+ * (its last index +1).<br>
1431
+ * It must be <code>0<=start<limit<=</code>containing paragraph limit.
1432
+ * If the specified line crosses a paragraph boundary, the function
1433
+ * will terminate with error code U_ILLEGAL_ARGUMENT_ERROR.
1434
+ *
1435
+ * @param pLineBiDi is the object that will now represent a line of the text.
1436
+ *
1437
+ * @param pErrorCode must be a valid pointer to an error code value.
1438
+ *
1439
+ * @see ubidi_setPara
1440
+ * @see ubidi_getProcessedLength
1441
+ * @stable ICU 2.0
1442
+ */
1443
+ U_CAPI void U_EXPORT2
1444
+ ubidi_setLine(const UBiDi *pParaBiDi,
1445
+ int32_t start, int32_t limit,
1446
+ UBiDi *pLineBiDi,
1447
+ UErrorCode *pErrorCode);
1448
+
1449
+ /**
1450
+ * Get the directionality of the text.
1451
+ *
1452
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1453
+ *
1454
+ * @return a value of <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>
1455
+ * or <code>UBIDI_MIXED</code>
1456
+ * that indicates if the entire text
1457
+ * represented by this object is unidirectional,
1458
+ * and which direction, or if it is mixed-directional.
1459
+ * Note - The value <code>UBIDI_NEUTRAL</code> is never returned from this method.
1460
+ *
1461
+ * @see UBiDiDirection
1462
+ * @stable ICU 2.0
1463
+ */
1464
+ U_CAPI UBiDiDirection U_EXPORT2
1465
+ ubidi_getDirection(const UBiDi *pBiDi);
1466
+
1467
+ /**
1468
+ * Gets the base direction of the text provided according
1469
+ * to the Unicode Bidirectional Algorithm. The base direction
1470
+ * is derived from the first character in the string with bidirectional
1471
+ * character type L, R, or AL. If the first such character has type L,
1472
+ * <code>UBIDI_LTR</code> is returned. If the first such character has
1473
+ * type R or AL, <code>UBIDI_RTL</code> is returned. If the string does
1474
+ * not contain any character of these types, then
1475
+ * <code>UBIDI_NEUTRAL</code> is returned.
1476
+ *
1477
+ * This is a lightweight function for use when only the base direction
1478
+ * is needed and no further bidi processing of the text is needed.
1479
+ *
1480
+ * @param text is a pointer to the text whose base
1481
+ * direction is needed.
1482
+ * Note: the text must be (at least) @c length long.
1483
+ *
1484
+ * @param length is the length of the text;
1485
+ * if <code>length==-1</code> then the text
1486
+ * must be zero-terminated.
1487
+ *
1488
+ * @return <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>,
1489
+ * <code>UBIDI_NEUTRAL</code>
1490
+ *
1491
+ * @see UBiDiDirection
1492
+ * @stable ICU 4.6
1493
+ */
1494
+ U_CAPI UBiDiDirection U_EXPORT2
1495
+ ubidi_getBaseDirection(const UChar *text, int32_t length );
1496
+
1497
+ /**
1498
+ * Get the pointer to the text.
1499
+ *
1500
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1501
+ *
1502
+ * @return The pointer to the text that the UBiDi object was created for.
1503
+ *
1504
+ * @see ubidi_setPara
1505
+ * @see ubidi_setLine
1506
+ * @stable ICU 2.0
1507
+ */
1508
+ U_CAPI const UChar * U_EXPORT2
1509
+ ubidi_getText(const UBiDi *pBiDi);
1510
+
1511
+ /**
1512
+ * Get the length of the text.
1513
+ *
1514
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1515
+ *
1516
+ * @return The length of the text that the UBiDi object was created for.
1517
+ * @stable ICU 2.0
1518
+ */
1519
+ U_CAPI int32_t U_EXPORT2
1520
+ ubidi_getLength(const UBiDi *pBiDi);
1521
+
1522
+ /**
1523
+ * Get the paragraph level of the text.
1524
+ *
1525
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1526
+ *
1527
+ * @return The paragraph level. If there are multiple paragraphs, their
1528
+ * level may vary if the required paraLevel is UBIDI_DEFAULT_LTR or
1529
+ * UBIDI_DEFAULT_RTL. In that case, the level of the first paragraph
1530
+ * is returned.
1531
+ *
1532
+ * @see UBiDiLevel
1533
+ * @see ubidi_getParagraph
1534
+ * @see ubidi_getParagraphByIndex
1535
+ * @stable ICU 2.0
1536
+ */
1537
+ U_CAPI UBiDiLevel U_EXPORT2
1538
+ ubidi_getParaLevel(const UBiDi *pBiDi);
1539
+
1540
+ /**
1541
+ * Get the number of paragraphs.
1542
+ *
1543
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1544
+ *
1545
+ * @return The number of paragraphs.
1546
+ * @stable ICU 3.4
1547
+ */
1548
+ U_CAPI int32_t U_EXPORT2
1549
+ ubidi_countParagraphs(UBiDi *pBiDi);
1550
+
1551
+ /**
1552
+ * Get a paragraph, given a position within the text.
1553
+ * This function returns information about a paragraph.<br>
1554
+ * Note: if the paragraph index is known, it is more efficient to
1555
+ * retrieve the paragraph information using ubidi_getParagraphByIndex().<p>
1556
+ *
1557
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1558
+ *
1559
+ * @param charIndex is the index of a character within the text, in the
1560
+ * range <code>[0..ubidi_getProcessedLength(pBiDi)-1]</code>.
1561
+ *
1562
+ * @param pParaStart will receive the index of the first character of the
1563
+ * paragraph in the text.
1564
+ * This pointer can be <code>NULL</code> if this
1565
+ * value is not necessary.
1566
+ *
1567
+ * @param pParaLimit will receive the limit of the paragraph.
1568
+ * The l-value that you point to here may be the
1569
+ * same expression (variable) as the one for
1570
+ * <code>charIndex</code>.
1571
+ * This pointer can be <code>NULL</code> if this
1572
+ * value is not necessary.
1573
+ *
1574
+ * @param pParaLevel will receive the level of the paragraph.
1575
+ * This pointer can be <code>NULL</code> if this
1576
+ * value is not necessary.
1577
+ *
1578
+ * @param pErrorCode must be a valid pointer to an error code value.
1579
+ *
1580
+ * @return The index of the paragraph containing the specified position.
1581
+ *
1582
+ * @see ubidi_getProcessedLength
1583
+ * @stable ICU 3.4
1584
+ */
1585
+ U_CAPI int32_t U_EXPORT2
1586
+ ubidi_getParagraph(const UBiDi *pBiDi, int32_t charIndex, int32_t *pParaStart,
1587
+ int32_t *pParaLimit, UBiDiLevel *pParaLevel,
1588
+ UErrorCode *pErrorCode);
1589
+
1590
+ /**
1591
+ * Get a paragraph, given the index of this paragraph.
1592
+ *
1593
+ * This function returns information about a paragraph.<p>
1594
+ *
1595
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
1596
+ *
1597
+ * @param paraIndex is the number of the paragraph, in the
1598
+ * range <code>[0..ubidi_countParagraphs(pBiDi)-1]</code>.
1599
+ *
1600
+ * @param pParaStart will receive the index of the first character of the
1601
+ * paragraph in the text.
1602
+ * This pointer can be <code>NULL</code> if this
1603
+ * value is not necessary.
1604
+ *
1605
+ * @param pParaLimit will receive the limit of the paragraph.
1606
+ * This pointer can be <code>NULL</code> if this
1607
+ * value is not necessary.
1608
+ *
1609
+ * @param pParaLevel will receive the level of the paragraph.
1610
+ * This pointer can be <code>NULL</code> if this
1611
+ * value is not necessary.
1612
+ *
1613
+ * @param pErrorCode must be a valid pointer to an error code value.
1614
+ *
1615
+ * @stable ICU 3.4
1616
+ */
1617
+ U_CAPI void U_EXPORT2
1618
+ ubidi_getParagraphByIndex(const UBiDi *pBiDi, int32_t paraIndex,
1619
+ int32_t *pParaStart, int32_t *pParaLimit,
1620
+ UBiDiLevel *pParaLevel, UErrorCode *pErrorCode);
1621
+
1622
+ /**
1623
+ * Get the level for one character.
1624
+ *
1625
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1626
+ *
1627
+ * @param charIndex the index of a character. It must be in the range
1628
+ * [0..ubidi_getProcessedLength(pBiDi)].
1629
+ *
1630
+ * @return The level for the character at charIndex (0 if charIndex is not
1631
+ * in the valid range).
1632
+ *
1633
+ * @see UBiDiLevel
1634
+ * @see ubidi_getProcessedLength
1635
+ * @stable ICU 2.0
1636
+ */
1637
+ U_CAPI UBiDiLevel U_EXPORT2
1638
+ ubidi_getLevelAt(const UBiDi *pBiDi, int32_t charIndex);
1639
+
1640
+ /**
1641
+ * Get an array of levels for each character.<p>
1642
+ *
1643
+ * Note that this function may allocate memory under some
1644
+ * circumstances, unlike <code>ubidi_getLevelAt()</code>.
1645
+ *
1646
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object, whose
1647
+ * text length must be strictly positive.
1648
+ *
1649
+ * @param pErrorCode must be a valid pointer to an error code value.
1650
+ *
1651
+ * @return The levels array for the text,
1652
+ * or <code>NULL</code> if an error occurs.
1653
+ *
1654
+ * @see UBiDiLevel
1655
+ * @see ubidi_getProcessedLength
1656
+ * @stable ICU 2.0
1657
+ */
1658
+ U_CAPI const UBiDiLevel * U_EXPORT2
1659
+ ubidi_getLevels(UBiDi *pBiDi, UErrorCode *pErrorCode);
1660
+
1661
+ /**
1662
+ * Get a logical run.
1663
+ * This function returns information about a run and is used
1664
+ * to retrieve runs in logical order.<p>
1665
+ * This is especially useful for line-breaking on a paragraph.
1666
+ *
1667
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1668
+ *
1669
+ * @param logicalPosition is a logical position within the source text.
1670
+ *
1671
+ * @param pLogicalLimit will receive the limit of the corresponding run.
1672
+ * The l-value that you point to here may be the
1673
+ * same expression (variable) as the one for
1674
+ * <code>logicalPosition</code>.
1675
+ * This pointer can be <code>NULL</code> if this
1676
+ * value is not necessary.
1677
+ *
1678
+ * @param pLevel will receive the level of the corresponding run.
1679
+ * This pointer can be <code>NULL</code> if this
1680
+ * value is not necessary.
1681
+ *
1682
+ * @see ubidi_getProcessedLength
1683
+ * @stable ICU 2.0
1684
+ */
1685
+ U_CAPI void U_EXPORT2
1686
+ ubidi_getLogicalRun(const UBiDi *pBiDi, int32_t logicalPosition,
1687
+ int32_t *pLogicalLimit, UBiDiLevel *pLevel);
1688
+
1689
+ /**
1690
+ * Get the number of runs.
1691
+ * This function may invoke the actual reordering on the
1692
+ * <code>UBiDi</code> object, after <code>ubidi_setPara()</code>
1693
+ * may have resolved only the levels of the text. Therefore,
1694
+ * <code>ubidi_countRuns()</code> may have to allocate memory,
1695
+ * and may fail doing so.
1696
+ *
1697
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1698
+ *
1699
+ * @param pErrorCode must be a valid pointer to an error code value.
1700
+ *
1701
+ * @return The number of runs.
1702
+ * @stable ICU 2.0
1703
+ */
1704
+ U_CAPI int32_t U_EXPORT2
1705
+ ubidi_countRuns(UBiDi *pBiDi, UErrorCode *pErrorCode);
1706
+
1707
+ /**
1708
+ * Get one run's logical start, length, and directionality,
1709
+ * which can be 0 for LTR or 1 for RTL.
1710
+ * In an RTL run, the character at the logical start is
1711
+ * visually on the right of the displayed run.
1712
+ * The length is the number of characters in the run.<p>
1713
+ * <code>ubidi_countRuns()</code> should be called
1714
+ * before the runs are retrieved.
1715
+ *
1716
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1717
+ *
1718
+ * @param runIndex is the number of the run in visual order, in the
1719
+ * range <code>[0..ubidi_countRuns(pBiDi)-1]</code>.
1720
+ *
1721
+ * @param pLogicalStart is the first logical character index in the text.
1722
+ * The pointer may be <code>NULL</code> if this index is not needed.
1723
+ *
1724
+ * @param pLength is the number of characters (at least one) in the run.
1725
+ * The pointer may be <code>NULL</code> if this is not needed.
1726
+ *
1727
+ * @return the directionality of the run,
1728
+ * <code>UBIDI_LTR==0</code> or <code>UBIDI_RTL==1</code>,
1729
+ * never <code>UBIDI_MIXED</code>,
1730
+ * never <code>UBIDI_NEUTRAL</code>.
1731
+ *
1732
+ * @see ubidi_countRuns
1733
+ *
1734
+ * Example:
1735
+ * <pre>
1736
+ * \code
1737
+ * int32_t i, count=ubidi_countRuns(pBiDi),
1738
+ * logicalStart, visualIndex=0, length;
1739
+ * for(i=0; i<count; ++i) {
1740
+ * if(UBIDI_LTR==ubidi_getVisualRun(pBiDi, i, &logicalStart, &length)) {
1741
+ * do { // LTR
1742
+ * show_char(text[logicalStart++], visualIndex++);
1743
+ * } while(--length>0);
1744
+ * } else {
1745
+ * logicalStart+=length; // logicalLimit
1746
+ * do { // RTL
1747
+ * show_char(text[--logicalStart], visualIndex++);
1748
+ * } while(--length>0);
1749
+ * }
1750
+ * }
1751
+ *\endcode
1752
+ * </pre>
1753
+ *
1754
+ * Note that in right-to-left runs, code like this places
1755
+ * second surrogates before first ones (which is generally a bad idea)
1756
+ * and combining characters before base characters.
1757
+ * <p>
1758
+ * Use of <code>ubidi_writeReordered()</code>, optionally with the
1759
+ * <code>#UBIDI_KEEP_BASE_COMBINING</code> option, can be considered in order
1760
+ * to avoid these issues.
1761
+ * @stable ICU 2.0
1762
+ */
1763
+ U_CAPI UBiDiDirection U_EXPORT2
1764
+ ubidi_getVisualRun(UBiDi *pBiDi, int32_t runIndex,
1765
+ int32_t *pLogicalStart, int32_t *pLength);
1766
+
1767
+ /**
1768
+ * Get the visual position from a logical text position.
1769
+ * If such a mapping is used many times on the same
1770
+ * <code>UBiDi</code> object, then calling
1771
+ * <code>ubidi_getLogicalMap()</code> is more efficient.<p>
1772
+ *
1773
+ * The value returned may be <code>#UBIDI_MAP_NOWHERE</code> if there is no
1774
+ * visual position because the corresponding text character is a Bidi control
1775
+ * removed from output by the option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>.
1776
+ * <p>
1777
+ * When the visual output is altered by using options of
1778
+ * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
1779
+ * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>,
1780
+ * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual position returned may not
1781
+ * be correct. It is advised to use, when possible, reordering options
1782
+ * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.
1783
+ * <p>
1784
+ * Note that in right-to-left runs, this mapping places
1785
+ * second surrogates before first ones (which is generally a bad idea)
1786
+ * and combining characters before base characters.
1787
+ * Use of <code>ubidi_writeReordered()</code>, optionally with the
1788
+ * <code>#UBIDI_KEEP_BASE_COMBINING</code> option can be considered instead
1789
+ * of using the mapping, in order to avoid these issues.
1790
+ *
1791
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1792
+ *
1793
+ * @param logicalIndex is the index of a character in the text.
1794
+ *
1795
+ * @param pErrorCode must be a valid pointer to an error code value.
1796
+ *
1797
+ * @return The visual position of this character.
1798
+ *
1799
+ * @see ubidi_getLogicalMap
1800
+ * @see ubidi_getLogicalIndex
1801
+ * @see ubidi_getProcessedLength
1802
+ * @stable ICU 2.0
1803
+ */
1804
+ U_CAPI int32_t U_EXPORT2
1805
+ ubidi_getVisualIndex(UBiDi *pBiDi, int32_t logicalIndex, UErrorCode *pErrorCode);
1806
+
1807
+ /**
1808
+ * Get the logical text position from a visual position.
1809
+ * If such a mapping is used many times on the same
1810
+ * <code>UBiDi</code> object, then calling
1811
+ * <code>ubidi_getVisualMap()</code> is more efficient.<p>
1812
+ *
1813
+ * The value returned may be <code>#UBIDI_MAP_NOWHERE</code> if there is no
1814
+ * logical position because the corresponding text character is a Bidi mark
1815
+ * inserted in the output by option <code>#UBIDI_OPTION_INSERT_MARKS</code>.
1816
+ * <p>
1817
+ * This is the inverse function to <code>ubidi_getVisualIndex()</code>.
1818
+ * <p>
1819
+ * When the visual output is altered by using options of
1820
+ * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
1821
+ * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>,
1822
+ * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical position returned may not
1823
+ * be correct. It is advised to use, when possible, reordering options
1824
+ * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.
1825
+ *
1826
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1827
+ *
1828
+ * @param visualIndex is the visual position of a character.
1829
+ *
1830
+ * @param pErrorCode must be a valid pointer to an error code value.
1831
+ *
1832
+ * @return The index of this character in the text.
1833
+ *
1834
+ * @see ubidi_getVisualMap
1835
+ * @see ubidi_getVisualIndex
1836
+ * @see ubidi_getResultLength
1837
+ * @stable ICU 2.0
1838
+ */
1839
+ U_CAPI int32_t U_EXPORT2
1840
+ ubidi_getLogicalIndex(UBiDi *pBiDi, int32_t visualIndex, UErrorCode *pErrorCode);
1841
+
1842
+ /**
1843
+ * Get a logical-to-visual index map (array) for the characters in the UBiDi
1844
+ * (paragraph or line) object.
1845
+ * <p>
1846
+ * Some values in the map may be <code>#UBIDI_MAP_NOWHERE</code> if the
1847
+ * corresponding text characters are Bidi controls removed from the visual
1848
+ * output by the option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code>.
1849
+ * <p>
1850
+ * When the visual output is altered by using options of
1851
+ * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
1852
+ * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>,
1853
+ * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual positions returned may not
1854
+ * be correct. It is advised to use, when possible, reordering options
1855
+ * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.
1856
+ * <p>
1857
+ * Note that in right-to-left runs, this mapping places
1858
+ * second surrogates before first ones (which is generally a bad idea)
1859
+ * and combining characters before base characters.
1860
+ * Use of <code>ubidi_writeReordered()</code>, optionally with the
1861
+ * <code>#UBIDI_KEEP_BASE_COMBINING</code> option can be considered instead
1862
+ * of using the mapping, in order to avoid these issues.
1863
+ *
1864
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1865
+ *
1866
+ * @param indexMap is a pointer to an array of <code>ubidi_getProcessedLength()</code>
1867
+ * indexes which will reflect the reordering of the characters.
1868
+ * If option <code>#UBIDI_OPTION_INSERT_MARKS</code> is set, the number
1869
+ * of elements allocated in <code>indexMap</code> must be no less than
1870
+ * <code>ubidi_getResultLength()</code>.
1871
+ * The array does not need to be initialized.<br><br>
1872
+ * The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>.
1873
+ *
1874
+ * @param pErrorCode must be a valid pointer to an error code value.
1875
+ *
1876
+ * @see ubidi_getVisualMap
1877
+ * @see ubidi_getVisualIndex
1878
+ * @see ubidi_getProcessedLength
1879
+ * @see ubidi_getResultLength
1880
+ * @stable ICU 2.0
1881
+ */
1882
+ U_CAPI void U_EXPORT2
1883
+ ubidi_getLogicalMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode);
1884
+
1885
+ /**
1886
+ * Get a visual-to-logical index map (array) for the characters in the UBiDi
1887
+ * (paragraph or line) object.
1888
+ * <p>
1889
+ * Some values in the map may be <code>#UBIDI_MAP_NOWHERE</code> if the
1890
+ * corresponding text characters are Bidi marks inserted in the visual output
1891
+ * by the option <code>#UBIDI_OPTION_INSERT_MARKS</code>.
1892
+ * <p>
1893
+ * When the visual output is altered by using options of
1894
+ * <code>ubidi_writeReordered()</code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
1895
+ * <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>,
1896
+ * <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical positions returned may not
1897
+ * be correct. It is advised to use, when possible, reordering options
1898
+ * such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.
1899
+ *
1900
+ * @param pBiDi is the paragraph or line <code>UBiDi</code> object.
1901
+ *
1902
+ * @param indexMap is a pointer to an array of <code>ubidi_getResultLength()</code>
1903
+ * indexes which will reflect the reordering of the characters.
1904
+ * If option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> is set, the number
1905
+ * of elements allocated in <code>indexMap</code> must be no less than
1906
+ * <code>ubidi_getProcessedLength()</code>.
1907
+ * The array does not need to be initialized.<br><br>
1908
+ * The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>.
1909
+ *
1910
+ * @param pErrorCode must be a valid pointer to an error code value.
1911
+ *
1912
+ * @see ubidi_getLogicalMap
1913
+ * @see ubidi_getLogicalIndex
1914
+ * @see ubidi_getProcessedLength
1915
+ * @see ubidi_getResultLength
1916
+ * @stable ICU 2.0
1917
+ */
1918
+ U_CAPI void U_EXPORT2
1919
+ ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode);
1920
+
1921
+ /**
1922
+ * This is a convenience function that does not use a UBiDi object.
1923
+ * It is intended to be used for when an application has determined the levels
1924
+ * of objects (character sequences) and just needs to have them reordered (L2).
1925
+ * This is equivalent to using <code>ubidi_getLogicalMap()</code> on a
1926
+ * <code>UBiDi</code> object.
1927
+ *
1928
+ * @param levels is an array with <code>length</code> levels that have been determined by
1929
+ * the application.
1930
+ *
1931
+ * @param length is the number of levels in the array, or, semantically,
1932
+ * the number of objects to be reordered.
1933
+ * It must be <code>length>0</code>.
1934
+ *
1935
+ * @param indexMap is a pointer to an array of <code>length</code>
1936
+ * indexes which will reflect the reordering of the characters.
1937
+ * The array does not need to be initialized.<p>
1938
+ * The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>.
1939
+ * @stable ICU 2.0
1940
+ */
1941
+ U_CAPI void U_EXPORT2
1942
+ ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap);
1943
+
1944
+ /**
1945
+ * This is a convenience function that does not use a UBiDi object.
1946
+ * It is intended to be used for when an application has determined the levels
1947
+ * of objects (character sequences) and just needs to have them reordered (L2).
1948
+ * This is equivalent to using <code>ubidi_getVisualMap()</code> on a
1949
+ * <code>UBiDi</code> object.
1950
+ *
1951
+ * @param levels is an array with <code>length</code> levels that have been determined by
1952
+ * the application.
1953
+ *
1954
+ * @param length is the number of levels in the array, or, semantically,
1955
+ * the number of objects to be reordered.
1956
+ * It must be <code>length>0</code>.
1957
+ *
1958
+ * @param indexMap is a pointer to an array of <code>length</code>
1959
+ * indexes which will reflect the reordering of the characters.
1960
+ * The array does not need to be initialized.<p>
1961
+ * The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>.
1962
+ * @stable ICU 2.0
1963
+ */
1964
+ U_CAPI void U_EXPORT2
1965
+ ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap);
1966
+
1967
+ /**
1968
+ * Invert an index map.
1969
+ * The index mapping of the first map is inverted and written to
1970
+ * the second one.
1971
+ *
1972
+ * @param srcMap is an array with <code>length</code> elements
1973
+ * which defines the original mapping from a source array containing
1974
+ * <code>length</code> elements to a destination array.
1975
+ * Some elements of the source array may have no mapping in the
1976
+ * destination array. In that case, their value will be
1977
+ * the special value <code>UBIDI_MAP_NOWHERE</code>.
1978
+ * All elements must be >=0 or equal to <code>UBIDI_MAP_NOWHERE</code>.
1979
+ * Some elements may have a value >= <code>length</code>, if the
1980
+ * destination array has more elements than the source array.
1981
+ * There must be no duplicate indexes (two or more elements with the
1982
+ * same value except <code>UBIDI_MAP_NOWHERE</code>).
1983
+ *
1984
+ * @param destMap is an array with a number of elements equal to 1 + the highest
1985
+ * value in <code>srcMap</code>.
1986
+ * <code>destMap</code> will be filled with the inverse mapping.
1987
+ * If element with index i in <code>srcMap</code> has a value k different
1988
+ * from <code>UBIDI_MAP_NOWHERE</code>, this means that element i of
1989
+ * the source array maps to element k in the destination array.
1990
+ * The inverse map will have value i in its k-th element.
1991
+ * For all elements of the destination array which do not map to
1992
+ * an element in the source array, the corresponding element in the
1993
+ * inverse map will have a value equal to <code>UBIDI_MAP_NOWHERE</code>.
1994
+ *
1995
+ * @param length is the length of each array.
1996
+ * @see UBIDI_MAP_NOWHERE
1997
+ * @stable ICU 2.0
1998
+ */
1999
+ U_CAPI void U_EXPORT2
2000
+ ubidi_invertMap(const int32_t *srcMap, int32_t *destMap, int32_t length);
2001
+
2002
+ /** option flags for ubidi_writeReordered() */
2003
+
2004
+ /**
2005
+ * option bit for ubidi_writeReordered():
2006
+ * keep combining characters after their base characters in RTL runs
2007
+ *
2008
+ * @see ubidi_writeReordered
2009
+ * @stable ICU 2.0
2010
+ */
2011
+ #define UBIDI_KEEP_BASE_COMBINING 1
2012
+
2013
+ /**
2014
+ * option bit for ubidi_writeReordered():
2015
+ * replace characters with the "mirrored" property in RTL runs
2016
+ * by their mirror-image mappings
2017
+ *
2018
+ * @see ubidi_writeReordered
2019
+ * @stable ICU 2.0
2020
+ */
2021
+ #define UBIDI_DO_MIRRORING 2
2022
+
2023
+ /**
2024
+ * option bit for ubidi_writeReordered():
2025
+ * surround the run with LRMs if necessary;
2026
+ * this is part of the approximate "inverse Bidi" algorithm
2027
+ *
2028
+ * <p>This option does not imply corresponding adjustment of the index
2029
+ * mappings.</p>
2030
+ *
2031
+ * @see ubidi_setInverse
2032
+ * @see ubidi_writeReordered
2033
+ * @stable ICU 2.0
2034
+ */
2035
+ #define UBIDI_INSERT_LRM_FOR_NUMERIC 4
2036
+
2037
+ /**
2038
+ * option bit for ubidi_writeReordered():
2039
+ * remove Bidi control characters
2040
+ * (this does not affect #UBIDI_INSERT_LRM_FOR_NUMERIC)
2041
+ *
2042
+ * <p>This option does not imply corresponding adjustment of the index
2043
+ * mappings.</p>
2044
+ *
2045
+ * @see ubidi_writeReordered
2046
+ * @stable ICU 2.0
2047
+ */
2048
+ #define UBIDI_REMOVE_BIDI_CONTROLS 8
2049
+
2050
+ /**
2051
+ * option bit for ubidi_writeReordered():
2052
+ * write the output in reverse order
2053
+ *
2054
+ * <p>This has the same effect as calling <code>ubidi_writeReordered()</code>
2055
+ * first without this option, and then calling
2056
+ * <code>ubidi_writeReverse()</code> without mirroring.
2057
+ * Doing this in the same step is faster and avoids a temporary buffer.
2058
+ * An example for using this option is output to a character terminal that
2059
+ * is designed for RTL scripts and stores text in reverse order.</p>
2060
+ *
2061
+ * @see ubidi_writeReordered
2062
+ * @stable ICU 2.0
2063
+ */
2064
+ #define UBIDI_OUTPUT_REVERSE 16
2065
+
2066
+ /**
2067
+ * Get the length of the source text processed by the last call to
2068
+ * <code>ubidi_setPara()</code>. This length may be different from the length
2069
+ * of the source text if option <code>#UBIDI_OPTION_STREAMING</code>
2070
+ * has been set.
2071
+ * <br>
2072
+ * Note that whenever the length of the text affects the execution or the
2073
+ * result of a function, it is the processed length which must be considered,
2074
+ * except for <code>ubidi_setPara</code> (which receives unprocessed source
2075
+ * text) and <code>ubidi_getLength</code> (which returns the original length
2076
+ * of the source text).<br>
2077
+ * In particular, the processed length is the one to consider in the following
2078
+ * cases:
2079
+ * <ul>
2080
+ * <li>maximum value of the <code>limit</code> argument of
2081
+ * <code>ubidi_setLine</code></li>
2082
+ * <li>maximum value of the <code>charIndex</code> argument of
2083
+ * <code>ubidi_getParagraph</code></li>
2084
+ * <li>maximum value of the <code>charIndex</code> argument of
2085
+ * <code>ubidi_getLevelAt</code></li>
2086
+ * <li>number of elements in the array returned by <code>ubidi_getLevels</code></li>
2087
+ * <li>maximum value of the <code>logicalStart</code> argument of
2088
+ * <code>ubidi_getLogicalRun</code></li>
2089
+ * <li>maximum value of the <code>logicalIndex</code> argument of
2090
+ * <code>ubidi_getVisualIndex</code></li>
2091
+ * <li>number of elements filled in the <code>*indexMap</code> argument of
2092
+ * <code>ubidi_getLogicalMap</code></li>
2093
+ * <li>length of text processed by <code>ubidi_writeReordered</code></li>
2094
+ * </ul>
2095
+ *
2096
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
2097
+ *
2098
+ * @return The length of the part of the source text processed by
2099
+ * the last call to <code>ubidi_setPara</code>.
2100
+ * @see ubidi_setPara
2101
+ * @see UBIDI_OPTION_STREAMING
2102
+ * @stable ICU 3.6
2103
+ */
2104
+ U_CAPI int32_t U_EXPORT2
2105
+ ubidi_getProcessedLength(const UBiDi *pBiDi);
2106
+
2107
+ /**
2108
+ * Get the length of the reordered text resulting from the last call to
2109
+ * <code>ubidi_setPara()</code>. This length may be different from the length
2110
+ * of the source text if option <code>#UBIDI_OPTION_INSERT_MARKS</code>
2111
+ * or option <code>#UBIDI_OPTION_REMOVE_CONTROLS</code> has been set.
2112
+ * <br>
2113
+ * This resulting length is the one to consider in the following cases:
2114
+ * <ul>
2115
+ * <li>maximum value of the <code>visualIndex</code> argument of
2116
+ * <code>ubidi_getLogicalIndex</code></li>
2117
+ * <li>number of elements of the <code>*indexMap</code> argument of
2118
+ * <code>ubidi_getVisualMap</code></li>
2119
+ * </ul>
2120
+ * Note that this length stays identical to the source text length if
2121
+ * Bidi marks are inserted or removed using option bits of
2122
+ * <code>ubidi_writeReordered</code>, or if option
2123
+ * <code>#UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code> has been set.
2124
+ *
2125
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
2126
+ *
2127
+ * @return The length of the reordered text resulting from
2128
+ * the last call to <code>ubidi_setPara</code>.
2129
+ * @see ubidi_setPara
2130
+ * @see UBIDI_OPTION_INSERT_MARKS
2131
+ * @see UBIDI_OPTION_REMOVE_CONTROLS
2132
+ * @stable ICU 3.6
2133
+ */
2134
+ U_CAPI int32_t U_EXPORT2
2135
+ ubidi_getResultLength(const UBiDi *pBiDi);
2136
+
2137
+ U_CDECL_BEGIN
2138
+
2139
+ #ifndef U_HIDE_DEPRECATED_API
2140
+ /**
2141
+ * Value returned by <code>UBiDiClassCallback</code> callbacks when
2142
+ * there is no need to override the standard Bidi class for a given code point.
2143
+ *
2144
+ * This constant is deprecated; use u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1 instead.
2145
+ *
2146
+ * @see UBiDiClassCallback
2147
+ * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2148
+ */
2149
+ #define U_BIDI_CLASS_DEFAULT U_CHAR_DIRECTION_COUNT
2150
+ #endif // U_HIDE_DEPRECATED_API
2151
+
2152
+ /**
2153
+ * Callback type declaration for overriding default Bidi class values with
2154
+ * custom ones.
2155
+ * <p>Usually, the function pointer will be propagated to a <code>UBiDi</code>
2156
+ * object by calling the <code>ubidi_setClassCallback()</code> function;
2157
+ * then the callback will be invoked by the UBA implementation any time the
2158
+ * class of a character is to be determined.</p>
2159
+ *
2160
+ * @param context is a pointer to the callback private data.
2161
+ *
2162
+ * @param c is the code point to get a Bidi class for.
2163
+ *
2164
+ * @return The directional property / Bidi class for the given code point
2165
+ * <code>c</code> if the default class has been overridden, or
2166
+ * <code>u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code>
2167
+ * if the standard Bidi class value for <code>c</code> is to be used.
2168
+ * @see ubidi_setClassCallback
2169
+ * @see ubidi_getClassCallback
2170
+ * @stable ICU 3.6
2171
+ */
2172
+ typedef UCharDirection U_CALLCONV
2173
+ UBiDiClassCallback(const void *context, UChar32 c);
2174
+
2175
+ U_CDECL_END
2176
+
2177
+ /**
2178
+ * Retrieve the Bidi class for a given code point.
2179
+ * <p>If a <code>#UBiDiClassCallback</code> callback is defined and returns a
2180
+ * value other than <code>u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code>,
2181
+ * that value is used; otherwise the default class determination mechanism is invoked.</p>
2182
+ *
2183
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
2184
+ *
2185
+ * @param c is the code point whose Bidi class must be retrieved.
2186
+ *
2187
+ * @return The Bidi class for character <code>c</code> based
2188
+ * on the given <code>pBiDi</code> instance.
2189
+ * @see UBiDiClassCallback
2190
+ * @stable ICU 3.6
2191
+ */
2192
+ U_CAPI UCharDirection U_EXPORT2
2193
+ ubidi_getCustomizedClass(UBiDi *pBiDi, UChar32 c);
2194
+
2195
+ /**
2196
+ * Set the callback function and callback data used by the UBA
2197
+ * implementation for Bidi class determination.
2198
+ * <p>This may be useful for assigning Bidi classes to PUA characters, or
2199
+ * for special application needs. For instance, an application may want to
2200
+ * handle all spaces like L or R characters (according to the base direction)
2201
+ * when creating the visual ordering of logical lines which are part of a report
2202
+ * organized in columns: there should not be interaction between adjacent
2203
+ * cells.<p>
2204
+ *
2205
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
2206
+ *
2207
+ * @param newFn is the new callback function pointer.
2208
+ *
2209
+ * @param newContext is the new callback context pointer. This can be NULL.
2210
+ *
2211
+ * @param oldFn fillin: Returns the old callback function pointer. This can be
2212
+ * NULL.
2213
+ *
2214
+ * @param oldContext fillin: Returns the old callback's context. This can be
2215
+ * NULL.
2216
+ *
2217
+ * @param pErrorCode must be a valid pointer to an error code value.
2218
+ *
2219
+ * @see ubidi_getClassCallback
2220
+ * @stable ICU 3.6
2221
+ */
2222
+ U_CAPI void U_EXPORT2
2223
+ ubidi_setClassCallback(UBiDi *pBiDi, UBiDiClassCallback *newFn,
2224
+ const void *newContext, UBiDiClassCallback **oldFn,
2225
+ const void **oldContext, UErrorCode *pErrorCode);
2226
+
2227
+ /**
2228
+ * Get the current callback function used for Bidi class determination.
2229
+ *
2230
+ * @param pBiDi is the paragraph <code>UBiDi</code> object.
2231
+ *
2232
+ * @param fn fillin: Returns the callback function pointer.
2233
+ *
2234
+ * @param context fillin: Returns the callback's private context.
2235
+ *
2236
+ * @see ubidi_setClassCallback
2237
+ * @stable ICU 3.6
2238
+ */
2239
+ U_CAPI void U_EXPORT2
2240
+ ubidi_getClassCallback(UBiDi *pBiDi, UBiDiClassCallback **fn, const void **context);
2241
+
2242
+ /**
2243
+ * Take a <code>UBiDi</code> object containing the reordering
2244
+ * information for a piece of text (one or more paragraphs) set by
2245
+ * <code>ubidi_setPara()</code> or for a line of text set by
2246
+ * <code>ubidi_setLine()</code> and write a reordered string to the
2247
+ * destination buffer.
2248
+ *
2249
+ * This function preserves the integrity of characters with multiple
2250
+ * code units and (optionally) combining characters.
2251
+ * Characters in RTL runs can be replaced by mirror-image characters
2252
+ * in the destination buffer. Note that "real" mirroring has
2253
+ * to be done in a rendering engine by glyph selection
2254
+ * and that for many "mirrored" characters there are no
2255
+ * Unicode characters as mirror-image equivalents.
2256
+ * There are also options to insert or remove Bidi control
2257
+ * characters; see the description of the <code>destSize</code>
2258
+ * and <code>options</code> parameters and of the option bit flags.
2259
+ *
2260
+ * @param pBiDi A pointer to a <code>UBiDi</code> object that
2261
+ * is set by <code>ubidi_setPara()</code> or
2262
+ * <code>ubidi_setLine()</code> and contains the reordering
2263
+ * information for the text that it was defined for,
2264
+ * as well as a pointer to that text.<br><br>
2265
+ * The text was aliased (only the pointer was stored
2266
+ * without copying the contents) and must not have been modified
2267
+ * since the <code>ubidi_setPara()</code> call.
2268
+ *
2269
+ * @param dest A pointer to where the reordered text is to be copied.
2270
+ * The source text and <code>dest[destSize]</code>
2271
+ * must not overlap.
2272
+ *
2273
+ * @param destSize The size of the <code>dest</code> buffer,
2274
+ * in number of UChars.
2275
+ * If the <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>
2276
+ * option is set, then the destination length could be
2277
+ * as large as
2278
+ * <code>ubidi_getLength(pBiDi)+2*ubidi_countRuns(pBiDi)</code>.
2279
+ * If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option
2280
+ * is set, then the destination length may be less than
2281
+ * <code>ubidi_getLength(pBiDi)</code>.
2282
+ * If none of these options is set, then the destination length
2283
+ * will be exactly <code>ubidi_getProcessedLength(pBiDi)</code>.
2284
+ *
2285
+ * @param options A bit set of options for the reordering that control
2286
+ * how the reordered text is written.
2287
+ * The options include mirroring the characters on a code
2288
+ * point basis and inserting LRM characters, which is used
2289
+ * especially for transforming visually stored text
2290
+ * to logically stored text (although this is still an
2291
+ * imperfect implementation of an "inverse Bidi" algorithm
2292
+ * because it uses the "forward Bidi" algorithm at its core).
2293
+ * The available options are:
2294
+ * <code>#UBIDI_DO_MIRRORING</code>,
2295
+ * <code>#UBIDI_INSERT_LRM_FOR_NUMERIC</code>,
2296
+ * <code>#UBIDI_KEEP_BASE_COMBINING</code>,
2297
+ * <code>#UBIDI_OUTPUT_REVERSE</code>,
2298
+ * <code>#UBIDI_REMOVE_BIDI_CONTROLS</code>
2299
+ *
2300
+ * @param pErrorCode must be a valid pointer to an error code value.
2301
+ *
2302
+ * @return The length of the output string.
2303
+ *
2304
+ * @see ubidi_getProcessedLength
2305
+ * @stable ICU 2.0
2306
+ */
2307
+ U_CAPI int32_t U_EXPORT2
2308
+ ubidi_writeReordered(UBiDi *pBiDi,
2309
+ UChar *dest, int32_t destSize,
2310
+ uint16_t options,
2311
+ UErrorCode *pErrorCode);
2312
+
2313
+ /**
2314
+ * Reverse a Right-To-Left run of Unicode text.
2315
+ *
2316
+ * This function preserves the integrity of characters with multiple
2317
+ * code units and (optionally) combining characters.
2318
+ * Characters can be replaced by mirror-image characters
2319
+ * in the destination buffer. Note that "real" mirroring has
2320
+ * to be done in a rendering engine by glyph selection
2321
+ * and that for many "mirrored" characters there are no
2322
+ * Unicode characters as mirror-image equivalents.
2323
+ * There are also options to insert or remove Bidi control
2324
+ * characters.
2325
+ *
2326
+ * This function is the implementation for reversing RTL runs as part
2327
+ * of <code>ubidi_writeReordered()</code>. For detailed descriptions
2328
+ * of the parameters, see there.
2329
+ * Since no Bidi controls are inserted here, the output string length
2330
+ * will never exceed <code>srcLength</code>.
2331
+ *
2332
+ * @see ubidi_writeReordered
2333
+ *
2334
+ * @param src A pointer to the RTL run text.
2335
+ *
2336
+ * @param srcLength The length of the RTL run.
2337
+ *
2338
+ * @param dest A pointer to where the reordered text is to be copied.
2339
+ * <code>src[srcLength]</code> and <code>dest[destSize]</code>
2340
+ * must not overlap.
2341
+ *
2342
+ * @param destSize The size of the <code>dest</code> buffer,
2343
+ * in number of UChars.
2344
+ * If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option
2345
+ * is set, then the destination length may be less than
2346
+ * <code>srcLength</code>.
2347
+ * If this option is not set, then the destination length
2348
+ * will be exactly <code>srcLength</code>.
2349
+ *
2350
+ * @param options A bit set of options for the reordering that control
2351
+ * how the reordered text is written.
2352
+ * See the <code>options</code> parameter in <code>ubidi_writeReordered()</code>.
2353
+ *
2354
+ * @param pErrorCode must be a valid pointer to an error code value.
2355
+ *
2356
+ * @return The length of the output string.
2357
+ * @stable ICU 2.0
2358
+ */
2359
+ U_CAPI int32_t U_EXPORT2
2360
+ ubidi_writeReverse(const UChar *src, int32_t srcLength,
2361
+ UChar *dest, int32_t destSize,
2362
+ uint16_t options,
2363
+ UErrorCode *pErrorCode);
2364
+
2365
+ /*#define BIDI_SAMPLE_CODE*/
2366
+ /*@}*/
2367
+
2368
+ #endif