+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
*
******************************************************************************
* file name: ubidi.h
-* encoding: US-ASCII
+* encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
U_NAMESPACE_END
-#endif
+#endif // U_SHOW_CPLUSPLUS_API
/**
* Modify the operation of the Bidi algorithm such that it
* <code>UBIDI_REORDER_NUMBERS_SPECIAL</code> Bidi algorithm.
* @stable ICU 3.6 */
UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
- /** Number of values for reordering mode.
- * @stable ICU 3.6 */
+#ifndef U_HIDE_DEPRECATED_API
+ /**
+ * Number of values for reordering mode.
+ * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
+ */
UBIDI_REORDER_COUNT
+#endif // U_HIDE_DEPRECATED_API
} UBiDiReorderingMode;
/**
* A level overrides the directional property of its corresponding
* (same index) character if the level has the
* <code>#UBIDI_LEVEL_OVERRIDE</code> bit set.<br><br>
- * Except for that bit, it must be
+ * Aside from that bit, it must be
* <code>paraLevel<=embeddingLevels[]<=UBIDI_MAX_EXPLICIT_LEVEL</code>,
- * with one exception: a level of zero may be specified for a paragraph
- * separator even if <code>paraLevel>0</code> when multiple paragraphs
- * are submitted in the same call to <code>ubidi_setPara()</code>.<br><br>
+ * except that level 0 is always allowed.
+ * Level 0 for a paragraph separator prevents reordering of paragraphs;
+ * this only works reliably if <code>#UBIDI_LEVEL_OVERRIDE</code>
+ * is also set for paragraph separators.
+ * Level 0 for other characters is treated as a wildcard
+ * and is lifted up to the resolved level of the surrounding paragraph.<br><br>
* <strong>Caution: </strong>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
ubidi_getResultLength(const UBiDi *pBiDi);
U_CDECL_BEGIN
+
+#ifndef U_HIDE_DEPRECATED_API
/**
- * value returned by <code>UBiDiClassCallback</code> callbacks when
+ * Value returned by <code>UBiDiClassCallback</code> callbacks when
* there is no need to override the standard Bidi class for a given code point.
+ *
+ * This constant is deprecated; use u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1 instead.
+ *
* @see UBiDiClassCallback
- * @stable ICU 3.6
+ * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
#define U_BIDI_CLASS_DEFAULT U_CHAR_DIRECTION_COUNT
+#endif // U_HIDE_DEPRECATED_API
/**
* Callback type declaration for overriding default Bidi class values with
*
* @return The directional property / Bidi class for the given code point
* <code>c</code> if the default class has been overridden, or
- * <code>#U_BIDI_CLASS_DEFAULT</code> if the standard Bidi class value
- * for <code>c</code> is to be used.
+ * <code>#U_BIDI_CLASS_DEFAULT=u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code>
+ * if the standard Bidi class value for <code>c</code> is to be used.
* @see ubidi_setClassCallback
* @see ubidi_getClassCallback
* @stable ICU 3.6
/**
* Retrieve the Bidi class for a given code point.
* <p>If a <code>#UBiDiClassCallback</code> callback is defined and returns a
- * value other than <code>#U_BIDI_CLASS_DEFAULT</code>, that value is used;
- * otherwise the default class determination mechanism is invoked.</p>
+ * value other than <code>#U_BIDI_CLASS_DEFAULT=u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1</code>,
+ * that value is used; otherwise the default class determination mechanism is invoked.</p>
*
* @param pBiDi is the paragraph <code>UBiDi</code> object.
*