Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 34ae14235711d1471f043ac894a061f9 > files > 372

libicu-doc-3.6-5.16.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.6: ubidi.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>ubidi.h File Reference</h1>C API: BIDI algorithm. <a href="#_details">More...</a>
<p>
<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>

<p>
<a href="ubidi_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ff5eee22d3130be4f5c2254e1a8dae65">UBIDI_DEFAULT_LTR</a>&nbsp;&nbsp;&nbsp;0xfe</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Paragraph level setting.  <a href="#ff5eee22d3130be4f5c2254e1a8dae65"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a6368b5e74d98553915bc63041d74d47">UBIDI_DEFAULT_RTL</a>&nbsp;&nbsp;&nbsp;0xff</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Paragraph level setting.  <a href="#a6368b5e74d98553915bc63041d74d47"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#c7f0100f7be9e8c61f85f501d1b8f14c">UBIDI_MAX_EXPLICIT_LEVEL</a>&nbsp;&nbsp;&nbsp;61</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum explicit embedding level.  <a href="#c7f0100f7be9e8c61f85f501d1b8f14c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#19a9034c2f06e61d3032afc78a9aa75f">UBIDI_LEVEL_OVERRIDE</a>&nbsp;&nbsp;&nbsp;0x80</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bit flag for level input.  <a href="#19a9034c2f06e61d3032afc78a9aa75f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#946e4eea601973e1c8fd311b159cab92">UBIDI_MAP_NOWHERE</a>&nbsp;&nbsp;&nbsp;(-1)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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="#946e4eea601973e1c8fd311b159cab92"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#da1a0e34561495323475dde8cdc6b576">UBIDI_KEEP_BASE_COMBINING</a>&nbsp;&nbsp;&nbsp;1</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: keep combining characters after their base characters in RTL runs  <a href="#da1a0e34561495323475dde8cdc6b576"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#01c0f4ab096a7d805ce28942427c214c">UBIDI_DO_MIRRORING</a>&nbsp;&nbsp;&nbsp;2</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: replace characters with the "mirrored" property in RTL runs by their mirror-image mappings  <a href="#01c0f4ab096a7d805ce28942427c214c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#161f0768b752922264e22cdec2fb5a02">UBIDI_INSERT_LRM_FOR_NUMERIC</a>&nbsp;&nbsp;&nbsp;4</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: surround the run with LRMs if necessary; this is part of the approximate "inverse BiDi" algorithm  <a href="#161f0768b752922264e22cdec2fb5a02"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#6cf976bd18e94168e4fd5327cbb0d442">UBIDI_REMOVE_BIDI_CONTROLS</a>&nbsp;&nbsp;&nbsp;8</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: remove BiDi control characters (this does not affect <a class="el" href="ubidi_8h.html#161f0768b752922264e22cdec2fb5a02">UBIDI_INSERT_LRM_FOR_NUMERIC</a>)  <a href="#6cf976bd18e94168e4fd5327cbb0d442"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#100684bd5d1fce146f83cec934214f42">UBIDI_OUTPUT_REVERSE</a>&nbsp;&nbsp;&nbsp;16</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: write the output in reverse order  <a href="#100684bd5d1fce146f83cec934214f42"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#0f98def8090d066b66a3f75b57899313">U_BIDI_CLASS_DEFAULT</a>&nbsp;&nbsp;&nbsp;U_CHAR_DIRECTION_COUNT</td></tr>

<tr><td class="mdescLeft">&nbsp;</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="#0f98def8090d066b66a3f75b57899313"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#3ebf7c4fcbf17b618a01df30a79859d3">uint8_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">UBiDiLevel is the type of the level values in this BiDi implementation.  <a href="#ed05299a322dc38cbfae537e53aacd3a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef enum <a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a88807fb0e5f9c8ba30cc7eed659c372">UBiDiDirection</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="uchar_8h.html#936814157622d365bc20077c3b177f3b">UCharDirection</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback type declaration for overriding default BiDi class values with custom ones.  <a href="#b6ae3fdaf533affb3c33bbee84dc401a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a> { <a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec44060af7720c0e2dd4dd5c0e2366ed962c7">UBIDI_LTR</a>, 
<a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec4401bd0502bb79adbc411abf16ec240f347">UBIDI_RTL</a>, 
<a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440c7d7756a30601b4570f675f0b098118a">UBIDI_MIXED</a>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>UBiDiDirection</code> values indicate the text direction.  <a href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902">UBiDiReorderingMode</a> { <br>
&nbsp;&nbsp;<a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902fdc4019fb1ba2d4c9b8e7436c2b8ec2d">UBIDI_REORDER_DEFAULT</a> =  0, 
<a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902e83d780f52da963735d2b9e714aad766">UBIDI_REORDER_NUMBERS_SPECIAL</a>, 
<a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac490244fb971da10133656ea04074c79e797a">UBIDI_REORDER_GROUP_NUMBERS_WITH_R</a>, 
<a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49022a093ff9e45e30079f4235d0118a6560">UBIDI_REORDER_RUNS_ONLY</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a>, 
<a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49027cd1ef588cd6eb0d5d5b7cc66054b0be">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a>, 
<a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902ddc7ccc621067029ac4444d8e530b5e6">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a>, 
<a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac490211013529024f44034f343e10abb1c1a9">UBIDI_REORDER_COUNT</a>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>UBiDiReorderingMode</code> values indicate which variant of the BiDi algorithm to use.  <a href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06">UBiDiReorderingOption</a> { <a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06cede404f14908e296df1ce5e30ad6bf6">UBIDI_OPTION_DEFAULT</a> =  0, 
<a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">UBIDI_OPTION_INSERT_MARKS</a> =  1, 
<a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">UBIDI_OPTION_REMOVE_CONTROLS</a> =  2, 
<a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e066e4c25cf01ac27bcaa23ad684ca52763">UBIDI_OPTION_STREAMING</a> =  4
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>UBiDiReorderingOption</code> values indicate which options are specified to affect the BiDi algorithm.  <a href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#9a672f4fb33411f5f55d98a77b959867">ubidi_open</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate a <code>UBiDi</code> structure.  <a href="#9a672f4fb33411f5f55d98a77b959867"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#939ff8b4d73245b72f1161eaedab64f7">ubidi_openSized</a> (<a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> maxLength, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> maxRunCount, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate a <code>UBiDi</code> structure with preallocated memory for internal structures.  <a href="#939ff8b4d73245b72f1161eaedab64f7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#e5954754d50f965e680388d740bf19fb">ubidi_close</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code><a class="el" href="ubidi_8h.html#e5954754d50f965e680388d740bf19fb">ubidi_close()</a></code> must be called to free the memory associated with a UBiDi object.  <a href="#e5954754d50f965e680388d740bf19fb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#bf9b7b73638bffc6ac162e30e58628d8">ubidi_setInverse</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> isInverse)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Modify the operation of the BiDi algorithm such that it approximates an "inverse BiDi" algorithm.  <a href="#bf9b7b73638bffc6ac162e30e58628d8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#97822c2c5b8220f361f0cdf41771856c">ubidi_isInverse</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this BiDi object set to perform the inverse BiDi algorithm?  <a href="#97822c2c5b8220f361f0cdf41771856c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#6810a9af3c7791832a8196b5159f94b5">ubidi_orderParagraphsLTR</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> orderParagraphsLTR)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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="#6810a9af3c7791832a8196b5159f94b5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#0161b1de1a568c179c63c8cd2bc654df">ubidi_isOrderParagraphsLTR</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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="#0161b1de1a568c179c63c8cd2bc654df"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#e1d9fc3df20932c20e3744ff7a75f916">ubidi_setReorderingMode</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902">UBiDiReorderingMode</a> reorderingMode)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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="#e1d9fc3df20932c20e3744ff7a75f916"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902">UBiDiReorderingMode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a2fc77b2bb3fce96a6b9ca69f8bbad86">ubidi_getReorderingMode</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">What is the requested reordering mode for a given BiDi object?  <a href="#a2fc77b2bb3fce96a6b9ca69f8bbad86"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#db64e6d18943e1088c4a9d00cd63b038">ubidi_setReorderingOptions</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a> reorderingOptions)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specify which of the reordering options should be applied during BiDi transformations.  <a href="#db64e6d18943e1088c4a9d00cd63b038"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#14bed2c1840b6fb40d5bfd69b991f9e8">ubidi_getReorderingOptions</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">What are the reordering options applied to a given BiDi object?  <a href="#14bed2c1840b6fb40d5bfd69b991f9e8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, const UChar *text, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>, <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> paraLevel, <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *embeddingLevels, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform the Unicode BiDi algorithm.  <a href="#8c2076512fab83e334d9c3826b27615c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pParaBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> start, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> limit, <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pLineBiDi, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">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="#d7946a4ea2e5b100aff23bd4b3971edc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#49b26999786f69af3476fc5c745c06e1">ubidi_getDirection</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the directionality of the text.  <a href="#49b26999786f69af3476fc5c745c06e1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const UChar *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#b38e64519f2a9510afa9e5d5c5dbc70f">ubidi_getText</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the pointer to the text.  <a href="#b38e64519f2a9510afa9e5d5c5dbc70f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#5f178284d949a498c1cef1034108aa10">ubidi_getLength</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the length of the text.  <a href="#5f178284d949a498c1cef1034108aa10"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#b05444180610255d1cf45ec8de37df7f">ubidi_getParaLevel</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the paragraph level of the text.  <a href="#b05444180610255d1cf45ec8de37df7f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ad32225e7ce66f919988753f1d7f17bb">ubidi_countParagraphs</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of paragraphs.  <a href="#ad32225e7ce66f919988753f1d7f17bb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#545937338c3ac22a5d19ed6e24b6ca1c">ubidi_getParagraph</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> charIndex, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *pParaStart, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *pParaLimit, <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *pParaLevel, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a paragraph, given a position within the text.  <a href="#545937338c3ac22a5d19ed6e24b6ca1c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#c9eb4946b6a8f358358935d6db4caeba">ubidi_getParagraphByIndex</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> paraIndex, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *pParaStart, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *pParaLimit, <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *pParaLevel, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a paragraph, given the index of this paragraph.  <a href="#c9eb4946b6a8f358358935d6db4caeba"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#f0c1337508d7fc18c34a9e2c954fb783">ubidi_getLevelAt</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> charIndex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the level for one character.  <a href="#f0c1337508d7fc18c34a9e2c954fb783"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#f9a5de911e99f90e1f9b20bcfc83e537">ubidi_getLevels</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get an array of levels for each character.  <a href="#f9a5de911e99f90e1f9b20bcfc83e537"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ba6cd69ae902ea6cadbcf5a39a51d658">ubidi_getLogicalRun</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> logicalStart, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *pLogicalLimit, <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *pLevel)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a logical run.  <a href="#ba6cd69ae902ea6cadbcf5a39a51d658"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#7c506d5f29674cf2ad37fbd34755385d">ubidi_countRuns</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of runs.  <a href="#7c506d5f29674cf2ad37fbd34755385d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#5b92f0b09f5e20ed7271b28ea12c6d1a">ubidi_getVisualRun</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> runIndex, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *pLogicalStart, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *pLength)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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="#5b92f0b09f5e20ed7271b28ea12c6d1a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#9ad520ba5f15849575009b6b60fa63a7">ubidi_getVisualIndex</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> logicalIndex, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the visual position from a logical text position.  <a href="#9ad520ba5f15849575009b6b60fa63a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#6fd4cb392a354b04a356f6c209bb153f">ubidi_getLogicalIndex</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> visualIndex, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the logical text position from a visual position.  <a href="#6fd4cb392a354b04a356f6c209bb153f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#98de42dbd4f597e0b4303c20edba59e1">ubidi_getLogicalMap</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *indexMap, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object.  <a href="#98de42dbd4f597e0b4303c20edba59e1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#c2697a47eae2ce4660dc5720980af1ff">ubidi_getVisualMap</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *indexMap, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object.  <a href="#c2697a47eae2ce4660dc5720980af1ff"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#c72c0aa72cf20976e774174ded25410e">ubidi_reorderLogical</a> (const <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *levels, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *indexMap)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is a convenience function that does not use a UBiDi object.  <a href="#c72c0aa72cf20976e774174ded25410e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#7b997524bb063a2eaa837322463c4c18">ubidi_reorderVisual</a> (const <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *levels, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *indexMap)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is a convenience function that does not use a UBiDi object.  <a href="#7b997524bb063a2eaa837322463c4c18"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#da8c5199cc7013c6e179bc1340f086c1">ubidi_invertMap</a> (const <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *srcMap, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *destMap, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Invert an index map.  <a href="#da8c5199cc7013c6e179bc1340f086c1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code>.  <a href="#30efdfb16ada03a6304138c3b7a7f210"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#aa487e8b945e381c8090cff34a63a570">ubidi_getResultLength</a> (const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code>.  <a href="#aa487e8b945e381c8090cff34a63a570"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">U_CDECL_END <a class="el" href="uchar_8h.html#936814157622d365bc20077c3b177f3b">UCharDirection</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#37069f153a1fb86b90211f69ee8d23ea">ubidi_getCustomizedClass</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve the BiDi class for a given code point.  <a href="#37069f153a1fb86b90211f69ee8d23ea"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#c6a2aceeed12b9d526d96ecc52564356">ubidi_setClassCallback</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="ubidi_8h.html#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a> *newFn, const void *newContext, <a class="el" href="ubidi_8h.html#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a> **oldFn, const void **oldContext, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function and callback data used by the UBA implementation for BiDi class determination.  <a href="#c6a2aceeed12b9d526d96ecc52564356"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#2e76dd815c9e79108ba0b1166d5c5417">ubidi_getClassCallback</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, <a class="el" href="ubidi_8h.html#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a> **fn, const void **<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current callback function used for BiDi class determination.  <a href="#2e76dd815c9e79108ba0b1166d5c5417"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered</a> (<a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *pBiDi, UChar *dest, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> destSize, <a class="el" href="pwin32_8h.html#009defcb88ef0180917f5d2ca68a5c30">uint16_t</a> options, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> or for a line of text set by <code><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine()</a></code> and write a reordered string to the destination buffer.  <a href="#a2f704a90621d59f7436678626c18e08"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#9617020b91f5fdd92893a41ca81cae14">ubidi_writeReverse</a> (const UChar *src, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> srcLength, UChar *dest, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> destSize, <a class="el" href="pwin32_8h.html#009defcb88ef0180917f5d2ca68a5c30">uint16_t</a> options, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reverse a Right-To-Left run of Unicode text.  <a href="#9617020b91f5fdd92893a41ca81cae14"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
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>, version 13, also described in The Unicode Standard, Version 4.0 .<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#b85f7fe2987a1b2702f455d65013a051">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>
The "limit" of a sequence of characters is the position just after their last character, i.e., one more than that position.<p>
Some of the API functions provide access to "runs". Such a "run" is defined as a sequence of characters that are at the same embedding level after performing the BIDI algorithm.<p>
<dl compact><dt><b>Author:</b></dt><dd>Markus W. Scherer </dd></dl>
<dl compact><dt><b>Version:</b></dt><dd>1.0</dd></dl>
<h4>Sample code for the ICU BIDI API </h4>
<p>
<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>
The basic assumptions are: <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>
<p>
<pre>
<div class="fragment"><pre class="fragment"> *#include <span class="stringliteral">"unicode/ubidi.h"</span>

 *<span class="keyword">typedef</span> <span class="keyword">enum</span> {
     styleNormal=0, styleSelected=1,
     styleBold=2, styleItalics=4,
     styleSuper=8, styleSub=16
 *} Style;

 *<span class="keyword">typedef</span> <span class="keyword">struct </span>{ <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> limit; Style style; } StyleRun;

 *<span class="keywordtype">int</span> getTextWidth(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a7213b402d772584553f6e614109e6e4">UChar</a> *text, <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> start, <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> limit,
                  <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount);

 <span class="comment">// set *pLimit and *pStyleRunLimit for a line</span>
 <span class="comment">// from text[start] and from styleRuns[styleRunStart]</span>
 <span class="comment">// using ubidi_getLogicalRun(para, ...)</span>
 *<span class="keywordtype">void</span> getLineBreak(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a7213b402d772584553f6e614109e6e4">UChar</a> *text, <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> start, <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *pLimit,
                  <a class="code" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *para,
                  <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunStart, <span class="keywordtype">int</span> *pStyleRunLimit,
                  <span class="keywordtype">int</span> *pLineWidth);

 <span class="comment">// render runs on a line sequentially, always from left to right</span>

 <span class="comment">// prepare rendering a new line</span>
 <span class="keywordtype">void</span> startLine(<a class="code" href="ubidi_8h.html#a88807fb0e5f9c8ba30cc7eed659c372">UBiDiDirection</a> textDirection, <span class="keywordtype">int</span> lineWidth);

 <span class="comment">// render a run of text and advance to the right by the run width</span>
 <span class="comment">// the text[start..limit-1] is always in logical order</span>
 <span class="keywordtype">void</span> renderRun(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a7213b402d772584553f6e614109e6e4">UChar</a> *text, <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> start, <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> limit,
               <a class="code" href="ubidi_8h.html#a88807fb0e5f9c8ba30cc7eed659c372">UBiDiDirection</a> textDirection, Style style);

 <span class="comment">// We could compute a cross-product</span>
 <span class="comment">// from the style runs with the directional runs</span>
 <span class="comment">// and then reorder it.</span>
 <span class="comment">// Instead, here we iterate over each run type</span>
 <span class="comment">// and render the intersections -</span>
 <span class="comment">// with shortcuts in simple (and common) cases.</span>
 <span class="comment">// renderParagraph() is the main function.</span>

 <span class="comment">// render a directional run with</span>
 <span class="comment">// (possibly) multiple style runs intersecting with it</span>
 <span class="keywordtype">void</span> renderDirectionalRun(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a7213b402d772584553f6e614109e6e4">UChar</a> *text,
                           <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> start, <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> limit,
                           <a class="code" href="ubidi_8h.html#a88807fb0e5f9c8ba30cc7eed659c372">UBiDiDirection</a> direction,
                           <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount) {
     <span class="keywordtype">int</span> i;

     <span class="comment">// iterate over style runs</span>
     <span class="keywordflow">if</span>(direction==<a class="code" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec44060af7720c0e2dd4dd5c0e2366ed962c7">UBIDI_LTR</a>) {
         <span class="keywordtype">int</span> styleLimit;

         <span class="keywordflow">for</span>(i=0; i&lt;styleRunCount; ++i) {
             styleLimit=styleRun[i].limit;
             <span class="keywordflow">if</span>(start&lt;styleLimit) {
                 <span class="keywordflow">if</span>(styleLimit&gt;limit) { styleLimit=limit; }
                 renderRun(text, start, styleLimit,
                           direction, styleRun[i].style);
                 <span class="keywordflow">if</span>(styleLimit==limit) { <span class="keywordflow">break</span>; }
                 start=styleLimit;
             }
         }
     } <span class="keywordflow">else</span> {
         <span class="keywordtype">int</span> styleStart;

         <span class="keywordflow">for</span>(i=styleRunCount-1; i&gt;=0; --i) {
             <span class="keywordflow">if</span>(i&gt;0) {
                 styleStart=styleRun[i-1].limit;
             } <span class="keywordflow">else</span> {
                 styleStart=0;
             }
             <span class="keywordflow">if</span>(limit&gt;=styleStart) {
                 <span class="keywordflow">if</span>(styleStart&lt;start) { styleStart=start; }
                 renderRun(text, styleStart, limit,
                           direction, styleRun[i].style);
                 <span class="keywordflow">if</span>(styleStart==start) { <span class="keywordflow">break</span>; }
                 limit=styleStart;
             }
         }
     }
 }

 <span class="comment">// the line object represents text[start..limit-1]</span>
 <span class="keywordtype">void</span> renderLine(<a class="code" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *line, <span class="keyword">const</span> <a class="code" href="umachine_8h.html#a7213b402d772584553f6e614109e6e4">UChar</a> *text,
                 <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> start, <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> limit,
                 <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount) {
     <a class="code" href="ubidi_8h.html#a88807fb0e5f9c8ba30cc7eed659c372">UBiDiDirection</a> direction=<a class="code" href="ubidi_8h.html#49b26999786f69af3476fc5c745c06e1">ubidi_getDirection</a>(line);
     <span class="keywordflow">if</span>(direction!=<a class="code" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440c7d7756a30601b4570f675f0b098118a">UBIDI_MIXED</a>) {
         <span class="comment">// unidirectional</span>
         <span class="keywordflow">if</span>(styleRunCount&lt;=1) {
             renderRun(text, start, limit, direction, styleRuns[0].style);
         } <span class="keywordflow">else</span> {
             renderDirectionalRun(text, start, limit,
                                  direction, styleRuns, styleRunCount);
         }
     } <span class="keywordflow">else</span> {
         <span class="comment">// mixed-directional</span>
         <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> count, i, <a class="code" href="ucnv_8h.html#c14f4e493302a219114039668cd5c7d1">length</a>;
         <a class="code" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> level;

         count=<a class="code" href="ubidi_8h.html#7c506d5f29674cf2ad37fbd34755385d">ubidi_countRuns</a>(para, <a class="code" href="ucnv_8h.html#5716258ed7a3d2283a1a0ae26cf1e5e9">pErrorCode</a>);
         <span class="keywordflow">if</span>(<a class="code" href="utypes_8h.html#66bf50e5fe117e762c90f1a1fd9c297e">U_SUCCESS</a>(*<a class="code" href="ucnv_8h.html#5716258ed7a3d2283a1a0ae26cf1e5e9">pErrorCode</a>)) {
             <span class="keywordflow">if</span>(styleRunCount&lt;=1) {
                 Style style=styleRuns[0].style;

                 <span class="comment">// iterate over directional runs</span>
                <span class="keywordflow">for</span>(i=0; i&lt;count; ++i) {
                    direction=<a class="code" href="ubidi_8h.html#5b92f0b09f5e20ed7271b28ea12c6d1a">ubidi_getVisualRun</a>(para, i, &amp;start, &amp;length);
                     renderRun(text, start, start+length, direction, style);
                }
             } <span class="keywordflow">else</span> {
                 <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> j;

                 <span class="comment">// iterate over both directional and style runs</span>
                 <span class="keywordflow">for</span>(i=0; i&lt;count; ++i) {
                     direction=<a class="code" href="ubidi_8h.html#5b92f0b09f5e20ed7271b28ea12c6d1a">ubidi_getVisualRun</a>(line, i, &amp;start, &amp;length);
                     renderDirectionalRun(text, start, start+length,
                                          direction, styleRuns, styleRunCount);
                 }
             }
         }
     }
 }

 *<span class="keywordtype">void</span> renderParagraph(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a7213b402d772584553f6e614109e6e4">UChar</a> *text, <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> length,
                     <a class="code" href="ubidi_8h.html#a88807fb0e5f9c8ba30cc7eed659c372">UBiDiDirection</a> textDirection,
                      <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount,
                      <span class="keywordtype">int</span> lineWidth,
                      <a class="code" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="code" href="ucnv_8h.html#5716258ed7a3d2283a1a0ae26cf1e5e9">pErrorCode</a>) {
     <a class="code" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *para;

     <span class="keywordflow">if</span>(pErrorCode==<a class="code" href="utypes_8h.html#73db6a27182fb6f49fadbdad318845ce">NULL</a> || <a class="code" href="utypes_8h.html#488895ec2af6692af4afe1ddb1908155">U_FAILURE</a>(*pErrorCode) || length&lt;=0) {
         <span class="keywordflow">return</span>;
     }

     para=<a class="code" href="ubidi_8h.html#939ff8b4d73245b72f1161eaedab64f7">ubidi_openSized</a>(length, 0, pErrorCode);
     <span class="keywordflow">if</span>(para==<a class="code" href="utypes_8h.html#73db6a27182fb6f49fadbdad318845ce">NULL</a>) { <span class="keywordflow">return</span>; }

     <a class="code" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a>(para, text, length,
                   textDirection ? <a class="code" href="ubidi_8h.html#a6368b5e74d98553915bc63041d74d47">UBIDI_DEFAULT_RTL</a> : <a class="code" href="ubidi_8h.html#ff5eee22d3130be4f5c2254e1a8dae65">UBIDI_DEFAULT_LTR</a>,
                   <a class="code" href="utypes_8h.html#73db6a27182fb6f49fadbdad318845ce">NULL</a>, pErrorCode);
     <span class="keywordflow">if</span>(<a class="code" href="utypes_8h.html#66bf50e5fe117e762c90f1a1fd9c297e">U_SUCCESS</a>(*pErrorCode)) {
         <a class="code" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> paraLevel=1&amp;<a class="code" href="ubidi_8h.html#b05444180610255d1cf45ec8de37df7f">ubidi_getParaLevel</a>(para);
         StyleRun styleRun={ length, styleNormal };
         <span class="keywordtype">int</span> width;

         <span class="keywordflow">if</span>(styleRuns==<a class="code" href="utypes_8h.html#73db6a27182fb6f49fadbdad318845ce">NULL</a> || styleRunCount&lt;=0) {
            styleRunCount=1;
             styleRuns=&amp;styleRun;
         }

        <span class="comment">// assume styleRuns[styleRunCount-1].limit&gt;=length</span>

         width=getTextWidth(text, 0, length, styleRuns, styleRunCount);
         <span class="keywordflow">if</span>(width&lt;=lineWidth) {
             <span class="comment">// everything fits onto one line</span>

            <span class="comment">// prepare rendering a new line from either left or right</span>
             startLine(paraLevel, width);

             renderLine(para, text, 0, length,
                        styleRuns, styleRunCount);
         } <span class="keywordflow">else</span> {
             <a class="code" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *line;

             <span class="comment">// we need to render several lines</span>
             line=<a class="code" href="ubidi_8h.html#939ff8b4d73245b72f1161eaedab64f7">ubidi_openSized</a>(length, 0, pErrorCode);
             <span class="keywordflow">if</span>(line!=<a class="code" href="utypes_8h.html#73db6a27182fb6f49fadbdad318845ce">NULL</a>) {
                 <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> start=0, limit;
                 <span class="keywordtype">int</span> styleRunStart=0, styleRunLimit;

                 <span class="keywordflow">for</span>(;;) {
                     limit=length;
                     styleRunLimit=styleRunCount;
                     getLineBreak(text, start, &amp;limit, para,
                                  styleRuns, styleRunStart, &amp;styleRunLimit,
                                 &amp;width);
                     <a class="code" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine</a>(para, start, limit, line, pErrorCode);
                     <span class="keywordflow">if</span>(<a class="code" href="utypes_8h.html#66bf50e5fe117e762c90f1a1fd9c297e">U_SUCCESS</a>(*pErrorCode)) {
                         <span class="comment">// prepare rendering a new line</span>
                         <span class="comment">// from either left or right</span>
                         startLine(paraLevel, width);

                         renderLine(line, text, start, limit,
                                    styleRuns+styleRunStart,
                                    styleRunLimit-styleRunStart);
                     }
                     <span class="keywordflow">if</span>(limit==length) { <span class="keywordflow">break</span>; }
                     start=limit;
                     styleRunStart=styleRunLimit-1;
                     <span class="keywordflow">if</span>(start&gt;=styleRuns[styleRunStart].limit) {
                         ++styleRunStart;
                     }
                 }

                 <a class="code" href="ubidi_8h.html#e5954754d50f965e680388d740bf19fb">ubidi_close</a>(line);
             }
        }
    }

     <a class="code" href="ubidi_8h.html#e5954754d50f965e680388d740bf19fb">ubidi_close</a>(para);
 *}
 *
</pre></div>
 </pre> 
<p>
Definition in file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.<hr><h2>Define Documentation</h2>
<a class="anchor" name="0f98def8090d066b66a3f75b57899313"></a><!-- doxytag: member="ubidi.h::U_BIDI_CLASS_DEFAULT" ref="0f98def8090d066b66a3f75b57899313" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_BIDI_CLASS_DEFAULT&nbsp;&nbsp;&nbsp;U_CHAR_DIRECTION_COUNT          </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>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000016">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l01699">1699</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="ff5eee22d3130be4f5c2254e1a8dae65"></a><!-- doxytag: member="ubidi.h::UBIDI_DEFAULT_LTR" ref="ff5eee22d3130be4f5c2254e1a8dae65" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_DEFAULT_LTR&nbsp;&nbsp;&nbsp;0xfe          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Paragraph level setting. 
<p>
If there is no strong character, then set the paragraph level to 0 (left-to-right). <dl compact><dt><b><a class="el" href="stable.html#_stable000333">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00336">336</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="a6368b5e74d98553915bc63041d74d47"></a><!-- doxytag: member="ubidi.h::UBIDI_DEFAULT_RTL" ref="a6368b5e74d98553915bc63041d74d47" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_DEFAULT_RTL&nbsp;&nbsp;&nbsp;0xff          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Paragraph level setting. 
<p>
If there is no strong character, then set the paragraph level to 1 (right-to-left). <dl compact><dt><b><a class="el" href="stable.html#_stable000334">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00342">342</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="01c0f4ab096a7d805ce28942427c214c"></a><!-- doxytag: member="ubidi.h::UBIDI_DO_MIRRORING" ref="01c0f4ab096a7d805ce28942427c214c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_DO_MIRRORING&nbsp;&nbsp;&nbsp;2          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: replace characters with the "mirrored" property in RTL runs by their mirror-image mappings 
<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000370">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l01576">1576</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="161f0768b752922264e22cdec2fb5a02"></a><!-- doxytag: member="ubidi.h::UBIDI_INSERT_LRM_FOR_NUMERIC" ref="161f0768b752922264e22cdec2fb5a02" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_INSERT_LRM_FOR_NUMERIC&nbsp;&nbsp;&nbsp;4          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: surround the run with LRMs if necessary; this is part of the approximate "inverse BiDi" algorithm 
<p>
This option does not imply corresponding adjustment of the index mappings.<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#bf9b7b73638bffc6ac162e30e58628d8">ubidi_setInverse</a> <p>
<a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000371">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l01590">1590</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="da1a0e34561495323475dde8cdc6b576"></a><!-- doxytag: member="ubidi.h::UBIDI_KEEP_BASE_COMBINING" ref="da1a0e34561495323475dde8cdc6b576" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_KEEP_BASE_COMBINING&nbsp;&nbsp;&nbsp;1          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: keep combining characters after their base characters in RTL runs 
<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000369">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l01566">1566</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="19a9034c2f06e61d3032afc78a9aa75f"></a><!-- doxytag: member="ubidi.h::UBIDI_LEVEL_OVERRIDE" ref="19a9034c2f06e61d3032afc78a9aa75f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_LEVEL_OVERRIDE&nbsp;&nbsp;&nbsp;0x80          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00355">355</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="946e4eea601973e1c8fd311b159cab92"></a><!-- doxytag: member="ubidi.h::UBIDI_MAP_NOWHERE" ref="946e4eea601973e1c8fd311b159cab92" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_MAP_NOWHERE&nbsp;&nbsp;&nbsp;(-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>
This may happen for the logical-to-visual mapping of a BiDi control when option <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">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#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">UBIDI_OPTION_INSERT_MARKS</a></code>. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#9ad520ba5f15849575009b6b60fa63a7">ubidi_getVisualIndex</a> <p>
<a class="el" href="ubidi_8h.html#c2697a47eae2ce4660dc5720980af1ff">ubidi_getVisualMap</a> <p>
<a class="el" href="ubidi_8h.html#6fd4cb392a354b04a356f6c209bb153f">ubidi_getLogicalIndex</a> <p>
<a class="el" href="ubidi_8h.html#98de42dbd4f597e0b4303c20edba59e1">ubidi_getLogicalMap</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000007">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00370">370</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="c7f0100f7be9e8c61f85f501d1b8f14c"></a><!-- doxytag: member="ubidi.h::UBIDI_MAX_EXPLICIT_LEVEL" ref="c7f0100f7be9e8c61f85f501d1b8f14c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_MAX_EXPLICIT_LEVEL&nbsp;&nbsp;&nbsp;61          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00349">349</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="100684bd5d1fce146f83cec934214f42"></a><!-- doxytag: member="ubidi.h::UBIDI_OUTPUT_REVERSE" ref="100684bd5d1fce146f83cec934214f42" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_OUTPUT_REVERSE&nbsp;&nbsp;&nbsp;16          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: write the output in reverse order 
<p>
This has the same effect as calling <code><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a></code> first without this option, and then calling <code><a class="el" href="ubidi_8h.html#9617020b91f5fdd92893a41ca81cae14">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 compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000373">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l01619">1619</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="6cf976bd18e94168e4fd5327cbb0d442"></a><!-- doxytag: member="ubidi.h::UBIDI_REMOVE_BIDI_CONTROLS" ref="6cf976bd18e94168e4fd5327cbb0d442" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_REMOVE_BIDI_CONTROLS&nbsp;&nbsp;&nbsp;8          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
option bit for <a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a>: remove BiDi control characters (this does not affect <a class="el" href="ubidi_8h.html#161f0768b752922264e22cdec2fb5a02">UBIDI_INSERT_LRM_FOR_NUMERIC</a>) 
<p>
This option does not imply corresponding adjustment of the index mappings.<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000372">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l01603">1603</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="32383717fffcba38917dab05d26827bb"></a><!-- doxytag: member="ubidi.h::UBiDi" ref="32383717fffcba38917dab05d26827bb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000340">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00401">401</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="b6ae3fdaf533affb3c33bbee84dc401a"></a><!-- doxytag: member="ubidi.h::UBiDiClassCallback" ref="b6ae3fdaf533affb3c33bbee84dc401a" args="(const void *context, UChar32 c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="uchar_8h.html#936814157622d365bc20077c3b177f3b">UCharDirection</a> U_CALLCONV <a class="el" href="ubidi_8h.html#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a>(const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> c)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Callback type declaration for overriding default BiDi class values with custom ones. 
<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#c6a2aceeed12b9d526d96ecc52564356">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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>is a pointer to the callback private data.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>is the code point to get a BiDi class for.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></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#0f98def8090d066b66a3f75b57899313">U_BIDI_CLASS_DEFAULT</a></code> if the standard BiDi class value for <code>c</code> is to be used. </dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#c6a2aceeed12b9d526d96ecc52564356">ubidi_setClassCallback</a> <p>
<a class="el" href="ubidi_8h.html#2e76dd815c9e79108ba0b1166d5c5417">ubidi_getClassCallback</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000017">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l01722">1722</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="a88807fb0e5f9c8ba30cc7eed659c372"></a><!-- doxytag: member="ubidi.h::UBiDiDirection" ref="a88807fb0e5f9c8ba30cc7eed659c372" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a> <a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000338">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00386">386</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="ed05299a322dc38cbfae537e53aacd3a"></a><!-- doxytag: member="ubidi.h::UBiDiLevel" ref="ed05299a322dc38cbfae537e53aacd3a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#3ebf7c4fcbf17b618a01df30a79859d3">uint8_t</a> <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
UBiDiLevel is the type of the level values in this BiDi implementation. 
<p>
It holds an embedding level and indicates the visual direction by its bit&nbsp;0 (even/odd value).<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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code>; there: <ul>
<li>
bit&nbsp;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>
<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> function shall determine it but there is no strongly typed character in the input.<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 compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#ff5eee22d3130be4f5c2254e1a8dae65">UBIDI_DEFAULT_LTR</a> <p>
<a class="el" href="ubidi_8h.html#a6368b5e74d98553915bc63041d74d47">UBIDI_DEFAULT_RTL</a> <p>
<a class="el" href="ubidi_8h.html#19a9034c2f06e61d3032afc78a9aa75f">UBIDI_LEVEL_OVERRIDE</a> <p>
<a class="el" href="ubidi_8h.html#c7f0100f7be9e8c61f85f501d1b8f14c">UBIDI_MAX_EXPLICIT_LEVEL</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000332">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00330">330</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="855fe9a3ad744fad8007c3a3b78ec440"></a><!-- doxytag: member="ubidi.h::UBiDiDirection" ref="855fe9a3ad744fad8007c3a3b78ec440" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>UBiDiDirection</code> values indicate the text direction. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000337">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="855fe9a3ad744fad8007c3a3b78ec44060af7720c0e2dd4dd5c0e2366ed962c7"></a><!-- doxytag: member="UBIDI_LTR" ref="855fe9a3ad744fad8007c3a3b78ec44060af7720c0e2dd4dd5c0e2366ed962c7" args="" -->UBIDI_LTR</em>&nbsp;</td><td>
All left-to-right text. 
<p>
This is a 0 value.<dl compact><dt><b><a class="el" href="stable.html#_stable000376">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="855fe9a3ad744fad8007c3a3b78ec4401bd0502bb79adbc411abf16ec240f347"></a><!-- doxytag: member="UBIDI_RTL" ref="855fe9a3ad744fad8007c3a3b78ec4401bd0502bb79adbc411abf16ec240f347" args="" -->UBIDI_RTL</em>&nbsp;</td><td>
All right-to-left text. 
<p>
This is a 1 value.<dl compact><dt><b><a class="el" href="stable.html#_stable000377">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="855fe9a3ad744fad8007c3a3b78ec440c7d7756a30601b4570f675f0b098118a"></a><!-- doxytag: member="UBIDI_MIXED" ref="855fe9a3ad744fad8007c3a3b78ec440c7d7756a30601b4570f675f0b098118a" args="" -->UBIDI_MIXED</em>&nbsp;</td><td>
Mixed-directional text. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000378">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00376">376</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="5ecfdc5fc4188e8f27a9b989edac4902"></a><!-- doxytag: member="ubidi.h::UBiDiReorderingMode" ref="5ecfdc5fc4188e8f27a9b989edac4902" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902">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 compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#e1d9fc3df20932c20e3744ff7a75f916">ubidi_setReorderingMode</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000008">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="5ecfdc5fc4188e8f27a9b989edac4902fdc4019fb1ba2d4c9b8e7436c2b8ec2d"></a><!-- doxytag: member="UBIDI_REORDER_DEFAULT" ref="5ecfdc5fc4188e8f27a9b989edac4902fdc4019fb1ba2d4c9b8e7436c2b8ec2d" args="" -->UBIDI_REORDER_DEFAULT</em>&nbsp;</td><td>
Regular Logical to Visual BiDi algorithm according to Unicode. 
<p>
This is a 0 value.<dl compact><dt><b><a class="el" href="draft.html#_draft000021">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="5ecfdc5fc4188e8f27a9b989edac4902e83d780f52da963735d2b9e714aad766"></a><!-- doxytag: member="UBIDI_REORDER_NUMBERS_SPECIAL" ref="5ecfdc5fc4188e8f27a9b989edac4902e83d780f52da963735d2b9e714aad766" args="" -->UBIDI_REORDER_NUMBERS_SPECIAL</em>&nbsp;</td><td>
Logical to Visual algorithm which handles numbers in a way which mimicks the behavior of Windows XP. 
<p>
<dl compact><dt><b><a class="el" href="draft.html#_draft000022">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="5ecfdc5fc4188e8f27a9b989edac490244fb971da10133656ea04074c79e797a"></a><!-- doxytag: member="UBIDI_REORDER_GROUP_NUMBERS_WITH_R" ref="5ecfdc5fc4188e8f27a9b989edac490244fb971da10133656ea04074c79e797a" args="" -->UBIDI_REORDER_GROUP_NUMBERS_WITH_R</em>&nbsp;</td><td>
Logical to Visual algorithm grouping numbers with adjacent R characters (reversible algorithm). 
<p>
<dl compact><dt><b><a class="el" href="draft.html#_draft000023">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="5ecfdc5fc4188e8f27a9b989edac49022a093ff9e45e30079f4235d0118a6560"></a><!-- doxytag: member="UBIDI_REORDER_RUNS_ONLY" ref="5ecfdc5fc4188e8f27a9b989edac49022a093ff9e45e30079f4235d0118a6560" args="" -->UBIDI_REORDER_RUNS_ONLY</em>&nbsp;</td><td>
Reorder runs only to transform a Logical LTR string to the Logical RTL string with the same display, or vice-versa. 
<p>
<br>
 If this mode is set together with option <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">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. <dl compact><dt><b><a class="el" href="draft.html#_draft000024">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b"></a><!-- doxytag: member="UBIDI_REORDER_INVERSE_NUMBERS_AS_L" ref="5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b" args="" -->UBIDI_REORDER_INVERSE_NUMBERS_AS_L</em>&nbsp;</td><td>
Visual to Logical algorithm which handles numbers like L (same algorithm as selected by <code>ubidi_setInverse(TRUE)</code>. 
<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#bf9b7b73638bffc6ac162e30e58628d8">ubidi_setInverse</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000025">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="5ecfdc5fc4188e8f27a9b989edac49027cd1ef588cd6eb0d5d5b7cc66054b0be"></a><!-- doxytag: member="UBIDI_REORDER_INVERSE_LIKE_DIRECT" ref="5ecfdc5fc4188e8f27a9b989edac49027cd1ef588cd6eb0d5d5b7cc66054b0be" args="" -->UBIDI_REORDER_INVERSE_LIKE_DIRECT</em>&nbsp;</td><td>
Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm. 
<p>
<dl compact><dt><b><a class="el" href="draft.html#_draft000026">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="5ecfdc5fc4188e8f27a9b989edac4902ddc7ccc621067029ac4444d8e530b5e6"></a><!-- doxytag: member="UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL" ref="5ecfdc5fc4188e8f27a9b989edac4902ddc7ccc621067029ac4444d8e530b5e6" args="" -->UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</em>&nbsp;</td><td>
Inverse BiDi (Visual to Logical) algorithm for the <code>UBIDI_REORDER_NUMBERS_SPECIAL</code> BiDi algorithm. 
<p>
<dl compact><dt><b><a class="el" href="draft.html#_draft000027">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="5ecfdc5fc4188e8f27a9b989edac490211013529024f44034f343e10abb1c1a9"></a><!-- doxytag: member="UBIDI_REORDER_COUNT" ref="5ecfdc5fc4188e8f27a9b989edac490211013529024f44034f343e10abb1c1a9" args="" -->UBIDI_REORDER_COUNT</em>&nbsp;</td><td>
Number of values for reordering mode. 
<p>
<dl compact><dt><b><a class="el" href="draft.html#_draft000028">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00595">595</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<a class="anchor" name="287071dd22a6d61a35f6dee4128f5e06"></a><!-- doxytag: member="ubidi.h::UBiDiReorderingOption" ref="287071dd22a6d61a35f6dee4128f5e06" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06">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 compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#db64e6d18943e1088c4a9d00cd63b038">ubidi_setReorderingOptions</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000011">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="287071dd22a6d61a35f6dee4128f5e06cede404f14908e296df1ce5e30ad6bf6"></a><!-- doxytag: member="UBIDI_OPTION_DEFAULT" ref="287071dd22a6d61a35f6dee4128f5e06cede404f14908e296df1ce5e30ad6bf6" args="" -->UBIDI_OPTION_DEFAULT</em>&nbsp;</td><td>
option value for <code>ubidi_setReorderingOptions</code>: disable all the options which can be set with this function 
<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#db64e6d18943e1088c4a9d00cd63b038">ubidi_setReorderingOptions</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000029">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088"></a><!-- doxytag: member="UBIDI_OPTION_INSERT_MARKS" ref="287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088" args="" -->UBIDI_OPTION_INSERT_MARKS</em>&nbsp;</td><td>
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>
This option must be set or reset before calling <code>ubidi_setPara</code>.<p>
This option is significant only with reordering modes which generate a result with Logical order, specifically: <ul>
<li>
<code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49022a093ff9e45e30079f4235d0118a6560">UBIDI_REORDER_RUNS_ONLY</a></code> </li>
<li>
<code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> </li>
<li>
<code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49027cd1ef588cd6eb0d5d5b7cc66054b0be">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a></code> </li>
<li>
<code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902ddc7ccc621067029ac4444d8e530b5e6">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#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">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#161f0768b752922264e22cdec2fb5a02">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to function <code><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a></code>.<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#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">UBIDI_OPTION_REMOVE_CONTROLS</a></code> set before calling <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> or option <code><a class="el" href="ubidi_8h.html#6cf976bd18e94168e4fd5327cbb0d442">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>
This option will be ignored if specified together with option <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">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#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a></code> and it implies option <code><a class="el" href="ubidi_8h.html#161f0768b752922264e22cdec2fb5a02">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to function <code><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a></code> if the reordering mode is <code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>.<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#e1d9fc3df20932c20e3744ff7a75f916">ubidi_setReorderingMode</a> <p>
<a class="el" href="ubidi_8h.html#db64e6d18943e1088c4a9d00cd63b038">ubidi_setReorderingOptions</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000030">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b"></a><!-- doxytag: member="UBIDI_OPTION_REMOVE_CONTROLS" ref="287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b" args="" -->UBIDI_OPTION_REMOVE_CONTROLS</em>&nbsp;</td><td>
option bit for <code>ubidi_setReorderingOptions</code>: remove BiDi control characters 
<p>
This option must be set or reset before calling <code>ubidi_setPara</code>.<p>
This option nullifies option <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">UBIDI_OPTION_INSERT_MARKS</a></code>. It inhibits option <code><a class="el" href="ubidi_8h.html#161f0768b752922264e22cdec2fb5a02">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to function <code><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a></code> and it implies option <code><a class="el" href="ubidi_8h.html#6cf976bd18e94168e4fd5327cbb0d442">UBIDI_REMOVE_BIDI_CONTROLS</a></code> in calls to that function.<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#e1d9fc3df20932c20e3744ff7a75f916">ubidi_setReorderingMode</a> <p>
<a class="el" href="ubidi_8h.html#db64e6d18943e1088c4a9d00cd63b038">ubidi_setReorderingOptions</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000031">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="287071dd22a6d61a35f6dee4128f5e066e4c25cf01ac27bcaa23ad684ca52763"></a><!-- doxytag: member="UBIDI_OPTION_STREAMING" ref="287071dd22a6d61a35f6dee4128f5e066e4c25cf01ac27bcaa23ad684ca52763" args="" -->UBIDI_OPTION_STREAMING</em>&nbsp;</td><td>
option bit for <code>ubidi_setReorderingOptions</code>: process the output as part of a stream to be continued 
<p>
This option must be set or reset before calling <code>ubidi_setPara</code>.<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>
When this option bit is on, <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">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#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength()</a></code> immediately after calling <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">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: <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>
In all cases, this option should be turned off before processing the last part of the text.<p>
When the <code>UBIDI_OPTION_STREAMING</code> option is used, it is recommended to call <code><a class="el" href="ubidi_8h.html#6810a9af3c7791832a8196b5159f94b5">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 compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#e1d9fc3df20932c20e3744ff7a75f916">ubidi_setReorderingMode</a> <p>
<a class="el" href="ubidi_8h.html#db64e6d18943e1088c4a9d00cd63b038">ubidi_setReorderingOptions</a> <p>
<a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> <p>
<a class="el" href="ubidi_8h.html#6810a9af3c7791832a8196b5159f94b5">ubidi_orderParagraphsLTR</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000032">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="ubidi_8h-source.html#l00806">806</a> of file <a class="el" href="ubidi_8h-source.html">ubidi.h</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="e5954754d50f965e680388d740bf19fb"></a><!-- doxytag: member="ubidi.h::ubidi_close" ref="e5954754d50f965e680388d740bf19fb" args="(UBiDi *pBiDi)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code><a class="el" href="ubidi_8h.html#e5954754d50f965e680388d740bf19fb">ubidi_close()</a></code> must be called to free the memory associated with a UBiDi object. 
<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#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine()</a></code>, then the child object must be destroyed (closed) or reused (by calling <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> or <code><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine()</a></code>) before the parent object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a> <p>
<a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000343">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ad32225e7ce66f919988753f1d7f17bb"></a><!-- doxytag: member="ubidi.h::ubidi_countParagraphs" ref="ad32225e7ce66f919988753f1d7f17bb" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_countParagraphs           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the number of paragraphs. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The number of paragraphs. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000354">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="7c506d5f29674cf2ad37fbd34755385d"></a><!-- doxytag: member="ubidi.h::ubidi_countRuns" ref="7c506d5f29674cf2ad37fbd34755385d" args="(UBiDi *pBiDi, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_countRuns           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the number of runs. 
<p>
This function may invoke the actual reordering on the <code>UBiDi</code> object, after <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> may have resolved only the levels of the text. Therefore, <code><a class="el" href="ubidi_8h.html#7c506d5f29674cf2ad37fbd34755385d">ubidi_countRuns()</a></code> may have to allocate memory, and may fail doing so.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The number of runs. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000360">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="2e76dd815c9e79108ba0b1166d5c5417"></a><!-- doxytag: member="ubidi.h::ubidi_getClassCallback" ref="2e76dd815c9e79108ba0b1166d5c5417" args="(UBiDi *pBiDi, UBiDiClassCallback **fn, const void **context)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</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#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a> **&nbsp;</td>
          <td class="paramname"> <em>fn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void **&nbsp;</td>
          <td class="paramname"> <em>context</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the current callback function used for BiDi class determination. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fn</em>&nbsp;</td><td>fillin: Returns the callback function pointer.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>fillin: Returns the callback's private context.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#c6a2aceeed12b9d526d96ecc52564356">ubidi_setClassCallback</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000020">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="37069f153a1fb86b90211f69ee8d23ea"></a><!-- doxytag: member="ubidi.h::ubidi_getCustomizedClass" ref="37069f153a1fb86b90211f69ee8d23ea" args="(UBiDi *pBiDi, UChar32 c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">U_CDECL_END <a class="el" href="uchar_8h.html#936814157622d365bc20077c3b177f3b">UCharDirection</a> ubidi_getCustomizedClass           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</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#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a>&nbsp;</td>
          <td class="paramname"> <em>c</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieve the BiDi class for a given code point. 
<p>
If a <code><a class="el" href="ubidi_8h.html#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a></code> callback is defined and returns a value other than <code><a class="el" href="ubidi_8h.html#0f98def8090d066b66a3f75b57899313">U_BIDI_CLASS_DEFAULT</a></code>, that value is used; otherwise the default class determination mechanism is invoked.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>is the code point whose BiDi class must be retrieved.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The BiDi class for character <code>c</code> based on the given <code>pBiDi</code> instance. </dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000018">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="49b26999786f69af3476fc5c745c06e1"></a><!-- doxytag: member="ubidi.h::ubidi_getDirection" ref="49b26999786f69af3476fc5c745c06e1" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a> ubidi_getDirection           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the directionality of the text. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A <code>UBIDI_XXX</code> value that indicates if the entire text represented by this object is unidirectional, and which direction, or if it is mixed-directional.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000350">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Referenced by <a class="el" href="ParagraphLayout_8h-source.html#l00633">ParagraphLayout::getTextDirection()</a>.
</div>
</div><p>
<a class="anchor" name="5f178284d949a498c1cef1034108aa10"></a><!-- doxytag: member="ubidi.h::ubidi_getLength" ref="5f178284d949a498c1cef1034108aa10" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_getLength           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the length of the text. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The length of the text that the UBiDi object was created for. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000352">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="f0c1337508d7fc18c34a9e2c954fb783"></a><!-- doxytag: member="ubidi.h::ubidi_getLevelAt" ref="f0c1337508d7fc18c34a9e2c954fb783" args="(const UBiDi *pBiDi, int32_t charIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> ubidi_getLevelAt           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>charIndex</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the level for one character. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>charIndex</em>&nbsp;</td><td>the index of a character.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The level for the character at charIndex.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> <p>
<a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000357">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="f9a5de911e99f90e1f9b20bcfc83e537"></a><!-- doxytag: member="ubidi.h::ubidi_getLevels" ref="f9a5de911e99f90e1f9b20bcfc83e537" args="(UBiDi *pBiDi, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a>* ubidi_getLevels           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get an array of levels for each character. 
<p>
Note that this function may allocate memory under some circumstances, unlike <code><a class="el" href="ubidi_8h.html#f0c1337508d7fc18c34a9e2c954fb783">ubidi_getLevelAt()</a></code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object, whose text length must be strictly positive.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The levels array for the text, or <code>NULL</code> if an error occurs.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> <p>
<a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000358">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="6fd4cb392a354b04a356f6c209bb153f"></a><!-- doxytag: member="ubidi.h::ubidi_getLogicalIndex" ref="6fd4cb392a354b04a356f6c209bb153f" args="(UBiDi *pBiDi, int32_t visualIndex, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_getLogicalIndex           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the logical text position from a visual position. 
<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#c2697a47eae2ce4660dc5720980af1ff">ubidi_getVisualMap()</a></code> is more efficient.<p>
The value returned may be <code><a class="el" href="ubidi_8h.html#946e4eea601973e1c8fd311b159cab92">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#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">UBIDI_OPTION_INSERT_MARKS</a></code>. <p>
This is the inverse function to <code><a class="el" href="ubidi_8h.html#9ad520ba5f15849575009b6b60fa63a7">ubidi_getVisualIndex()</a></code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>visualIndex</em>&nbsp;</td><td>is the visual position of a character.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The index of this character in the text.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#c2697a47eae2ce4660dc5720980af1ff">ubidi_getVisualMap</a> <p>
<a class="el" href="ubidi_8h.html#9ad520ba5f15849575009b6b60fa63a7">ubidi_getVisualIndex</a> <p>
<a class="el" href="ubidi_8h.html#aa487e8b945e381c8090cff34a63a570">ubidi_getResultLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000363">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="98de42dbd4f597e0b4303c20edba59e1"></a><!-- doxytag: member="ubidi.h::ubidi_getLogicalMap" ref="98de42dbd4f597e0b4303c20edba59e1" args="(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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>
Some values in the map may be <code><a class="el" href="ubidi_8h.html#946e4eea601973e1c8fd311b159cab92">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#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">UBIDI_OPTION_REMOVE_CONTROLS</a></code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>indexMap</em>&nbsp;</td><td>is a pointer to an array of <code><a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength()</a></code> indexes which will reflect the reordering of the characters. If option <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">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#aa487e8b945e381c8090cff34a63a570">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 valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#c2697a47eae2ce4660dc5720980af1ff">ubidi_getVisualMap</a> <p>
<a class="el" href="ubidi_8h.html#9ad520ba5f15849575009b6b60fa63a7">ubidi_getVisualIndex</a> <p>
<a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> <p>
<a class="el" href="ubidi_8h.html#aa487e8b945e381c8090cff34a63a570">ubidi_getResultLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000364">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ba6cd69ae902ea6cadbcf5a39a51d658"></a><!-- doxytag: member="ubidi.h::ubidi_getLogicalRun" ref="ba6cd69ae902ea6cadbcf5a39a51d658" args="(const UBiDi *pBiDi, int32_t logicalStart, int32_t *pLogicalLimit, UBiDiLevel *pLevel)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>logicalStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</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#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *&nbsp;</td>
          <td class="paramname"> <em>pLevel</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a logical run. 
<p>
This function returns information about a run and is used to retrieve runs in logical order.<p>
This is especially useful for line-breaking on a paragraph.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>logicalStart</em>&nbsp;</td><td>is the first character of the run.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pLogicalLimit</em>&nbsp;</td><td>will receive the limit of the run. The l-value that you point to here may be the same expression (variable) as the one for <code>logicalStart</code>. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pLevel</em>&nbsp;</td><td>will receive the level of the run. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000359">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="545937338c3ac22a5d19ed6e24b6ca1c"></a><!-- doxytag: member="ubidi.h::ubidi_getParagraph" ref="545937338c3ac22a5d19ed6e24b6ca1c" args="(const UBiDi *pBiDi, int32_t charIndex, int32_t *pParaStart, int32_t *pParaLimit, UBiDiLevel *pParaLevel, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_getParagraph           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>charIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>pParaStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</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#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a paragraph, given a position within the text. 
<p>
This function returns information about a paragraph.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>charIndex</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pParaStart</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pParaLimit</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pParaLevel</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The index of the paragraph containing the specified position.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000355">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="c9eb4946b6a8f358358935d6db4caeba"></a><!-- doxytag: member="ubidi.h::ubidi_getParagraphByIndex" ref="c9eb4946b6a8f358358935d6db4caeba" args="(const UBiDi *pBiDi, int32_t paraIndex, int32_t *pParaStart, int32_t *pParaLimit, UBiDiLevel *pParaLevel, UErrorCode *pErrorCode)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>paraIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>pParaStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</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#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a paragraph, given the index of this paragraph. 
<p>
This function returns information about a paragraph.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>paraIndex</em>&nbsp;</td><td>is the number of the paragraph, in the range <code>[0..ubidi_countParagraphs(pBiDi)-1]</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pParaStart</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pParaLimit</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pParaLevel</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000356">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="b05444180610255d1cf45ec8de37df7f"></a><!-- doxytag: member="ubidi.h::ubidi_getParaLevel" ref="b05444180610255d1cf45ec8de37df7f" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> ubidi_getParaLevel           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the paragraph level of the text. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></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 compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> <p>
<a class="el" href="ubidi_8h.html#545937338c3ac22a5d19ed6e24b6ca1c">ubidi_getParagraph</a> <p>
<a class="el" href="ubidi_8h.html#c9eb4946b6a8f358358935d6db4caeba">ubidi_getParagraphByIndex</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000353">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Referenced by <a class="el" href="ParagraphLayout_8h-source.html#l00628">ParagraphLayout::getParagraphLevel()</a>.
</div>
</div><p>
<a class="anchor" name="30efdfb16ada03a6304138c3b7a7f210"></a><!-- doxytag: member="ubidi.h::ubidi_getProcessedLength" ref="30efdfb16ada03a6304138c3b7a7f210" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_getProcessedLength           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code>. 
<p>
This length may be different from the length of the source text if option <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e066e4c25cf01ac27bcaa23ad684ca52763">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: <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>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The length of the part of the source text processed by the last call to <code>ubidi_setPara</code>. </dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a> <p>
<a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e066e4c25cf01ac27bcaa23ad684ca52763">UBIDI_OPTION_STREAMING</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000014">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="a2fc77b2bb3fce96a6b9ca69f8bbad86"></a><!-- doxytag: member="ubidi.h::ubidi_getReorderingMode" ref="a2fc77b2bb3fce96a6b9ca69f8bbad86" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902">UBiDiReorderingMode</a> ubidi_getReorderingMode           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
What is the requested reordering mode for a given BiDi object? 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the current reordering mode of the BiDi object </dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#e1d9fc3df20932c20e3744ff7a75f916">ubidi_setReorderingMode</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000010">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="14bed2c1840b6fb40d5bfd69b991f9e8"></a><!-- doxytag: member="ubidi.h::ubidi_getReorderingOptions" ref="14bed2c1840b6fb40d5bfd69b991f9e8" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a> ubidi_getReorderingOptions           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
What are the reordering options applied to a given BiDi object? 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the current reordering options of the BiDi object </dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#db64e6d18943e1088c4a9d00cd63b038">ubidi_setReorderingOptions</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000013">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="aa487e8b945e381c8090cff34a63a570"></a><!-- doxytag: member="ubidi.h::ubidi_getResultLength" ref="aa487e8b945e381c8090cff34a63a570" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_getResultLength           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code>. 
<p>
This length may be different from the length of the source text if option <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">UBIDI_OPTION_INSERT_MARKS</a></code> or option <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">UBIDI_OPTION_REMOVE_CONTROLS</a></code> has been set. <br>
 This resulting length is the one to consider in the following cases: <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>
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#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> has been set.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The length of the reordered text resulting from the last call to <code>ubidi_setPara</code>. </dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a> <p>
<a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">UBIDI_OPTION_INSERT_MARKS</a> <p>
<a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">UBIDI_OPTION_REMOVE_CONTROLS</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000015">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="b38e64519f2a9510afa9e5d5c5dbc70f"></a><!-- doxytag: member="ubidi.h::ubidi_getText" ref="b38e64519f2a9510afa9e5d5c5dbc70f" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const UChar* ubidi_getText           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the pointer to the text. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The pointer to the text that the UBiDi object was created for.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a> <p>
<a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000351">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="9ad520ba5f15849575009b6b60fa63a7"></a><!-- doxytag: member="ubidi.h::ubidi_getVisualIndex" ref="9ad520ba5f15849575009b6b60fa63a7" args="(UBiDi *pBiDi, int32_t logicalIndex, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_getVisualIndex           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the visual position from a logical text position. 
<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#98de42dbd4f597e0b4303c20edba59e1">ubidi_getLogicalMap()</a></code> is more efficient.<p>
The value returned may be <code><a class="el" href="ubidi_8h.html#946e4eea601973e1c8fd311b159cab92">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#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">UBIDI_OPTION_REMOVE_CONTROLS</a></code>. <p>
Note that in right-to-left runs, this mapping places modifier letters before base characters and second surrogates before first ones.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>logicalIndex</em>&nbsp;</td><td>is the index of a character in the text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The visual position of this character.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#98de42dbd4f597e0b4303c20edba59e1">ubidi_getLogicalMap</a> <p>
<a class="el" href="ubidi_8h.html#6fd4cb392a354b04a356f6c209bb153f">ubidi_getLogicalIndex</a> <p>
<a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000362">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="c2697a47eae2ce4660dc5720980af1ff"></a><!-- doxytag: member="ubidi.h::ubidi_getVisualMap" ref="c2697a47eae2ce4660dc5720980af1ff" args="(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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>
Some values in the map may be <code><a class="el" href="ubidi_8h.html#946e4eea601973e1c8fd311b159cab92">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#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">UBIDI_OPTION_INSERT_MARKS</a></code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>indexMap</em>&nbsp;</td><td>is a pointer to an array of <code><a class="el" href="ubidi_8h.html#aa487e8b945e381c8090cff34a63a570">ubidi_getResultLength()</a></code> indexes which will reflect the reordering of the characters. If option <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">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#30efdfb16ada03a6304138c3b7a7f210">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 valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#98de42dbd4f597e0b4303c20edba59e1">ubidi_getLogicalMap</a> <p>
<a class="el" href="ubidi_8h.html#6fd4cb392a354b04a356f6c209bb153f">ubidi_getLogicalIndex</a> <p>
<a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> <p>
<a class="el" href="ubidi_8h.html#aa487e8b945e381c8090cff34a63a570">ubidi_getResultLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000365">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="5b92f0b09f5e20ed7271b28ea12c6d1a"></a><!-- doxytag: member="ubidi.h::ubidi_getVisualRun" ref="5b92f0b09f5e20ed7271b28ea12c6d1a" args="(UBiDi *pBiDi, int32_t runIndex, int32_t *pLogicalStart, int32_t *pLength)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec440">UBiDiDirection</a> ubidi_getVisualRun           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>runIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>pLogicalStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>pLength</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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>
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>
<code><a class="el" href="ubidi_8h.html#7c506d5f29674cf2ad37fbd34755385d">ubidi_countRuns()</a></code> should be called before the runs are retrieved.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>runIndex</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pLogicalStart</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pLength</em>&nbsp;</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>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the directionality of the run, <code>UBIDI_LTR==0</code> or <code>UBIDI_RTL==1</code>, never <code>UBIDI_MIXED</code>.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#7c506d5f29674cf2ad37fbd34755385d">ubidi_countRuns</a></dd></dl>
Example: <pre>
<div class="fragment"><pre class="fragment"> <a class="code" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> i, count=<a class="code" href="ubidi_8h.html#7c506d5f29674cf2ad37fbd34755385d">ubidi_countRuns</a>(pBiDi),
         logicalStart, visualIndex=0, length;
 <span class="keywordflow">for</span>(i=0; i&lt;count; ++i) {
    <span class="keywordflow">if</span>(<a class="code" href="ubidi_8h.html#855fe9a3ad744fad8007c3a3b78ec44060af7720c0e2dd4dd5c0e2366ed962c7">UBIDI_LTR</a>==<a class="code" href="ubidi_8h.html#5b92f0b09f5e20ed7271b28ea12c6d1a">ubidi_getVisualRun</a>(pBiDi, i, &amp;logicalStart, &amp;length)) {
         <span class="keywordflow">do</span> { <span class="comment">// LTR</span>
             show_char(text[logicalStart++], visualIndex++);
         } <span class="keywordflow">while</span>(--length&gt;0);
     } <span class="keywordflow">else</span> {
         logicalStart+=length;  <span class="comment">// logicalLimit</span>
         <span class="keywordflow">do</span> { <span class="comment">// RTL</span>
             show_char(text[--logicalStart], visualIndex++);
         } <span class="keywordflow">while</span>(--length&gt;0);
     }
 }
 *
</pre></div>
 </pre><p>
Note that in right-to-left runs, code like this places modifier letters before base characters and second surrogates before first ones. <dl compact><dt><b><a class="el" href="stable.html#_stable000361">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="da8c5199cc7013c6e179bc1340f086c1"></a><!-- doxytag: member="ubidi.h::ubidi_invertMap" ref="da8c5199cc7013c6e179bc1340f086c1" args="(const int32_t *srcMap, int32_t *destMap, int32_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_invertMap           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>srcMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>destMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Invert an index map. 
<p>
The index mapping of the first map is inverted and written to the second one.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>srcMap</em>&nbsp;</td><td>is an array with <code>length</code> indexes which defines the original mapping from a source array containing <code>length</code> elements to a destination array. All indexes must be &gt;=0 or equal to <code>UBIDI_MAP_NOWHERE</code>. This special value means that the corresponding elements in the source array have no matching element in the destination array. Some indexes 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 indexes with the same value except <code>UBIDI_MAP_NOWHERE</code>).</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destMap</em>&nbsp;</td><td>is an array with a number of indexes equal to 1 + the highest value in <code>srcMap</code>. <code>destMap</code> will be filled with the inverse mapping. Elements of <code>destMap</code> which have no matching elements in <code>srcMap</code> will receive an index equal to <code>UBIDI_MAP_NOWHERE</code></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>is the length of each array. </td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#946e4eea601973e1c8fd311b159cab92">UBIDI_MAP_NOWHERE</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000368">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="97822c2c5b8220f361f0cdf41771856c"></a><!-- doxytag: member="ubidi.h::ubidi_isInverse" ref="97822c2c5b8220f361f0cdf41771856c" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> ubidi_isInverse           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Is this BiDi object set to perform the inverse BiDi algorithm? 
<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#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>, <code>FALSE</code> for all other values.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>TRUE if the BiDi object is set to perform the inverse BiDi algorithm by handling numbers as L.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#bf9b7b73638bffc6ac162e30e58628d8">ubidi_setInverse</a> <p>
<a class="el" href="ubidi_8h.html#e1d9fc3df20932c20e3744ff7a75f916">ubidi_setReorderingMode</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000345">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="0161b1de1a568c179c63c8cd2bc654df"></a><!-- doxytag: member="ubidi.h::ubidi_isOrderParagraphsLTR" ref="0161b1de1a568c179c63c8cd2bc654df" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> ubidi_isOrderParagraphsLTR           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>TRUE if the BiDi object is set to allocate level 0 to block separators.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#6810a9af3c7791832a8196b5159f94b5">ubidi_orderParagraphsLTR</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000347">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="9a672f4fb33411f5f55d98a77b959867"></a><!-- doxytag: member="ubidi.h::ubidi_open" ref="9a672f4fb33411f5f55d98a77b959867" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a>* ubidi_open           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Allocate a <code>UBiDi</code> structure. 
<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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> or the BiDi properties of a line within a paragraph by <code><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine()</a></code>.<p>
This object can be reused for as long as it is not deallocated by calling <code><a class="el" href="ubidi_8h.html#e5954754d50f965e680388d740bf19fb">ubidi_close()</a></code>.<p>
<code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> and <code><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine()</a></code> will allocate additional memory for internal structures as necessary.<p>
<dl compact><dt><b>Returns:</b></dt><dd>An empty <code>UBiDi</code> object. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000341">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="939ff8b4d73245b72f1161eaedab64f7"></a><!-- doxytag: member="ubidi.h::ubidi_openSized" ref="939ff8b4d73245b72f1161eaedab64f7" args="(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a>* ubidi_openSized           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>maxLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Allocate a <code>UBiDi</code> structure with preallocated memory for internal structures. 
<p>
This function provides a <code>UBiDi</code> object like <code><a class="el" href="ubidi_8h.html#9a672f4fb33411f5f55d98a77b959867">ubidi_open()</a></code> with no arguments, but it also preallocates memory for internal structures according to the sizings supplied by the caller.<p>
Subsequent functions will not allocate any more memory, and are thus guaranteed not to fail because of lack of memory.<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#9a672f4fb33411f5f55d98a77b959867">ubidi_open()</a></code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>maxLength</em>&nbsp;</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 valign="top"></td><td valign="top"><em>maxRunCount</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>An empty <code>UBiDi</code> object with preallocated memory. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000342">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="6810a9af3c7791832a8196b5159f94b5"></a><!-- doxytag: member="ubidi.h::ubidi_orderParagraphsLTR" ref="6810a9af3c7791832a8196b5159f94b5" args="(UBiDi *pBiDi, UBool orderParagraphsLTR)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</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#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>orderParagraphsLTR</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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>
This function must be called before <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>orderParagraphsLTR</em>&nbsp;</td><td>specifies whether paragraph separators (B) must receive level 0, so that successive paragraphs progress from left to right.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000346">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="c72c0aa72cf20976e774174ded25410e"></a><!-- doxytag: member="ubidi.h::ubidi_reorderLogical" ref="c72c0aa72cf20976e774174ded25410e" args="(const UBiDiLevel *levels, int32_t length, int32_t *indexMap)" -->
<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#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *&nbsp;</td>
          <td class="paramname"> <em>levels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>indexMap</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This is a convenience function that does not use a UBiDi object. 
<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#98de42dbd4f597e0b4303c20edba59e1">ubidi_getLogicalMap()</a></code> on a <code>UBiDi</code> object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>levels</em>&nbsp;</td><td>is an array with <code>length</code> levels that have been determined by the application.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</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 valign="top"></td><td valign="top"><em>indexMap</em>&nbsp;</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>
</dl>
The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>. <dl compact><dt><b><a class="el" href="stable.html#_stable000366">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="7b997524bb063a2eaa837322463c4c18"></a><!-- doxytag: member="ubidi.h::ubidi_reorderVisual" ref="7b997524bb063a2eaa837322463c4c18" args="(const UBiDiLevel *levels, int32_t length, int32_t *indexMap)" -->
<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#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *&nbsp;</td>
          <td class="paramname"> <em>levels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>indexMap</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This is a convenience function that does not use a UBiDi object. 
<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#c2697a47eae2ce4660dc5720980af1ff">ubidi_getVisualMap()</a></code> on a <code>UBiDi</code> object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>levels</em>&nbsp;</td><td>is an array with <code>length</code> levels that have been determined by the application.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</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 valign="top"></td><td valign="top"><em>indexMap</em>&nbsp;</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>
</dl>
The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>. <dl compact><dt><b><a class="el" href="stable.html#_stable000367">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="c6a2aceeed12b9d526d96ecc52564356"></a><!-- doxytag: member="ubidi.h::ubidi_setClassCallback" ref="c6a2aceeed12b9d526d96ecc52564356" args="(UBiDi *pBiDi, UBiDiClassCallback *newFn, const void *newContext, UBiDiClassCallback **oldFn, const void **oldContext, UErrorCode *pErrorCode)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</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#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a> *&nbsp;</td>
          <td class="paramname"> <em>newFn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</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#b6ae3fdaf533affb3c33bbee84dc401a">UBiDiClassCallback</a> **&nbsp;</td>
          <td class="paramname"> <em>oldFn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void **&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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>
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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>newFn</em>&nbsp;</td><td>is the new callback function pointer.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>newContext</em>&nbsp;</td><td>is the new callback context pointer. This can be NULL.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>oldFn</em>&nbsp;</td><td>fillin: Returns the old callback function pointer. This can be NULL.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>oldContext</em>&nbsp;</td><td>fillin: Returns the old callback's context. This can be NULL.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#2e76dd815c9e79108ba0b1166d5c5417">ubidi_getClassCallback</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000019">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="bf9b7b73638bffc6ac162e30e58628d8"></a><!-- doxytag: member="ubidi.h::ubidi_setInverse" ref="bf9b7b73638bffc6ac162e30e58628d8" args="(UBiDi *pBiDi, UBool isInverse)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</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#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>isInverse</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Modify the operation of the BiDi algorithm such that it approximates an "inverse BiDi" algorithm. 
<p>
This function must be called before <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code>.<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>
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>
Output runs should be retrieved using <code><a class="el" href="ubidi_8h.html#5b92f0b09f5e20ed7271b28ea12c6d1a">ubidi_getVisualRun()</a></code>. Since the actual input for "inverse BiDi" is visually ordered text and <code><a class="el" href="ubidi_8h.html#5b92f0b09f5e20ed7271b28ea12c6d1a">ubidi_getVisualRun()</a></code> gets the reordered runs, these are actually the runs of the logically ordered output.<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#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">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#5ecfdc5fc4188e8f27a9b989edac4902fdc4019fb1ba2d4c9b8e7436c2b8ec2d">UBIDI_REORDER_DEFAULT</a></code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>isInverse</em>&nbsp;</td><td>specifies "forward" or "inverse" BiDi operation.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a> <p>
<a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered</a> <p>
<a class="el" href="ubidi_8h.html#e1d9fc3df20932c20e3744ff7a75f916">ubidi_setReorderingMode</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000344">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="d7946a4ea2e5b100aff23bd4b3971edc"></a><!-- doxytag: member="ubidi.h::ubidi_setLine" ref="d7946a4ea2e5b100aff23bd4b3971edc" args="(const UBiDi *pParaBiDi, int32_t start, int32_t limit, UBiDi *pLineBiDi, UErrorCode *pErrorCode)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pParaBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">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>
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>
In the new line object, the indexes will range from 0 to <code>limit-start-1</code>.<p>
This is used after calling <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">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>
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>
<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>
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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pParaBiDi</em>&nbsp;</td><td>is the parent paragraph object. It must have been set by a successful call to ubidi_setPara.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>is the line's first index into the text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>limit</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pLineBiDi</em>&nbsp;</td><td>is the object that will now represent a line of the text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a> <p>
<a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000349">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="8c2076512fab83e334d9c3826b27615c"></a><!-- doxytag: member="ubidi.h::ubidi_setPara" ref="8c2076512fab83e334d9c3826b27615c" args="(UBiDi *pBiDi, const UChar *text, int32_t length, UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, UErrorCode *pErrorCode)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const UChar *&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</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#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a>&nbsp;</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#ed05299a322dc38cbfae537e53aacd3a">UBiDiLevel</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Perform the Unicode BiDi algorithm. 
<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>
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>
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>
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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>A <code>UBiDi</code> object allocated with <code><a class="el" href="ubidi_8h.html#9a672f4fb33411f5f55d98a77b959867">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 valign="top"></td><td valign="top"><em>text</em>&nbsp;</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#b38e64519f2a9510afa9e5d5c5dbc70f">ubidi_getText()</a></code>.<br>
 <b>Note:</b> the text must be (at least) <code>length</code> long.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>is the length of the text; if <code>length==-1</code> then the text must be zero-terminated.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>paraLevel</em>&nbsp;</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#ff5eee22d3130be4f5c2254e1a8dae65">UBIDI_DEFAULT_LTR</a></code> or <code><a class="el" href="ubidi_8h.html#a6368b5e74d98553915bc63041d74d47">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#c7f0100f7be9e8c61f85f501d1b8f14c">UBIDI_MAX_EXPLICIT_LEVEL</a></code> is also valid, with odd levels indicating RTL.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>embeddingLevels</em>&nbsp;</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#19a9034c2f06e61d3032afc78a9aa75f">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#8c2076512fab83e334d9c3826b27615c">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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> and <code><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">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.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000348">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="e1d9fc3df20932c20e3744ff7a75f916"></a><!-- doxytag: member="ubidi.h::ubidi_setReorderingMode" ref="e1d9fc3df20932c20e3744ff7a75f916" args="(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</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#5ecfdc5fc4188e8f27a9b989edac4902">UBiDiReorderingMode</a>&nbsp;</td>
          <td class="paramname"> <em>reorderingMode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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>
This function must be called before <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code>, and stays in effect until called again with a different argument.<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>
With the reordering mode set to a value other than <code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902fdc4019fb1ba2d4c9b8e7436c2b8ec2d">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>
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>
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>
When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902fdc4019fb1ba2d4c9b8e7436c2b8ec2d">UBIDI_REORDER_DEFAULT</a></code>, the standard BiDi Logical to Visual algorithm is applied.<p>
</li>
<li>
When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902e83d780f52da963735d2b9e714aad766">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: <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>
</li>
<li>
When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac490244fb971da10133656ea04074c79e797a">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>
</li>
<li>
When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49022a093ff9e45e30079f4235d0118a6560">UBIDI_REORDER_RUNS_ONLY</a></code>, a "Logical to Logical" transformation must be performed: <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>
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>
</li>
<li>
When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">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#161f0768b752922264e22cdec2fb5a02">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#bf9b7b73638bffc6ac162e30e58628d8">ubidi_setInverse()</a></code> with argument <code>isInverse</code> set to <code>TRUE</code>.<p>
</li>
<li>
When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac49027cd1ef588cd6eb0d5d5b7cc66054b0be">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#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">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#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">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#5ecfdc5fc4188e8f27a9b989edac49021338c589caa536b49e6394b90a47460b">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> with option <code><a class="el" href="ubidi_8h.html#161f0768b752922264e22cdec2fb5a02">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to <code>ubidi_writeReordered</code>.<p>
</li>
<li>
When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902ddc7ccc621067029ac4444d8e530b5e6">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#5b92f0b09f5e20ed7271b28ea12c6d1a">ubidi_getVisualRun()</a></code>, and the output text with <code><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">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#5b92f0b09f5e20ed7271b28ea12c6d1a">ubidi_getVisualRun()</a></code> or <code><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">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>
Note that option <code><a class="el" href="ubidi_8h.html#100684bd5d1fce146f83cec934214f42">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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>reorderingMode</em>&nbsp;</td><td>specifies the required variant of the BiDi algorithm.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#5ecfdc5fc4188e8f27a9b989edac4902">UBiDiReorderingMode</a> <p>
<a class="el" href="ubidi_8h.html#bf9b7b73638bffc6ac162e30e58628d8">ubidi_setInverse</a> <p>
<a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara</a> <p>
<a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000009">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="db64e6d18943e1088c4a9d00cd63b038"></a><!-- doxytag: member="ubidi.h::ubidi_setReorderingOptions" ref="db64e6d18943e1088c4a9d00cd63b038" args="(UBiDi *pBiDi, uint32_t reorderingOptions)" -->
<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#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a>&nbsp;</td>
          <td class="paramname"> <em>reorderingOptions</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Specify which of the reordering options should be applied during BiDi transformations. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>reorderingOptions</em>&nbsp;</td><td>is a combination of zero or more of the following options: <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06cede404f14908e296df1ce5e30ad6bf6">UBIDI_OPTION_DEFAULT</a></code>, <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06e1ec321f35019ae2da16a10e78012088">UBIDI_OPTION_INSERT_MARKS</a></code>, <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e06aaf8aa48f1e59a81c15923b073480b5b">UBIDI_OPTION_REMOVE_CONTROLS</a></code>, <code><a class="el" href="ubidi_8h.html#287071dd22a6d61a35f6dee4128f5e066e4c25cf01ac27bcaa23ad684ca52763">UBIDI_OPTION_STREAMING</a></code>.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#14bed2c1840b6fb40d5bfd69b991f9e8">ubidi_getReorderingOptions</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000012">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="a2f704a90621d59f7436678626c18e08"></a><!-- doxytag: member="ubidi.h::ubidi_writeReordered" ref="a2f704a90621d59f7436678626c18e08" args="(UBiDi *pBiDi, UChar *dest, int32_t destSize, uint16_t options, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_writeReordered           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#32383717fffcba38917dab05d26827bb">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UChar *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>destSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#009defcb88ef0180917f5d2ca68a5c30">uint16_t</a>&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> or for a line of text set by <code><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">ubidi_setLine()</a></code> and write a reordered string to the destination buffer. 
<p>
This function preserves the integrity of characters with multiple code units and (optionally) modifier letters. 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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>A pointer to a <code>UBiDi</code> object that is set by <code><a class="el" href="ubidi_8h.html#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> or <code><a class="el" href="ubidi_8h.html#d7946a4ea2e5b100aff23bd4b3971edc">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#8c2076512fab83e334d9c3826b27615c">ubidi_setPara()</a></code> call.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</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 valign="top"></td><td valign="top"><em>destSize</em>&nbsp;</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_getLength(pBiDi)</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</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#01c0f4ab096a7d805ce28942427c214c">UBIDI_DO_MIRRORING</a></code>, <code><a class="el" href="ubidi_8h.html#161f0768b752922264e22cdec2fb5a02">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code>, <code><a class="el" href="ubidi_8h.html#da1a0e34561495323475dde8cdc6b576">UBIDI_KEEP_BASE_COMBINING</a></code>, <code><a class="el" href="ubidi_8h.html#100684bd5d1fce146f83cec934214f42">UBIDI_OUTPUT_REVERSE</a></code>, <code><a class="el" href="ubidi_8h.html#6cf976bd18e94168e4fd5327cbb0d442">UBIDI_REMOVE_BIDI_CONTROLS</a></code></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The length of the output string.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#30efdfb16ada03a6304138c3b7a7f210">ubidi_getProcessedLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000374">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="9617020b91f5fdd92893a41ca81cae14"></a><!-- doxytag: member="ubidi.h::ubidi_writeReverse" ref="9617020b91f5fdd92893a41ca81cae14" args="(const UChar *src, int32_t srcLength, UChar *dest, int32_t destSize, uint16_t options, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ubidi_writeReverse           </td>
          <td>(</td>
          <td class="paramtype">const UChar *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UChar *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>destSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#009defcb88ef0180917f5d2ca68a5c30">uint16_t</a>&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Reverse a Right-To-Left run of Unicode text. 
<p>
This function preserves the integrity of characters with multiple code units and (optionally) modifier letters. 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>
This function is the implementation for reversing RTL runs as part of <code><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">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 compact><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>A pointer to the RTL run text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>srcLength</em>&nbsp;</td><td>The length of the RTL run.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</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 valign="top"></td><td valign="top"><em>destSize</em>&nbsp;</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 valign="top"></td><td valign="top"><em>options</em>&nbsp;</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#a2f704a90621d59f7436678626c18e08">ubidi_writeReordered()</a></code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The length of the output string. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000375">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:51 2011 for ICU 3.6 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>