Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 3a4e91bde08970529a0aa07935652fe8 > files > 923

icu-doc-58.2-3.mga6.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ICU 58.2: ubidi.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ICU 58.2
   &#160;<span id="projectnumber">58.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li><li class="navelem"><a class="el" href="dir_30087b5439e04c85304dbcf15650710b.html">common</a></li><li class="navelem"><a class="el" href="dir_8bf9c54ed6ca2fd1e2117fb037e4ad06.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a>  </div>
  <div class="headertitle">
<div class="title">ubidi.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>C API: Bidi algorithm.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="uchar_8h_source.html">unicode/uchar.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>&quot;</code><br />
</div>
<p><a href="ubidi_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceicu"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceicu.html">icu</a></td></tr>
<tr class="memdesc:namespaceicu"><td class="mdescLeft">&#160;</td><td class="mdescRight">File <a class="el" href="coll_8h.html" title="C++ API: Collation Service. ">coll.h</a>. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a165ae276878c7a54fd8b067db0d12f40"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a165ae276878c7a54fd8b067db0d12f40">UBIDI_DEFAULT_LTR</a>&#160;&#160;&#160;0xfe</td></tr>
<tr class="memdesc:a165ae276878c7a54fd8b067db0d12f40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Paragraph level setting.  <a href="#a165ae276878c7a54fd8b067db0d12f40">More...</a><br /></td></tr>
<tr class="separator:a165ae276878c7a54fd8b067db0d12f40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b4d6ac752ab7a8a33eb825e9c76683d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a0b4d6ac752ab7a8a33eb825e9c76683d">UBIDI_DEFAULT_RTL</a>&#160;&#160;&#160;0xff</td></tr>
<tr class="memdesc:a0b4d6ac752ab7a8a33eb825e9c76683d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Paragraph level setting.  <a href="#a0b4d6ac752ab7a8a33eb825e9c76683d">More...</a><br /></td></tr>
<tr class="separator:a0b4d6ac752ab7a8a33eb825e9c76683d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a531b2d2bfa7655df6bf86d1236a1928a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a531b2d2bfa7655df6bf86d1236a1928a">UBIDI_MAX_EXPLICIT_LEVEL</a>&#160;&#160;&#160;125</td></tr>
<tr class="memdesc:a531b2d2bfa7655df6bf86d1236a1928a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum explicit embedding level.  <a href="#a531b2d2bfa7655df6bf86d1236a1928a">More...</a><br /></td></tr>
<tr class="separator:a531b2d2bfa7655df6bf86d1236a1928a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e4049fa946dd8e0a1b3c01e5c1c3711"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a5e4049fa946dd8e0a1b3c01e5c1c3711">UBIDI_LEVEL_OVERRIDE</a>&#160;&#160;&#160;0x80</td></tr>
<tr class="memdesc:a5e4049fa946dd8e0a1b3c01e5c1c3711"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit flag for level input.  <a href="#a5e4049fa946dd8e0a1b3c01e5c1c3711">More...</a><br /></td></tr>
<tr class="separator:a5e4049fa946dd8e0a1b3c01e5c1c3711"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bdc9eb61fd6146789e9827bdbded171"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171">UBIDI_MAP_NOWHERE</a>&#160;&#160;&#160;(-1)</td></tr>
<tr class="memdesc:a6bdc9eb61fd6146789e9827bdbded171"><td class="mdescLeft">&#160;</td><td class="mdescRight">Special value which can be returned by the mapping functions when a logical index has no corresponding visual index or vice-versa.  <a href="#a6bdc9eb61fd6146789e9827bdbded171">More...</a><br /></td></tr>
<tr class="separator:a6bdc9eb61fd6146789e9827bdbded171"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e022ccd0d2c55a21c2aa233c30ecd88"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88">UBIDI_KEEP_BASE_COMBINING</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:a2e022ccd0d2c55a21c2aa233c30ecd88"><td class="mdescLeft">&#160;</td><td class="mdescRight">option flags for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>  <a href="#a2e022ccd0d2c55a21c2aa233c30ecd88">More...</a><br /></td></tr>
<tr class="separator:a2e022ccd0d2c55a21c2aa233c30ecd88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b1370dda1e3ad8ef9c94fd28320153d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a0b1370dda1e3ad8ef9c94fd28320153d">UBIDI_DO_MIRRORING</a>&#160;&#160;&#160;2</td></tr>
<tr class="memdesc:a0b1370dda1e3ad8ef9c94fd28320153d"><td class="mdescLeft">&#160;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>: replace characters with the "mirrored" property in RTL runs by their mirror-image mappings  <a href="#a0b1370dda1e3ad8ef9c94fd28320153d">More...</a><br /></td></tr>
<tr class="separator:a0b1370dda1e3ad8ef9c94fd28320153d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adad66f9132bc4e4621427091acfc0f40"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40">UBIDI_INSERT_LRM_FOR_NUMERIC</a>&#160;&#160;&#160;4</td></tr>
<tr class="memdesc:adad66f9132bc4e4621427091acfc0f40"><td class="mdescLeft">&#160;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>: surround the run with LRMs if necessary; this is part of the approximate "inverse Bidi" algorithm  <a href="#adad66f9132bc4e4621427091acfc0f40">More...</a><br /></td></tr>
<tr class="separator:adad66f9132bc4e4621427091acfc0f40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a039000c1e298cbad5909d07a55ca5312"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a039000c1e298cbad5909d07a55ca5312">UBIDI_REMOVE_BIDI_CONTROLS</a>&#160;&#160;&#160;8</td></tr>
<tr class="memdesc:a039000c1e298cbad5909d07a55ca5312"><td class="mdescLeft">&#160;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>: remove Bidi control characters (this does not affect <a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this is part of the a...">UBIDI_INSERT_LRM_FOR_NUMERIC</a>)  <a href="#a039000c1e298cbad5909d07a55ca5312">More...</a><br /></td></tr>
<tr class="separator:a039000c1e298cbad5909d07a55ca5312"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a10c3aac68ceca1569bac717156cef3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a4a10c3aac68ceca1569bac717156cef3">UBIDI_OUTPUT_REVERSE</a>&#160;&#160;&#160;16</td></tr>
<tr class="memdesc:a4a10c3aac68ceca1569bac717156cef3"><td class="mdescLeft">&#160;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>: write the output in reverse order  <a href="#a4a10c3aac68ceca1569bac717156cef3">More...</a><br /></td></tr>
<tr class="separator:a4a10c3aac68ceca1569bac717156cef3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab74f3e4fed22db8d521e42f6a882b7a1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ab74f3e4fed22db8d521e42f6a882b7a1">U_BIDI_CLASS_DEFAULT</a>&#160;&#160;&#160;<a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593a6ef7d8987718e33961e6a15739343af9">U_CHAR_DIRECTION_COUNT</a></td></tr>
<tr class="memdesc:ab74f3e4fed22db8d521e42f6a882b7a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Value returned by <code>UBiDiClassCallback</code> callbacks when there is no need to override the standard Bidi class for a given code point.  <a href="#ab74f3e4fed22db8d521e42f6a882b7a1">More...</a><br /></td></tr>
<tr class="separator:ab74f3e4fed22db8d521e42f6a882b7a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68a6b5fdcbf80aaa51b5bd39f7f31102"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> { <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a3378628e1b7851cd6d00e7f74d29f6c3">UBIDI_LTR</a>, 
<a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a73e659e3118b58f822cc1384e7fcd8ec">UBIDI_RTL</a>, 
<a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a5cc55b0dc99fa2ef003c7a8beb00844d">UBIDI_MIXED</a>, 
<a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a4ec7a06cf7b96d2df5d39ac54765be12">UBIDI_NEUTRAL</a>
 }<tr class="memdesc:a68a6b5fdcbf80aaa51b5bd39f7f31102"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>UBiDiDirection</code> values indicate the text direction.  <a href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a68a6b5fdcbf80aaa51b5bd39f7f31102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88693e5a8ad4be974dc90ec6b8db56df"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a> { <br />
&#160;&#160;<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b">UBIDI_REORDER_DEFAULT</a> = 0, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa447996fecd0eefb0d12ce247cb511e5f">UBIDI_REORDER_NUMBERS_SPECIAL</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0cd75b3d1d8abc971554a2a7d459c6d7">UBIDI_REORDER_GROUP_NUMBERS_WITH_R</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d">UBIDI_REORDER_RUNS_ONLY</a>, 
<br />
&#160;&#160;<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfae19ca6f8614a91e49454b21264f6a379">UBIDI_REORDER_COUNT</a>
<br />
 }<tr class="memdesc:a88693e5a8ad4be974dc90ec6b8db56df"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>UBiDiReorderingMode</code> values indicate which variant of the Bidi algorithm to use.  <a href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a88693e5a8ad4be974dc90ec6b8db56df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4505e4adc8da792501414b770f49f386"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386">UBiDiReorderingOption</a> { <a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386ae3c7e82fa51ecfccacb2d85fb6dc60fb">UBIDI_OPTION_DEFAULT</a> = 0, 
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6">UBIDI_OPTION_INSERT_MARKS</a> = 1, 
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502">UBIDI_OPTION_REMOVE_CONTROLS</a> = 2, 
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7">UBIDI_OPTION_STREAMING</a> = 4
 }<tr class="memdesc:a4505e4adc8da792501414b770f49f386"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>UBiDiReorderingOption</code> values indicate which options are specified to affect the Bidi algorithm.  <a href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a4505e4adc8da792501414b770f49f386"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2460a19f323ab9787a79a95db91a606"><td class="memItemLeft" align="right" valign="top">typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a></td></tr>
<tr class="memdesc:ab2460a19f323ab9787a79a95db91a606"><td class="mdescLeft">&#160;</td><td class="mdescRight">UBiDiLevel is the type of the level values in this Bidi implementation.  <a href="#ab2460a19f323ab9787a79a95db91a606">More...</a><br /></td></tr>
<tr class="separator:ab2460a19f323ab9787a79a95db91a606"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d13f55bcc7116169db68b10733545f1"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a0d13f55bcc7116169db68b10733545f1">UBiDiDirection</a></td></tr>
<tr class="separator:a0d13f55bcc7116169db68b10733545f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeed24292bbed966df93f088bc6791f74"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a></td></tr>
<tr class="separator:aeed24292bbed966df93f088bc6791f74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6764f58b44c41e99b0b9d1be3f98f06d"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a6764f58b44c41e99b0b9d1be3f98f06d">UBiDiReorderingMode</a></td></tr>
<tr class="memdesc:a6764f58b44c41e99b0b9d1be3f98f06d"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>UBiDiReorderingMode</code> values indicate which variant of the Bidi algorithm to use.  <a href="#a6764f58b44c41e99b0b9d1be3f98f06d">More...</a><br /></td></tr>
<tr class="separator:a6764f58b44c41e99b0b9d1be3f98f06d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0734f6d3b154be99b2a159cb02647f9"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386">UBiDiReorderingOption</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ab0734f6d3b154be99b2a159cb02647f9">UBiDiReorderingOption</a></td></tr>
<tr class="memdesc:ab0734f6d3b154be99b2a159cb02647f9"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>UBiDiReorderingOption</code> values indicate which options are specified to affect the Bidi algorithm.  <a href="#ab0734f6d3b154be99b2a159cb02647f9">More...</a><br /></td></tr>
<tr class="separator:ab0734f6d3b154be99b2a159cb02647f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77893628988f90ea58198aaac9c6fcea"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593">UCharDirection</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a>(const void *context, <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c)</td></tr>
<tr class="memdesc:a77893628988f90ea58198aaac9c6fcea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback type declaration for overriding default Bidi class values with custom ones.  <a href="#a77893628988f90ea58198aaac9c6fcea">More...</a><br /></td></tr>
<tr class="separator:a77893628988f90ea58198aaac9c6fcea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b0163f0f98e1c0f8915f1a26813c07f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a4b0163f0f98e1c0f8915f1a26813c07f">ubidi_open</a> (void)</td></tr>
<tr class="memdesc:a4b0163f0f98e1c0f8915f1a26813c07f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate a <code>UBiDi</code> structure.  <a href="#a4b0163f0f98e1c0f8915f1a26813c07f">More...</a><br /></td></tr>
<tr class="separator:a4b0163f0f98e1c0f8915f1a26813c07f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d75a7eb9ecf1d5280dc2807efd64716"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a3d75a7eb9ecf1d5280dc2807efd64716">ubidi_openSized</a> (int32_t maxLength, int32_t maxRunCount, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a3d75a7eb9ecf1d5280dc2807efd64716"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate a <code>UBiDi</code> structure with preallocated memory for internal structures.  <a href="#a3d75a7eb9ecf1d5280dc2807efd64716">More...</a><br /></td></tr>
<tr class="separator:a3d75a7eb9ecf1d5280dc2807efd64716"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c30f10761d8cfb6974e3b7dc6c35df5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5">ubidi_close</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:a3c30f10761d8cfb6974e3b7dc6c35df5"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code><a class="el" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5" title="ubidi_close() must be called to free the memory associated with a UBiDi object. ">ubidi_close()</a></code> must be called to free the memory associated with a UBiDi object.  <a href="#a3c30f10761d8cfb6974e3b7dc6c35df5">More...</a><br /></td></tr>
<tr class="separator:a3c30f10761d8cfb6974e3b7dc6c35df5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a836b2eaf83ca712cf28e69cd4ba934f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4">ubidi_setInverse</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> isInverse)</td></tr>
<tr class="memdesc:a836b2eaf83ca712cf28e69cd4ba934f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modify the operation of the Bidi algorithm such that it approximates an "inverse Bidi" algorithm.  <a href="#a836b2eaf83ca712cf28e69cd4ba934f4">More...</a><br /></td></tr>
<tr class="separator:a836b2eaf83ca712cf28e69cd4ba934f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a794e61b06b5eedaeff7c7e72fa78a8ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a794e61b06b5eedaeff7c7e72fa78a8ba">ubidi_isInverse</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:a794e61b06b5eedaeff7c7e72fa78a8ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this Bidi object set to perform the inverse Bidi algorithm?  <a href="#a794e61b06b5eedaeff7c7e72fa78a8ba">More...</a><br /></td></tr>
<tr class="separator:a794e61b06b5eedaeff7c7e72fa78a8ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7b9785b85169b3830034029729c672e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ab7b9785b85169b3830034029729c672e">ubidi_orderParagraphsLTR</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> orderParagraphsLTR)</td></tr>
<tr class="memdesc:ab7b9785b85169b3830034029729c672e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify whether block separators must be allocated level zero, so that successive paragraphs will progress from left to right.  <a href="#ab7b9785b85169b3830034029729c672e">More...</a><br /></td></tr>
<tr class="separator:ab7b9785b85169b3830034029729c672e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a612d1977d09d1b30a8a41296a85ccba4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a612d1977d09d1b30a8a41296a85ccba4">ubidi_isOrderParagraphsLTR</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:a612d1977d09d1b30a8a41296a85ccba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this Bidi object set to allocate level 0 to block separators so that successive paragraphs progress from left to right?  <a href="#a612d1977d09d1b30a8a41296a85ccba4">More...</a><br /></td></tr>
<tr class="separator:a612d1977d09d1b30a8a41296a85ccba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe123acc1196c4d7363f968ca6af6faa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa">ubidi_setReorderingMode</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a> reorderingMode)</td></tr>
<tr class="memdesc:afe123acc1196c4d7363f968ca6af6faa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi algorithm or approximates an "inverse Bidi" algorithm, depending on different values of the "reordering mode".  <a href="#afe123acc1196c4d7363f968ca6af6faa">More...</a><br /></td></tr>
<tr class="separator:afe123acc1196c4d7363f968ca6af6faa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98a1b2869aab8c9dec5effa7749e0369"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a98a1b2869aab8c9dec5effa7749e0369">ubidi_getReorderingMode</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:a98a1b2869aab8c9dec5effa7749e0369"><td class="mdescLeft">&#160;</td><td class="mdescRight">What is the requested reordering mode for a given Bidi object?  <a href="#a98a1b2869aab8c9dec5effa7749e0369">More...</a><br /></td></tr>
<tr class="separator:a98a1b2869aab8c9dec5effa7749e0369"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25dd2aba9db100133217b9fe76de01de"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de">ubidi_setReorderingOptions</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, uint32_t reorderingOptions)</td></tr>
<tr class="memdesc:a25dd2aba9db100133217b9fe76de01de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify which of the reordering options should be applied during Bidi transformations.  <a href="#a25dd2aba9db100133217b9fe76de01de">More...</a><br /></td></tr>
<tr class="separator:a25dd2aba9db100133217b9fe76de01de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5186ae76f6abfcbaf700d2dc7625516e"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a5186ae76f6abfcbaf700d2dc7625516e">ubidi_getReorderingOptions</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:a5186ae76f6abfcbaf700d2dc7625516e"><td class="mdescLeft">&#160;</td><td class="mdescRight">What are the reordering options applied to a given Bidi object?  <a href="#a5186ae76f6abfcbaf700d2dc7625516e">More...</a><br /></td></tr>
<tr class="separator:a5186ae76f6abfcbaf700d2dc7625516e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e38e9d7036f4aa7cc5aea5a435b3e63"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a1e38e9d7036f4aa7cc5aea5a435b3e63">ubidi_setContext</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *prologue, int32_t proLength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *epilogue, int32_t epiLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a1e38e9d7036f4aa7cc5aea5a435b3e63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the context before a call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a>.  <a href="#a1e38e9d7036f4aa7cc5aea5a435b3e63">More...</a><br /></td></tr>
<tr class="separator:a1e38e9d7036f4aa7cc5aea5a435b3e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdfe9e113a19dd8521d3b7ac8220fe11"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11">ubidi_setPara</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t length, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> paraLevel, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *embeddingLevels, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:abdfe9e113a19dd8521d3b7ac8220fe11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the Unicode Bidi algorithm.  <a href="#abdfe9e113a19dd8521d3b7ac8220fe11">More...</a><br /></td></tr>
<tr class="separator:abdfe9e113a19dd8521d3b7ac8220fe11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7d96b281cd6ab2d56900bfdc37c808a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a">ubidi_setLine</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pParaBiDi, int32_t start, int32_t limit, <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pLineBiDi, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:ac7d96b281cd6ab2d56900bfdc37c808a"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code> sets a <code>UBiDi</code> to contain the reordering information, especially the resolved levels, for all the characters in a line of text.  <a href="#ac7d96b281cd6ab2d56900bfdc37c808a">More...</a><br /></td></tr>
<tr class="separator:ac7d96b281cd6ab2d56900bfdc37c808a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af31ec52194764c663c224f5171e95ea3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#af31ec52194764c663c224f5171e95ea3">ubidi_getDirection</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:af31ec52194764c663c224f5171e95ea3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the directionality of the text.  <a href="#af31ec52194764c663c224f5171e95ea3">More...</a><br /></td></tr>
<tr class="separator:af31ec52194764c663c224f5171e95ea3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb1fd15743833278cc11906cd5a48aef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#aeb1fd15743833278cc11906cd5a48aef">ubidi_getBaseDirection</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t length)</td></tr>
<tr class="memdesc:aeb1fd15743833278cc11906cd5a48aef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the base direction of the text provided according to the Unicode Bidirectional Algorithm.  <a href="#aeb1fd15743833278cc11906cd5a48aef">More...</a><br /></td></tr>
<tr class="separator:aeb1fd15743833278cc11906cd5a48aef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc55abde2c543bdd5f4031e75d38bb02"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#afc55abde2c543bdd5f4031e75d38bb02">ubidi_getText</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:afc55abde2c543bdd5f4031e75d38bb02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the pointer to the text.  <a href="#afc55abde2c543bdd5f4031e75d38bb02">More...</a><br /></td></tr>
<tr class="separator:afc55abde2c543bdd5f4031e75d38bb02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f51ac46083e7ce52b6bea4bc7ac14a8"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a8f51ac46083e7ce52b6bea4bc7ac14a8">ubidi_getLength</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:a8f51ac46083e7ce52b6bea4bc7ac14a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the length of the text.  <a href="#a8f51ac46083e7ce52b6bea4bc7ac14a8">More...</a><br /></td></tr>
<tr class="separator:a8f51ac46083e7ce52b6bea4bc7ac14a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6724e673e9ff8f0ee47bd24e47ceb95a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a6724e673e9ff8f0ee47bd24e47ceb95a">ubidi_getParaLevel</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:a6724e673e9ff8f0ee47bd24e47ceb95a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the paragraph level of the text.  <a href="#a6724e673e9ff8f0ee47bd24e47ceb95a">More...</a><br /></td></tr>
<tr class="separator:a6724e673e9ff8f0ee47bd24e47ceb95a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f4b5bb9a8e37d8065490af4e6825563"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a8f4b5bb9a8e37d8065490af4e6825563">ubidi_countParagraphs</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:a8f4b5bb9a8e37d8065490af4e6825563"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of paragraphs.  <a href="#a8f4b5bb9a8e37d8065490af4e6825563">More...</a><br /></td></tr>
<tr class="separator:a8f4b5bb9a8e37d8065490af4e6825563"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cd3d78464b8e3b71886a643f70f25ab"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a5cd3d78464b8e3b71886a643f70f25ab">ubidi_getParagraph</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t charIndex, int32_t *pParaStart, int32_t *pParaLimit, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *pParaLevel, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a5cd3d78464b8e3b71886a643f70f25ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a paragraph, given a position within the text.  <a href="#a5cd3d78464b8e3b71886a643f70f25ab">More...</a><br /></td></tr>
<tr class="separator:a5cd3d78464b8e3b71886a643f70f25ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62377f811a750130246dfb49c1cc6dc0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a62377f811a750130246dfb49c1cc6dc0">ubidi_getParagraphByIndex</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t paraIndex, int32_t *pParaStart, int32_t *pParaLimit, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *pParaLevel, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a62377f811a750130246dfb49c1cc6dc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a paragraph, given the index of this paragraph.  <a href="#a62377f811a750130246dfb49c1cc6dc0">More...</a><br /></td></tr>
<tr class="separator:a62377f811a750130246dfb49c1cc6dc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad363767eacb66359de7c639a722338c8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ad363767eacb66359de7c639a722338c8">ubidi_getLevelAt</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t charIndex)</td></tr>
<tr class="memdesc:ad363767eacb66359de7c639a722338c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the level for one character.  <a href="#ad363767eacb66359de7c639a722338c8">More...</a><br /></td></tr>
<tr class="separator:ad363767eacb66359de7c639a722338c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae498c62057ff75f31ca8cbdbf9cae4b7"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ae498c62057ff75f31ca8cbdbf9cae4b7">ubidi_getLevels</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:ae498c62057ff75f31ca8cbdbf9cae4b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an array of levels for each character.  <a href="#ae498c62057ff75f31ca8cbdbf9cae4b7">More...</a><br /></td></tr>
<tr class="separator:ae498c62057ff75f31ca8cbdbf9cae4b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa99079b617dcc6c15910558306b7145"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#aaa99079b617dcc6c15910558306b7145">ubidi_getLogicalRun</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t logicalPosition, int32_t *pLogicalLimit, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *pLevel)</td></tr>
<tr class="memdesc:aaa99079b617dcc6c15910558306b7145"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a logical run.  <a href="#aaa99079b617dcc6c15910558306b7145">More...</a><br /></td></tr>
<tr class="separator:aaa99079b617dcc6c15910558306b7145"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18c2f5cfaf8c8717759d6e0feaa58c99"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99">ubidi_countRuns</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a18c2f5cfaf8c8717759d6e0feaa58c99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of runs.  <a href="#a18c2f5cfaf8c8717759d6e0feaa58c99">More...</a><br /></td></tr>
<tr class="separator:a18c2f5cfaf8c8717759d6e0feaa58c99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae923ec697e2eb77652fca9f1fcddc894"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894">ubidi_getVisualRun</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t runIndex, int32_t *pLogicalStart, int32_t *pLength)</td></tr>
<tr class="memdesc:ae923ec697e2eb77652fca9f1fcddc894"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get one run's logical start, length, and directionality, which can be 0 for LTR or 1 for RTL.  <a href="#ae923ec697e2eb77652fca9f1fcddc894">More...</a><br /></td></tr>
<tr class="separator:ae923ec697e2eb77652fca9f1fcddc894"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17696c56f06e1a48270f0ff3b69edd79"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79">ubidi_getVisualIndex</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t logicalIndex, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a17696c56f06e1a48270f0ff3b69edd79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the visual position from a logical text position.  <a href="#a17696c56f06e1a48270f0ff3b69edd79">More...</a><br /></td></tr>
<tr class="separator:a17696c56f06e1a48270f0ff3b69edd79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95ad84e638be70e73b23809fc132582f"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a95ad84e638be70e73b23809fc132582f">ubidi_getLogicalIndex</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t visualIndex, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a95ad84e638be70e73b23809fc132582f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the logical text position from a visual position.  <a href="#a95ad84e638be70e73b23809fc132582f">More...</a><br /></td></tr>
<tr class="separator:a95ad84e638be70e73b23809fc132582f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a279cb5ce73e8ce2f820fd3c1fb8bb15c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c">ubidi_getLogicalMap</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t *indexMap, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a279cb5ce73e8ce2f820fd3c1fb8bb15c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object.  <a href="#a279cb5ce73e8ce2f820fd3c1fb8bb15c">More...</a><br /></td></tr>
<tr class="separator:a279cb5ce73e8ce2f820fd3c1fb8bb15c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af54771dbad2e4988fe9b00e55eede2e2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2">ubidi_getVisualMap</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t *indexMap, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:af54771dbad2e4988fe9b00e55eede2e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object.  <a href="#af54771dbad2e4988fe9b00e55eede2e2">More...</a><br /></td></tr>
<tr class="separator:af54771dbad2e4988fe9b00e55eede2e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18113b39aa14585407c8f003c0f86d56"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a18113b39aa14585407c8f003c0f86d56">ubidi_reorderLogical</a> (const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *levels, int32_t length, int32_t *indexMap)</td></tr>
<tr class="memdesc:a18113b39aa14585407c8f003c0f86d56"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a convenience function that does not use a UBiDi object.  <a href="#a18113b39aa14585407c8f003c0f86d56">More...</a><br /></td></tr>
<tr class="separator:a18113b39aa14585407c8f003c0f86d56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01009fa9de9e31b124d5e8bdc2cf2a3e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a01009fa9de9e31b124d5e8bdc2cf2a3e">ubidi_reorderVisual</a> (const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *levels, int32_t length, int32_t *indexMap)</td></tr>
<tr class="memdesc:a01009fa9de9e31b124d5e8bdc2cf2a3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a convenience function that does not use a UBiDi object.  <a href="#a01009fa9de9e31b124d5e8bdc2cf2a3e">More...</a><br /></td></tr>
<tr class="separator:a01009fa9de9e31b124d5e8bdc2cf2a3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5d1e5272fb2eec21e89a026fb665610"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#af5d1e5272fb2eec21e89a026fb665610">ubidi_invertMap</a> (const int32_t *srcMap, int32_t *destMap, int32_t length)</td></tr>
<tr class="memdesc:af5d1e5272fb2eec21e89a026fb665610"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invert an index map.  <a href="#af5d1e5272fb2eec21e89a026fb665610">More...</a><br /></td></tr>
<tr class="separator:af5d1e5272fb2eec21e89a026fb665610"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf3d2acd9d73fb4a3a25deb0ebca28d5"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5">ubidi_getProcessedLength</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:abf3d2acd9d73fb4a3a25deb0ebca28d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the length of the source text processed by the last call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code>.  <a href="#abf3d2acd9d73fb4a3a25deb0ebca28d5">More...</a><br /></td></tr>
<tr class="separator:abf3d2acd9d73fb4a3a25deb0ebca28d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3247782277731ee82cfb3ba700f598a8"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8">ubidi_getResultLength</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr class="memdesc:a3247782277731ee82cfb3ba700f598a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the length of the reordered text resulting from the last call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code>.  <a href="#a3247782277731ee82cfb3ba700f598a8">More...</a><br /></td></tr>
<tr class="separator:a3247782277731ee82cfb3ba700f598a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e2bbf0e64c56a5e53f3e3524865ff76"><td class="memItemLeft" align="right" valign="top"><a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593">UCharDirection</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a7e2bbf0e64c56a5e53f3e3524865ff76">ubidi_getCustomizedClass</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c)</td></tr>
<tr class="memdesc:a7e2bbf0e64c56a5e53f3e3524865ff76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the Bidi class for a given code point.  <a href="#a7e2bbf0e64c56a5e53f3e3524865ff76">More...</a><br /></td></tr>
<tr class="separator:a7e2bbf0e64c56a5e53f3e3524865ff76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4acd99089d2c4f31495210a5462bcb21"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a4acd99089d2c4f31495210a5462bcb21">ubidi_setClassCallback</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> *newFn, const void *newContext, <a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> **oldFn, const void **oldContext, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a4acd99089d2c4f31495210a5462bcb21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the callback function and callback data used by the UBA implementation for Bidi class determination.  <a href="#a4acd99089d2c4f31495210a5462bcb21">More...</a><br /></td></tr>
<tr class="separator:a4acd99089d2c4f31495210a5462bcb21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cafa2a8c29c03918c3a2cdf4ccea778"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a0cafa2a8c29c03918c3a2cdf4ccea778">ubidi_getClassCallback</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> **fn, const void **context)</td></tr>
<tr class="memdesc:a0cafa2a8c29c03918c3a2cdf4ccea778"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current callback function used for Bidi class determination.  <a href="#a0cafa2a8c29c03918c3a2cdf4ccea778">More...</a><br /></td></tr>
<tr class="separator:a0cafa2a8c29c03918c3a2cdf4ccea778"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26790ff71c59f223ded4047da5626725"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725">ubidi_writeReordered</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destSize, uint16_t options, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a26790ff71c59f223ded4047da5626725"><td class="mdescLeft">&#160;</td><td class="mdescRight">Take a <code>UBiDi</code> object containing the reordering information for a piece of text (one or more paragraphs) set by <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> or for a line of text set by <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code> and write a reordered string to the destination buffer.  <a href="#a26790ff71c59f223ded4047da5626725">More...</a><br /></td></tr>
<tr class="separator:a26790ff71c59f223ded4047da5626725"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b0dd2bc3a984509545449d76cb1ed2e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a2b0dd2bc3a984509545449d76cb1ed2e">ubidi_writeReverse</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destSize, uint16_t options, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a2b0dd2bc3a984509545449d76cb1ed2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reverse a Right-To-Left run of Unicode text.  <a href="#a2b0dd2bc3a984509545449d76cb1ed2e">More...</a><br /></td></tr>
<tr class="separator:a2b0dd2bc3a984509545449d76cb1ed2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>C API: Bidi algorithm. </p>
<h2>Bidi algorithm for ICU</h2>
<p>This is an implementation of the Unicode Bidirectional Algorithm. The algorithm is defined in the <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>.</p>
<p>Note: Libraries that perform a bidirectional algorithm and reorder strings accordingly are sometimes called "Storage Layout Engines". ICU's Bidi and shaping (<a class="el" href="ushape_8h.html#a1f89291c5a24a50b8f6dcad5eb4668f7" title="Shape Arabic text on a character basis. ">u_shapeArabic()</a>) APIs can be used at the core of such "Storage Layout Engines".</p>
<h3>General remarks about the API:</h3>
<p>In functions with an error code parameter, the <code>pErrorCode</code> pointer must be valid and the value that it points to must not indicate a failure before the function call. Otherwise, the function returns immediately. After the function call, the value indicates success or failure.</p>
<p>The &quot;limit&quot; of a sequence of characters is the position just after their last character, i.e., one more than that position.</p>
<p>Some of the API functions provide access to &quot;runs&quot;. Such a &quot;run&quot; is defined as a sequence of characters that are at the same embedding level after performing the Bidi algorithm.</p>
<dl class="section author"><dt>Author</dt><dd>Markus W. Scherer </dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<h4>Sample code for the ICU Bidi API </h4>
<h5>Rendering a paragraph with the ICU Bidi API</h5>
<p>This is (hypothetical) sample code that illustrates how the ICU Bidi API could be used to render a paragraph of text. Rendering code depends highly on the graphics system, therefore this sample code must make a lot of assumptions, which may or may not match any existing graphics system's properties.</p>
<p>The basic assumptions are:</p>
<ul>
<li>
Rendering is done from left to right on a horizontal line. </li>
<li>
A run of single-style, unidirectional text can be rendered at once. </li>
<li>
Such a run of text is passed to the graphics system with characters (code units) in logical order. </li>
<li>
The line-breaking algorithm is very complicated and Locale-dependent - and therefore its implementation omitted from this sample code. </li>
</ul>
<pre>
<div class="fragment"><div class="line">*#include <span class="stringliteral">&quot;unicode/ubidi.h&quot;</span></div><div class="line"> </div><div class="line">*<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div><div class="line">      styleNormal=0, styleSelected=1,</div><div class="line">      styleBold=2, styleItalics=4,</div><div class="line">      styleSuper=8, styleSub=16</div><div class="line">*} Style;</div><div class="line"> </div><div class="line">*<span class="keyword">typedef</span> <span class="keyword">struct </span>{ int32_t limit; Style style; } StyleRun;</div><div class="line"> </div><div class="line">*<span class="keywordtype">int</span> getTextWidth(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t start, int32_t limit,</div><div class="line">                   <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount);</div><div class="line"> </div><div class="line">  <span class="comment">// set *pLimit and *pStyleRunLimit for a line</span></div><div class="line">  <span class="comment">// from text[start] and from styleRuns[styleRunStart]</span></div><div class="line">  <span class="comment">// using ubidi_getLogicalRun(para, ...)</span></div><div class="line">*<span class="keywordtype">void</span> getLineBreak(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t start, int32_t *pLimit,</div><div class="line">                   <a class="code" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *para,</div><div class="line">                   <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunStart, <span class="keywordtype">int</span> *pStyleRunLimit,</div><div class="line">                   <span class="keywordtype">int</span> *pLineWidth);</div><div class="line"> </div><div class="line">  <span class="comment">// render runs on a line sequentially, always from left to right</span></div><div class="line"> </div><div class="line">  <span class="comment">// prepare rendering a new line</span></div><div class="line">  <span class="keywordtype">void</span> startLine(<a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> textDirection, <span class="keywordtype">int</span> lineWidth);</div><div class="line"> </div><div class="line">  <span class="comment">// render a run of text and advance to the right by the run width</span></div><div class="line">  <span class="comment">// the text[start..limit-1] is always in logical order</span></div><div class="line">  <span class="keywordtype">void</span> renderRun(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t start, int32_t limit,</div><div class="line">                <a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> textDirection, Style style);</div><div class="line"> </div><div class="line">  <span class="comment">// We could compute a cross-product</span></div><div class="line">  <span class="comment">// from the style runs with the directional runs</span></div><div class="line">  <span class="comment">// and then reorder it.</span></div><div class="line">  <span class="comment">// Instead, here we iterate over each run type</span></div><div class="line">  <span class="comment">// and render the intersections -</span></div><div class="line">  <span class="comment">// with shortcuts in simple (and common) cases.</span></div><div class="line">  <span class="comment">// renderParagraph() is the main function.</span></div><div class="line"> </div><div class="line">  <span class="comment">// render a directional run with</span></div><div class="line">  <span class="comment">// (possibly) multiple style runs intersecting with it</span></div><div class="line">  <span class="keywordtype">void</span> renderDirectionalRun(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text,</div><div class="line">                            int32_t start, int32_t limit,</div><div class="line">                            <a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> direction,</div><div class="line">                            <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount) {</div><div class="line">      <span class="keywordtype">int</span> i;</div><div class="line"> </div><div class="line">      <span class="comment">// iterate over style runs</span></div><div class="line">      <span class="keywordflow">if</span>(direction==<a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a3378628e1b7851cd6d00e7f74d29f6c3">UBIDI_LTR</a>) {</div><div class="line">          <span class="keywordtype">int</span> styleLimit;</div><div class="line"> </div><div class="line">          <span class="keywordflow">for</span>(i=0; i&lt;styleRunCount; ++i) {</div><div class="line">              styleLimit=styleRun[i].limit;</div><div class="line">              <span class="keywordflow">if</span>(start&lt;styleLimit) {</div><div class="line">                  <span class="keywordflow">if</span>(styleLimit&gt;limit) { styleLimit=limit; }</div><div class="line">                  renderRun(text, start, styleLimit,</div><div class="line">                            direction, styleRun[i].style);</div><div class="line">                  <span class="keywordflow">if</span>(styleLimit==limit) { <span class="keywordflow">break</span>; }</div><div class="line">                  start=styleLimit;</div><div class="line">              }</div><div class="line">          }</div><div class="line">      } <span class="keywordflow">else</span> {</div><div class="line">          <span class="keywordtype">int</span> styleStart;</div><div class="line"> </div><div class="line">          <span class="keywordflow">for</span>(i=styleRunCount-1; i&gt;=0; --i) {</div><div class="line">              <span class="keywordflow">if</span>(i&gt;0) {</div><div class="line">                  styleStart=styleRun[i-1].limit;</div><div class="line">              } <span class="keywordflow">else</span> {</div><div class="line">                  styleStart=0;</div><div class="line">              }</div><div class="line">              <span class="keywordflow">if</span>(limit&gt;=styleStart) {</div><div class="line">                  <span class="keywordflow">if</span>(styleStart&lt;start) { styleStart=start; }</div><div class="line">                  renderRun(text, styleStart, limit,</div><div class="line">                            direction, styleRun[i].style);</div><div class="line">                  <span class="keywordflow">if</span>(styleStart==start) { <span class="keywordflow">break</span>; }</div><div class="line">                  limit=styleStart;</div><div class="line">              }</div><div class="line">          }</div><div class="line">      }</div><div class="line">  }</div><div class="line"> </div><div class="line">  <span class="comment">// the line object represents text[start..limit-1]</span></div><div class="line">  <span class="keywordtype">void</span> renderLine(<a class="code" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *line, <span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text,</div><div class="line">                  int32_t start, int32_t limit,</div><div class="line">                  <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount) {</div><div class="line">      <a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> direction=<a class="code" href="ubidi_8h.html#af31ec52194764c663c224f5171e95ea3">ubidi_getDirection</a>(line);</div><div class="line">      <span class="keywordflow">if</span>(direction!=<a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a5cc55b0dc99fa2ef003c7a8beb00844d">UBIDI_MIXED</a>) {</div><div class="line">          <span class="comment">// unidirectional</span></div><div class="line">          <span class="keywordflow">if</span>(styleRunCount&lt;=1) {</div><div class="line">              renderRun(text, start, limit, direction, styleRuns[0].style);</div><div class="line">          } <span class="keywordflow">else</span> {</div><div class="line">              renderDirectionalRun(text, start, limit,</div><div class="line">                                   direction, styleRuns, styleRunCount);</div><div class="line">          }</div><div class="line">      } <span class="keywordflow">else</span> {</div><div class="line">          <span class="comment">// mixed-directional</span></div><div class="line">          int32_t count, i, length;</div><div class="line">          <a class="code" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> level;</div><div class="line"> </div><div class="line">          count=<a class="code" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99">ubidi_countRuns</a>(para, pErrorCode);</div><div class="line">          <span class="keywordflow">if</span>(<a class="code" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711">U_SUCCESS</a>(*pErrorCode)) {</div><div class="line">              <span class="keywordflow">if</span>(styleRunCount&lt;=1) {</div><div class="line">                  Style style=styleRuns[0].style;</div><div class="line"> </div><div class="line">                  <span class="comment">// iterate over directional runs</span></div><div class="line">                 <span class="keywordflow">for</span>(i=0; i&lt;count; ++i) {</div><div class="line">                     direction=<a class="code" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894">ubidi_getVisualRun</a>(para, i, &amp;start, &amp;length);</div><div class="line">                      renderRun(text, start, start+length, direction, style);</div><div class="line">                 }</div><div class="line">              } <span class="keywordflow">else</span> {</div><div class="line">                  int32_t j;</div><div class="line"> </div><div class="line">                  <span class="comment">// iterate over both directional and style runs</span></div><div class="line">                  <span class="keywordflow">for</span>(i=0; i&lt;count; ++i) {</div><div class="line">                      direction=<a class="code" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894">ubidi_getVisualRun</a>(line, i, &amp;start, &amp;length);</div><div class="line">                      renderDirectionalRun(text, start, start+length,</div><div class="line">                                           direction, styleRuns, styleRunCount);</div><div class="line">                  }</div><div class="line">              }</div><div class="line">          }</div><div class="line">      }</div><div class="line">  }</div><div class="line"> </div><div class="line">*<span class="keywordtype">void</span> renderParagraph(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t length,</div><div class="line">                      <a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> textDirection,</div><div class="line">                       <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount,</div><div class="line">                       <span class="keywordtype">int</span> lineWidth,</div><div class="line">                       <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode) {</div><div class="line">      <a class="code" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *para;</div><div class="line"> </div><div class="line">      <span class="keywordflow">if</span>(pErrorCode==<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> || <a class="code" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f">U_FAILURE</a>(*pErrorCode) || length&lt;=0) {</div><div class="line">          <span class="keywordflow">return</span>;</div><div class="line">      }</div><div class="line"> </div><div class="line">      para=<a class="code" href="ubidi_8h.html#a3d75a7eb9ecf1d5280dc2807efd64716">ubidi_openSized</a>(length, 0, pErrorCode);</div><div class="line">      <span class="keywordflow">if</span>(para==<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) { <span class="keywordflow">return</span>; }</div><div class="line"> </div><div class="line">      <a class="code" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11">ubidi_setPara</a>(para, text, length,</div><div class="line">                    textDirection ? <a class="code" href="ubidi_8h.html#a0b4d6ac752ab7a8a33eb825e9c76683d">UBIDI_DEFAULT_RTL</a> : <a class="code" href="ubidi_8h.html#a165ae276878c7a54fd8b067db0d12f40">UBIDI_DEFAULT_LTR</a>,</div><div class="line">                    <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, pErrorCode);</div><div class="line">      <span class="keywordflow">if</span>(<a class="code" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711">U_SUCCESS</a>(*pErrorCode)) {</div><div class="line">          <a class="code" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> paraLevel=1&amp;<a class="code" href="ubidi_8h.html#a6724e673e9ff8f0ee47bd24e47ceb95a">ubidi_getParaLevel</a>(para);</div><div class="line">          StyleRun styleRun={ length, styleNormal };</div><div class="line">          <span class="keywordtype">int</span> width;</div><div class="line"> </div><div class="line">          <span class="keywordflow">if</span>(styleRuns==<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> || styleRunCount&lt;=0) {</div><div class="line">             styleRunCount=1;</div><div class="line">              styleRuns=&amp;styleRun;</div><div class="line">          }</div><div class="line"> </div><div class="line">         <span class="comment">// assume styleRuns[styleRunCount-1].limit&gt;=length</span></div><div class="line"> </div><div class="line">          width=getTextWidth(text, 0, length, styleRuns, styleRunCount);</div><div class="line">          <span class="keywordflow">if</span>(width&lt;=lineWidth) {</div><div class="line">              <span class="comment">// everything fits onto one line</span></div><div class="line"> </div><div class="line">             <span class="comment">// prepare rendering a new line from either left or right</span></div><div class="line">              startLine(paraLevel, width);</div><div class="line"> </div><div class="line">              renderLine(para, text, 0, length,</div><div class="line">                         styleRuns, styleRunCount);</div><div class="line">          } <span class="keywordflow">else</span> {</div><div class="line">              <a class="code" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *line;</div><div class="line"> </div><div class="line">              <span class="comment">// we need to render several lines</span></div><div class="line">              line=<a class="code" href="ubidi_8h.html#a3d75a7eb9ecf1d5280dc2807efd64716">ubidi_openSized</a>(length, 0, pErrorCode);</div><div class="line">              <span class="keywordflow">if</span>(line!=<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) {</div><div class="line">                  int32_t start=0, limit;</div><div class="line">                  <span class="keywordtype">int</span> styleRunStart=0, styleRunLimit;</div><div class="line"> </div><div class="line">                  <span class="keywordflow">for</span>(;;) {</div><div class="line">                      limit=length;</div><div class="line">                      styleRunLimit=styleRunCount;</div><div class="line">                      getLineBreak(text, start, &amp;limit, para,</div><div class="line">                                   styleRuns, styleRunStart, &amp;styleRunLimit,</div><div class="line">                                  &amp;width);</div><div class="line">                      <a class="code" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a">ubidi_setLine</a>(para, start, limit, line, pErrorCode);</div><div class="line">                      <span class="keywordflow">if</span>(<a class="code" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711">U_SUCCESS</a>(*pErrorCode)) {</div><div class="line">                          <span class="comment">// prepare rendering a new line</span></div><div class="line">                          <span class="comment">// from either left or right</span></div><div class="line">                          startLine(paraLevel, width);</div><div class="line"> </div><div class="line">                          renderLine(line, text, start, limit,</div><div class="line">                                     styleRuns+styleRunStart,</div><div class="line">                                     styleRunLimit-styleRunStart);</div><div class="line">                      }</div><div class="line">                      <span class="keywordflow">if</span>(limit==length) { <span class="keywordflow">break</span>; }</div><div class="line">                      start=limit;</div><div class="line">                      styleRunStart=styleRunLimit-1;</div><div class="line">                      <span class="keywordflow">if</span>(start&gt;=styleRuns[styleRunStart].limit) {</div><div class="line">                          ++styleRunStart;</div><div class="line">                      }</div><div class="line">                  }</div><div class="line"> </div><div class="line">                  <a class="code" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5">ubidi_close</a>(line);</div><div class="line">              }</div><div class="line">         }</div><div class="line">     }</div><div class="line"> </div><div class="line">      <a class="code" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5">ubidi_close</a>(para);</div><div class="line">*}</div><div class="line">*</div></div><!-- fragment -->
  </pre> 
<p>Definition in file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ab74f3e4fed22db8d521e42f6a882b7a1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_BIDI_CLASS_DEFAULT&#160;&#160;&#160;<a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593a6ef7d8987718e33961e6a15739343af9">U_CHAR_DIRECTION_COUNT</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Value returned by <code>UBiDiClassCallback</code> callbacks when there is no need to override the standard Bidi class for a given code point. </p>
<p>This constant is deprecated; use u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1 instead.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea" title="Callback type declaration for overriding default Bidi class values with custom ones. ">UBiDiClassCallback</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000045">Deprecated:</a></b></dt><dd>ICU 58 The numeric value may change over time, see ICU ticket #12420. </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01979">1979</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a165ae276878c7a54fd8b067db0d12f40"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_DEFAULT_LTR&#160;&#160;&#160;0xfe</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Paragraph level setting. </p>
<p>Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, then set the paragraph level to 0 (left-to-right).</p>
<p>If this value is used in conjunction with reordering modes <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder is assumed to be visual LTR, and the text after reordering is required to be the corresponding logical string with appropriate contextual direction. The direction of the result string will be RTL if either the righmost or leftmost strong character of the source text is RTL or Arabic Letter, the direction will be LTR otherwise.</p>
<p>If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may be added at the beginning of the result string to ensure round trip (that the result string, when reordered back to visual, will produce the original source text). </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" title="Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm. ">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e" title="Inverse Bidi (Visual to Logical) algorithm for the UBIDI_REORDER_NUMBERS_SPECIAL Bidi algorithm...">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000625">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00358">358</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0b4d6ac752ab7a8a33eb825e9c76683d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_DEFAULT_RTL&#160;&#160;&#160;0xff</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Paragraph level setting. </p>
<p>Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, then set the paragraph level to 1 (right-to-left).</p>
<p>If this value is used in conjunction with reordering modes <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder is assumed to be visual LTR, and the text after reordering is required to be the corresponding logical string with appropriate contextual direction. The direction of the result string will be RTL if either the righmost or leftmost strong character of the source text is RTL or Arabic Letter, or if the text contains no strong character; the direction will be LTR otherwise.</p>
<p>If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may be added at the beginning of the result string to ensure round trip (that the result string, when reordered back to visual, will produce the original source text). </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" title="Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm. ">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e" title="Inverse Bidi (Visual to Logical) algorithm for the UBIDI_REORDER_NUMBERS_SPECIAL Bidi algorithm...">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000626">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00385">385</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0b1370dda1e3ad8ef9c94fd28320153d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_DO_MIRRORING&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>: replace characters with the "mirrored" property in RTL runs by their mirror-image mappings </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000671">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01851">1851</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="adad66f9132bc4e4621427091acfc0f40"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_INSERT_LRM_FOR_NUMERIC&#160;&#160;&#160;4</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>: surround the run with LRMs if necessary; this is part of the approximate "inverse Bidi" algorithm </p>
<p>This option does not imply corresponding adjustment of the index mappings.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse Bidi&quot; algorithm...">ubidi_setInverse</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000672">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01865">1865</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2e022ccd0d2c55a21c2aa233c30ecd88"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_KEEP_BASE_COMBINING&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>option flags for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a> </p>
<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>: keep combining characters after their base characters in RTL runs</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000670">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01841">1841</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5e4049fa946dd8e0a1b3c01e5c1c3711"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_LEVEL_OVERRIDE&#160;&#160;&#160;0x80</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bit flag for level input. </p>
<p>Overrides directional properties. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000628">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00398">398</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6bdc9eb61fd6146789e9827bdbded171"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_MAP_NOWHERE&#160;&#160;&#160;(-1)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Special value which can be returned by the mapping functions when a logical index has no corresponding visual index or vice-versa. </p>
<p>This may happen for the logical-to-visual mapping of a Bidi control when option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters ">UBIDI_OPTION_REMOVE_CONTROLS</a></code> is specified. This can also happen for the visual-to-logical mapping of a Bidi mark (LRM or RLM) inserted by option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a></code>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79" title="Get the visual position from a logical text position. ">ubidi_getVisualIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getVisualMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a95ad84e638be70e73b23809fc132582f" title="Get the logical text position from a visual position. ">ubidi_getLogicalIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getLogicalMap</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000629">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00413">413</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a531b2d2bfa7655df6bf86d1236a1928a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_MAX_EXPLICIT_LEVEL&#160;&#160;&#160;125</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Maximum explicit embedding level. </p>
<p>(The maximum resolved level can be up to <code>UBIDI_MAX_EXPLICIT_LEVEL+1</code>). </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000627">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00392">392</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a4a10c3aac68ceca1569bac717156cef3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_OUTPUT_REVERSE&#160;&#160;&#160;16</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>: write the output in reverse order </p>
<p>This has the same effect as calling <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code> first without this option, and then calling <code><a class="el" href="ubidi_8h.html#a2b0dd2bc3a984509545449d76cb1ed2e" title="Reverse a Right-To-Left run of Unicode text. ">ubidi_writeReverse()</a></code> without mirroring. Doing this in the same step is faster and avoids a temporary buffer. An example for using this option is output to a character terminal that is designed for RTL scripts and stores text in reverse order.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000674">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01894">1894</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a039000c1e298cbad5909d07a55ca5312"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_REMOVE_BIDI_CONTROLS&#160;&#160;&#160;8</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a>: remove Bidi control characters (this does not affect <a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this is part of the a...">UBIDI_INSERT_LRM_FOR_NUMERIC</a>) </p>
<p>This option does not imply corresponding adjustment of the index mappings.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000673">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01878">1878</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="aeed24292bbed966df93f088bc6791f74"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000633">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00476">476</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a77893628988f90ea58198aaac9c6fcea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593">UCharDirection</a> UBiDiClassCallback(const void *context, <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback type declaration for overriding default Bidi class values with custom ones. </p>
<p>Usually, the function pointer will be propagated to a <code>UBiDi</code> object by calling the <code><a class="el" href="ubidi_8h.html#a4acd99089d2c4f31495210a5462bcb21" title="Set the callback function and callback data used by the UBA implementation for Bidi class determinati...">ubidi_setClassCallback()</a></code> function; then the callback will be invoked by the UBA implementation any time the class of a character is to be determined.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>is a pointer to the callback private data.</td></tr>
    <tr><td class="paramname">c</td><td>is the code point to get a Bidi class for.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The directional property / Bidi class for the given code point <code>c</code> if the default class has been overridden, or <code><a class="el" href="ubidi_8h.html#ab74f3e4fed22db8d521e42f6a882b7a1" title="Value returned by UBiDiClassCallback callbacks when there is no need to override the standard Bidi cl...">U_BIDI_CLASS_DEFAULT</a>=u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code> if the standard Bidi class value for <code>c</code> is to be used. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a4acd99089d2c4f31495210a5462bcb21" title="Set the callback function and callback data used by the UBA implementation for Bidi class determinati...">ubidi_setClassCallback</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a0cafa2a8c29c03918c3a2cdf4ccea778" title="Get the current callback function used for Bidi class determination. ">ubidi_getClassCallback</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000677">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l02003">2003</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0d13f55bcc7116169db68b10733545f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000631">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00461">461</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab2460a19f323ab9787a79a95db91a606"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef uint8_t <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>UBiDiLevel is the type of the level values in this Bidi implementation. </p>
<p>It holds an embedding level and indicates the visual direction by its bit&#160;0 (even/odd value).</p>
<p>It can also hold non-level values for the <code>paraLevel</code> and <code>embeddingLevels</code> arguments of <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code>; there: </p><ul>
<li>
bit&#160;7 of an <code>embeddingLevels[]</code> value indicates whether the using application is specifying the level of a character to <em>override</em> whatever the Bidi implementation would resolve it to. </li>
<li>
<code>paraLevel</code> can be set to the pseudo-level values <code>UBIDI_DEFAULT_LTR</code> and <code>UBIDI_DEFAULT_RTL</code>. </li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a></dd></dl>
<p>The related constants are not real, valid level values. <code>UBIDI_DEFAULT_XXX</code> can be used to specify a default for the paragraph level for when the <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> function shall determine it but there is no strongly typed character in the input.</p>
<p>Note that the value for <code>UBIDI_DEFAULT_LTR</code> is even and the one for <code>UBIDI_DEFAULT_RTL</code> is odd, just like with normal LTR and RTL level values - these special values are designed that way. Also, the implementation assumes that UBIDI_MAX_EXPLICIT_LEVEL is odd.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a165ae276878c7a54fd8b067db0d12f40" title="Paragraph level setting. ">UBIDI_DEFAULT_LTR</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a0b4d6ac752ab7a8a33eb825e9c76683d" title="Paragraph level setting. ">UBIDI_DEFAULT_RTL</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a5e4049fa946dd8e0a1b3c01e5c1c3711" title="Bit flag for level input. ">UBIDI_LEVEL_OVERRIDE</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a531b2d2bfa7655df6bf86d1236a1928a" title="Maximum explicit embedding level. ">UBIDI_MAX_EXPLICIT_LEVEL</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000624">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00332">332</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6764f58b44c41e99b0b9d1be3f98f06d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a>  <a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>UBiDiReorderingMode</code> values indicate which variant of the Bidi algorithm to use. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi alg...">ubidi_setReorderingMode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000641">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="ab0734f6d3b154be99b2a159cb02647f9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386">UBiDiReorderingOption</a>  <a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386">UBiDiReorderingOption</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>UBiDiReorderingOption</code> values indicate which options are specified to affect the Bidi algorithm. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations. ">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000644">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a68a6b5fdcbf80aaa51b5bd39f7f31102"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>UBiDiDirection</code> values indicate the text direction. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000630">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a68a6b5fdcbf80aaa51b5bd39f7f31102a3378628e1b7851cd6d00e7f74d29f6c3"></a>UBIDI_LTR&#160;</td><td class="fielddoc">
<p>Left-to-right text. </p>
<p>This is a 0 value. </p><ul>
<li>
As return value for <code><a class="el" href="ubidi_8h.html#af31ec52194764c663c224f5171e95ea3" title="Get the directionality of the text. ">ubidi_getDirection()</a></code>, it means that the source string contains no right-to-left characters, or that the source string is empty and the paragraph level is even. </li>
<li>
As return value for <code><a class="el" href="ubidi_8h.html#aeb1fd15743833278cc11906cd5a48aef" title="Gets the base direction of the text provided according to the Unicode Bidirectional Algorithm...">ubidi_getBaseDirection()</a></code>, it means that the first strong character of the source string has a left-to-right direction. </li>
</ul>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000683">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a68a6b5fdcbf80aaa51b5bd39f7f31102a73e659e3118b58f822cc1384e7fcd8ec"></a>UBIDI_RTL&#160;</td><td class="fielddoc">
<p>Right-to-left text. </p>
<p>This is a 1 value. </p><ul>
<li>
As return value for <code><a class="el" href="ubidi_8h.html#af31ec52194764c663c224f5171e95ea3" title="Get the directionality of the text. ">ubidi_getDirection()</a></code>, it means that the source string contains no left-to-right characters, or that the source string is empty and the paragraph level is odd. </li>
<li>
As return value for <code><a class="el" href="ubidi_8h.html#aeb1fd15743833278cc11906cd5a48aef" title="Gets the base direction of the text provided according to the Unicode Bidirectional Algorithm...">ubidi_getBaseDirection()</a></code>, it means that the first strong character of the source string has a right-to-left direction. </li>
</ul>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000684">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a68a6b5fdcbf80aaa51b5bd39f7f31102a5cc55b0dc99fa2ef003c7a8beb00844d"></a>UBIDI_MIXED&#160;</td><td class="fielddoc">
<p>Mixed-directional text. </p>
<p>As return value for <code><a class="el" href="ubidi_8h.html#af31ec52194764c663c224f5171e95ea3" title="Get the directionality of the text. ">ubidi_getDirection()</a></code>, it means that the source string contains both left-to-right and right-to-left characters. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000685">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a68a6b5fdcbf80aaa51b5bd39f7f31102a4ec7a06cf7b96d2df5d39ac54765be12"></a>UBIDI_NEUTRAL&#160;</td><td class="fielddoc">
<p>No strongly directional text. </p>
<p>As return value for <code><a class="el" href="ubidi_8h.html#aeb1fd15743833278cc11906cd5a48aef" title="Gets the base direction of the text provided according to the Unicode Bidirectional Algorithm...">ubidi_getBaseDirection()</a></code>, it means that the source string is missing or empty, or contains neither left-to-right nor right-to-left characters. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000686">Stable:</a></b></dt><dd>ICU 4.6 </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00419">419</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>UBiDiReorderingMode</code> values indicate which variant of the Bidi algorithm to use. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi alg...">ubidi_setReorderingMode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000641">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b"></a>UBIDI_REORDER_DEFAULT&#160;</td><td class="fielddoc">
<p>Regular Logical to Visual Bidi algorithm according to Unicode. </p>
<p>This is a 0 value. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000688">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa447996fecd0eefb0d12ce247cb511e5f"></a>UBIDI_REORDER_NUMBERS_SPECIAL&#160;</td><td class="fielddoc">
<p>Logical to Visual algorithm which handles numbers in a way which mimicks the behavior of Windows XP. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000689">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa0cd75b3d1d8abc971554a2a7d459c6d7"></a>UBIDI_REORDER_GROUP_NUMBERS_WITH_R&#160;</td><td class="fielddoc">
<p>Logical to Visual algorithm grouping numbers with adjacent R characters (reversible algorithm). </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000690">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d"></a>UBIDI_REORDER_RUNS_ONLY&#160;</td><td class="fielddoc">
<p>Reorder runs only to transform a Logical LTR string to the Logical RTL string with the same display, or vice-versa. </p>
<p><br />
 If this mode is set together with option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a></code>, some Bidi controls in the source text may be removed and other controls may be added to produce the minimum combination which has the required display. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000691">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a"></a>UBIDI_REORDER_INVERSE_NUMBERS_AS_L&#160;</td><td class="fielddoc">
<p>Visual to Logical algorithm which handles numbers like L (same algorithm as selected by <code>ubidi_setInverse(TRUE)</code>. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse Bidi&quot; algorithm...">ubidi_setInverse</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000692">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa"></a>UBIDI_REORDER_INVERSE_LIKE_DIRECT&#160;</td><td class="fielddoc">
<p>Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000693">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e"></a>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL&#160;</td><td class="fielddoc">
<p>Inverse Bidi (Visual to Logical) algorithm for the <code>UBIDI_REORDER_NUMBERS_SPECIAL</code> Bidi algorithm. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000694">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfae19ca6f8614a91e49454b21264f6a379"></a>UBIDI_REORDER_COUNT&#160;</td><td class="fielddoc">
<p>Number of values for reordering mode. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000046">Deprecated:</a></b></dt><dd>ICU 58 The numeric value may change over time, see ICU ticket #12420. </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00689">689</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a4505e4adc8da792501414b770f49f386"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386">UBiDiReorderingOption</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>UBiDiReorderingOption</code> values indicate which options are specified to affect the Bidi algorithm. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations. ">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000644">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a4505e4adc8da792501414b770f49f386ae3c7e82fa51ecfccacb2d85fb6dc60fb"></a>UBIDI_OPTION_DEFAULT&#160;</td><td class="fielddoc">
<p>option value for <code>ubidi_setReorderingOptions</code>: disable all the options which can be set with this function </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations. ">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000695">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6"></a>UBIDI_OPTION_INSERT_MARKS&#160;</td><td class="fielddoc">
<p>option bit for <code>ubidi_setReorderingOptions</code>: insert Bidi marks (LRM or RLM) when needed to ensure correct result of a reordering to a Logical order </p>
<p>This option must be set or reset before calling <code>ubidi_setPara</code>.</p>
<p>This option is significant only with reordering modes which generate a result with Logical order, specifically:</p>
<ul>
<li>
<code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d" title="Reorder runs only to transform a Logical LTR string to the Logical RTL string with the same display...">UBIDI_REORDER_RUNS_ONLY</a></code> </li>
<li>
<code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected by ubidi_setInve...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> </li>
<li>
<code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" title="Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm. ">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a></code> </li>
<li>
<code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e" title="Inverse Bidi (Visual to Logical) algorithm for the UBIDI_REORDER_NUMBERS_SPECIAL Bidi algorithm...">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a></code> </li>
</ul>
<p>If this option is set in conjunction with reordering mode <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected by ubidi_setInve...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> or with calling <code>ubidi_setInverse(TRUE)</code>, it implies option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this is part of the a...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to function <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code>.</p>
<p>For other reordering modes, a minimum number of LRM or RLM characters will be added to the source text after reordering it so as to ensure round trip, i.e. when applying the inverse reordering mode on the resulting logical text with removal of Bidi marks (option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters ">UBIDI_OPTION_REMOVE_CONTROLS</a></code> set before calling <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> or option <code><a class="el" href="ubidi_8h.html#a039000c1e298cbad5909d07a55ca5312" title="option bit for ubidi_writeReordered(): remove Bidi control characters (this does not affect UBIDI_INS...">UBIDI_REMOVE_BIDI_CONTROLS</a></code> in <code>ubidi_writeReordered</code>), the result will be identical to the source text in the first transformation.</p>
<p>This option will be ignored if specified together with option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters ">UBIDI_OPTION_REMOVE_CONTROLS</a></code>. It inhibits option <code>UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to function <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code> and it implies option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this is part of the a...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to function <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code> if the reordering mode is <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected by ubidi_setInve...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi alg...">ubidi_setReorderingMode</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations. ">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000696">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502"></a>UBIDI_OPTION_REMOVE_CONTROLS&#160;</td><td class="fielddoc">
<p>option bit for <code>ubidi_setReorderingOptions</code>: remove Bidi control characters </p>
<p>This option must be set or reset before calling <code>ubidi_setPara</code>.</p>
<p>This option nullifies option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a></code>. It inhibits option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this is part of the a...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to function <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code> and it implies option <code><a class="el" href="ubidi_8h.html#a039000c1e298cbad5909d07a55ca5312" title="option bit for ubidi_writeReordered(): remove Bidi control characters (this does not affect UBIDI_INS...">UBIDI_REMOVE_BIDI_CONTROLS</a></code> in calls to that function.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi alg...">ubidi_setReorderingMode</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations. ">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000697">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7"></a>UBIDI_OPTION_STREAMING&#160;</td><td class="fielddoc">
<p>option bit for <code>ubidi_setReorderingOptions</code>: process the output as part of a stream to be continued </p>
<p>This option must be set or reset before calling <code>ubidi_setPara</code>.</p>
<p>This option specifies that the caller is interested in processing large text object in parts. The results of the successive calls are expected to be concatenated by the caller. Only the call for the last part will have this option bit off.</p>
<p>When this option bit is on, <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> may process less than the full source text in order to truncate the text at a meaningful boundary. The caller should call <code><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength()</a></code> immediately after calling <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> in order to determine how much of the source text has been processed. Source text beyond that length should be resubmitted in following calls to <code>ubidi_setPara</code>. The processed length may be less than the length of the source text if a character preceding the last character of the source text constitutes a reasonable boundary (like a block separator) for text to be continued.<br />
 If the last character of the source text constitutes a reasonable boundary, the whole text will be processed at once.<br />
 If nowhere in the source text there exists such a reasonable boundary, the processed length will be zero.<br />
 The caller should check for such an occurrence and do one of the following: </p><ul>
<li>
submit a larger amount of text with a better chance to include a reasonable boundary. </li>
<li>
resubmit the same text after turning off option <code>UBIDI_OPTION_STREAMING</code>.</li>
</ul>
<p>In all cases, this option should be turned off before processing the last part of the text.</p>
<p>When the <code>UBIDI_OPTION_STREAMING</code> option is used, it is recommended to call <code><a class="el" href="ubidi_8h.html#ab7b9785b85169b3830034029729c672e" title="Specify whether block separators must be allocated level zero, so that successive paragraphs will pro...">ubidi_orderParagraphsLTR()</a></code> with argument <code>orderParagraphsLTR</code> set to <code>TRUE</code> before calling <code>ubidi_setPara</code> so that later paragraphs may be concatenated to previous paragraphs on the right.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi alg...">ubidi_setReorderingMode</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations. ">ubidi_setReorderingOptions</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#ab7b9785b85169b3830034029729c672e" title="Specify whether block separators must be allocated level zero, so that successive paragraphs will pro...">ubidi_orderParagraphsLTR</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000698">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00904">904</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a3c30f10761d8cfb6974e3b7dc6c35df5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code><a class="el" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5" title="ubidi_close() must be called to free the memory associated with a UBiDi object. ">ubidi_close()</a></code> must be called to free the memory associated with a UBiDi object. </p>
<p><b>Important: </b> A parent <code>UBiDi</code> object must not be destroyed or reused if it still has children. If a <code>UBiDi</code> object has become the <em>child</em> of another one (its <em>parent</em>) by calling <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code>, then the child object must be destroyed (closed) or reused (by calling <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> or <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code>) before the parent object.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000636">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a8f4b5bb9a8e37d8065490af4e6825563"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_countParagraphs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of paragraphs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of paragraphs. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000655">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a18c2f5cfaf8c8717759d6e0feaa58c99"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_countRuns </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of runs. </p>
<p>This function may invoke the actual reordering on the <code>UBiDi</code> object, after <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> may have resolved only the levels of the text. Therefore, <code><a class="el" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99" title="Get the number of runs. ">ubidi_countRuns()</a></code> may have to allocate memory, and may fail doing so.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of runs. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000661">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aeb1fd15743833278cc11906cd5a48aef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> ubidi_getBaseDirection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the base direction of the text provided according to the Unicode Bidirectional Algorithm. </p>
<p>The base direction is derived from the first character in the string with bidirectional character type L, R, or AL. If the first such character has type L, <code>UBIDI_LTR</code> is returned. If the first such character has type R or AL, <code>UBIDI_RTL</code> is returned. If the string does not contain any character of these types, then <code>UBIDI_NEUTRAL</code> is returned.</p>
<p>This is a lightweight function for use when only the base direction is needed and no further bidi processing of the text is needed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>is a pointer to the text whose base direction is needed. Note: the text must be (at least) <code>length</code> long.</td></tr>
    <tr><td class="paramname">length</td><td>is the length of the text; if <code>length==-1</code> then the text must be zero-terminated.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>UBIDI_LTR</code>, <code>UBIDI_RTL</code>, <code>UBIDI_NEUTRAL</code></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102" title="UBiDiDirection values indicate the text direction. ">UBiDiDirection</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000651">Stable:</a></b></dt><dd>ICU 4.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a0cafa2a8c29c03918c3a2cdf4ccea778"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getClassCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> **&#160;</td>
          <td class="paramname"><em>fn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void **&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current callback function used for Bidi class determination. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">fn</td><td>fillin: Returns the callback function pointer.</td></tr>
    <tr><td class="paramname">context</td><td>fillin: Returns the callback's private context.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a4acd99089d2c4f31495210a5462bcb21" title="Set the callback function and callback data used by the UBA implementation for Bidi class determinati...">ubidi_setClassCallback</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000680">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a7e2bbf0e64c56a5e53f3e3524865ff76"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593">UCharDirection</a> ubidi_getCustomizedClass </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&#160;</td>
          <td class="paramname"><em>c</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve the Bidi class for a given code point. </p>
<p>If a <code><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea" title="Callback type declaration for overriding default Bidi class values with custom ones. ">UBiDiClassCallback</a></code> callback is defined and returns a value other than <code><a class="el" href="ubidi_8h.html#ab74f3e4fed22db8d521e42f6a882b7a1" title="Value returned by UBiDiClassCallback callbacks when there is no need to override the standard Bidi cl...">U_BIDI_CLASS_DEFAULT</a>=u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code>, that value is used; otherwise the default class determination mechanism is invoked.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">c</td><td>is the code point whose Bidi class must be retrieved.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The Bidi class for character <code>c</code> based on the given <code>pBiDi</code> instance. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea" title="Callback type declaration for overriding default Bidi class values with custom ones. ">UBiDiClassCallback</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000678">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="af31ec52194764c663c224f5171e95ea3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> ubidi_getDirection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the directionality of the text. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a value of <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code> or <code>UBIDI_MIXED</code> that indicates if the entire text represented by this object is unidirectional, and which direction, or if it is mixed-directional. Note - The value <code>UBIDI_NEUTRAL</code> is never returned from this method.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102" title="UBiDiDirection values indicate the text direction. ">UBiDiDirection</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000650">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Referenced by <a class="el" href="ParagraphLayout_8h_source.html#l00655">icu::ParagraphLayout::getTextDirection()</a>.</p>

</div>
</div>
<a class="anchor" id="a8f51ac46083e7ce52b6bea4bc7ac14a8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getLength </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the length of the text. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the text that the UBiDi object was created for. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000653">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ad363767eacb66359de7c639a722338c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> ubidi_getLevelAt </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>charIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the level for one character. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">charIndex</td><td>the index of a character. It must be in the range [0..ubidi_getProcessedLength(pBiDi)].</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The level for the character at charIndex (0 if charIndex is not in the valid range).</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606" title="UBiDiLevel is the type of the level values in this Bidi implementation. ">UBiDiLevel</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000658">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ae498c62057ff75f31ca8cbdbf9cae4b7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>* ubidi_getLevels </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get an array of levels for each character. </p>
<p>Note that this function may allocate memory under some circumstances, unlike <code><a class="el" href="ubidi_8h.html#ad363767eacb66359de7c639a722338c8" title="Get the level for one character. ">ubidi_getLevelAt()</a></code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object, whose text length must be strictly positive.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The levels array for the text, or <code>NULL</code> if an error occurs.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606" title="UBiDiLevel is the type of the level values in this Bidi implementation. ">UBiDiLevel</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000659">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a95ad84e638be70e73b23809fc132582f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getLogicalIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>visualIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the logical text position from a visual position. </p>
<p>If such a mapping is used many times on the same <code>UBiDi</code> object, then calling <code><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getVisualMap()</a></code> is more efficient.</p>
<p>The value returned may be <code><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index has no correspondin...">UBIDI_MAP_NOWHERE</a></code> if there is no logical position because the corresponding text character is a Bidi mark inserted in the output by option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a></code>. </p>
<p>This is the inverse function to <code><a class="el" href="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79" title="Get the visual position from a logical text position. ">ubidi_getVisualIndex()</a></code>. </p>
<p>When the visual output is altered by using options of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical position returned may not be correct. It is advised to use, when possible, reordering options such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">visualIndex</td><td>is the visual position of a character.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of this character in the text.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getVisualMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79" title="Get the visual position from a logical text position. ">ubidi_getVisualIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara(). ">ubidi_getResultLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000664">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a279cb5ce73e8ce2f820fd3c1fb8bb15c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getLogicalMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>indexMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object. </p>
<p>Some values in the map may be <code><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index has no correspondin...">UBIDI_MAP_NOWHERE</a></code> if the corresponding text characters are Bidi controls removed from the visual output by the option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters ">UBIDI_OPTION_REMOVE_CONTROLS</a></code>. </p>
<p>When the visual output is altered by using options of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual positions returned may not be correct. It is advised to use, when possible, reordering options such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>. </p>
<p>Note that in right-to-left runs, this mapping places second surrogates before first ones (which is generally a bad idea) and combining characters before base characters. Use of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code>, optionally with the <code><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88" title="option flags for ubidi_writeReordered() ">UBIDI_KEEP_BASE_COMBINING</a></code> option can be considered instead of using the mapping, in order to avoid these issues.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">indexMap</td><td>is a pointer to an array of <code><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength()</a></code> indexes which will reflect the reordering of the characters. If option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a></code> is set, the number of elements allocated in <code>indexMap</code> must be no less than <code><a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara(). ">ubidi_getResultLength()</a></code>. The array does not need to be initialized.<br />
<br />
 The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getVisualMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79" title="Get the visual position from a logical text position. ">ubidi_getVisualIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara(). ">ubidi_getResultLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000665">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aaa99079b617dcc6c15910558306b7145"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getLogicalRun </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>logicalPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>pLogicalLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&#160;</td>
          <td class="paramname"><em>pLevel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a logical run. </p>
<p>This function returns information about a run and is used to retrieve runs in logical order.</p>
<p>This is especially useful for line-breaking on a paragraph.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">logicalPosition</td><td>is a logical position within the source text.</td></tr>
    <tr><td class="paramname">pLogicalLimit</td><td>will receive the limit of the corresponding run. The l-value that you point to here may be the same expression (variable) as the one for <code>logicalPosition</code>. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td class="paramname">pLevel</td><td>will receive the level of the corresponding run. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000660">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a5cd3d78464b8e3b71886a643f70f25ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getParagraph </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>charIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>pParaStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>pParaLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&#160;</td>
          <td class="paramname"><em>pParaLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a paragraph, given a position within the text. </p>
<p>This function returns information about a paragraph.<br />
 Note: if the paragraph index is known, it is more efficient to retrieve the paragraph information using <a class="el" href="ubidi_8h.html#a62377f811a750130246dfb49c1cc6dc0" title="Get a paragraph, given the index of this paragraph. ">ubidi_getParagraphByIndex()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">charIndex</td><td>is the index of a character within the text, in the range <code>[0..ubidi_getProcessedLength(pBiDi)-1]</code>.</td></tr>
    <tr><td class="paramname">pParaStart</td><td>will receive the index of the first character of the paragraph in the text. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td class="paramname">pParaLimit</td><td>will receive the limit of the paragraph. The l-value that you point to here may be the same expression (variable) as the one for <code>charIndex</code>. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td class="paramname">pParaLevel</td><td>will receive the level of the paragraph. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of the paragraph containing the specified position.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000656">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a62377f811a750130246dfb49c1cc6dc0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getParagraphByIndex </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>paraIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>pParaStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>pParaLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&#160;</td>
          <td class="paramname"><em>pParaLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a paragraph, given the index of this paragraph. </p>
<p>This function returns information about a paragraph.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">paraIndex</td><td>is the number of the paragraph, in the range <code>[0..ubidi_countParagraphs(pBiDi)-1]</code>.</td></tr>
    <tr><td class="paramname">pParaStart</td><td>will receive the index of the first character of the paragraph in the text. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td class="paramname">pParaLimit</td><td>will receive the limit of the paragraph. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td class="paramname">pParaLevel</td><td>will receive the level of the paragraph. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000657">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a6724e673e9ff8f0ee47bd24e47ceb95a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> ubidi_getParaLevel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the paragraph level of the text. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The paragraph level. If there are multiple paragraphs, their level may vary if the required paraLevel is UBIDI_DEFAULT_LTR or UBIDI_DEFAULT_RTL. In that case, the level of the first paragraph is returned.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606" title="UBiDiLevel is the type of the level values in this Bidi implementation. ">UBiDiLevel</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a5cd3d78464b8e3b71886a643f70f25ab" title="Get a paragraph, given a position within the text. ">ubidi_getParagraph</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a62377f811a750130246dfb49c1cc6dc0" title="Get a paragraph, given the index of this paragraph. ">ubidi_getParagraphByIndex</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000654">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Referenced by <a class="el" href="ParagraphLayout_8h_source.html#l00650">icu::ParagraphLayout::getParagraphLevel()</a>.</p>

</div>
</div>
<a class="anchor" id="abf3d2acd9d73fb4a3a25deb0ebca28d5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getProcessedLength </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the length of the source text processed by the last call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code>. </p>
<p>This length may be different from the length of the source text if option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7" title="option bit for ubidi_setReorderingOptions: process the output as part of a stream to be continued ...">UBIDI_OPTION_STREAMING</a></code> has been set. <br />
 Note that whenever the length of the text affects the execution or the result of a function, it is the processed length which must be considered, except for <code>ubidi_setPara</code> (which receives unprocessed source text) and <code>ubidi_getLength</code> (which returns the original length of the source text).<br />
 In particular, the processed length is the one to consider in the following cases: </p><ul>
<li>
maximum value of the <code>limit</code> argument of <code>ubidi_setLine</code> </li>
<li>
maximum value of the <code>charIndex</code> argument of <code>ubidi_getParagraph</code> </li>
<li>
maximum value of the <code>charIndex</code> argument of <code>ubidi_getLevelAt</code> </li>
<li>
number of elements in the array returned by <code>ubidi_getLevels</code> </li>
<li>
maximum value of the <code>logicalStart</code> argument of <code>ubidi_getLogicalRun</code> </li>
<li>
maximum value of the <code>logicalIndex</code> argument of <code>ubidi_getVisualIndex</code> </li>
<li>
number of elements filled in the <code>*indexMap</code> argument of <code>ubidi_getLogicalMap</code> </li>
<li>
length of text processed by <code>ubidi_writeReordered</code> </li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the part of the source text processed by the last call to <code>ubidi_setPara</code>. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7" title="option bit for ubidi_setReorderingOptions: process the output as part of a stream to be continued ...">UBIDI_OPTION_STREAMING</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000675">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a98a1b2869aab8c9dec5effa7749e0369"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a> ubidi_getReorderingMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>What is the requested reordering mode for a given Bidi object? </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the current reordering mode of the Bidi object </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi alg...">ubidi_setReorderingMode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000643">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a5186ae76f6abfcbaf700d2dc7625516e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ubidi_getReorderingOptions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>What are the reordering options applied to a given Bidi object? </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the current reordering options of the Bidi object </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations. ">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000646">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a3247782277731ee82cfb3ba700f598a8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getResultLength </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the length of the reordered text resulting from the last call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code>. </p>
<p>This length may be different from the length of the source text if option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a></code> or option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters ">UBIDI_OPTION_REMOVE_CONTROLS</a></code> has been set. <br />
 This resulting length is the one to consider in the following cases: </p><ul>
<li>
maximum value of the <code>visualIndex</code> argument of <code>ubidi_getLogicalIndex</code> </li>
<li>
number of elements of the <code>*indexMap</code> argument of <code>ubidi_getVisualMap</code> </li>
</ul>
<p>Note that this length stays identical to the source text length if Bidi marks are inserted or removed using option bits of <code>ubidi_writeReordered</code>, or if option <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected by ubidi_setInve...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> has been set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the reordered text resulting from the last call to <code>ubidi_setPara</code>. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters ">UBIDI_OPTION_REMOVE_CONTROLS</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000676">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="afc55abde2c543bdd5f4031e75d38bb02"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* ubidi_getText </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the pointer to the text. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The pointer to the text that the UBiDi object was created for.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000652">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a17696c56f06e1a48270f0ff3b69edd79"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getVisualIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>logicalIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the visual position from a logical text position. </p>
<p>If such a mapping is used many times on the same <code>UBiDi</code> object, then calling <code><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getLogicalMap()</a></code> is more efficient.</p>
<p>The value returned may be <code><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index has no correspondin...">UBIDI_MAP_NOWHERE</a></code> if there is no visual position because the corresponding text character is a Bidi control removed from output by the option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters ">UBIDI_OPTION_REMOVE_CONTROLS</a></code>. </p>
<p>When the visual output is altered by using options of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual position returned may not be correct. It is advised to use, when possible, reordering options such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>. </p>
<p>Note that in right-to-left runs, this mapping places second surrogates before first ones (which is generally a bad idea) and combining characters before base characters. Use of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code>, optionally with the <code><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88" title="option flags for ubidi_writeReordered() ">UBIDI_KEEP_BASE_COMBINING</a></code> option can be considered instead of using the mapping, in order to avoid these issues.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">logicalIndex</td><td>is the index of a character in the text.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The visual position of this character.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getLogicalMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a95ad84e638be70e73b23809fc132582f" title="Get the logical text position from a visual position. ">ubidi_getLogicalIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000663">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="af54771dbad2e4988fe9b00e55eede2e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getVisualMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>indexMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object. </p>
<p>Some values in the map may be <code><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index has no correspondin...">UBIDI_MAP_NOWHERE</a></code> if the corresponding text characters are Bidi marks inserted in the visual output by the option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a></code>. </p>
<p>When the visual output is altered by using options of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical positions returned may not be correct. It is advised to use, when possible, reordering options such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">indexMap</td><td>is a pointer to an array of <code><a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara(). ">ubidi_getResultLength()</a></code> indexes which will reflect the reordering of the characters. If option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters ">UBIDI_OPTION_REMOVE_CONTROLS</a></code> is set, the number of elements allocated in <code>indexMap</code> must be no less than <code><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength()</a></code>. The array does not need to be initialized.<br />
<br />
 The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getLogicalMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a95ad84e638be70e73b23809fc132582f" title="Get the logical text position from a visual position. ">ubidi_getLogicalIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara(). ">ubidi_getResultLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000666">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ae923ec697e2eb77652fca9f1fcddc894"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> ubidi_getVisualRun </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>runIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>pLogicalStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>pLength</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get one run's logical start, length, and directionality, which can be 0 for LTR or 1 for RTL. </p>
<p>In an RTL run, the character at the logical start is visually on the right of the displayed run. The length is the number of characters in the run.</p>
<p><code><a class="el" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99" title="Get the number of runs. ">ubidi_countRuns()</a></code> should be called before the runs are retrieved.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">runIndex</td><td>is the number of the run in visual order, in the range <code>[0..ubidi_countRuns(pBiDi)-1]</code>.</td></tr>
    <tr><td class="paramname">pLogicalStart</td><td>is the first logical character index in the text. The pointer may be <code>NULL</code> if this index is not needed.</td></tr>
    <tr><td class="paramname">pLength</td><td>is the number of characters (at least one) in the run. The pointer may be <code>NULL</code> if this is not needed.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the directionality of the run, <code>UBIDI_LTR==0</code> or <code>UBIDI_RTL==1</code>, never <code>UBIDI_MIXED</code>, never <code>UBIDI_NEUTRAL</code>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99" title="Get the number of runs. ">ubidi_countRuns</a></dd></dl>
<p>Example: </p><pre>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;  int32_t i, count=ubidi_countRuns(pBiDi),</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;          logicalStart, visualIndex=0, length;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;  for(i=0; i&lt;count; ++i) {</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;     if(UBIDI_LTR==ubidi_getVisualRun(pBiDi, i, &amp;logicalStart, &amp;length)) {</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;          do { // LTR</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;              show_char(text[logicalStart++], visualIndex++);</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;          } while(--length&gt;0);</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;      } else {</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;          logicalStart+=length;  // logicalLimit</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;          do { // RTL</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;              show_char(text[--logicalStart], visualIndex++);</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;          } while(--length&gt;0);</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;      }</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  }</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;*</div></div><!-- fragment -->
  </pre><p>Note that in right-to-left runs, code like this places second surrogates before first ones (which is generally a bad idea) and combining characters before base characters. </p>
<p>Use of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code>, optionally with the <code><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88" title="option flags for ubidi_writeReordered() ">UBIDI_KEEP_BASE_COMBINING</a></code> option, can be considered in order to avoid these issues. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000662">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="af5d1e5272fb2eec21e89a026fb665610"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_invertMap </td>
          <td>(</td>
          <td class="paramtype">const int32_t *&#160;</td>
          <td class="paramname"><em>srcMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>destMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Invert an index map. </p>
<p>The index mapping of the first map is inverted and written to the second one.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">srcMap</td><td>is an array with <code>length</code> elements which defines the original mapping from a source array containing <code>length</code> elements to a destination array. Some elements of the source array may have no mapping in the destination array. In that case, their value will be the special value <code>UBIDI_MAP_NOWHERE</code>. All elements must be &gt;=0 or equal to <code>UBIDI_MAP_NOWHERE</code>. Some elements may have a value &gt;= <code>length</code>, if the destination array has more elements than the source array. There must be no duplicate indexes (two or more elements with the same value except <code>UBIDI_MAP_NOWHERE</code>).</td></tr>
    <tr><td class="paramname">destMap</td><td>is an array with a number of elements equal to 1 + the highest value in <code>srcMap</code>. <code>destMap</code> will be filled with the inverse mapping. If element with index i in <code>srcMap</code> has a value k different from <code>UBIDI_MAP_NOWHERE</code>, this means that element i of the source array maps to element k in the destination array. The inverse map will have value i in its k-th element. For all elements of the destination array which do not map to an element in the source array, the corresponding element in the inverse map will have a value equal to <code>UBIDI_MAP_NOWHERE</code>.</td></tr>
    <tr><td class="paramname">length</td><td>is the length of each array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index has no correspondin...">UBIDI_MAP_NOWHERE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000669">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a794e61b06b5eedaeff7c7e72fa78a8ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> ubidi_isInverse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is this Bidi object set to perform the inverse Bidi algorithm? </p>
<p>Note: calling this function after setting the reordering mode with <code>ubidi_setReorderingMode</code> will return <code>TRUE</code> if the reordering mode was set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected by ubidi_setInve...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>, <code>FALSE</code> for all other values.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if the Bidi object is set to perform the inverse Bidi algorithm by handling numbers as L.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse Bidi&quot; algorithm...">ubidi_setInverse</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi alg...">ubidi_setReorderingMode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000638">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a612d1977d09d1b30a8a41296a85ccba4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> ubidi_isOrderParagraphsLTR </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is this Bidi object set to allocate level 0 to block separators so that successive paragraphs progress from left to right? </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if the Bidi object is set to allocate level 0 to block separators.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#ab7b9785b85169b3830034029729c672e" title="Specify whether block separators must be allocated level zero, so that successive paragraphs will pro...">ubidi_orderParagraphsLTR</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000640">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a4b0163f0f98e1c0f8915f1a26813c07f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a>* ubidi_open </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate a <code>UBiDi</code> structure. </p>
<p>Such an object is initially empty. It is assigned the Bidi properties of a piece of text containing one or more paragraphs by <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> or the Bidi properties of a line within a paragraph by <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code>.</p>
<p>This object can be reused for as long as it is not deallocated by calling <code><a class="el" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5" title="ubidi_close() must be called to free the memory associated with a UBiDi object. ">ubidi_close()</a></code>.</p>
<p><code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> and <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code> will allocate additional memory for internal structures as necessary.</p>
<dl class="section return"><dt>Returns</dt><dd>An empty <code>UBiDi</code> object. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000634">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a3d75a7eb9ecf1d5280dc2807efd64716"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a>* ubidi_openSized </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>maxLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>maxRunCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate a <code>UBiDi</code> structure with preallocated memory for internal structures. </p>
<p>This function provides a <code>UBiDi</code> object like <code><a class="el" href="ubidi_8h.html#a4b0163f0f98e1c0f8915f1a26813c07f" title="Allocate a UBiDi structure. ">ubidi_open()</a></code> with no arguments, but it also preallocates memory for internal structures according to the sizings supplied by the caller.</p>
<p>Subsequent functions will not allocate any more memory, and are thus guaranteed not to fail because of lack of memory.</p>
<p>The preallocation can be limited to some of the internal memory by setting some values to 0 here. That means that if, e.g., <code>maxRunCount</code> cannot be reasonably predetermined and should not be set to <code>maxLength</code> (the only failproof value) to avoid wasting memory, then <code>maxRunCount</code> could be set to 0 here and the internal structures that are associated with it will be allocated on demand, just like with <code><a class="el" href="ubidi_8h.html#a4b0163f0f98e1c0f8915f1a26813c07f" title="Allocate a UBiDi structure. ">ubidi_open()</a></code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">maxLength</td><td>is the maximum text or line length that internal memory will be preallocated for. An attempt to associate this object with a longer text will fail, unless this value is 0, which leaves the allocation up to the implementation.</td></tr>
    <tr><td class="paramname">maxRunCount</td><td>is the maximum anticipated number of same-level runs that internal memory will be preallocated for. An attempt to access visual runs on an object that was not preallocated for as many runs as the text was actually resolved to will fail, unless this value is 0, which leaves the allocation up to the implementation.<br />
<br />
 The number of runs depends on the actual text and maybe anywhere between 1 and <code>maxLength</code>. It is typically small.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An empty <code>UBiDi</code> object with preallocated memory. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000635">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ab7b9785b85169b3830034029729c672e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_orderParagraphsLTR </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td>
          <td class="paramname"><em>orderParagraphsLTR</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Specify whether block separators must be allocated level zero, so that successive paragraphs will progress from left to right. </p>
<p>This function must be called before <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code>. Paragraph separators (B) may appear in the text. Setting them to level zero means that all paragraph separators (including one possibly appearing in the last text position) are kept in the reordered text after the text that they follow in the source text. When this feature is not enabled, a paragraph separator at the last position of the text before reordering will go to the first position of the reordered text when the paragraph level is odd.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">orderParagraphsLTR</td><td>specifies whether paragraph separators (B) must receive level 0, so that successive paragraphs progress from left to right.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000639">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a18113b39aa14585407c8f003c0f86d56"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_reorderLogical </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&#160;</td>
          <td class="paramname"><em>levels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>indexMap</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is a convenience function that does not use a UBiDi object. </p>
<p>It is intended to be used for when an application has determined the levels of objects (character sequences) and just needs to have them reordered (L2). This is equivalent to using <code><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getLogicalMap()</a></code> on a <code>UBiDi</code> object.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">levels</td><td>is an array with <code>length</code> levels that have been determined by the application.</td></tr>
    <tr><td class="paramname">length</td><td>is the number of levels in the array, or, semantically, the number of objects to be reordered. It must be <code>length&gt;0</code>.</td></tr>
    <tr><td class="paramname">indexMap</td><td>is a pointer to an array of <code>length</code> indexes which will reflect the reordering of the characters. The array does not need to be initialized.</td></tr>
  </table>
  </dd>
</dl>
<p>The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000667">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a01009fa9de9e31b124d5e8bdc2cf2a3e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_reorderVisual </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&#160;</td>
          <td class="paramname"><em>levels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>indexMap</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is a convenience function that does not use a UBiDi object. </p>
<p>It is intended to be used for when an application has determined the levels of objects (character sequences) and just needs to have them reordered (L2). This is equivalent to using <code><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object...">ubidi_getVisualMap()</a></code> on a <code>UBiDi</code> object.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">levels</td><td>is an array with <code>length</code> levels that have been determined by the application.</td></tr>
    <tr><td class="paramname">length</td><td>is the number of levels in the array, or, semantically, the number of objects to be reordered. It must be <code>length&gt;0</code>.</td></tr>
    <tr><td class="paramname">indexMap</td><td>is a pointer to an array of <code>length</code> indexes which will reflect the reordering of the characters. The array does not need to be initialized.</td></tr>
  </table>
  </dd>
</dl>
<p>The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000668">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a4acd99089d2c4f31495210a5462bcb21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setClassCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> *&#160;</td>
          <td class="paramname"><em>newFn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>newContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> **&#160;</td>
          <td class="paramname"><em>oldFn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void **&#160;</td>
          <td class="paramname"><em>oldContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the callback function and callback data used by the UBA implementation for Bidi class determination. </p>
<p>This may be useful for assigning Bidi classes to PUA characters, or for special application needs. For instance, an application may want to handle all spaces like L or R characters (according to the base direction) when creating the visual ordering of logical lines which are part of a report organized in columns: there should not be interaction between adjacent cells.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">newFn</td><td>is the new callback function pointer.</td></tr>
    <tr><td class="paramname">newContext</td><td>is the new callback context pointer. This can be NULL.</td></tr>
    <tr><td class="paramname">oldFn</td><td>fillin: Returns the old callback function pointer. This can be NULL.</td></tr>
    <tr><td class="paramname">oldContext</td><td>fillin: Returns the old callback's context. This can be NULL.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a0cafa2a8c29c03918c3a2cdf4ccea778" title="Get the current callback function used for Bidi class determination. ">ubidi_getClassCallback</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000679">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a1e38e9d7036f4aa7cc5aea5a435b3e63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setContext </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>prologue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>proLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>epilogue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>epiLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the context before a call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a>. </p>
<p><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a> computes the left-right directionality for a given piece of text which is supplied as one of its arguments. Sometimes this piece of text (the "main text") should be considered in context, because text appearing before ("prologue") and/or after ("epilogue") the main text may affect the result of this computation.</p>
<p>This function specifies the prologue and/or the epilogue for the next call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a>. The characters specified as prologue and epilogue should not be modified by the calling program until the call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a> has returned. If successive calls to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a> all need specification of a context, <a class="el" href="ubidi_8h.html#a1e38e9d7036f4aa7cc5aea5a435b3e63" title="Set the context before a call to ubidi_setPara(). ">ubidi_setContext()</a> must be called before each call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a>. In other words, a context is not "remembered" after the following successful call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a>.</p>
<p>If a call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a> specifies UBIDI_DEFAULT_LTR or UBIDI_DEFAULT_RTL as paraLevel and is preceded by a call to <a class="el" href="ubidi_8h.html#a1e38e9d7036f4aa7cc5aea5a435b3e63" title="Set the context before a call to ubidi_setPara(). ">ubidi_setContext()</a> which specifies a prologue, the paragraph level will be computed taking in consideration the text in the prologue.</p>
<p>When <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a> is called without a previous call to ubidi_setContext, the main text is handled as if preceded and followed by strong directional characters at the current paragraph level. Calling <a class="el" href="ubidi_8h.html#a1e38e9d7036f4aa7cc5aea5a435b3e63" title="Set the context before a call to ubidi_setPara(). ">ubidi_setContext()</a> with specification of a prologue will change this behavior by handling the main text as if preceded by the last strong character appearing in the prologue, if any. Calling <a class="el" href="ubidi_8h.html#a1e38e9d7036f4aa7cc5aea5a435b3e63" title="Set the context before a call to ubidi_setPara(). ">ubidi_setContext()</a> with specification of an epilogue will change the behavior of <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a> by handling the main text as if followed by the first strong character or digit appearing in the epilogue, if any.</p>
<p>Note 1: if <code>ubidi_setContext</code> is called repeatedly without calling <code>ubidi_setPara</code>, the earlier calls have no effect, only the last call will be remembered for the next call to <code>ubidi_setPara</code>.</p>
<p>Note 2: calling <code>ubidi_setContext(pBiDi, NULL, 0, NULL, 0, &amp;errorCode)</code> cancels any previous setting of non-empty prologue or epilogue. The next call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> will process no prologue or epilogue.</p>
<p>Note 3: users must be aware that even after setting the context before a call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a> to perform e.g. a logical to visual transformation, the resulting string may not be identical to what it would have been if all the text, including prologue and epilogue, had been processed together.<br />
 Example (upper case letters represent RTL characters):<br />
 &#160;&#160;prologue = "&lt;code&gt;abc DE&lt;/code&gt;"<br />
 &#160;&#160;epilogue = none<br />
 &#160;&#160;main text = "&lt;code&gt;FGH xyz&lt;/code&gt;"<br />
 &#160;&#160;paraLevel = UBIDI_LTR<br />
 &#160;&#160;display without prologue = "&lt;code&gt;HGF xyz&lt;/code&gt;" ("HGF" is adjacent to "xyz")<br />
 &#160;&#160;display with prologue = "&lt;code&gt;abc HGFED xyz&lt;/code&gt;" ("HGF" is not adjacent to "xyz")<br />
</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">prologue</td><td>is a pointer to the text which precedes the text that will be specified in a coming call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a>. If there is no prologue to consider, then <code>proLength</code> must be zero and this pointer can be NULL.</td></tr>
    <tr><td class="paramname">proLength</td><td>is the length of the prologue; if <code>proLength==-1</code> then the prologue must be zero-terminated. Otherwise proLength must be &gt;= 0. If <code>proLength==0</code>, it means that there is no prologue to consider.</td></tr>
    <tr><td class="paramname">epilogue</td><td>is a pointer to the text which follows the text that will be specified in a coming call to <a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a>. If there is no epilogue to consider, then <code>epiLength</code> must be zero and this pointer can be NULL.</td></tr>
    <tr><td class="paramname">epiLength</td><td>is the length of the epilogue; if <code>epiLength==-1</code> then the epilogue must be zero-terminated. Otherwise epiLength must be &gt;= 0. If <code>epiLength==0</code>, it means that there is no epilogue to consider.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000647">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

</div>
</div>
<a class="anchor" id="a836b2eaf83ca712cf28e69cd4ba934f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setInverse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td>
          <td class="paramname"><em>isInverse</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Modify the operation of the Bidi algorithm such that it approximates an "inverse Bidi" algorithm. </p>
<p>This function must be called before <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code>.</p>
<p>The normal operation of the Bidi algorithm as described in the Unicode Technical Report is to take text stored in logical (keyboard, typing) order and to determine the reordering of it for visual rendering. Some legacy systems store text in visual order, and for operations with standard, Unicode-based algorithms, the text needs to be transformed to logical order. This is effectively the inverse algorithm of the described Bidi algorithm. Note that there is no standard algorithm for this "inverse Bidi" and that the current implementation provides only an approximation of "inverse Bidi".</p>
<p>With <code>isInverse</code> set to <code>TRUE</code>, this function changes the behavior of some of the subsequent functions in a way that they can be used for the inverse Bidi algorithm. Specifically, runs of text with numeric characters will be treated in a special way and may need to be surrounded with LRM characters when they are written in reordered sequence.</p>
<p>Output runs should be retrieved using <code><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&#39;s logical start, length, and directionality, which can be 0 for LTR or 1 for RTL...">ubidi_getVisualRun()</a></code>. Since the actual input for "inverse Bidi" is visually ordered text and <code><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&#39;s logical start, length, and directionality, which can be 0 for LTR or 1 for RTL...">ubidi_getVisualRun()</a></code> gets the reordered runs, these are actually the runs of the logically ordered output.</p>
<p>Calling this function with argument <code>isInverse</code> set to <code>TRUE</code> is equivalent to calling <code>ubidi_setReorderingMode</code> with argument <code>reorderingMode</code> set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected by ubidi_setInve...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>.<br />
 Calling this function with argument <code>isInverse</code> set to <code>FALSE</code> is equivalent to calling <code>ubidi_setReorderingMode</code> with argument <code>reorderingMode</code> set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b" title="Regular Logical to Visual Bidi algorithm according to Unicode. ">UBIDI_REORDER_DEFAULT</a></code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a <code>UBiDi</code> object.</td></tr>
    <tr><td class="paramname">isInverse</td><td>specifies "forward" or "inverse" Bidi operation.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi alg...">ubidi_setReorderingMode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000637">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ac7d96b281cd6ab2d56900bfdc37c808a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setLine </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pParaBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>limit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pLineBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code> sets a <code>UBiDi</code> to contain the reordering information, especially the resolved levels, for all the characters in a line of text. </p>
<p>This line of text is specified by referring to a <code>UBiDi</code> object representing this information for a piece of text containing one or more paragraphs, and by specifying a range of indexes in this text.</p>
<p>In the new line object, the indexes will range from 0 to <code>limit-start-1</code>.</p>
<p>This is used after calling <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> for a piece of text, and after line-breaking on that text. It is not necessary if each paragraph is treated as a single line.</p>
<p>After line-breaking, rules (L1) and (L2) for the treatment of trailing WS and for reordering are performed on a <code>UBiDi</code> object that represents a line.</p>
<p><b>Important: </b><code>pLineBiDi</code> shares data with <code>pParaBiDi</code>. You must destroy or reuse <code>pLineBiDi</code> before <code>pParaBiDi</code>. In other words, you must destroy or reuse the <code>UBiDi</code> object for a line before the object for its parent paragraph.</p>
<p>The text pointer that was stored in <code>pParaBiDi</code> is also copied, and <code>start</code> is added to it so that it points to the beginning of the line for this object.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pParaBiDi</td><td>is the parent paragraph object. It must have been set by a successful call to ubidi_setPara.</td></tr>
    <tr><td class="paramname">start</td><td>is the line's first index into the text.</td></tr>
    <tr><td class="paramname">limit</td><td>is just behind the line's last index into the text (its last index +1).<br />
 It must be <code>0&lt;=start&lt;limit&lt;=</code>containing paragraph limit. If the specified line crosses a paragraph boundary, the function will terminate with error code U_ILLEGAL_ARGUMENT_ERROR.</td></tr>
    <tr><td class="paramname">pLineBiDi</td><td>is the object that will now represent a line of the text.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000649">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="abdfe9e113a19dd8521d3b7ac8220fe11"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setPara </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>&#160;</td>
          <td class="paramname"><em>paraLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&#160;</td>
          <td class="paramname"><em>embeddingLevels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform the Unicode Bidi algorithm. </p>
<p>It is defined in the <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Anned #9</a>, version 13, also described in The Unicode Standard, Version 4.0 .</p>
<p>This function takes a piece of plain text containing one or more paragraphs, with or without externally specified embedding levels from <em>styled</em> text and computes the left-right-directionality of each character.</p>
<p>If the entire text is all of the same directionality, then the function may not perform all the steps described by the algorithm, i.e., some levels may not be the same as if all steps were performed. This is not relevant for unidirectional text.<br />
 For example, in pure LTR text with numbers the numbers would get a resolved level of 2 higher than the surrounding text according to the algorithm. This implementation may set all resolved levels to the same value in such a case.</p>
<p>The text can be composed of multiple paragraphs. Occurrence of a block separator in the text terminates a paragraph, and whatever comes next starts a new paragraph. The exception to this rule is when a Carriage Return (CR) is followed by a Line Feed (LF). Both CR and LF are block separators, but in that case, the pair of characters is considered as terminating the preceding paragraph, and a new paragraph will be started by a character coming after the LF.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>A <code>UBiDi</code> object allocated with <code><a class="el" href="ubidi_8h.html#a4b0163f0f98e1c0f8915f1a26813c07f" title="Allocate a UBiDi structure. ">ubidi_open()</a></code> which will be set to contain the reordering information, especially the resolved levels for all the characters in <code>text</code>.</td></tr>
    <tr><td class="paramname">text</td><td>is a pointer to the text that the Bidi algorithm will be performed on. This pointer is stored in the UBiDi object and can be retrieved with <code><a class="el" href="ubidi_8h.html#afc55abde2c543bdd5f4031e75d38bb02" title="Get the pointer to the text. ">ubidi_getText()</a></code>.<br />
 <b>Note:</b> the text must be (at least) <code>length</code> long.</td></tr>
    <tr><td class="paramname">length</td><td>is the length of the text; if <code>length==-1</code> then the text must be zero-terminated.</td></tr>
    <tr><td class="paramname">paraLevel</td><td>specifies the default level for the text; it is typically 0 (LTR) or 1 (RTL). If the function shall determine the paragraph level from the text, then <code>paraLevel</code> can be set to either <code><a class="el" href="ubidi_8h.html#a165ae276878c7a54fd8b067db0d12f40" title="Paragraph level setting. ">UBIDI_DEFAULT_LTR</a></code> or <code><a class="el" href="ubidi_8h.html#a0b4d6ac752ab7a8a33eb825e9c76683d" title="Paragraph level setting. ">UBIDI_DEFAULT_RTL</a></code>; if the text contains multiple paragraphs, the paragraph level shall be determined separately for each paragraph; if a paragraph does not include any strongly typed character, then the desired default is used (0 for LTR or 1 for RTL). Any other value between 0 and <code><a class="el" href="ubidi_8h.html#a531b2d2bfa7655df6bf86d1236a1928a" title="Maximum explicit embedding level. ">UBIDI_MAX_EXPLICIT_LEVEL</a></code> is also valid, with odd levels indicating RTL.</td></tr>
    <tr><td class="paramname">embeddingLevels</td><td>(in) may be used to preset the embedding and override levels, ignoring characters like LRE and PDF in the text. A level overrides the directional property of its corresponding (same index) character if the level has the <code><a class="el" href="ubidi_8h.html#a5e4049fa946dd8e0a1b3c01e5c1c3711" title="Bit flag for level input. ">UBIDI_LEVEL_OVERRIDE</a></code> bit set.<br />
<br />
 Except for that bit, it must be <code>paraLevel&lt;=embeddingLevels[]&lt;=UBIDI_MAX_EXPLICIT_LEVEL</code>, with one exception: a level of zero may be specified for a paragraph separator even if <code>paraLevel&gt;0</code> when multiple paragraphs are submitted in the same call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code>.<br />
<br />
 <b>Caution: </b>A copy of this pointer, not of the levels, will be stored in the <code>UBiDi</code> object; the <code>embeddingLevels</code> array must not be deallocated before the <code>UBiDi</code> structure is destroyed or reused, and the <code>embeddingLevels</code> should not be modified to avoid unexpected results on subsequent Bidi operations. However, the <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> and <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code> functions may modify some or all of the levels.<br />
<br />
 After the <code>UBiDi</code> object is reused or destroyed, the caller must take care of the deallocation of the <code>embeddingLevels</code> array.<br />
<br />
 <b>Note:</b> the <code>embeddingLevels</code> array must be at least <code>length</code> long. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000648">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="afe123acc1196c4d7363f968ca6af6faa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setReorderingMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a>&#160;</td>
          <td class="paramname"><em>reorderingMode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi algorithm or approximates an "inverse Bidi" algorithm, depending on different values of the "reordering mode". </p>
<p>This function must be called before <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code>, and stays in effect until called again with a different argument.</p>
<p>The normal operation of the Bidi algorithm as described in the Unicode Standard Annex #9 is to take text stored in logical (keyboard, typing) order and to determine how to reorder it for visual rendering.</p>
<p>With the reordering mode set to a value other than <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b" title="Regular Logical to Visual Bidi algorithm according to Unicode. ">UBIDI_REORDER_DEFAULT</a></code>, this function changes the behavior of some of the subsequent functions in a way such that they implement an inverse Bidi algorithm or some other algorithm variants.</p>
<p>Some legacy systems store text in visual order, and for operations with standard, Unicode-based algorithms, the text needs to be transformed into logical order. This is effectively the inverse algorithm of the described Bidi algorithm. Note that there is no standard algorithm for this "inverse Bidi", so a number of variants are implemented here.</p>
<p>In other cases, it may be desirable to emulate some variant of the Logical to Visual algorithm (e.g. one used in MS Windows), or perform a Logical to Logical transformation.</p>
<ul>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b" title="Regular Logical to Visual Bidi algorithm according to Unicode. ">UBIDI_REORDER_DEFAULT</a></code>, the standard Bidi Logical to Visual algorithm is applied.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa447996fecd0eefb0d12ce247cb511e5f" title="Logical to Visual algorithm which handles numbers in a way which mimicks the behavior of Windows XP...">UBIDI_REORDER_NUMBERS_SPECIAL</a></code>, the algorithm used to perform Bidi transformations when calling <code>ubidi_setPara</code> should approximate the algorithm used in Microsoft Windows XP rather than strictly conform to the Unicode Bidi algorithm. <br />
 The differences between the basic algorithm and the algorithm addressed by this option are as follows: </p><ul>
<li>
Within text at an even embedding level, the sequence "123AB" (where AB represent R or AL letters) is transformed to "123BA" by the Unicode algorithm and to "BA123" by the Windows algorithm. </li>
<li>
Arabic-Indic numbers (AN) are handled by the Windows algorithm just like regular numbers (EN). </li>
</ul>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0cd75b3d1d8abc971554a2a7d459c6d7" title="Logical to Visual algorithm grouping numbers with adjacent R characters (reversible algorithm)...">UBIDI_REORDER_GROUP_NUMBERS_WITH_R</a></code>, numbers located between LTR text and RTL text are associated with the RTL text. For instance, an LTR paragraph with content "abc 123 DEF" (where upper case letters represent RTL characters) will be transformed to "abc FED 123" (and not "abc 123 FED"), "DEF 123 abc" will be transformed to "123 FED abc" and "123 FED abc" will be transformed to "DEF 123 abc". This makes the algorithm reversible and makes it useful when round trip (from visual to logical and back to visual) must be achieved without adding LRM characters. However, this is a variation from the standard Unicode Bidi algorithm.<br />
 The source text should not contain Bidi control characters other than LRM or RLM.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d" title="Reorder runs only to transform a Logical LTR string to the Logical RTL string with the same display...">UBIDI_REORDER_RUNS_ONLY</a></code>, a "Logical to Logical" transformation must be performed: </p><ul>
<li>
If the default text level of the source text (argument <code>paraLevel</code> in <code>ubidi_setPara</code>) is even, the source text will be handled as LTR logical text and will be transformed to the RTL logical text which has the same LTR visual display. </li>
<li>
If the default level of the source text is odd, the source text will be handled as RTL logical text and will be transformed to the LTR logical text which has the same LTR visual display. </li>
</ul>
<p>This mode may be needed when logical text which is basically Arabic or Hebrew, with possible included numbers or phrases in English, has to be displayed as if it had an even embedding level (this can happen if the displaying application treats all text as if it was basically LTR). <br />
 This mode may also be needed in the reverse case, when logical text which is basically English, with possible included phrases in Arabic or Hebrew, has to be displayed as if it had an odd embedding level. <br />
 Both cases could be handled by adding LRE or RLE at the head of the text, if the display subsystem supports these formatting controls. If it does not, the problem may be handled by transforming the source text in this mode before displaying it, so that it will be displayed properly.<br />
 The source text should not contain Bidi control characters other than LRM or RLM.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected by ubidi_setInve...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>, an "inverse Bidi" algorithm is applied. Runs of text with numeric characters will be treated like LTR letters and may need to be surrounded with LRM characters when they are written in reordered sequence (the option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this is part of the a...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> can be used with function <code>ubidi_writeReordered</code> to this end. This mode is equivalent to calling <code><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse Bidi&quot; algorithm...">ubidi_setInverse()</a></code> with argument <code>isInverse</code> set to <code>TRUE</code>.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" title="Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm. ">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a></code>, the "direct" Logical to Visual Bidi algorithm is used as an approximation of an "inverse Bidi" algorithm. This mode is similar to mode <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected by ubidi_setInve...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> but is closer to the regular Bidi algorithm. <br />
 For example, an LTR paragraph with the content "FED 123 456 CBA" (where upper case represents RTL characters) will be transformed to "ABC 456 123 DEF", as opposed to "DEF 123 456 ABC" with mode <code>UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.<br />
 When used in conjunction with option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a></code>, this mode generally adds Bidi marks to the output significantly more sparingly than mode <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected by ubidi_setInve...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> with option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this is part of the a...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to <code>ubidi_writeReordered</code>.</p>
<p class="endli"></p>
</li>
<li>
When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e" title="Inverse Bidi (Visual to Logical) algorithm for the UBIDI_REORDER_NUMBERS_SPECIAL Bidi algorithm...">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a></code>, the Logical to Visual Bidi algorithm used in Windows XP is used as an approximation of an "inverse Bidi" algorithm. <br />
 For example, an LTR paragraph with the content "abc FED123" (where upper case represents RTL characters) will be transformed to "abc 123DEF." </li>
</ul>
<p>In all the reordering modes specifying an "inverse Bidi" algorithm (i.e. those with a name starting with <code>UBIDI_REORDER_INVERSE</code>), output runs should be retrieved using <code><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&#39;s logical start, length, and directionality, which can be 0 for LTR or 1 for RTL...">ubidi_getVisualRun()</a></code>, and the output text with <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code>. The caller should keep in mind that in "inverse Bidi" modes the input is actually visually ordered text and reordered output returned by <code><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&#39;s logical start, length, and directionality, which can be 0 for LTR or 1 for RTL...">ubidi_getVisualRun()</a></code> or <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code> are actually runs or character string of logically ordered output.<br />
 For all the "inverse Bidi" modes, the source text should not contain Bidi control characters other than LRM or RLM.</p>
<p>Note that option <code><a class="el" href="ubidi_8h.html#a4a10c3aac68ceca1569bac717156cef3" title="option bit for ubidi_writeReordered(): write the output in reverse order ">UBIDI_OUTPUT_REVERSE</a></code> of <code>ubidi_writeReordered</code> has no useful meaning and should not be used in conjunction with any value of the reordering mode specifying "inverse Bidi" or with value <code>UBIDI_REORDER_RUNS_ONLY</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a <code>UBiDi</code> object. </td></tr>
    <tr><td class="paramname">reorderingMode</td><td>specifies the required variant of the Bidi algorithm.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df" title="UBiDiReorderingMode values indicate which variant of the Bidi algorithm to use. ">UBiDiReorderingMode</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse Bidi&quot; algorithm...">ubidi_setInverse</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000642">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a25dd2aba9db100133217b9fe76de01de"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setReorderingOptions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>reorderingOptions</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Specify which of the reordering options should be applied during Bidi transformations. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>is a <code>UBiDi</code> object. </td></tr>
    <tr><td class="paramname">reorderingOptions</td><td>is a combination of zero or more of the following options: <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386ae3c7e82fa51ecfccacb2d85fb6dc60fb" title="option value for ubidi_setReorderingOptions: disable all the options which can be set with this funct...">UBIDI_OPTION_DEFAULT</a></code>, <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure corre...">UBIDI_OPTION_INSERT_MARKS</a></code>, <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters ">UBIDI_OPTION_REMOVE_CONTROLS</a></code>, <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7" title="option bit for ubidi_setReorderingOptions: process the output as part of a stream to be continued ...">UBIDI_OPTION_STREAMING</a></code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a5186ae76f6abfcbaf700d2dc7625516e" title="What are the reordering options applied to a given Bidi object? ">ubidi_getReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000645">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a26790ff71c59f223ded4047da5626725"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_writeReordered </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&#160;</td>
          <td class="paramname"><em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>destSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Take a <code>UBiDi</code> object containing the reordering information for a piece of text (one or more paragraphs) set by <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> or for a line of text set by <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code> and write a reordered string to the destination buffer. </p>
<p>This function preserves the integrity of characters with multiple code units and (optionally) combining characters. Characters in RTL runs can be replaced by mirror-image characters in the destination buffer. Note that "real" mirroring has to be done in a rendering engine by glyph selection and that for many "mirrored" characters there are no Unicode characters as mirror-image equivalents. There are also options to insert or remove Bidi control characters; see the description of the <code>destSize</code> and <code>options</code> parameters and of the option bit flags.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBiDi</td><td>A pointer to a <code>UBiDi</code> object that is set by <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> or <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the resolved levels...">ubidi_setLine()</a></code> and contains the reordering information for the text that it was defined for, as well as a pointer to that text.<br />
<br />
 The text was aliased (only the pointer was stored without copying the contents) and must not have been modified since the <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm. ">ubidi_setPara()</a></code> call.</td></tr>
    <tr><td class="paramname">dest</td><td>A pointer to where the reordered text is to be copied. The source text and <code>dest[destSize]</code> must not overlap.</td></tr>
    <tr><td class="paramname">destSize</td><td>The size of the <code>dest</code> buffer, in number of UChars. If the <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code> option is set, then the destination length could be as large as <code>ubidi_getLength(pBiDi)+2*ubidi_countRuns(pBiDi)</code>. If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option is set, then the destination length may be less than <code>ubidi_getLength(pBiDi)</code>. If none of these options is set, then the destination length will be exactly <code>ubidi_getProcessedLength(pBiDi)</code>.</td></tr>
    <tr><td class="paramname">options</td><td>A bit set of options for the reordering that control how the reordered text is written. The options include mirroring the characters on a code point basis and inserting LRM characters, which is used especially for transforming visually stored text to logically stored text (although this is still an imperfect implementation of an "inverse Bidi" algorithm because it uses the "forward Bidi" algorithm at its core). The available options are: <code><a class="el" href="ubidi_8h.html#a0b1370dda1e3ad8ef9c94fd28320153d" title="option bit for ubidi_writeReordered(): replace characters with the &quot;mirrored&quot; property in RTL runs by...">UBIDI_DO_MIRRORING</a></code>, <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this is part of the a...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code>, <code><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88" title="option flags for ubidi_writeReordered() ">UBIDI_KEEP_BASE_COMBINING</a></code>, <code><a class="el" href="ubidi_8h.html#a4a10c3aac68ceca1569bac717156cef3" title="option bit for ubidi_writeReordered(): write the output in reverse order ">UBIDI_OUTPUT_REVERSE</a></code>, <code><a class="el" href="ubidi_8h.html#a039000c1e298cbad5909d07a55ca5312" title="option bit for ubidi_writeReordered(): remove Bidi control characters (this does not affect UBIDI_INS...">UBIDI_REMOVE_BIDI_CONTROLS</a></code></td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the output string.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara(). ">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000681">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a2b0dd2bc3a984509545449d76cb1ed2e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_writeReverse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>destSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reverse a Right-To-Left run of Unicode text. </p>
<p>This function preserves the integrity of characters with multiple code units and (optionally) combining characters. Characters can be replaced by mirror-image characters in the destination buffer. Note that "real" mirroring has to be done in a rendering engine by glyph selection and that for many "mirrored" characters there are no Unicode characters as mirror-image equivalents. There are also options to insert or remove Bidi control characters.</p>
<p>This function is the implementation for reversing RTL runs as part of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code>. For detailed descriptions of the parameters, see there. Since no Bidi controls are inserted here, the output string length will never exceed <code>srcLength</code>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>A pointer to the RTL run text.</td></tr>
    <tr><td class="paramname">srcLength</td><td>The length of the RTL run.</td></tr>
    <tr><td class="paramname">dest</td><td>A pointer to where the reordered text is to be copied. <code>src[srcLength]</code> and <code>dest[destSize]</code> must not overlap.</td></tr>
    <tr><td class="paramname">destSize</td><td>The size of the <code>dest</code> buffer, in number of UChars. If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option is set, then the destination length may be less than <code>srcLength</code>. If this option is not set, then the destination length will be exactly <code>srcLength</code>.</td></tr>
    <tr><td class="paramname">options</td><td>A bit set of options for the reordering that control how the reordered text is written. See the <code>options</code> parameter in <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one or more paragraphs...">ubidi_writeReordered()</a></code>.</td></tr>
    <tr><td class="paramname">pErrorCode</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the output string. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000682">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>