* @ingroup CAPI_BASE_UTILS_MODULE
* @defgroup CAPI_BASE_UTILS_I18N_MODULE i18n
* @brief The i18n module contains:
- * - uchar
- * - ucollator
- * - unormalization
- * - usearch
- * - ustring
- * - ucalendar
- * - udate
- * - udatepg
- * - ulocale
- * - unumber
- * - alpha_idx
- * - formattable
- * - measure unit
- * - measure
- * - format
- * - measure format
- * - field position
- * - parse position
- * - ushape
- * - utmscale
- * - ubidi
+ * - uchar
+ * - ucollator
+ * - unormalization
+ * - usearch
+ * - ustring
+ * - ucalendar
+ * - udate
+ * - udatepg
+ * - ulocale
+ * - unumber
+ * - alpha_idx
+ * - formattable
+ * - measure unit
+ * - measure
+ * - format
+ * - measure format
+ * - field position
+ * - parse position
+ * - ushape
+ * - utmscale
+ * - ubidi
*
* This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale.
* The i18n module provides various features based on data from ICU. The following table shows the version of ICU used in each Tizen platform.
* <table>
- * <tr>
- * <td>Tizen 2.3, 2.3.1, 2.4</td>
- * <td>ICU 51</td>
- * <td>CLDR 23</td>
- * <td>Unicode 6.2</td>
- * </tr>
- * <tr>
- * <td>Tizen 2.3.2, 3.0</td>
- * <td>ICU 57</td>
- * <td>CLDR 29</td>
- * <td>Unicode 8.0</td>
- * </tr>
+ * <tr>
+ * <td>Tizen 2.3, 2.3.1, 2.4</td>
+ * <td>ICU 51</td>
+ * <td>CLDR 23</td>
+ * <td>Unicode 6.2</td>
+ * </tr>
+ * <tr>
+ * <td>Tizen 2.3.2, 3.0</td>
+ * <td>ICU 57</td>
+ * <td>CLDR 29</td>
+ * <td>Unicode 8.0</td>
+ * </tr>
* </table>
* @section CAPI_BASE_UTILS_I18N_MODULE_HEADER Required Header
* \#include <utils_i18n.h>
* <td>@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE</td>
* <td>Unumber helps you format and parse numbers for any locale.</td>
* </tr>
- * <tr>
+ * <tr>
* <td>@ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE</td>
* <td>Alpha_idx supports the creation of a UI index appropriate for a given language.</td>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>Formattable interconverts between the primitive numeric types (double, long, etc.) as well as the #i18n_udate and char string.</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>Formattable interconverts between the primitive numeric types (double, long, etc.) as well as the #i18n_udate and char string.</td>
* </tr>
* <tr>
* <td>@ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE</td>
* <td>The Parse Position module used by Format and its subclasses to keep track of the current position during parsing.</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_USHAPE_MODULE</td>
- * <td>Ushape module provides Arabic shaping functionality.</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_USHAPE_MODULE</td>
+ * <td>Ushape module provides Arabic shaping functionality.</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE</td>
- * <td>The Universal Time Scale</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE</td>
+ * <td>The Universal Time Scale</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>Ubidi module provides implementation of the Unicode Bidirectional Algorithm.</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>Ubidi module provides implementation of the Unicode Bidirectional Algorithm.</td>
* </tr>
* </table>
*
* <td>getDSTSavings</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE</td>
- * <td>#i18n_timezone_detect_host_timezone</td>
- * <td>detectHostTimeZone</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE</td>
+ * <td>#i18n_timezone_detect_host_timezone</td>
+ * <td>detectHostTimeZone</td>
* </tr>
* <tr>
* <td>@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE</td>
* <td>resetRecordIterator</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_create_default</td>
- * <td>Formattable()</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_create_default</td>
+ * <td>Formattable()</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_create_with_udate</td>
- * <td>Formattable(UDate d, ISDATE flag)</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_create_with_udate</td>
+ * <td>Formattable(UDate d, ISDATE flag)</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_create_with_double</td>
- * <td>Formattable(double d)</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_create_with_double</td>
+ * <td>Formattable(double d)</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_create_with_long</td>
- * <td>Formattable(int32_t l)</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_create_with_long</td>
+ * <td>Formattable(int32_t l)</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_create_with_int64</td>
- * <td>Formattable(int64_t ll)</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_create_with_int64</td>
+ * <td>Formattable(int64_t ll)</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_create_with_char_string</td>
- * <td>Formattable(const char* strToCopy)</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_create_with_char_string</td>
+ * <td>Formattable(const char* strToCopy)</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_create_with_formattable_array</td>
- * <td>Formattable(const Formattable* arrayToCopy, int32_t count)</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_create_with_formattable_array</td>
+ * <td>Formattable(const Formattable* arrayToCopy, int32_t count)</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_destroy</td>
- * <td>delete</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_destroy</td>
+ * <td>delete</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_clone</td>
- * <td>Formattable::clone</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_clone</td>
+ * <td>Formattable::clone</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_get_array</td>
- * <td>Formattable::getArray</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_get_array</td>
+ * <td>Formattable::getArray</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_get_date</td>
- * <td>Formattable::getDate</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_get_date</td>
+ * <td>Formattable::getDate</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_get_double</td>
- * <td>Formattable::getDouble</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_get_double</td>
+ * <td>Formattable::getDouble</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_get_int64</td>
- * <td>Formattable::getInt64</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_get_int64</td>
+ * <td>Formattable::getInt64</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_get_long</td>
- * <td>Formattable::getLong</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_get_long</td>
+ * <td>Formattable::getLong</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_get_string</td>
- * <td>Formattable::getString</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_get_string</td>
+ * <td>Formattable::getString</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_get_type</td>
- * <td>Formattable::getType</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_get_type</td>
+ * <td>Formattable::getType</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_is_numeric</td>
- * <td>Formattable::isNumeric</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_is_numeric</td>
+ * <td>Formattable::isNumeric</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_not_equal</td>
- * <td>Formattable::operator!=</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_not_equal</td>
+ * <td>Formattable::operator!=</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_equal</td>
- * <td>Formattable::operator==</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_equal</td>
+ * <td>Formattable::operator==</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_element_at</td>
- * <td>Formattable::operator[]</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_element_at</td>
+ * <td>Formattable::operator[]</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_set_array</td>
- * <td>Formattable::setArray</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_set_array</td>
+ * <td>Formattable::setArray</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_set_date</td>
- * <td>Formattable::setDate</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_set_date</td>
+ * <td>Formattable::setDate</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_set_double</td>
- * <td>Formattable::setDouble</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_set_double</td>
+ * <td>Formattable::setDouble</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_set_int64</td>
- * <td>Formattable::setInt64</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_set_int64</td>
+ * <td>Formattable::setInt64</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_set_long</td>
- * <td>Formattable::setLong</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_set_long</td>
+ * <td>Formattable::setLong</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
- * <td>#i18n_formattable_set_string</td>
- * <td>Formattable::setString</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE</td>
+ * <td>#i18n_formattable_set_string</td>
+ * <td>Formattable::setString</td>
* </tr>
* <tr>
* <td>@ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE</td>
* <td>getErrorIndex</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_USHAPE_MODULE</td>
- * <td>#i18n_ushape_shape_arabic</td>
- * <td>u_shapeArabic</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_USHAPE_MODULE</td>
+ * <td>#i18n_ushape_shape_arabic</td>
+ * <td>u_shapeArabic</td>
* </tr>
* <tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE</td>
- * <td>#i18n_utmscale_get_time_scale_value</td>
- * <td>utmscale_getTimeScaleValue</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE</td>
+ * <td>#i18n_utmscale_get_time_scale_value</td>
+ * <td>utmscale_getTimeScaleValue</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE</td>
- * <td>#i18n_utmscale_from_int64</td>
- * <td>utmscale_fromInt64</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE</td>
+ * <td>#i18n_utmscale_from_int64</td>
+ * <td>utmscale_fromInt64</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE</td>
- * <td>#i18n_utmscale_to_int64</td>
- * <td>utmscale_toInt64</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE</td>
+ * <td>#i18n_utmscale_to_int64</td>
+ * <td>utmscale_toInt64</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_destroy</td>
- * <td>ubidi_close</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_destroy</td>
+ * <td>ubidi_close</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_count_paragraphs</td>
- * <td>ubidi_countParagraphs</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_count_paragraphs</td>
+ * <td>ubidi_countParagraphs</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_count_runs</td>
- * <td>ubidi_countRuns</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_count_runs</td>
+ * <td>ubidi_countRuns</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_base_direction</td>
- * <td>ubidi_getBaseDirection</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_base_direction</td>
+ * <td>ubidi_getBaseDirection</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_class_cb</td>
- * <td>ubidi_getClassCallback</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_class_cb</td>
+ * <td>ubidi_getClassCallback</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_customized_class</td>
- * <td>ubidi_getCustomizedClass</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_customized_class</td>
+ * <td>ubidi_getCustomizedClass</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_direction</td>
- * <td>ubidi_getDirection</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_direction</td>
+ * <td>ubidi_getDirection</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_length</td>
- * <td>ubidi_getLength</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_length</td>
+ * <td>ubidi_getLength</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_level_at</td>
- * <td>ubidi_getLevelAt</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_level_at</td>
+ * <td>ubidi_getLevelAt</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_levels</td>
- * <td>ubidi_getLevels</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_levels</td>
+ * <td>ubidi_getLevels</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_logical_index</td>
- * <td>ubidi_getLogicalIndex</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_logical_index</td>
+ * <td>ubidi_getLogicalIndex</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_logical_map</td>
- * <td>ubidi_getLogicalMap</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_logical_map</td>
+ * <td>ubidi_getLogicalMap</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_logical_run</td>
- * <td>ubidi_getLogicalRun</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_logical_run</td>
+ * <td>ubidi_getLogicalRun</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_paragraph</td>
- * <td>ubidi_getParagraph</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_paragraph</td>
+ * <td>ubidi_getParagraph</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_paragraph_by_index</td>
- * <td>ubidi_getParagraphByIndex</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_paragraph_by_index</td>
+ * <td>ubidi_getParagraphByIndex</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_para_level</td>
- * <td>ubidi_getParaLevel</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_para_level</td>
+ * <td>ubidi_getParaLevel</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_processed_length</td>
- * <td>ubidi_getProcessedLength</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_processed_length</td>
+ * <td>ubidi_getProcessedLength</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_reordering_mode</td>
- * <td>ubidi_getReorderingMode</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_reordering_mode</td>
+ * <td>ubidi_getReorderingMode</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_reordering_options</td>
- * <td>ubidi_getReorderingOptions</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_reordering_options</td>
+ * <td>ubidi_getReorderingOptions</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_result_length</td>
- * <td>ubidi_getResultLength</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_result_length</td>
+ * <td>ubidi_getResultLength</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_text</td>
- * <td>ubidi_getText</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_text</td>
+ * <td>ubidi_getText</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_visual_index</td>
- * <td>ubidi_getVisualIndex</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_visual_index</td>
+ * <td>ubidi_getVisualIndex</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_visual_map</td>
- * <td>ubidi_getVisualMap</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_visual_map</td>
+ * <td>ubidi_getVisualMap</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_get_visual_run</td>
- * <td>ubidi_getVisualRun</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_get_visual_run</td>
+ * <td>ubidi_getVisualRun</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_invert_map</td>
- * <td>ubidi_invertMap</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_invert_map</td>
+ * <td>ubidi_invertMap</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_is_inverse</td>
- * <td>ubidi_isInverse</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_is_inverse</td>
+ * <td>ubidi_isInverse</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_is_order_paragraphs_ltr</td>
- * <td>ubidi_isOrderParagraphsLTR</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_is_order_paragraphs_ltr</td>
+ * <td>ubidi_isOrderParagraphsLTR</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_create</td>
- * <td>ubidi_open</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_create</td>
+ * <td>ubidi_open</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_create_sized</td>
- * <td>ubidi_openSized</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_create_sized</td>
+ * <td>ubidi_openSized</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_order_paragraphs_ltr</td>
- * <td>ubidi_orderParagraphsLTR</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_order_paragraphs_ltr</td>
+ * <td>ubidi_orderParagraphsLTR</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_reorder_logical</td>
- * <td>ubidi_reorderLogical</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_reorder_logical</td>
+ * <td>ubidi_reorderLogical</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_reorder_visual</td>
- * <td>ubidi_reorderVisual</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_reorder_visual</td>
+ * <td>ubidi_reorderVisual</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_set_class_cb</td>
- * <td>ubidi_setClassCallback</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_set_class_cb</td>
+ * <td>ubidi_setClassCallback</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_set_context</td>
- * <td>ubidi_setContext</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_set_context</td>
+ * <td>ubidi_setContext</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_set_inverse</td>
- * <td>ubidi_setInverse</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_set_inverse</td>
+ * <td>ubidi_setInverse</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_set_line</td>
- * <td>ubidi_setLine</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_set_line</td>
+ * <td>ubidi_setLine</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_set_para</td>
- * <td>ubidi_setPara</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_set_para</td>
+ * <td>ubidi_setPara</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_set_reordering_mode</td>
- * <td>ubidi_setReorderingMode</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_set_reordering_mode</td>
+ * <td>ubidi_setReorderingMode</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_set_reordering_options</td>
- * <td>ubidi_setReorderingOptions</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_set_reordering_options</td>
+ * <td>ubidi_setReorderingOptions</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_write_reordered</td>
- * <td>ubidi_writeReordered</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_write_reordered</td>
+ * <td>ubidi_writeReordered</td>
* </tr>
* <tr>
- * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
- * <td>#i18n_ubidi_write_reverse</td>
- * <td>ubidi_writeReverse</td>
+ * <td>@ref CAPI_BASE_UTILS_I18N_UBIDI_MODULE</td>
+ * <td>#i18n_ubidi_write_reverse</td>
+ * <td>ubidi_writeReverse</td>
* </tr>
* </table>
*/
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#ifndef __UTILS_I18N_ALPHA_IDX_H__
* @defgroup CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE Alphabetic Index
* @brief Alphabetic Index supports the creation of a UI index appropriate for a given language.
* @section CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE_HEADER Required Header
- * \#include <utils_i18n.h>
+ * \#include <utils_i18n.h>
*
* @section CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE_OVERVIEW Overview
* @details The module can generate a list of labels for use as a UI "index",
- * that is, a list of clickable characters (or character sequences)
- * that allow the user to see a segment (bucket) of a larger "target" list.
- * That is, each label corresponds to a bucket in the target list, where
- * everything in the bucket is greater than or equal to the character
- * (according to the locale's collation). Strings can be added to the index;
- * they will be in sorted order in the right bucket.
- * The module also supports having buckets for strings before the first (underflow),
- * after the last (overflow), and between scripts (inflow). For example,
- * if the index is constructed with labels for Russian and English,
- * Greek characters would fall into an inflow bucket between the other two scripts.
+ * that is, a list of clickable characters (or character sequences)
+ * that allow the user to see a segment (bucket) of a larger "target" list.
+ * That is, each label corresponds to a bucket in the target list, where
+ * everything in the bucket is greater than or equal to the character
+ * (according to the locale's collation). Strings can be added to the index;
+ * they will be in sorted order in the right bucket.
+ * The module also supports having buckets for strings before the first (underflow),
+ * after the last (overflow), and between scripts (inflow). For example,
+ * if the index is constructed with labels for Russian and English,
+ * Greek characters would fall into an inflow bucket between the other two scripts.
*/
/**
/**
* @brief Creates an alphabetic index object for the specified locale.
* @details If the locale's data does not include index characters,
- * a set of them will be synthesized based on the locale's
- * exemplar characters. The locale determines the sorting order
- * for both the index characters and the user item names appearing
- * under each Index character.
+ * a set of them will be synthesized based on the locale's
+ * exemplar characters. The locale determines the sorting order
+ * for both the index characters and the user item names appearing
+ * under each Index character.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_alpha_idx_destroy() function.
+ * #i18n_alpha_idx_destroy() function.
*
- * @param[in] language The language of the locale
- * @param[in] country The country of the locale
- * @param[out] index The created alphabetic index object
+ * @param[in] language The language of the locale
+ * @param[in] country The country of the locale
+ * @param[out] index The created alphabetic index object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory
*/
int i18n_alpha_idx_create(const char *language, const char *country,
- i18n_alpha_idx_h *index);
+ i18n_alpha_idx_h *index);
/**
* @brief Destroys the alphabetic index object.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index to be destroyed
+ * @param[in] index The alphabetic index to be destroyed
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Adds the index characters from a specified locale to the index.
* @details The labels are added to those that are already in the index;
- * they do not replace the existing index characters. The collation
- * order for this index is not changed; it remains that of the locale
- * that was originally specified when creating this Index.
+ * they do not replace the existing index characters. The collation
+ * order for this index is not changed; it remains that of the locale
+ * that was originally specified when creating this Index.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index Label will be added to this alphabetic index
- * @param[in] language The language of the locale
- * @param[in] country The country of the locale
+ * @param[in] index Label will be added to this alphabetic index
+ * @param[in] language The language of the locale
+ * @param[in] country The country of the locale
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_alpha_idx_add_labels(i18n_alpha_idx_h index, const char *language,
- const char *country);
+ const char *country);
/**
* @brief Adds the record to the alphabetic index.
* @details Each record will be associated with an index Bucket
- * based on the record's name. The list of records for
- * each bucket will be sorted based on the collation ordering
- * of the names in the index's locale. Records with duplicate
- * names are permitted; they will be kept in the order that
- * they were added.
+ * based on the record's name. The list of records for
+ * each bucket will be sorted based on the collation ordering
+ * of the names in the index's locale. Records with duplicate
+ * names are permitted; they will be kept in the order that
+ * they were added.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index Record will be added to this alphabetic index
- * @param[in] name The display name for the record.
- * The Record will be placed in a bucket based on this name.
- * @param[in] data An optional pointer to user data associated with this item
+ * @param[in] index Record will be added to this alphabetic index
+ * @param[in] name The display name for the record.
+ * The Record will be placed in a bucket based on this name.
+ * @param[in] data An optional pointer to user data associated with this item
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_alpha_idx_add_record(i18n_alpha_idx_h index, const char *name,
- const void *data);
+ const void *data);
/**
* @brief Sets the next bucket as current bucket in the index.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets
+ * @param[in] index The alphabetic index, which contains buckets
* @param[out] available A flag set to @c true if the next bucket was available,
- * or @c false if there were no more buckets.
+ * or @c false if there were no more buckets.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the next record as current record in current bucket of the index.
* @details When i18n_alpha_idx_get_next_bucket() is called, record iteration is reset
- * to just before the first record in the new bucket.
+ * to just before the first record in the new bucket.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
* @param[out] available A flag set to @c true if the next record was available,
- * or @c false if there were no more records.
+ * or @c false if there were no more records.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the number of <name, data> records in the current bucket.
* @details If the current bucket iteration position is before the first
- * label or after the last, return 0.
+ * label or after the last, return 0.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
* @param[out] records_count Number of <name, data> records in the current bucket
*
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Gets the name of the label of the current bucket in alphabetic index.
* @details If the iteration is before the first Bucket
- * (i18n_alpha_idx_get_next_bucket() has not been called),
- * or after the last, return an empty string.
+ * (i18n_alpha_idx_get_next_bucket() has not been called),
+ * or after the last, return an empty string.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained @a label should be released by the caller with the free() function.
*
- * @param[in] index The alphabetic index, which contains buckets
+ * @param[in] index The alphabetic index, which contains buckets
* @param[out] label The name of the label of the current bucket
*
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Gets the data pointer of the current record in a current bucket in alphabetic index.
* @details Returns NULL if:
- * - the current iteration position is before the first item in this Bucket,
- * or after the last,
- * - the given @a index parameter is invalid.
+ * - the current iteration position is before the first item in this Bucket,
+ * or after the last,
+ * - the given @a index parameter is invalid.
* @since_tizen 2.3.2 and 3.0
* @remarks The specific error code can be obtained using the get_last_result() method.
- * Error codes are described in Exceptions section.
+ * Error codes are described in Exceptions section.
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
*
* @return The data pointer of the current record in a current bucket
* @exception #I18N_ERROR_NONE Successful
/**
* @brief Gets the default label used for abbreviated buckets between other index characters.
* @details For example, consider the labels when Latin and Greek are used:
- * X Y Z ... &\#x0391; &\#x0392; &\#x0393;
+ * X Y Z ... &\#x0391; &\#x0392; &\#x0393;
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained @a label should be released by the caller with the free() function.
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
* @param[out] label The default label used for abbreviated bucket between other index characters
*
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the default label used for abbreviated buckets between other index characters.
* @details An inflow label will be automatically inserted if two otherwise-adjacent label characters
- * are from different scripts, e.g. Latin and Cyrillic, and a third script,
- * e.g. Greek, sorts between the two. The default inflow character is an ellipsis (...)
+ * are from different scripts, e.g. Latin and Cyrillic, and a third script,
+ * e.g. Greek, sorts between the two. The default inflow character is an ellipsis (...)
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
- * @param[in] label The new inflow label
+ * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] label The new inflow label
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the special label used for items that sort after the last normal label,
- * and that would not otherwise have an appropriate label.
+ * and that would not otherwise have an appropriate label.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained @a label should be released by the caller with the free() function.
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
* @param[out] label The overflow label
*
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the special label used for items that sort after the last normal label,
- * and that would not otherwise have an appropriate label.
+ * and that would not otherwise have an appropriate label.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
- * @param[in] label The new overflow label
+ * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] label The new overflow label
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the special label used for items that sort before the first normal label,
- * and that would not otherwise have an appropriate label.
+ * and that would not otherwise have an appropriate label.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained @a label should be released by the caller with the free() function.
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
* @param[out] label The underflow label
*
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the special label used for items that sort before the first normal label,
- * and that would not otherwise have an appropriate label.
+ * and that would not otherwise have an appropriate label.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
- * @param[in] label The new underflow label
+ * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] label The new underflow label
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @details The number does not include over, under and inflow labels.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
- * @param[out] max_label_count The maximum number of labels
+ * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[out] max_label_count The maximum number of labels
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets a limit on the number of labels permitted in the index.
* @details The number does not include over, under and inflow labels.
- * Currently, if the number is exceeded, then every nth item
- * is removed to bring the count down. A more sophisticated
- * mechanism may be available in the future.
+ * Currently, if the number is exceeded, then every nth item
+ * is removed to bring the count down. A more sophisticated
+ * mechanism may be available in the future.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
* @param[in] max_label_count The new maximum number of labels
*
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Remove all records from the index.
* @details The set of Buckets, which define the headings under which records are classified,
- * is not altered.
+ * is not altered.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
* @remarks Note: may trigger lazy index construction.
*
- * @param[in] index The alphabetic index, which contains buckets with records
- * @param[out] bucket_count The number of labels in this index, including any under,
- * over or inflow labels
+ * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[out] bucket_count The number of labels in this index, including any under,
+ * over or inflow labels
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the total number of records in this index, that is, the number of
- * <name, data> pairs added.
+ * <name, data> pairs added.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
* @param[out] record_count The number of records in this index, that is,
- * the total number of (name, data) items added with
- * i18n_alpha_idx_add_record()
+ * the total number of (name, data) items added with
+ * i18n_alpha_idx_add_record()
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Given the name of a record, returns the zero-based index of the bucket
- * in which the item should appear.
+ * in which the item should appear.
* @details The name need not be in the index.
- * A Record will not be added to the index by this function.
- * Bucket numbers are zero-based, in Bucket iteration order.
+ * A Record will not be added to the index by this function.
+ * Bucket numbers are zero-based, in Bucket iteration order.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
- * @param[in] item_name The name whose bucket position in the index is to be determined
- * @param[out] bucket_index The bucket number for this name
+ * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] item_name The name whose bucket position in the index is to be determined
+ * @param[out] bucket_index The bucket number for this name
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the zero based index of the current bucket of this index.
* @details Sets the variable pointed by the @a bucket_index to -1 if no iteration
- * is in process.
+ * is in process.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
- * @param[out] bucket_index The index of the current Bucket
+ * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[out] bucket_index The index of the current Bucket
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the type of the label for the current Bucket
- * (selected by the iteration over Buckets).
+ * (selected by the iteration over Buckets).
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
- * @param[out] type The alphabetic index label type
+ * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[out] type The alphabetic index label type
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_alpha_idx_get_bucket_label_type(i18n_alpha_idx_h index,
- i18n_alpha_idx_label_type_e *type);
+ i18n_alpha_idx_label_type_e *type);
/**
* @brief Gets the name of the current record.
* @details If the Record iteration position is before the first or after the last record,
- * sets the string pointed by the @a record_name parameter to NULL and returns
- * the #I18N_ERROR_INDEX_OUTOFBOUNDS error code.
+ * sets the string pointed by the @a record_name parameter to NULL and returns
+ * the #I18N_ERROR_INDEX_OUTOFBOUNDS error code.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained @a record_name should be released by the caller with the free() function.
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
* @param[out] record_name The name of the current index item
*
* @return @c 0 on success, otherwise a negative error value
* @details The next call to i18n_alpha_idx_get_next_bucket() will restart the iteration at the first label.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @details The next call to i18n_alpha_idx_get_next_record() will restart the iteration at the first label.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] index The alphabetic index, which contains buckets with records
+ * @param[in] index The alphabetic index, which contains buckets with records
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#ifndef __UTILS_I18N_FIELD_POSITION_H__
* @ingroup CAPI_BASE_UTILS_I18N_MODULE
* @defgroup CAPI_BASE_UTILS_I18N_FIELD_POSITION_MODULE FieldPosition
* @brief Field Position is a simple type used by the Format module and its submodules
- * to identify fields in formatted output.
+ * to identify fields in formatted output.
* @section CAPI_BASE_UTILS_I18N_FIELD_POSITION_MODULE_HEADER Required Header
- * \#include <utils_i18n.h>
+ * \#include <utils_i18n.h>
*
* @section CAPI_BASE_UTILS_I18N_FIELD_POSITION_MODULE_OVERVIEW Overview
* @details Fields are identified by constants defined in *_format_field_e enumerations.
* @brief Creates a field position object with a non-specified field.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * i18n_field_position_destroy() function.
+ * i18n_field_position_destroy() function.
*
* @param[out] field_position The created field position object
*
/**
* @brief Creates a field position object for the given field.
* @details The only fields currently supported are the fields accepted by the date formatter,
- * see #i18n_udate_format_field_e.
+ * see #i18n_udate_format_field_e.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * i18n_field_position_destroy() function.
+ * i18n_field_position_destroy() function.
*
- * @param[in] field The field value
+ * @param[in] field The field value
* @param[out] field_position The created field position object
*
* @return @c 0 on success, otherwise a negative error value
* @brief Creates a clone of the given @a field_position object.
* @since_tizen 2.3.2 and 3.0
* @remarks The @a clone object should be released by the caller with the
- * i18n_field_position_destroy() function.
+ * i18n_field_position_destroy() function.
*
* @param[in] field_position The field position object to be cloned
- * @param[out] clone The created field position object
+ * @param[out] clone The created field position object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
*
* @param[in] field_position The field_position object
- * @param[out] field The field identifier
+ * @param[out] field The field identifier
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
*
* @param[in] field_position The field position object
- * @param[out] begin_index The index of the first character in the requested field
+ * @param[out] begin_index The index of the first character in the requested field
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
*
* @param[in] field_position The field position object
- * @param[out] end_index The index of the character following the last character
- * in the requested field
+ * @param[out] end_index The index of the character following the last character
+ * in the requested field
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
*
* @param[in] field_position The field_position object
- * @param[in] field The new value of the field
+ * @param[in] field The new value of the field
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
*
* @param[in] field_position The field_position object
- * @param[in] begin_index The new value of the begin index
+ * @param[in] begin_index The new value of the begin index
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
*
* @param[in] field_position The field_position object
- * @param[in] end_index The new value of the end index
+ * @param[in] end_index The new value of the end index
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#ifndef __UTILS_I18N_FORMAT_H__
* @brief Creates a polymorphic clone of the given @a format object.
* @since_tizen 2.3.2 and 3.0
* @remarks The cloned object should be released by the caller with the
- * i18n_format_destroy() function.
+ * i18n_format_destroy() function.
*
* @param[in] format The format object to be cloned
* @param[out] clone The clone of the given @a format object
* @brief Formats an object to produce a string.
* @since_tizen 2.3.2 and 3.0
* @remarks The @a append_to parameter should be released by the caller with the
- * free() function.
+ * free() function.
*
- * @param[in] format The format object
- * @param[in] formattable The object to format
- * @param[out] append_to An input/output parameter to receive the result.
- * The result is appended to the existing contents.
+ * @param[in] format The format object
+ * @param[in] formattable The object to format
+ * @param[out] append_to An input/output parameter to receive the result.
+ * The result is appended to the existing contents.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Formats an object to produce a string.
* @since_tizen 2.3.2 and 3.0
* @remarks The @a append_to parameter should be released by the caller with the
- * free() function.
+ * free() function.
*
- * @param[in] format The format object
- * @param[in] formattable The object to format
- * @param[out] append_to Input/output parameter to receive the result.
- * The result is appended to the existing contents.
- * @param[out] field_position On input: an alignment field, if desired.
- * On output: the offsets of the alignment field.
+ * @param[in] format The format object
+ * @param[in] formattable The object to format
+ * @param[out] append_to Input/output parameter to receive the result.
+ * The result is appended to the existing contents.
+ * @param[out] field_position On input: an alignment field, if desired.
+ * On output: the offsets of the alignment field.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Parses a string to produce an object.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained @a result formattable object should be released by the caller with the
- * i18n_formattable_destroy() function.
+ * i18n_formattable_destroy() function.
*
* @param[in] format The format object
* @param[in] source The string to be parsed into an object
* @param[out] result The formattable object to be set to the parse result.
- * If parse fails, return contents are undefined.
+ * If parse fails, return contents are undefined.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Parses a string to produce an object.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained @a result formattable object should be released by the caller with the
- * i18n_formattable_destroy() function.
+ * i18n_formattable_destroy() function.
*
- * @param[in] format The format object
- * @param[in] source The string to be parsed into an object
- * @param[out] parse_position The position to start parsing at. Upon return this parameter is set
- * to the position after the last character successfully parsed. If the source
- * is not parsed successfully, this parameter will remain unchanged.
- * @param[out] result The formattable object to be set to the parse result.
- * If parse fails, return contents are undefined.
+ * @param[in] format The format object
+ * @param[in] source The string to be parsed into an object
+ * @param[out] parse_position The position to start parsing at. Upon return this parameter is set
+ * to the position after the last character successfully parsed. If the source
+ * is not parsed successfully, this parameter will remain unchanged.
+ * @param[out] result The formattable object to be set to the parse result.
+ * If parse fails, return contents are undefined.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
* @remarks Both @a language and @a country should be released by the caller with the free() function.
*
- * @param[in] format The format object
- * @param[in] type The type of the locale we're looking for (valid or actual)
- * @param[out] language The obtained locale's ISO-639 language code
- * @param[out] country The obtained locale's ISO-3166 country code
+ * @param[in] format The format object
+ * @param[in] type The type of the locale we're looking for (valid or actual)
+ * @param[out] language The obtained locale's ISO-639 language code
+ * @param[out] country The obtained locale's ISO-3166 country code
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory
*/
int i18n_format_get_locale(i18n_format_h format,
- i18n_ulocale_data_locale_type_e type, char **language, char **country);
+ i18n_ulocale_data_locale_type_e type, char **language, char **country);
/**
* @}
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#ifndef UTILS_I18N_FORMATTABLE_H_
* @ingroup CAPI_BASE_UTILS_I18N_MODULE
* @defgroup CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE Formattable
* @brief Formattable interconverts between the primitive numeric types
- * (double, long, etc.) as well as #i18n_udate and char string.
+ * (double, long, etc.) as well as #i18n_udate and char string.
*
* @section CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE_HEADER Required Header
* \#include <utils_i18n.h>
*
* @section CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE_OVERVIEW Overview
* @details Internally, an #i18n_formattable_h handle holds an object
- * that is a union of primitive types.
- * As such, it can only store one flavor of data at a time.
- * To determine what flavor of data it contains, use the
- * #i18n_formattable_get_type function.
+ * that is a union of primitive types.
+ * As such, it can only store one flavor of data at a time.
+ * To determine what flavor of data it contains, use the
+ * #i18n_formattable_get_type function.
*/
/**
* @brief Creates a new default #i18n_formattable_h.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_formattable_destroy() function.
+ * #i18n_formattable_destroy() function.
*
- * @param[out] formattable A pointer to a handle to the newly created formattable
- * object
+ * @param[out] formattable A pointer to a handle to the newly created formattable
+ * object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Creates a new #i18n_formattable_h handle with an #i18n_udate instance.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_formattable_destroy() function.
+ * #i18n_formattable_destroy() function.
*
- * @param[in] date The #i18n_udate instance
- * @param[out] formattable A pointer to a handle to the newly created formattable
- * object
+ * @param[in] date The #i18n_udate instance
+ * @param[out] formattable A pointer to a handle to the newly created formattable
+ * object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Creates a new #i18n_formattable_h handle with a double value.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_formattable_destroy() function.
+ * #i18n_formattable_destroy() function.
*
- * @param[in] value The double value to be used
- * @param[out] formattable A pointer to a handle to the newly created formattable
- * object
+ * @param[in] value The double value to be used
+ * @param[out] formattable A pointer to a handle to the newly created formattable
+ * object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Creates a new #i18n_formattable_h handle with a long value.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_formattable_destroy() function.
+ * #i18n_formattable_destroy() function.
*
- * @param[in] value The long value to be used
- * @param[out] formattable A pointer to a handle to the newly created formattable
- * object
+ * @param[in] value The long value to be used
+ * @param[out] formattable A pointer to a handle to the newly created formattable
+ * object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Creates a new #i18n_formattable_h handle with an int64_t value.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_formattable_destroy() function.
+ * #i18n_formattable_destroy() function.
*
- * @param[in] value The int64_t value to be used
- * @param[out] formattable A pointer to a handle to the newly created formattable
- * object
+ * @param[in] value The int64_t value to be used
+ * @param[out] formattable A pointer to a handle to the newly created formattable
+ * object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @details Assumes that the char string is null terminated.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_formattable_destroy() function.
+ * #i18n_formattable_destroy() function.
*
- * @param[in] str_to_copy The char string
- * @param[out] formattable A pointer to a handle to the newly created formattable
- * object
+ * @param[in] str_to_copy The char string
+ * @param[out] formattable A pointer to a handle to the newly created formattable
+ * object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Creates a new #i18n_formattable_h handle with an array of
- * #i18n_formattable_h handles.
+ * #i18n_formattable_h handles.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_formattable_destroy() function.
+ * #i18n_formattable_destroy() function.
*
- * @param[in] array_to_copy An array with the #i18n_formattable_h handles
- * @param[in] count The number of the elements in the array
- * @param[out] formattable A pointer to a handle to the newly created
- * formattable object
+ * @param[in] array_to_copy An array with the #i18n_formattable_h handles
+ * @param[in] count The number of the elements in the array
+ * @param[out] formattable A pointer to a handle to the newly created
+ * formattable object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Clones the given formattable handle with the related object to the
- * @a clone handle.
+ * @a clone handle.
* @since_tizen 2.3.2 and 3.0
* @details Clones can be used concurrently in multiple threads.
* @remarks The cloned object should be released by the caller with the
- * #i18n_formattable_destroy() function.
+ * #i18n_formattable_destroy() function.
*
* @param[in] formattable A handle to the formattable object
- * @param[out] clone A pointer to a handle to the formattable object which
- * will be filled with a copy of the @a formattable handle.
+ * @param[out] clone A pointer to a handle to the formattable object which
+ * will be filled with a copy of the @a formattable handle.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the array value and count of the given formattable object.
* @since_tizen 2.3.2 and 3.0
* @remarks If this object is not of type #I18N_FORMATTABLE_TYPE_ARRAY then the
- * result is undefined. The obtained array should be released by the
- * caller with the free() function.
+ * result is undefined. The obtained array should be released by the
+ * caller with the free() function.
*
- * @param[in] formattable A handle to the formattable object
- * @param[out] array A pointer to an array of #i18n_formattable_h handles
- * @param[out] count A pointer to an int32_t variable which will be filled
- * with the number of array's elements
+ * @param[in] formattable A handle to the formattable object
+ * @param[out] array A pointer to an array of #i18n_formattable_h handles
+ * @param[out] count A pointer to an int32_t variable which will be filled
+ * with the number of array's elements
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the date value of the given formattable object.
* @since_tizen 2.3.2 and 3.0
* @remarks If this object is not of type #I18N_FORMATTABLE_TYPE_DATE then the
- * result is undefined.
+ * result is undefined.
*
* @param[in] formattable A handle to the formattable object
- * @param[out] date A pointer to an i18n_udate object which will be filled
- * with the date obtained from the given formattable object
+ * @param[out] date A pointer to an i18n_udate object which will be filled
+ * with the date obtained from the given formattable object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the double value of the given formattable object.
* @since_tizen 2.3.2 and 3.0
* @remarks If this object is not of type #I18N_FORMATTABLE_TYPE_DOUBLE then the
- * result is undefined.
+ * result is undefined.
*
* @param[in] formattable A handle to the formattable object
- * @param[out] value A pointer to a double variable which will be filled
- * with the value obtained from the given formattable object
+ * @param[out] value A pointer to a double variable which will be filled
+ * with the value obtained from the given formattable object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the int64 value of the given formattable object.
* @since_tizen 2.3.2 and 3.0
* @remarks If this object is not of type #I18N_FORMATTABLE_TYPE_INT64 then the
- * result is undefined.
+ * result is undefined.
*
* @param[in] formattable A handle to the formattable object
- * @param[out] value A pointer to an int64_t variable which will be filled
- * with the value obtained from the given formattable object
+ * @param[out] value A pointer to an int64_t variable which will be filled
+ * with the value obtained from the given formattable object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the long value of the given formattable object.
* @details If the magnitude is too large to fit in a long, then the maximum or
- * minimum long value, as appropriate, is set to @a value
- * and the #I18N_ERROR_INVALID_FORMAT error code is returned by the
- * function.
+ * minimum long value, as appropriate, is set to @a value
+ * and the #I18N_ERROR_INVALID_FORMAT error code is returned by the
+ * function.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] formattable A handle to the formattable object
- * @param[out] value A pointer to a int32_t variable which will be filled
- * with the value obtained from the given formattable object
+ * @param[in] formattable A handle to the formattable object
+ * @param[out] value A pointer to a int32_t variable which will be filled
+ * with the value obtained from the given formattable object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the string value of the given formattable object.
* @since_tizen 2.3.2 and 3.0
* @remarks If the type is not a string, the function returns the
- * #I18N_ERROR_INVALID_FORMAT error code and the value is set to @c
- * NULL. The @a value should be released by the caller with the free() function.
+ * #I18N_ERROR_INVALID_FORMAT error code and the value is set to @c
+ * NULL. The @a value should be released by the caller with the free() function.
*
* @param[in] formattable A handle to the formattable object
- * @param[out] value A pointer to a char string variable which will be
- * filled with the value obtained from the given formattable object
+ * @param[out] value A pointer to a char string variable which will be
+ * filled with the value obtained from the given formattable object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
*
* @param[in] formattable A handle to the formattable object
- * @param[out] type A pointer to an #i18n_formattable_type_e variable which
- * will be filled with the type obtained from the given formattable
- * object
+ * @param[out] type A pointer to an #i18n_formattable_type_e variable which
+ * will be filled with the type obtained from the given formattable
+ * object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the variable pointed by the @a is_numeric pointer to @c true if
- * the data type of the given formattable object is #I18N_FORMATTABLE_TYPE_DOUBLE,
- * #I18N_FORMATTABLE_TYPE_LONG or #I18N_FORMATTABLE_TYPE_INT64.
+ * the data type of the given formattable object is #I18N_FORMATTABLE_TYPE_DOUBLE,
+ * #I18N_FORMATTABLE_TYPE_LONG or #I18N_FORMATTABLE_TYPE_INT64.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] formattable A handle to the formattable object
* @param[out] is_numeric A pointer to a boolean variable which will be filled by
- * the function
+ * the function
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the variable pointed by the @a not_equal pointer to @c true if
- * the given @a formattable object is not equal to the given @a other
- * formattable object.
+ * the given @a formattable object is not equal to the given @a other
+ * formattable object.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] formattable A handle to the formattable object
- * @param[in] other A handle to the other formattable object
+ * @param[in] other A handle to the other formattable object
* @param[out] not_equal A pointer to a boolean variable which will be filled by
- * the function
+ * the function
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the variable pointed by the @a equal pointer to @c true if the
- * given @a formattable object is equal to the given @a other
- * formattable object.
+ * given @a formattable object is equal to the given @a other
+ * formattable object.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] formattable A handle to the formattable object
- * @param[in] other A handle to the other formattable object
- * @param[out] equal A pointer to a boolean variable which will be filled by
- * the function
+ * @param[in] other A handle to the other formattable object
+ * @param[out] equal A pointer to a boolean variable which will be filled by
+ * the function
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the object pointed by the @a element pointer to the element at
- * the @a index position in the array stored by the given formattable
- * object (if its type is #I18N_FORMATTABLE_TYPE_ARRAY).
+ * the @a index position in the array stored by the given formattable
+ * object (if its type is #I18N_FORMATTABLE_TYPE_ARRAY).
* @since_tizen 2.3.2 and 3.0
* @remarks If this object is not of type #I18N_FORMATTABLE_TYPE_ARRAY then the
- * result is undefined.
+ * result is undefined.
*
- * The obtained formattable element should not be released by the caller
- * as it belongs to the given formattable object of type #I18N_FORMATTABLE_TYPE_ARRAY.
+ * The obtained formattable element should not be released by the caller
+ * as it belongs to the given formattable object of type #I18N_FORMATTABLE_TYPE_ARRAY.
*
* @param[in] formattable A handle to the formattable object
- * @param[in] index A number representing the position in the array from
- * which the element should be obtained
- * @param[out] element A pointer to a handle to the formattable object which
- * will be filled by the function
+ * @param[in] index A number representing the position in the array from
+ * which the element should be obtained
+ * @param[out] element A pointer to a handle to the formattable object which
+ * will be filled by the function
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the array value and count of the given formattable object and
- * changes the type to #I18N_FORMATTABLE_TYPE_ARRAY.
+ * changes the type to #I18N_FORMATTABLE_TYPE_ARRAY.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] formattable A handle to the formattable object
- * @param[in] array An array of handles to the formattable objects
- * @param[in] count The number of array elements to be copied
+ * @param[in] array An array of handles to the formattable objects
+ * @param[in] count The number of array elements to be copied
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the date value of the given formattable object and changes the
- * type to the #I18N_FORMATTABLE_TYPE_DATE.
+ * type to the #I18N_FORMATTABLE_TYPE_DATE.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] formattable A handle to the formattable object
- * @param[in] date The new i18n_udate value to be set
+ * @param[in] date The new i18n_udate value to be set
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the double value of the given formattable object and changes
- * the type to the #I18N_FORMATTABLE_TYPE_DOUBLE.
+ * the type to the #I18N_FORMATTABLE_TYPE_DOUBLE.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] formattable A handle to the formattable object
- * @param[in] value The new double value to be set
+ * @param[in] value The new double value to be set
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the int64 value of the given formattable object and changes the
- * type to the #I18N_FORMATTABLE_TYPE_INT64.
+ * type to the #I18N_FORMATTABLE_TYPE_INT64.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] formattable A handle to the formattable object
- * @param[in] value The new int64_t value to be set
+ * @param[in] value The new int64_t value to be set
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the long value of the given formattable object and changes the
- * type to the #I18N_FORMATTABLE_TYPE_LONG.
+ * type to the #I18N_FORMATTABLE_TYPE_LONG.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] formattable A handle to the formattable object
- * @param[in] value The new int32_t value to be set
+ * @param[in] value The new int32_t value to be set
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the string value of the given formattable object and changes
- * the type to the #I18N_FORMATTABLE_TYPE_STRING.
+ * the type to the #I18N_FORMATTABLE_TYPE_STRING.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] formattable A handle to the formattable object
+ * @param[in] formattable A handle to the formattable object
* @param[in] string_to_copy The new string value to be set
*
* @return @c 0 on success, otherwise a negative error value
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#ifndef __UTILS_I18N_MEASURE_H__
* @defgroup CAPI_BASE_UTILS_I18N_MEASURE_MODULE Measure
* @brief Measure object contains an amount of a specified unit, consisting of a number and an unit.
* @section CAPI_BASE_UTILS_I18N_MEASURE_MODULE_HEADER Required Header
- * \#include <utils_i18n.h>
+ * \#include <utils_i18n.h>
*
* @section CAPI_BASE_UTILS_I18N_MEASURE_MODULE_OVERVIEW Overview
* @details
* @details After this call, the caller must not delete the given measure unit object.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_measure_destroy() function.
+ * #i18n_measure_destroy() function.
*
- * @param[in] formattable A numeric object; The #i18n_formattable_is_numeric()
- * function must return @c true for this object.
- * @param[in] measure_unit The unit object, which must not be @c NULL
- * @param[out] measure The created measure object
+ * @param[in] formattable A numeric object; The #i18n_formattable_is_numeric()
+ * function must return @c true for this object.
+ * @param[in] measure_unit The unit object, which must not be @c NULL
+ * @param[out] measure The created measure object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Creates a polymorphic clone of the given @a clone object.
* @since_tizen 2.3.2 and 3.0
* @remarks The @c clone object should be released by the caller with the
- * #i18n_measure_destroy() function.
+ * #i18n_measure_destroy() function.
*
- * @param[in] measure The measure object to be cloned
- * @param[out] clone The created measure object
+ * @param[in] measure The measure object to be cloned
+ * @param[out] clone The created measure object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets a reference to the numeric value of the measure object.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained formattable object should be released by the caller
- * with the #i18n_formattable_destroy() function.
+ * with the #i18n_formattable_destroy() function.
*
- * @param[in] measure The measure object
- * @param[out] formattable The numeric value of the measure object
+ * @param[in] measure The measure object
+ * @param[out] formattable The numeric value of the measure object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets a reference to the unit of the measure object.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained measure unit object should be released by the caller
- * with the #i18n_measure_unit_destroy() function.
+ * with the #i18n_measure_unit_destroy() function.
*
- * @param[in] measure The measure object
- * @param[out] measure_unit The unit of the measure object
+ * @param[in] measure The measure object
+ * @param[out] measure_unit The unit of the measure object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#ifndef __UTILS_I18N_MEASURE_FORMAT_H__
* @defgroup CAPI_BASE_UTILS_I18N_MEASURE_FORMAT_MODULE MeasureFormat
* @brief The MeasureFormat is a formatter for Measure objects.
* @section CAPI_BASE_UTILS_I18N_MEASURE_FORMAT_MODULE_HEADER Required Header
- * \#include <utils_i18n.h>
+ * \#include <utils_i18n.h>
*
* @section CAPI_BASE_UTILS_I18N_MEASURE_FORMAT_MODULE_OVERVIEW Overview
* @details
* @brief Creates the measure format object using given locale.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * i18n_measure_format_destroy() function.
+ * i18n_measure_format_destroy() function.
*
- * @param[in] language The language of the locale
- * @param[in] country The country of the locale
- * @param[in] width The format width
+ * @param[in] language The language of the locale
+ * @param[in] country The country of the locale
+ * @param[in] width The format width
* @param[out] measure_format The created measure format object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory
*/
int i18n_measure_format_create(const char *language, const char *country,
- i18n_umeasure_format_width_e width, i18n_measure_format_h *measure_format);
+ i18n_umeasure_format_width_e width, i18n_measure_format_h *measure_format);
/**
* @brief Destroys the measure format object
* @brief Creates a polymorphic clone of the given @a measure_format object.
* @since_tizen 2.3.2 and 3.0
* @remarks The @a clone object should be released by the caller with the
- * i18n_measure_format_destroy() function.
+ * i18n_measure_format_destroy() function.
*
* @param[in] measure_format The measure format object to be cloned
- * @param[out] clone The created measure format object
+ * @param[out] clone The created measure format object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Formats an object to produce a string.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained @a append_to string is actually a concatenation of the given input string and
- * the result of the function (appended to the string). Actually, the @a append_to
- * buffer is being reallocated inside the function which means that the buffer is not
- * at the same place in memory as it was on the input. Please note that the @a append_to
- * buffer should be released by the caller with the free() function.
+ * the result of the function (appended to the string). Actually, the @a append_to
+ * buffer is being reallocated inside the function which means that the buffer is not
+ * at the same place in memory as it was on the input. Please note that the @a append_to
+ * buffer should be released by the caller with the free() function.
*
* @param[in] measure_format The format object
- * @param[in] formattable The object to format
- * @param[out] append_to Input/output parameter to receive the result.
- * The result is appended to the existing contents.
+ * @param[in] formattable The object to format
+ * @param[out] append_to Input/output parameter to receive the result.
+ * The result is appended to the existing contents.
* @param[out] field_position On input: an alignment field, if desired.
- * On output: the offsets of the alignment field.
+ * On output: the offsets of the alignment field.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory
*/
int i18n_measure_format_format(i18n_measure_format_h measure_format, i18n_formattable_h formattable,
- char **append_to, i18n_field_position_h field_position);
+ char **append_to, i18n_field_position_h field_position);
/**
* @brief Parses a string to produce an object.
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained @a result object should be released by the caller
- * with the i18n_formattable_destroy() function.
- *
- * @param[in] measure_format The format object
- * @param[in] source The string to be parsed into an object
- * @param[out] parse_position The position to start parsing at. Upon return
- * this parameter is set to the position after the
- * last character successfully parsed. If the
- * source is not parsed successfully, this parameter
- * will remain unchanged.
- * @param[out] result The formattable object to be set to the parse result.
- * If parse fails, return contents are undefined.
+ * with the i18n_formattable_destroy() function.
+ *
+ * @param[in] measure_format The format object
+ * @param[in] source The string to be parsed into an object
+ * @param[out] parse_position The position to start parsing at. Upon return
+ * this parameter is set to the position after the
+ * last character successfully parsed. If the
+ * source is not parsed successfully, this parameter
+ * will remain unchanged.
+ * @param[out] result The formattable object to be set to the parse result.
+ * If parse fails, return contents are undefined.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets a formatter for currency amount objects in the given locale.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * i18n_measure_format_destroy() function.
+ * i18n_measure_format_destroy() function.
*
- * @param[in] language The language of the locale
- * @param[in] country The country of the locale
+ * @param[in] language The language of the locale
+ * @param[in] country The country of the locale
* @param[out] measure_format The measure format object
*
* @return @c 0 on success, otherwise a negative error value
* @brief Gets a formatter for currency amount objects in the default locale.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * i18n_measure_format_destroy() function.
+ * i18n_measure_format_destroy() function.
*
* @param[out] measure_format The measure format object
*
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#ifndef __UTILS_I18N_MEASURE_UNIT_H__
* @brief Creates the default measure unit object.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_measure_unit_destroy() function.
+ * #i18n_measure_unit_destroy() function.
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Creates a polymorphic clone of the given @a clone object.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * #i18n_measure_unit_destroy() function.
+ * #i18n_measure_unit_destroy() function.
*
- * @param[in] measure_unit The measure unit object to be cloned.
- * @param[out] clone The clone of the given @a measure_unit object
+ * @param[in] measure_unit The measure unit object to be cloned.
+ * @param[out] clone The clone of the given @a measure_unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Destroys the measure unit object
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] measure_unit The measure unit object to destroy
+ * @param[in] measure_unit The measure unit object to destroy
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Destroys the given array of the measure unit objects
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] array The array of measure unit objects to destroy
+ * @param[in] array The array of measure unit objects to destroy
* @param[in] array_size The capacity of the @a dest_array
*
* @return @c 0 on success, otherwise a negative error value
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained type should be released by the caller with the free() function.
*
- * @param[in] measure_unit The measure unit object
- * @param[out] type The measure unit object type
+ * @param[in] measure_unit The measure unit object
+ * @param[out] type The measure unit object type
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained subtype should be released by the caller with the free() function.
*
- * @param[in] measure_unit The measure unit object
- * @param[out] subtype The measure unit object subtype
+ * @param[in] measure_unit The measure unit object
+ * @param[out] subtype The measure unit object subtype
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the available units.
* @details The function creates the array with the results.
- * If there are more units available than the given @a max_count
- * then the returned array is truncated to the first @a max_count units
- * and the returned error code is #I18N_ERROR_BUFFER_OVERFLOW.
+ * If there are more units available than the given @a max_count
+ * then the returned array is truncated to the first @a max_count units
+ * and the returned error code is #I18N_ERROR_BUFFER_OVERFLOW.
*
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained array of measure unit objects should be released by the caller
- * with the #i18n_measure_unit_array_destroy() function.
+ * with the #i18n_measure_unit_array_destroy() function.
*
- * @param[in] max_count The maximal number of units that will be obtained
- * @param[out] out_array The output array
- * @param[out] available The actual number of available units
+ * @param[in] max_count The maximal number of units that will be obtained
+ * @param[out] out_array The output array
+ * @param[out] available The actual number of available units
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the available units for a specific type.
* @details The function creates the array with the results.
- * If there are more units available than the given @a max_count
- * then the returned array is truncated to the first @a max_count units
- * and the returned error code is #I18N_ERROR_BUFFER_OVERFLOW.
+ * If there are more units available than the given @a max_count
+ * then the returned array is truncated to the first @a max_count units
+ * and the returned error code is #I18N_ERROR_BUFFER_OVERFLOW.
*
* @since_tizen 2.3.2 and 3.0
* @remarks The obtained array of measure unit objects should be released by the caller
- * with the #i18n_measure_unit_array_destroy() function.
+ * with the #i18n_measure_unit_array_destroy() function.
*
- * @param[in] max_count The maximal number of units that will be obtained
- * @param[in] type The type of the obtained units
- * @param[out] out_array The output array
- * @param[out] available The actual number of available units
+ * @param[in] max_count The maximal number of units that will be obtained
+ * @param[in] type The type of the obtained units
+ * @param[out] out_array The output array
+ * @param[out] available The actual number of available units
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_BUFFER_OVERFLOW Buffer overflow
*/
int i18n_measure_unit_get_available_with_type(int32_t max_count, const char *type,
- i18n_measure_unit_h **out_array, int32_t *available);
+ i18n_measure_unit_h **out_array, int32_t *available);
/**
* @brief Invokes the given callback function for every available measure unit type.
* @since_tizen 2.3.2 and 3.0
*
- * @param[in] cb The callback function invoked for every available measure unit type
- * @param[in] user_data The user data passed to the callback function
+ * @param[in] cb The callback function invoked for every available measure unit type
+ * @param[in] user_data The user data passed to the callback function
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of acceleration: g-force.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of acceleration: meter-per-second-squared.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of angle: arc-minute.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of angle: arc-second.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of angle: degree.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of angle: radian.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of angle: acre.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of angle: hectare.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit area: square-centimeter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit area: square-foot.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit area: square-inch.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit area: square-kilometer.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit area: square-meter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit area: square-mile.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit area: square-yard.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of consumption: liter-per-kilometer.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of consumption: mile-per-gallon.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: bit.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: byte.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: gigabit.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: gigabyte.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: kilobit.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: kilobyte.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: megabit.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: megabyte.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: terabit.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of digital: terabyte.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: day.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: hour.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: microsecond.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: millisecond.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: minute.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: month.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: nanosecond.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: second.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: week.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of duration: year.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of electric: ampere.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of electric: milliampere.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of electric: ohm.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of electric: volt.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of energy: calorie.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of energy: foodcalorie.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of energy: joule.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of energy: kilocalorie.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of energy: kilojoule.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of energy: kilowatt-hour.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of frequency: gigahertz.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of frequency: hertz.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of frequency: kilohertz.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of frequency: megahertz.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: astronomical-unit.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: centimeter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: decimeter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: fathom.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: foot.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: furlong.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: inch.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: kilometer.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: light-year.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: meter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: micrometer.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: mile.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: millimeter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: nanometer.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: nautical-mile.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: parsec.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: picometer.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: yard.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of length: lux.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: carat.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: gram.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: kilogram.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: metric-ton.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: microgram.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: milligram.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: ounce.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: ounce-troy.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: pound.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: stone.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of mass: ton.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of power: gigawatt.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of power: horsepower.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of power: kilowatt.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of power: megawatt.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of power: milliwatt.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of power: watt.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of pressure: hectopascal.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of pressure: inch-hg.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of pressure: millibar.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of pressure: millimeter-of-mercury.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of pressure: pound-per-square-inch.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of proportion: karat.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of speed: kilometer-per-hour.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of speed: meter-per-second.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of speed: mile-per-hour.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of temperature: celsius.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of temperature: fahrenheit.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of temperature: kelvin.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: acre-foot.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: bushel.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: centiliter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: cubic-centimeter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: cubic-foot.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: cubic-inch.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: cubic-kilometer.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: cubic-meter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: cubic-mile.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: cubic-yard.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: cup.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: deciliter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: fluid-ounce.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: gallon.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: hectoliter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: liter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: megaliter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: milliliter.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: pint.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: quart.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: tablespoon.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets unit of volume: teaspoon.
* @since_tizen 2.3.2 and 3.0
* @remarks The returned @a measure_unit should be freed by the caller
- * with i18n_measure_unit_destroy().
+ * with i18n_measure_unit_destroy().
*
- * @param[out] measure_unit The created measure unit object
+ * @param[out] measure_unit The created measure unit object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#ifndef __UTILS_I18N_PARSE_POSITION_H__
* @ingroup CAPI_BASE_UTILS_I18N_MODULE
* @defgroup CAPI_BASE_UTILS_I18N_PARSE_POSITION_MODULE ParsePosition
* @brief Parse Position is a simple object used by the Format and its subtypes
- * to keep track of the current position during parsing.
+ * to keep track of the current position during parsing.
* @section CAPI_BASE_UTILS_I18N_PARSE_POSITION_MODULE_HEADER Required Header
- * \#include <utils_i18n.h>
+ * \#include <utils_i18n.h>
*
* @section CAPI_BASE_UTILS_I18N_PARSE_POSITION_MODULE_OVERVIEW Overview
* @details The i18n_format_parse_object() function in the Format types requires
* @details The index is set to position 0.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * i18n_parse_position_destroy() function.
+ * i18n_parse_position_destroy() function.
*
* @param[out] parse_position The created parse position object
*
* @brief Creates a parse position object with the given initial index.
* @since_tizen 2.3.2 and 3.0
* @remarks The created object should be released by the caller with the
- * i18n_parse_position_destroy() function.
+ * i18n_parse_position_destroy() function.
*
- * @param[in] new_index The new text offset
+ * @param[in] new_index The new text offset
* @param[out] parse_position The parse position object
*
* @return @c 0 on success, otherwise a negative error value
* @brief Creates a clone of the given @a parse_position object.
* @since_tizen 2.3.2 and 3.0
* @remarks The @a clone object should be released by the caller with the
- * i18n_parse_position_destroy() function.
+ * i18n_parse_position_destroy() function.
*
* @param[in] parse_position The parse position object to be cloned
- * @param[out] clone The created parse position object
+ * @param[out] clone The created parse position object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Retrieves the current parse position.
* @details On input to a parse function, this is the index of the character
- * at which parsing will begin; on output, it is the index of the character
- * following the last character parsed.
+ * at which parsing will begin; on output, it is the index of the character
+ * following the last character parsed.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] parse_position The parse position object
- * @param[out] index The current index
+ * @param[out] index The current index
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 2.3.2 and 3.0
*
* @param[in] parse_position The parse position object
- * @param[in] index The new index
+ * @param[in] index The new index
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the index at which a parse error occurred.
* @details Formatters should set this before returning an error code
- * from their parse_object() function. The default value is -1
- * if this is not set.
+ * from their parse_object() function. The default value is -1
+ * if this is not set.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] parse_position The parse position object
- * @param[in] error_index The error index
+ * @param[in] error_index The error index
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Retrieves the index at which an error occurred, or -1 if the error index
- * has not been set.
+ * has not been set.
* @since_tizen 2.3.2 and 3.0
*
* @param[in] parse_position The parse position object
- * @param[out] error_index The index at which an error occurred
+ * @param[out] error_index The index at which an error occurred
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
} while (0);
#define ERR_MAPPING_REVERSE(BASE_UTILS_ERROR, ICU_ERROR) ICU_ERROR = \
- (UErrorCode)_i18n_error_mapping_reverse((int)BASE_UTILS_ERROR)
+ (UErrorCode)_i18n_error_mapping_reverse((int)BASE_UTILS_ERROR)
#define ERR_MAPPING(ICU_ERROR, BASE_UTILS_ERROR) BASE_UTILS_ERROR = \
- (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR)
+ (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR)
int _i18n_error_mapping(int err);
int _i18n_error_mapping_reverse(int err);
*/
typedef enum {
I18N_ERROR_NONE = TIZEN_ERROR_NONE, /**< No error, no warning */
- I18N_ERROR_MISSING_RESOURCE = TIZEN_ERROR_UTILITY_ICU | 0x01, /**< The requested resource cannot be found */
- I18N_ERROR_INVALID_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x02, /**< Data format is not what is expected */
- I18N_ERROR_FILE_ACCESS = TIZEN_ERROR_UTILITY_ICU | 0x03, /**< The requested file cannot be found */
- I18N_ERROR_INTERNAL_PROGRAM = TIZEN_ERROR_UTILITY_ICU | 0x04, /**< Indicates a bug in the library code */
- I18N_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- I18N_ERROR_INDEX_OUTOFBOUNDS = TIZEN_ERROR_UTILITY_ICU | 0x05, /**< Trying to access the index that is out of bounds */
- I18N_ERROR_INVALID_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x06, /**< Character conversion: Unmappable input sequence. In other APIs: Invalid character */
- I18N_ERROR_BUFFER_OVERFLOW = TIZEN_ERROR_UTILITY_ICU | 0x07, /**< A result would not fit in the supplied buffer */
- I18N_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Requested operation is not supported in the current context */
- I18N_ERROR_COLLATOR_VERSION_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x08, /**< Collator version is not compatible with the base version */
- I18N_ERROR_USELESS_COLLATOR = TIZEN_ERROR_UTILITY_ICU | 0x09, /**< Collator is options only and no base is specified */
- I18N_ERROR_NO_WRITE_PERMISSION = TIZEN_ERROR_UTILITY_ICU | 0x0A, /**< Attempt to modify read-only or constant data */
- I18N_ERROR_RESOURCE_TYPE_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x0B, /**< An operation is requested over a resource that does not support it */
- I18N_ERROR_TOO_MANY_ALIASES = TIZEN_ERROR_UTILITY_ICU | 0x0C, /**< Too many aliases in the path to the requested resource */
- I18N_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */
- I18N_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
-
- I18N_ERROR_MESSAGE_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0D, /**< Unable to parse a message (message format). @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0E, /**< Equivalent to Java ParseException. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_TRUNCATED_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x0F, /**< Character conversion: Incomplete input sequence. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_ILLEGAL_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x10, /**< Character conversion: Illegal input sequence/combination of input units. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_INVALID_TABLE_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x11, /**< Conversion table file found, but corrupted. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_INVALID_TABLE_FILE = TIZEN_ERROR_UTILITY_ICU | 0x12, /**< Conversion table file not found. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x13, /**< ISO-2022 illegal escape sequence. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x14, /**< ISO-2022 unsupported escape sequence. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_NO_SPACE_AVAILABLE = TIZEN_ERROR_UTILITY_ICU | 0x15, /**< No space available for in-buffer expansion for Arabic shaping. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_CE_NOT_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x16, /**< Currently used only while setting variable top, but can be used generally. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_PRIMARY_TOO_LONG = TIZEN_ERROR_UTILITY_ICU | 0x17, /**< User tried to set variable top to a primary that is longer than two bytes. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_STATE_TOO_OLD = TIZEN_ERROR_UTILITY_ICU | 0x18, /**< ICU cannot construct a service from this state, as it is no longer supported. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_ENUM_OUT_OF_SYNC = TIZEN_ERROR_UTILITY_ICU | 0x19, /**< UEnumeration out of sync with underlying collection. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_INVARIANT_CONVERSION = TIZEN_ERROR_UTILITY_ICU | 0x1A, /**< Unable to convert a UChar* string to char* with the invariant converter. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_INVALID_STATE = TIZEN_ERROR_UTILITY_ICU | 0x1B, /**< Requested operation can not be completed with ICU in its current state. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_MALFORMED_SET = TIZEN_ERROR_UTILITY_ICU | 0x1C, /**< A UnicodeSet pattern is invalid. @if MOBILE (Since 2.3.1) @endif*/
- I18N_WARNING_STRING_NOT_TERMINATED = TIZEN_ERROR_UTILITY_ICU | 0x1D, /**< String not terminated with NULL. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_STD3_ASCII_RULES = TIZEN_ERROR_UTILITY_ICU | 0x1E, /**< Argument does not satisfy STD3 rules. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_UNASSIGNED = TIZEN_ERROR_UTILITY_ICU | 0x1F, /**< Unassigned code points are found. @if MOBILE (Since 2.3.1) @endif*/
- I18N_WARNING_SORT_KEY_TOO_SHORT = TIZEN_ERROR_UTILITY_ICU | 0x20, /**< Number of levels requested in getBound is higher than the number of levels in the sort key. @if MOBILE (Since 2.3.1) @endif*/
- I18N_ERROR_UNKNOWN = TIZEN_ERROR_UNKNOWN, /**< Unknown error. @if MOBILE (Since 2.3.1) @endif*/
-} i18n_error_code_e;
+ I18N_ERROR_MISSING_RESOURCE = TIZEN_ERROR_UTILITY_ICU | 0x01, /**< The requested resource cannot be found */
+ I18N_ERROR_INVALID_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x02, /**< Data format is not what is expected */
+ I18N_ERROR_FILE_ACCESS = TIZEN_ERROR_UTILITY_ICU | 0x03, /**< The requested file cannot be found */
+ I18N_ERROR_INTERNAL_PROGRAM = TIZEN_ERROR_UTILITY_ICU | 0x04, /**< Indicates a bug in the library code */
+ I18N_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ I18N_ERROR_INDEX_OUTOFBOUNDS = TIZEN_ERROR_UTILITY_ICU | 0x05, /**< Trying to access the index that is out of bounds */
+ I18N_ERROR_INVALID_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x06, /**< Character conversion: Unmappable input sequence. In other APIs: Invalid character */
+ I18N_ERROR_BUFFER_OVERFLOW = TIZEN_ERROR_UTILITY_ICU | 0x07, /**< A result would not fit in the supplied buffer */
+ I18N_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Requested operation is not supported in the current context */
+ I18N_ERROR_COLLATOR_VERSION_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x08, /**< Collator version is not compatible with the base version */
+ I18N_ERROR_USELESS_COLLATOR = TIZEN_ERROR_UTILITY_ICU | 0x09, /**< Collator is options only and no base is specified */
+ I18N_ERROR_NO_WRITE_PERMISSION = TIZEN_ERROR_UTILITY_ICU | 0x0A, /**< Attempt to modify read-only or constant data */
+ I18N_ERROR_RESOURCE_TYPE_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x0B, /**< An operation is requested over a resource that does not support it */
+ I18N_ERROR_TOO_MANY_ALIASES = TIZEN_ERROR_UTILITY_ICU | 0x0C, /**< Too many aliases in the path to the requested resource */
+ I18N_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */
+ I18N_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+
+ I18N_ERROR_MESSAGE_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0D, /**< Unable to parse a message (message format). @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0E, /**< Equivalent to Java ParseException. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_TRUNCATED_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x0F, /**< Character conversion: Incomplete input sequence. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_ILLEGAL_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x10, /**< Character conversion: Illegal input sequence/combination of input units. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_INVALID_TABLE_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x11, /**< Conversion table file found, but corrupted. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_INVALID_TABLE_FILE = TIZEN_ERROR_UTILITY_ICU | 0x12, /**< Conversion table file not found. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x13, /**< ISO-2022 illegal escape sequence. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x14, /**< ISO-2022 unsupported escape sequence. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_NO_SPACE_AVAILABLE = TIZEN_ERROR_UTILITY_ICU | 0x15, /**< No space available for in-buffer expansion for Arabic shaping. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_CE_NOT_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x16, /**< Currently used only while setting variable top, but can be used generally. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_PRIMARY_TOO_LONG = TIZEN_ERROR_UTILITY_ICU | 0x17, /**< User tried to set variable top to a primary that is longer than two bytes. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_STATE_TOO_OLD = TIZEN_ERROR_UTILITY_ICU | 0x18, /**< ICU cannot construct a service from this state, as it is no longer supported. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_ENUM_OUT_OF_SYNC = TIZEN_ERROR_UTILITY_ICU | 0x19, /**< UEnumeration out of sync with underlying collection. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_INVARIANT_CONVERSION = TIZEN_ERROR_UTILITY_ICU | 0x1A, /**< Unable to convert a UChar* string to char* with the invariant converter. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_INVALID_STATE = TIZEN_ERROR_UTILITY_ICU | 0x1B, /**< Requested operation can not be completed with ICU in its current state. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_MALFORMED_SET = TIZEN_ERROR_UTILITY_ICU | 0x1C, /**< A UnicodeSet pattern is invalid. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_WARNING_STRING_NOT_TERMINATED = TIZEN_ERROR_UTILITY_ICU | 0x1D, /**< String not terminated with NULL. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_STD3_ASCII_RULES = TIZEN_ERROR_UTILITY_ICU | 0x1E, /**< Argument does not satisfy STD3 rules. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_UNASSIGNED = TIZEN_ERROR_UTILITY_ICU | 0x1F, /**< Unassigned code points are found. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_WARNING_SORT_KEY_TOO_SHORT = TIZEN_ERROR_UTILITY_ICU | 0x20, /**< Number of levels requested in getBound is higher than the number of levels in the sort key. @if MOBILE (Since 2.3.1) @endif*/
+ I18N_ERROR_UNKNOWN = TIZEN_ERROR_UNKNOWN, /**< Unknown error. @if MOBILE (Since 2.3.1) @endif*/
+}
+i18n_error_code_e;
/**
* @}
* @since_tizen 3.0
*/
typedef enum {
- I18N_UNUMBER_PAD_BEFORE_PREFIX,
- I18N_UNUMBER_PAD_AFTER_PREFIX,
- I18N_UNUMBER_PAD_BEFORE_SUFFIX,
- I18N_UNUMBER_PAD_AFTER_SUFFIX,
+ I18N_UNUMBER_PAD_BEFORE_PREFIX,
+ I18N_UNUMBER_PAD_AFTER_PREFIX,
+ I18N_UNUMBER_PAD_BEFORE_SUFFIX,
+ I18N_UNUMBER_PAD_AFTER_SUFFIX,
} i18n_unumber_pad_position_e;
/**
* @since_tizen 3.0
*/
typedef enum {
- I18N_UMEASFMT_WIDTH_WIDE = 0, /**< Spell out measure units */
- I18N_UMEASFMT_WIDTH_SHORT = 1, /**< Abbreviate measure units */
- I18N_UMEASFMT_WIDTH_NARROW = 2, /**< Use symbols for measure units when possible */
- I18N_UMEASFMT_WIDTH_NUMERIC = 3, /**< Completely omit measure units when possible
- For example, format '5 hours, 37 minutes' as '5:37' */
- I18N_UMEASFMT_WIDTH_COUNT = 4, /**< Count of values in this enumeration */
+ I18N_UMEASFMT_WIDTH_WIDE = 0, /**< Spell out measure units */
+ I18N_UMEASFMT_WIDTH_SHORT = 1, /**< Abbreviate measure units */
+ I18N_UMEASFMT_WIDTH_NARROW = 2, /**< Use symbols for measure units when possible */
+ I18N_UMEASFMT_WIDTH_NUMERIC = 3, /**< Completely omit measure units when possible
+ For example, format '5 hours, 37 minutes' as '5:37' */
+ I18N_UMEASFMT_WIDTH_COUNT = 4, /**< Count of values in this enumeration */
} i18n_umeasure_format_width_e;
/**
* @since_tizen 3.0
*/
typedef enum {
- I18N_FORMATTABLE_TYPE_DATE = 0, /**< Selector indicating an #i18n_udate value */
- I18N_FORMATTABLE_TYPE_DOUBLE = 1, /**< Selector indicating a double value */
- I18N_FORMATTABLE_TYPE_LONG = 2, /**< Selector indicating a 32-bit integer value */
- I18N_FORMATTABLE_TYPE_STRING = 3, /**< Selector indicating a string value */
- I18N_FORMATTABLE_TYPE_ARRAY = 4, /**< Selector indicating an array of #i18n_formattable_h */
- I18N_FORMATTABLE_TYPE_INT64 = 5, /**< Selector indicating a 64-bit integer value */
- I18N_FORMATTABLE_TYPE_OBJECT = 6, /**< Selector indicating a generic object value.
- In the current version of the API, such objects
- are not supported and cannot be used. This value
- was added for completeness and possible future extensions. */
+ I18N_FORMATTABLE_TYPE_DATE = 0, /**< Selector indicating an #i18n_udate value */
+ I18N_FORMATTABLE_TYPE_DOUBLE = 1, /**< Selector indicating a double value */
+ I18N_FORMATTABLE_TYPE_LONG = 2, /**< Selector indicating a 32-bit integer value */
+ I18N_FORMATTABLE_TYPE_STRING = 3, /**< Selector indicating a string value */
+ I18N_FORMATTABLE_TYPE_ARRAY = 4, /**< Selector indicating an array of #i18n_formattable_h */
+ I18N_FORMATTABLE_TYPE_INT64 = 5, /**< Selector indicating a 64-bit integer value */
+ I18N_FORMATTABLE_TYPE_OBJECT = 6, /**< Selector indicating a generic object value.
+ In the current version of the API, such objects
+ are not supported and cannot be used. This value
+ was added for completeness and possible future extensions. */
} i18n_formattable_type_e;
/**
/**
* @brief Callback function for the i18n_measure_unit_get_available_types()
- * that returns an enumeration over all recognized types.
+ * that returns an enumeration over all recognized types.
* @since_tizen 3.0
*
- * @param[in] type_id The type ID
- * @param[in] user_data The user data passed to the callback function
+ * @param[in] type_id The type ID
+ * @param[in] user_data The user data passed to the callback function
*
* @return @c true to continue with the next iteration of the loop,
- * otherwise @c false to break out of the loop.
+ * otherwise @c false to break out of the loop.
*/
typedef bool (*i18n_measure_unit_types_cb)(const char *type_id, void *user_data);
* @since_tizen 3.0
*/
typedef enum {
- I18N_FIELD_POSITION_DONT_CARE = -1,
+ I18N_FIELD_POSITION_DONT_CARE = -1,
} i18n_field_position_dont_care_e;
/**
* @details Affects: LamAlef options
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LENGTH_GROW_SHRINK 0
+#define I18N_USHAPE_LENGTH_GROW_SHRINK 0
/**
* @brief Memory option: allow the result to have a different length than the source.
* @details Affects: LamAlef options
*
- * This option is an alias to #I18N_USHAPE_LENGTH_GROW_SHRINK.
+ * This option is an alias to #I18N_USHAPE_LENGTH_GROW_SHRINK.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LAMALEF_RESIZE 0
+#define I18N_USHAPE_LAMALEF_RESIZE 0
/**
* @brief Memory option: the result must have the same length as the source.
* @details If more room is necessary, then try to consume spaces next to modified characters.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LENGTH_FIXED_SPACES_NEAR 1
+#define I18N_USHAPE_LENGTH_FIXED_SPACES_NEAR 1
/**
* @brief Memory option: the result must have the same length as the source.
* @details If more room is necessary, then try to consume spaces next to modified characters.
*
- * Affects: LamAlef options
+ * Affects: LamAlef options
*
- * This option is an alias to #I18N_USHAPE_LENGTH_FIXED_SPACES_NEAR.
+ * This option is an alias to #I18N_USHAPE_LENGTH_FIXED_SPACES_NEAR.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LAMALEF_NEAR 1
+#define I18N_USHAPE_LAMALEF_NEAR 1
/**
* @brief Memory option: the result must have the same length as the source.
* @details If more room is necessary, then try to consume spaces at the end of the text.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LENGTH_FIXED_SPACES_AT_END 2
+#define I18N_USHAPE_LENGTH_FIXED_SPACES_AT_END 2
/**
* @brief Memory option: the result must have the same length as the source.
* @details If more room is necessary, then try to consume spaces at the end of the text.
*
- * Affects: LamAlef options
+ * Affects: LamAlef options
*
- * This option is an alias to #I18N_USHAPE_LENGTH_FIXED_SPACES_AT_END.
+ * This option is an alias to #I18N_USHAPE_LENGTH_FIXED_SPACES_AT_END.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LAMALEF_END 2
+#define I18N_USHAPE_LAMALEF_END 2
/**
* @brief Memory option: the result must have the same length as the source.
* @brief Memory option: the result must have the same length as the source.
* @details If more room is necessary, then try to consume spaces at the beginning of the text.
*
- * Affects: LamAlef options
+ * Affects: LamAlef options
*
- * This option is an alias to #i18N_USHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING.
+ * This option is an alias to #i18N_USHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LAMALEF_BEGIN 3
+#define I18N_USHAPE_LAMALEF_BEGIN 3
/**
* @brief Memory option: the result must have the same length as the source.
* @details Shaping Mode: For each LAMALEF character found, expand LAMALEF using space at end.
- * If there is no space at end, use spaces at beginning of the buffer. If there
- * is no space at beginning of the buffer, use spaces at the near (i.e. the space
- * after the LAMALEF character).
- * If there are no spaces found, an #I18N_ERROR_NO_SPACE_AVAILABLE error will be
- * returned by the i18n_ushape_shape_arabic() function.
+ * If there is no space at end, use spaces at beginning of the buffer. If there
+ * is no space at beginning of the buffer, use spaces at the near (i.e. the space
+ * after the LAMALEF character).
+ * If there are no spaces found, an #I18N_ERROR_NO_SPACE_AVAILABLE error will be
+ * returned by the i18n_ushape_shape_arabic() function.
*
- * Deshaping Mode: Perform the same function as the flag equals #I18N_USHAPE_LAMALEF_END.
+ * Deshaping Mode: Perform the same function as the flag equals #I18N_USHAPE_LAMALEF_END.
*
- * Affects: LamAlef options
+ * Affects: LamAlef options
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LAMALEF_AUTO 0x10000
+#define I18N_USHAPE_LAMALEF_AUTO 0x10000
/**
* @brief Bit mask for memory options.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LENGTH_MASK 0x10003
+#define I18N_USHAPE_LENGTH_MASK 0x10003
/**
* @brief Bit mask for LamAlef memory options.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LAMALEF_MASK 0x10003
+#define I18N_USHAPE_LAMALEF_MASK 0x10003
/**
* @brief Direction indicator: the source is in logical (keyboard) order.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TEXT_DIRECTION_LOGICAL 0
+#define I18N_USHAPE_TEXT_DIRECTION_LOGICAL 0
/**
* @brief Direction indicator: the source is in visual RTL order,
- * the rightmost displayed character stored first.
+ * the rightmost displayed character stored first.
*
- * This option is an alias to #I18N_USHAPE_TEXT_DIRECTION_LOGICAL.
+ * This option is an alias to #I18N_USHAPE_TEXT_DIRECTION_LOGICAL.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TEXT_DIRECTION_VISUAL_RTL 0
+#define I18N_USHAPE_TEXT_DIRECTION_VISUAL_RTL 0
/**
* @brief Direction indicator: the source is in visual LTR order,
- * the leftmost displayed character stored first.
+ * the leftmost displayed character stored first.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TEXT_DIRECTION_VISUAL_LTR 4
+#define I18N_USHAPE_TEXT_DIRECTION_VISUAL_LTR 4
/**
* @brief Bit mask for direction indicators.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TEXT_DIRECTION_MASK 4
+#define I18N_USHAPE_TEXT_DIRECTION_MASK 4
/**
* @brief Letter shaping option: do not perform letter shaping.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LETTERS_NOOP 0
+#define I18N_USHAPE_LETTERS_NOOP 0
/**
* @brief Letter shaping option: replace abstract letter characters by "shaped" ones.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LETTERS_SHAPE 8
+#define I18N_USHAPE_LETTERS_SHAPE 8
/**
* @brief Letter shaping option: replace "shaped" letter characters by abstract ones.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LETTERS_UNSHAPE 0x10
+#define I18N_USHAPE_LETTERS_UNSHAPE 0x10
/**
* @brief Letter shaping option: replace abstract letter characters by "shaped" ones.
* @details The only difference with #I18N_USHAPE_LETTERS_SHAPE is that Tashkeel letters
- * are always "shaped" into the isolated form instead of the medial form
- * (selecting code points from the Arabic Presentation Forms-B block).
+ * are always "shaped" into the isolated form instead of the medial form
+ * (selecting code points from the Arabic Presentation Forms-B block).
* @since_tizen 3.0
*/
#define I18N_USHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED 0x18
* @brief Bit mask for letter shaping options.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_LETTERS_MASK 0x18
+#define I18N_USHAPE_LETTERS_MASK 0x18
/**
* @brief Digit shaping option: do not perform digit shaping.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGITS_NOOP 0
+#define I18N_USHAPE_DIGITS_NOOP 0
/**
* @brief Digit shaping option: replace European digits (U+0030...) by Arabic-Indic digits.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGITS_EN2AN 0x20
+#define I18N_USHAPE_DIGITS_EN2AN 0x20
/**
* @brief Digit shaping option: replace Arabic-Indic digits by European digits (U+0030...).
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGITS_AN2EN 0x40
+#define I18N_USHAPE_DIGITS_AN2EN 0x40
/**
* @brief Digit shaping option: replace European digits (U+0030...) by Arabic-Indic digits
- * if the most recent strongly directional character is an Arabic letter.
+ * if the most recent strongly directional character is an Arabic letter.
*
* @details The direction of "preceding" depends on the direction indicator option.
- * For the first characters, the preceding strongly directional character
- * (initial state) is assumed to be not an Arabic letter
- * (it is #I18N_UCHAR_U_LEFT_TO_RIGHT [L] or #I18N_UCHAR_U_RIGHT_TO_LEFT [R]).
+ * For the first characters, the preceding strongly directional character
+ * (initial state) is assumed to be not an Arabic letter
+ * (it is #I18N_UCHAR_U_LEFT_TO_RIGHT [L] or #I18N_UCHAR_U_RIGHT_TO_LEFT [R]).
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGITS_ALEN2AN_INIT_LR 0x60
+#define I18N_USHAPE_DIGITS_ALEN2AN_INIT_LR 0x60
/**
* @brief Digit shaping option: replace European digits (U+0030...) by Arabic-Indic digits
- * if the most recent strongly directional character is an Arabic letter.
+ * if the most recent strongly directional character is an Arabic letter.
*
* @details The direction of "preceding" depends on the direction indicator option.
- * For the first characters, the preceding strongly directional character
- * (initial state) is assumed to be an Arabic letter.
+ * For the first characters, the preceding strongly directional character
+ * (initial state) is assumed to be an Arabic letter.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGITS_ALEN2AN_INIT_AL 0x80
+#define I18N_USHAPE_DIGITS_ALEN2AN_INIT_AL 0x80
/**
* @brief Not a valid option value. May be replaced by a new option.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGITS_RESERVED 0xa0
+#define I18N_USHAPE_DIGITS_RESERVED 0xa0
/**
* @brief Bit mask for digit shaping options.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGITS_MASK 0xe0
+#define I18N_USHAPE_DIGITS_MASK 0xe0
/**
* @brief Digit type option: Use Arabic-Indic digits (U+0660...U+0669).
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGIT_TYPE_AN 0
+#define I18N_USHAPE_DIGIT_TYPE_AN 0
/**
* @brief Digit type option: Use Eastern (Extended) Arabic-Indic digits (U+06f0...U+06f9).
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGIT_TYPE_AN_EXTENDED 0x100
+#define I18N_USHAPE_DIGIT_TYPE_AN_EXTENDED 0x100
/**
* @brief Not a valid option value. May be replaced by a new option.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGIT_TYPE_RESERVED 0x200
+#define I18N_USHAPE_DIGIT_TYPE_RESERVED 0x200
/**
* @brief Bit mask for digit type options.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_DIGIT_TYPE_MASK 0x300
+#define I18N_USHAPE_DIGIT_TYPE_MASK 0x300
/**
* @brief Tashkeel aggregation option: replace any combination of U+0651 with one of
- * U+064C, U+064D, U+064E, U+064F, U+0650 with
- * U+FC5E, U+FC5F, U+FC60, U+FC61, U+FC62 consecutively.
+ * U+064C, U+064D, U+064E, U+064F, U+0650 with
+ * U+FC5E, U+FC5F, U+FC60, U+FC61, U+FC62 consecutively.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_AGGREGATE_TASHKEEL 0x4000
+#define I18N_USHAPE_AGGREGATE_TASHKEEL 0x4000
/**
* @brief Tashkeel aggregation option: do not aggregate tashkeels.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_AGGREGATE_TASHKEEL_NOOP 0
+#define I18N_USHAPE_AGGREGATE_TASHKEEL_NOOP 0
/**
* @brief Bit mask for tashkeel aggregation.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_AGGREGATE_TASHKEEL_MASK 0x4000
+#define I18N_USHAPE_AGGREGATE_TASHKEEL_MASK 0x4000
/**
* @brief Presentation form option: don't replace Arabic Presentation Forms-A and
- * Arabic Presentation Forms-B characters with 0+06xx characters, before shaping.
+ * Arabic Presentation Forms-B characters with 0+06xx characters, before shaping.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_PRESERVE_PRESENTATION 0x8000
+#define I18N_USHAPE_PRESERVE_PRESENTATION 0x8000
/**
* @brief Presentation form option: replace Arabic Presentation Forms-A and
- * Arabic Presentationo Forms-B with their unshaped correspondants in range 0+06xx,
- * before shaping.
+ * Arabic Presentationo Forms-B with their unshaped correspondants in range 0+06xx,
+ * before shaping.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_PRESERVE_PRESENTATION_NOOP 0
+#define I18N_USHAPE_PRESERVE_PRESENTATION_NOOP 0
/**
* @brief Bit mask for preserve presentation form.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_PRESERVE_PRESENTATION_MASK 0x8000
+#define I18N_USHAPE_PRESERVE_PRESENTATION_MASK 0x8000
/* Seen Tail options */
/**
* @brief Memory option: the result must have the same length as the source.
* @details Shaping mode: The SEEN family character will expand into two characters using space near
- * the SEEN family character (i.e. the space after the character).
+ * the SEEN family character (i.e. the space after the character).
*
- * If there are no spaces found, an #I18N_ERROR_NO_SPACE_AVAILABLE error will be
- * returned by the i18n_ushape_shape_arabic() function.
+ * If there are no spaces found, an #I18N_ERROR_NO_SPACE_AVAILABLE error will be
+ * returned by the i18n_ushape_shape_arabic() function.
*
- * De-shaping mode: Any Seen character followed by Tail character will be
- * replaced by one cell Seen and a space will replace the Tail.
+ * De-shaping mode: Any Seen character followed by Tail character will be
+ * replaced by one cell Seen and a space will replace the Tail.
*
- * Affects: Seen options
+ * Affects: Seen options
* @since_tizen 3.0
*/
-#define I18N_USHAPE_SEEN_TWOCELL_NEAR 0x200000
+#define I18N_USHAPE_SEEN_TWOCELL_NEAR 0x200000
/**
* @brief Bit mask for Seen memory options.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_SEEN_MASK 0x700000
+#define I18N_USHAPE_SEEN_MASK 0x700000
/* YehHamza options */
/**
* @brief Memory option: the result must have the same length as the source.
* @details Shaping mode: The YEHHAMZA character will expand into two characters using space near it
- * (i.e. the space after the character).
+ * (i.e. the space after the character).
*
- * If there are no spaces found, an #I18N_ERROR_NO_SPACE_AVAILABLE error will be
- * returned by the i18n_ushape_shape_arabic() function.
+ * If there are no spaces found, an #I18N_ERROR_NO_SPACE_AVAILABLE error will be
+ * returned by the i18n_ushape_shape_arabic() function.
*
- * De-shaping mode: Any Yeh (final or isolated) character followed by Hamza character will
- * be replaced by one cell YehHamza and space will replace the Hamza.
+ * De-shaping mode: Any Yeh (final or isolated) character followed by Hamza character will
+ * be replaced by one cell YehHamza and space will replace the Hamza.
*
- * Affects: YehHamza options
+ * Affects: YehHamza options
* @since_tizen 3.0
*/
-#define I18N_USHAPE_YEHHAMZA_TWOCELL_NEAR 0x1000000
+#define I18N_USHAPE_YEHHAMZA_TWOCELL_NEAR 0x1000000
/**
* @brief Bit mask for YehHamza memory options.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_YEHHAMZA_MASK 0x3800000
+#define I18N_USHAPE_YEHHAMZA_MASK 0x3800000
/* New Tashkeel options */
/**
* @brief Memory option: the result must have the same length as the source.
* @details Shaping mode: Tashkeel characters will be replaced by spaces.
- * Spaces will be placed at beginning of the buffer.
+ * Spaces will be placed at beginning of the buffer.
*
- * De-shaping mode: N/A
+ * De-shaping mode: N/A
*
- * Affects: Tashkeel options
+ * Affects: Tashkeel options
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TASHKEEL_BEGIN 0x40000
+#define I18N_USHAPE_TASHKEEL_BEGIN 0x40000
/**
* @brief Memory option: the result must have the same length as the source.
* @details Shaping mode: Tashkeel characters will be replaced by spaces.
- * Spaces will be placed at end of the buffer.
+ * Spaces will be placed at end of the buffer.
*
- * De-shaping mode: N/A
+ * De-shaping mode: N/A
*
- * Affects: Tashkeel options
+ * Affects: Tashkeel options
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TASHKEEL_END 0x60000
+#define I18N_USHAPE_TASHKEEL_END 0x60000
/**
* @brief Memory option: allow the result to have a different length than the source.
* @details Shaping mode: Tashkeel characters will be removed, buffer length will shrink.
*
- * De-shaping mode: N/A
+ * De-shaping mode: N/A
*
- * Affect: Tashkeel options
+ * Affect: Tashkeel options
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TASHKEEL_RESIZE 0x80000
+#define I18N_USHAPE_TASHKEEL_RESIZE 0x80000
/**
* @brief Memory option: the result must have the same length as the source.
* @details Shaping mode: Tashkeel characters will be replaced by Tatweel if it is connected to
- * adjacent characters (i.e. shaped on Tatweel) or replaced by space if it
- * is not connected.
+ * adjacent characters (i.e. shaped on Tatweel) or replaced by space if it
+ * is not connected.
*
- * De-shaping mode: N/A
+ * De-shaping mode: N/A
*
- * Affects: YehHamza options
+ * Affects: YehHamza options
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TASHKEEL_REPLACE_BY_TATWEEL 0xC0000
+#define I18N_USHAPE_TASHKEEL_REPLACE_BY_TATWEEL 0xC0000
/**
* @brief Bit mask for Tashkeel replacement with Space or Tatweel memory options.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TASHKEEL_MASK 0xE0000
+#define I18N_USHAPE_TASHKEEL_MASK 0xE0000
/* Space location control options */
/**
* @brief This option affect the meaning of BEGIN and END options.
* @details If this option is not used the default for BEGIN and END will be as following:
- * The Default (for both Visual LTR, Visual RTL and Logical Text)
- * 1. BEGIN always refers to the start address of physical memory.
- * 2. END always refers to the end address of physical memory.
+ * The Default (for both Visual LTR, Visual RTL and Logical Text)
+ * 1. BEGIN always refers to the start address of physical memory.
+ * 2. END always refers to the end address of physical memory.
*
- * If this option is used it will swap the meaning of BEGIN and END only for Visual LTR
- * text.
+ * If this option is used it will swap the meaning of BEGIN and END only for Visual LTR
+ * text.
*
- * The effect on BEGIN and END Memory Options will be as following:
- * A. BEGIN For Visual LTR text: This will be the beginning (right side) of the visual
- * text (corresponding to the physical memory address end for Visual LTR text,
- * Same as END in default behavior).
- * B. BEGIN For Logical text: Same as BEGIN in default behavior.
- * C. END For Visual LTR text: This will be the end (left side) of the visual text
- * (corresponding to the physical memory address beginning for Visual LTR text,
- * Same as BEGIN in default behavior).
- * D. END For Logical text: Same as END in default behavior.
+ * The effect on BEGIN and END Memory Options will be as following:
+ * A. BEGIN For Visual LTR text: This will be the beginning (right side) of the visual
+ * text (corresponding to the physical memory address end for Visual LTR text,
+ * Same as END in default behavior).
+ * B. BEGIN For Logical text: Same as BEGIN in default behavior.
+ * C. END For Visual LTR text: This will be the end (left side) of the visual text
+ * (corresponding to the physical memory address beginning for Visual LTR text,
+ * Same as BEGIN in default behavior).
+ * D. END For Logical text: Same as END in default behavior.
*
- * Affects: All LamAlef BEGIN, END and AUTO options.
+ * Affects: All LamAlef BEGIN, END and AUTO options.
* @since_tizen 3.0
*/
#define I18N_USHAPE_SPACES_RELATIVE_TO_TEXT_BEGIN_END 0x4000000
* @brief Bit mask for swapping BEGIN and END for Visual LTR text.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_SPACES_RELATIVE_TO_TEXT_MASK 0x4000000
+#define I18N_USHAPE_SPACES_RELATIVE_TO_TEXT_MASK 0x4000000
/**
* @brief If this option is used, shaping will use the new Unicode code point for TAIL (i.e. 0xFE73).
* @details If this option is not specified (Default), old unofficial Unicode TAIL code point is
- * used (i.e. 0x200B).
+ * used (i.e. 0x200B).
*
- * De-shaping will not use this option as it will always search for both the new Unicode
- * code point for the TAIL (i.e. 0xFE73) or the old unofficial Unicode TAIL code point
- * (i.e. 0x200B) and de-shape the Seen-Family letter accordingly.
+ * De-shaping will not use this option as it will always search for both the new Unicode
+ * code point for the TAIL (i.e. 0xFE73) or the old unofficial Unicode TAIL code point
+ * (i.e. 0x200B) and de-shape the Seen-Family letter accordingly.
*
- * Shaping Mode: Only shaping.
+ * Shaping Mode: Only shaping.
*
- * De-shaping Mode: N/A.
+ * De-shaping Mode: N/A.
*
- * Affects: All Seen options
+ * Affects: All Seen options
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TAIL_NEW_UNICODE 0x8000000
+#define I18N_USHAPE_TAIL_NEW_UNICODE 0x8000000
/**
* @brief Bit mask for new Unicode Tail option.
* @since_tizen 3.0
*/
-#define I18N_USHAPE_TAIL_TYPE_MASK 0x8000000
+#define I18N_USHAPE_TAIL_TYPE_MASK 0x8000000
/**
* @}
* @since_tizen 3.0
*/
typedef enum {
- I18N_UTMSCALE_JAVA_TIME = 0, /**< Used in the JDK. Data is a Java long (int64_t). Value is milliseconds since January 1, 1970.*/
- I18N_UTMSCALE_UNIX_TIME, /**< Used on Unix systems. Data is an int32_t or int64_t. Value is seconds since January 1, 1970.*/
- I18N_UTMSCALE_ICU4C_TIME, /**< Used in ICU4C. Data is a double. Value is milliseconds since January 1, 1970.*/
- I18N_UTMSCALE_WINDOWS_FILE_TIME, /**< Used in Windows for file times. Data is an int64_t. Value is ticks (1 tick == 100 nanoseconds) since January 1, 1601.*/
- I18N_UTMSCALE_DOTNET_DATE_TIME, /**< Used in the .NET framework's System.DateTime structure. Data is an int64_t. Value is ticks (1 tick == 100 nanoseconds) since January 1, 0001.*/
- I18N_UTMSCALE_MAC_OLD_TIME, /**< Used in older Macintosh systems. Data is an int32_t or int64_t. Value is seconds since January 1, 1904.*/
- I18N_UTMSCALE_MAC_TIME, /**< Used in newer Macintosh systems. Data is a double. Value is seconds since January 1, 2001.*/
- I18N_UTMSCALE_EXCEL_TIME, /**< Used in Excel. Value is days since December 31, 1899.*/
- I18N_UTMSCALE_DB2_TIME, /**< Used in DB2. Value is days since December 31, 1899.*/
- I18N_UTMSCALE_UNIX_MICROSECONDS_TIME, /**< Data is a long. Value is microseconds since January 1, 1970. Similar to Unix time (linear value from 1970) and struct timeval (microseconds resolution).*/
- I18N_UTMSCALE_MAX_SCALE /**< The first unused time scale value. The limit of this enum */
+ I18N_UTMSCALE_JAVA_TIME = 0, /**< Used in the JDK. Data is a Java long (int64_t). Value is milliseconds since January 1, 1970.*/
+ I18N_UTMSCALE_UNIX_TIME, /**< Used on Unix systems. Data is an int32_t or int64_t. Value is seconds since January 1, 1970.*/
+ I18N_UTMSCALE_ICU4C_TIME, /**< Used in ICU4C. Data is a double. Value is milliseconds since January 1, 1970.*/
+ I18N_UTMSCALE_WINDOWS_FILE_TIME, /**< Used in Windows for file times. Data is an int64_t. Value is ticks (1 tick == 100 nanoseconds) since January 1, 1601.*/
+ I18N_UTMSCALE_DOTNET_DATE_TIME, /**< Used in the .NET framework's System.DateTime structure. Data is an int64_t. Value is ticks (1 tick == 100 nanoseconds) since January 1, 0001.*/
+ I18N_UTMSCALE_MAC_OLD_TIME, /**< Used in older Macintosh systems. Data is an int32_t or int64_t. Value is seconds since January 1, 1904.*/
+ I18N_UTMSCALE_MAC_TIME, /**< Used in newer Macintosh systems. Data is a double. Value is seconds since January 1, 2001.*/
+ I18N_UTMSCALE_EXCEL_TIME, /**< Used in Excel. Value is days since December 31, 1899.*/
+ I18N_UTMSCALE_DB2_TIME, /**< Used in DB2. Value is days since December 31, 1899.*/
+ I18N_UTMSCALE_UNIX_MICROSECONDS_TIME, /**< Data is a long. Value is microseconds since January 1, 1970. Similar to Unix time (linear value from 1970) and struct timeval (microseconds resolution).*/
+ I18N_UTMSCALE_MAX_SCALE /**< The first unused time scale value. The limit of this enum */
} i18n_utmscale_scale_e;
* @see i18n_utmscale_get_time_scale_value()
*/
typedef enum {
- I18N_UTMSCALE_VALUE_UNITS = 0, /**< The constant used to select the units value for a time scale. */
- I18N_UTMSCALE_VALUE_EPOCH_OFFSET = 1, /**< The constant used to select the epoch offset value for a time scale. */
- I18N_UTMSCALE_VALUE_FROM_MIN = 2, /**< The constant used to select the minimum from value for a time scale. */
- I18N_UTMSCALE_VALUE_FROM_MAX = 3, /**< The constant used to select the maximum from value for a time scale. */
- I18N_UTMSCALE_VALUE_TO_MIN = 4, /**< The constant used to select the minimum to value for a time scale. */
- I18N_UTMSCALE_VALUE_TO_MAX = 5, /**< The constant used to select the maximum to value for a time scale. */
- I18N_UTMSCALE_VALUE_MAX /**< The number of time scale values, in other words limit of this enum.*/
+ I18N_UTMSCALE_VALUE_UNITS = 0, /**< The constant used to select the units value for a time scale. */
+ I18N_UTMSCALE_VALUE_EPOCH_OFFSET = 1, /**< The constant used to select the epoch offset value for a time scale. */
+ I18N_UTMSCALE_VALUE_FROM_MIN = 2, /**< The constant used to select the minimum from value for a time scale. */
+ I18N_UTMSCALE_VALUE_FROM_MAX = 3, /**< The constant used to select the maximum from value for a time scale. */
+ I18N_UTMSCALE_VALUE_TO_MIN = 4, /**< The constant used to select the minimum to value for a time scale. */
+ I18N_UTMSCALE_VALUE_TO_MAX = 5, /**< The constant used to select the maximum to value for a time scale. */
+ I18N_UTMSCALE_VALUE_MAX /**< The number of time scale values, in other words limit of this enum.*/
} i18n_utmscale_value_e;
/**
* @brief Value returned by i18n_ubidi_class_cb() callbacks when there is no need to override the standard ubidi class for a given code point.
* @since_tizen 3.0
*/
-#define I18N_UBIDI_CLASS_DEFAULT I18N_UCHAR_U_CHAR_DIRECTION_COUNT
+#define I18N_UBIDI_CLASS_DEFAULT I18N_UCHAR_U_CHAR_DIRECTION_COUNT
/**
* @brief Paragraph level setting: Constant indicating that the base direction depends on the first
- * strong directional character in the text according to the Unicode Bidirectional Algorithm.
- * If no strong directional character is present, then set the paragraph level to 0
- * (left-to-right).
+ * strong directional character in the text according to the Unicode Bidirectional Algorithm.
+ * If no strong directional character is present, then set the paragraph level to 0
+ * (left-to-right).
* @details If this value is used in conjunction with reordering modes
- * #I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT or #I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
- * the text to reorder is assumed to be visual LTR, and the text after reordering is
- * required to be the corresponding logical string with appropriate contextual direction.
- * The direction of the result string will be RTL if either the rightmost or leftmost
- * strong character of the source text is RTL or Arabic Letter, the direction will be LTR
- * otherwise.
+ * #I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT or #I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
+ * the text to reorder is assumed to be visual LTR, and the text after reordering is
+ * required to be the corresponding logical string with appropriate contextual direction.
+ * The direction of the result string will be RTL if either the rightmost or leftmost
+ * strong character of the source text is RTL or Arabic Letter, the direction will be LTR
+ * otherwise.
*
- * If reordering option #I18N_UBIDI_OPTION_INSERT_MARKS is set, an RLM may be
- * added at the beginning of the result string to ensure round trip (that the result
- * string, when reordered back to visual, will produce the original source text).
+ * If reordering option #I18N_UBIDI_OPTION_INSERT_MARKS is set, an RLM may be
+ * added at the beginning of the result string to ensure round trip (that the result
+ * string, when reordered back to visual, will produce the original source text).
* @since_tizen 3.0
* @see I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT
* @see I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL
*/
-#define I18N_UBIDI_DEFAULT_LTR 0xfe
+#define I18N_UBIDI_DEFAULT_LTR 0xfe
/**
* @brief Paragraph level setting:
*
- * Constant indicating that the base direction depends on the first
- * strong directional character in the text according to the Unicode Bidirectional Algorithm.
- * If no strong directional character is present, then set the paragraph level to 1
- * (right-to-left).
+ * Constant indicating that the base direction depends on the first
+ * strong directional character in the text according to the Unicode Bidirectional Algorithm.
+ * If no strong directional character is present, then set the paragraph level to 1
+ * (right-to-left).
* @details If this value is used in conjunction with reordering modes
- * #I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT or #I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
- * the text to reorder is assumed to be visual LTR, and the text after reordering is
- * required to be the corresponding logical string with appropriate contextual direction.
- * The direction of the result string will be RTL if either the rightmost or leftmost
- * strong character of the source text is RTL or Arabic Letter, or if the text contains no
- * strong character; the direction will be LTR otherwise.
- *
- * If reordering option
- * #I18N_UBIDI_OPTION_INSERT_MARKS is set, an RLM may be added at the beginning of the
- * result string to ensure round trip (that the result string, when reordered back to
- * visual, will produce the original source text).
+ * #I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT or #I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
+ * the text to reorder is assumed to be visual LTR, and the text after reordering is
+ * required to be the corresponding logical string with appropriate contextual direction.
+ * The direction of the result string will be RTL if either the rightmost or leftmost
+ * strong character of the source text is RTL or Arabic Letter, or if the text contains no
+ * strong character; the direction will be LTR otherwise.
+ *
+ * If reordering option
+ * #I18N_UBIDI_OPTION_INSERT_MARKS is set, an RLM may be added at the beginning of the
+ * result string to ensure round trip (that the result string, when reordered back to
+ * visual, will produce the original source text).
* @since_tizen 3.0
* @see I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT
* @see I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL
*/
- #define I18N_UBIDI_DEFAULT_RTL 0xff
+#define I18N_UBIDI_DEFAULT_RTL 0xff
/**
* @brief Option bit for i18n_ubidi_write_reordered(): replace characters with the "mirrored"
- * property in RTL runs by their mirror-image mappings.
+ * property in RTL runs by their mirror-image mappings.
* @since_tizen 3.0
* @see i18n_ubidi_write_reordered()
*/
-#define I18N_UBIDI_DO_MIRRORING 2
+#define I18N_UBIDI_DO_MIRRORING 2
/**
* @brief Option bit for i18n_ubidi_write_reordered(): surround the run with LRMs if necessary;
- * this is part of the approximate "inverse ubidi" algorithm.
+ * this is part of the approximate "inverse ubidi" algorithm.
* @details This option does not imply corresponding adjustment of the index mappings.
* @since_tizen 3.0
* @see i18n_ubidi_set_inverse()
* @see i18n_ubidi_write_reordered()
*/
-#define I18N_UBIDI_INSERT_LRM_FOR_NUMERIC 4
+#define I18N_UBIDI_INSERT_LRM_FOR_NUMERIC 4
/**
* @brief Option bit for i18n_ubidi_write_reordered(): keep combining characters after their base
- * characters in RTL runs.
+ * characters in RTL runs.
* @since_tizen 3.0
* @see i18n_ubidi_write_reordered()
*/
-#define I18N_UBIDI_KEEP_BASE_COMBINING 1
+#define I18N_UBIDI_KEEP_BASE_COMBINING 1
/**
* @brief Bit flag for level input.
* @details Overrides directional properties.
* @since_tizen 3.0
*/
-#define I18N_UBIDI_LEVEL_OVERRIDE 0x80
+#define I18N_UBIDI_LEVEL_OVERRIDE 0x80
/**
* @brief Special value which can be returned by the mapping functions when a logical index has no
- * corresponding visual index or vice-versa.
+ * corresponding visual index or vice-versa.
* @details This may happen for the logical-to-visual mapping of a ubidi control when option
- * #I18N_UBIDI_OPTION_REMOVE_CONTROLS is specified. This can also happen for the
- * visual-to-logical mapping of a ubidi mark (LRM or RLM) inserted by option
- * #I18N_UBIDI_OPTION_INSERT_MARKS.
+ * #I18N_UBIDI_OPTION_REMOVE_CONTROLS is specified. This can also happen for the
+ * visual-to-logical mapping of a ubidi mark (LRM or RLM) inserted by option
+ * #I18N_UBIDI_OPTION_INSERT_MARKS.
* @since_tizen 3.0
* @see i18n_ubidi_get_visual_index()
* @see i18n_ubidi_get_visual_map()
* @see i18n_ubidi_get_logical_index()
* @see i18n_ubidi_get_logical_map()
*/
-#define I18N_UBIDI_MAP_NOWHERE (-1)
+#define I18N_UBIDI_MAP_NOWHERE (-1)
/**
* @brief Maximum explicit embedding level.
* @details The maximum resolved level can be up to #I18N_UBIDI_MAX_EXPLICIT_LEVEL + 1.
* @since_tizen 3.0
*/
-#define I18N_UBIDI_MAX_EXPLICIT_LEVEL 125
+#define I18N_UBIDI_MAX_EXPLICIT_LEVEL 125
/**
* @brief Option bit for i18n_ubidi_write_reordered(): write the output in reverse order.
* @details This has the same effect as calling i18n_ubidi_write_reordered() first without this
- * option, and then calling i18n_ubidi_write_reordered() 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.
+ * option, and then calling i18n_ubidi_write_reordered() 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.
* @since_tizen 3.0
* @see i18n_ubidi_write_reordered()
*/
-#define I18N_UBIDI_OUTPUT_REVERSE 16
+#define I18N_UBIDI_OUTPUT_REVERSE 16
/**
* @brief Option bit for i18n_ubidi_write_reordered(): remove ubidi control characters (this does
- * not affect #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC).
+ * not affect #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC).
* @details This option does not imply corresponding adjustment of the index mappings.
* @since_tizen 3.0
* @see i18n_ubidi_write_reordered()
*/
-#define I18N_UBIDI_REMOVE_BIDI_CONTROLS 8
+#define I18N_UBIDI_REMOVE_BIDI_CONTROLS 8
/**
* @brief An #i18n_ubidi_h handle.
* @details Use i18n_ubidi_* functions to operate on Ubidi objects.
* @since_tizen 3.0
*/
-typedef void* i18n_ubidi_h;
+typedef void *i18n_ubidi_h;
/**
* @brief Callback type declaration for overriding default ubidi class values with custom ones.
* @details Usually, the function pointer will be propagated to an #i18n_ubidi_h handle by calling
- * the i18n_ubidi_set_class_cb() function; then the callback will be invoked by the UBA
- * implementation any time the class of a character is to be determined.
+ * the i18n_ubidi_set_class_cb() function; then the callback will be invoked by the UBA
+ * implementation any time the class of a character is to be determined.
* @since_tizen 3.0
*
- * @param[in] context A pointer to the callback private data
- * @param[in] c The code point to get a ubidi class for
+ * @param[in] context A pointer to the callback private data
+ * @param[in] c The code point to get a ubidi class for
*
- * @retval direction The directional property / ubidi class for the given code point @a c if
- * the default class has been overridden, or #I18N_UBIDI_CLASS_DEFAULT if
- * the standard ubidi class value for code point @a c is to be used.
+ * @retval direction The directional property / ubidi class for the given code point @a c if
+ * the default class has been overridden, or #I18N_UBIDI_CLASS_DEFAULT if
+ * the standard ubidi class value for code point @a c is to be used.
*
* @see i18n_ubidi_set_class_cb()
* @see i18n_ubidi_get_class_cb()
*/
-typedef i18n_uchar_direction_e (*i18n_ubidi_class_cb)(const void *context, i18n_uchar32 c);
+typedef i18n_uchar_direction_e(*i18n_ubidi_class_cb)(const void *context, i18n_uchar32 c);
/**
* @brief The type of the level values in this ubidi implementation.
* @details It holds an embedding level and indicates the visual direction by its bit 0
- * (even/odd value).
+ * (even/odd value).
*
- * It can also hold non-level values for the @c para_level and @c embedding_levels
- * arguments of i18n_ubidi_set_para(); there:
- * - bit 7 of an @c embedding_levels[] value indicates whether the using application is
- * specifying the level of a character to override whatever the ubidi implementation would
- * resolve it to.
- * - @c para_level can be set to the pseudo-level values #I18N_UBIDI_DEFAULT_LTR and
- * #I18N_UBIDI_DEFAULT_RTL.
+ * It can also hold non-level values for the @c para_level and @c embedding_levels
+ * arguments of i18n_ubidi_set_para(); there:
+ * - bit 7 of an @c embedding_levels[] value indicates whether the using application is
+ * specifying the level of a character to override whatever the ubidi implementation would
+ * resolve it to.
+ * - @c para_level can be set to the pseudo-level values #I18N_UBIDI_DEFAULT_LTR and
+ * #I18N_UBIDI_DEFAULT_RTL.
*
- * The related constants are not real, valid level values. I18N_UBIDI_DEFAULT_XXX can be
- * used to specify a default for the paragraph level for when the i18n_ubidi_set_para()
- * function shall determine it but there is no strongly typed character in the input.
+ * The related constants are not real, valid level values. I18N_UBIDI_DEFAULT_XXX can be
+ * used to specify a default for the paragraph level for when the i18n_ubidi_set_para()
+ * function shall determine it but there is no strongly typed character in the input.
*
- * Note that the value for #I18N_UBIDI_DEFAULT_LTR is even and the one for
- * #I18N_UBIDI_DEFAULT_RTL is odd, just like with normal LTR and RTL level values - these
- * special values are designed that way. Also, the implementation assumes that
- * #I18N_UBIDI_MAX_EXPLICIT_LEVEL is odd.
+ * Note that the value for #I18N_UBIDI_DEFAULT_LTR is even and the one for
+ * #I18N_UBIDI_DEFAULT_RTL is odd, just like with normal LTR and RTL level values - these
+ * special values are designed that way. Also, the implementation assumes that
+ * #I18N_UBIDI_MAX_EXPLICIT_LEVEL is odd.
*
* @see i18n_ubidi_set_para()
* @see I18N_UBIDI_DEFAULT_LTR
* @since_tizen 3.0
*/
typedef enum {
- /**
- * Left-to-right text. This is a 0 value.
- * - As return value for i18n_ubidi_get_direction(), it means that the source string contains
- * no right-to-left characters, or that the source string is empty and the paragraph level is
- * even.
- * - As return value for i18n_ubidi_get_base_direction(), it means that the first strong
- * character of the source string has a left-to-right direction.
- */
- I18N_UBIDI_LTR,
-
- /**
- * Right-to-left text. This is a 1 value.
- * - As return value for i18n_ubidi_get_direction(), it means that the source string contains
- * no left-to-right characters, or that the source string is empty and the paragraph level is odd.
- * - As return value for i18n_ubidi_get_base_direction(), it means that the first strong character
- * of the source string has a right-to-left direction.
- */
- I18N_UBIDI_RTL,
-
- /**
- * Mixed-directional text.
- *
- * As return value for i18n_ubidi_get_direction(), it means that the
- * source string contains both left-to-right and right-to-left characters.
- */
- I18N_UBIDI_MIXED,
-
- /**
- * No strongly directional text.
- *
- * As return value for i18n_ubidi_get_direction(), it means that
- * the source string is missing or empty, or contains neither left-to-right nor right-to-left
- * characters.
- */
- I18N_UBIDI_NEUTRAL
+ /**
+ * Left-to-right text. This is a 0 value.
+ * - As return value for i18n_ubidi_get_direction(), it means that the source string contains
+ * no right-to-left characters, or that the source string is empty and the paragraph level is
+ * even.
+ * - As return value for i18n_ubidi_get_base_direction(), it means that the first strong
+ * character of the source string has a left-to-right direction.
+ */
+ I18N_UBIDI_LTR,
+
+ /**
+ * Right-to-left text. This is a 1 value.
+ * - As return value for i18n_ubidi_get_direction(), it means that the source string contains
+ * no left-to-right characters, or that the source string is empty and the paragraph level is odd.
+ * - As return value for i18n_ubidi_get_base_direction(), it means that the first strong character
+ * of the source string has a right-to-left direction.
+ */
+ I18N_UBIDI_RTL,
+
+ /**
+ * Mixed-directional text.
+ *
+ * As return value for i18n_ubidi_get_direction(), it means that the
+ * source string contains both left-to-right and right-to-left characters.
+ */
+ I18N_UBIDI_MIXED,
+
+ /**
+ * No strongly directional text.
+ *
+ * As return value for i18n_ubidi_get_direction(), it means that
+ * the source string is missing or empty, or contains neither left-to-right nor right-to-left
+ * characters.
+ */
+ I18N_UBIDI_NEUTRAL
} i18n_ubidi_direction_e;
* @see i18n_ubidi_set_inverse()
*/
typedef enum {
- /**
- * Regular Logical to Visual ubidi algorithm according to Unicode. This is a 0 value.
- */
- I18N_UBIDI_REORDER_DEFAULT = 0,
-
- /**
- * Logical to Visual algorithm which handles numbers in a way which mimicks the behavior of
- * Windows XP.
- */
- I18N_UBIDI_REORDER_NUMBERS_SPECIAL,
-
- /**
- * Logical to Visual algorithm grouping numbers with adjacent R characters (reversible
- * algorithm).
- */
- I18N_UBIDI_REORDER_GROUP_NUMBERS_WITH_R,
-
- /**
- * Reorder runs only to transform a Logical LTR string to the Logical RTL string with the same
- * display, or vice-versa.
- *
- * If this mode is set together with option #I18N_UBIDI_OPTION_INSERT_MARKS, some ubidi
- * controls in the source text may be removed and other controls may be added to produce the
- * minimum combination which has the required display.
- */
- I18N_UBIDI_REORDER_RUNS_ONLY,
-
- /**
- * Visual to Logical algorithm which handles numbers like L (same algorithm as selected by
- * i18n_ubidi_set_inverse(true).
- */
- I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L,
-
- /**
- * Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm.
- */
- I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT,
-
- /**
- * Inverse ubidi (Visual to Logical) algorithm for the #I18N_UBIDI_REORDER_NUMBERS_SPECIAL
- * ubidi algorithm.
- */
- I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
-
- /**
- * Number of values for reordering mode.
- */
- I18N_UBIDI_REORDER_COUNT
+ /**
+ * Regular Logical to Visual ubidi algorithm according to Unicode. This is a 0 value.
+ */
+ I18N_UBIDI_REORDER_DEFAULT = 0,
+
+ /**
+ * Logical to Visual algorithm which handles numbers in a way which mimicks the behavior of
+ * Windows XP.
+ */
+ I18N_UBIDI_REORDER_NUMBERS_SPECIAL,
+
+ /**
+ * Logical to Visual algorithm grouping numbers with adjacent R characters (reversible
+ * algorithm).
+ */
+ I18N_UBIDI_REORDER_GROUP_NUMBERS_WITH_R,
+
+ /**
+ * Reorder runs only to transform a Logical LTR string to the Logical RTL string with the same
+ * display, or vice-versa.
+ *
+ * If this mode is set together with option #I18N_UBIDI_OPTION_INSERT_MARKS, some ubidi
+ * controls in the source text may be removed and other controls may be added to produce the
+ * minimum combination which has the required display.
+ */
+ I18N_UBIDI_REORDER_RUNS_ONLY,
+
+ /**
+ * Visual to Logical algorithm which handles numbers like L (same algorithm as selected by
+ * i18n_ubidi_set_inverse(true).
+ */
+ I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L,
+
+ /**
+ * Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm.
+ */
+ I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT,
+
+ /**
+ * Inverse ubidi (Visual to Logical) algorithm for the #I18N_UBIDI_REORDER_NUMBERS_SPECIAL
+ * ubidi algorithm.
+ */
+ I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
+
+ /**
+ * Number of values for reordering mode.
+ */
+ I18N_UBIDI_REORDER_COUNT
} i18n_ubidi_reordering_mode_e;
* @see i18n_ubidi_set_inverse()
*/
typedef enum {
- /**
- * Option value for i18n_ubidi_set_reordering_options(): disable all the options which can be set
- * with this function.
- */
- I18N_UBIDI_OPTION_DEFAULT = 0,
-
- /**
- * Option bit for i18n_ubidi_set_reordering_options(): insert ubidi marks (LRM or RLM) when
- * needed to ensure correct result of a reordering to a Logical order. This option must be set
- * or reset before calling i18n_ubidi_set_para().
- *
- * This option is significant only with reordering modes which generate a result with Logical
- * order, specifically:
- * - #I18N_UBIDI_REORDER_RUNS_ONLY
- * - #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L
- * - #I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT
- * - #I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL
- *
- * If this option is set in conjunction with reordering mode
- * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L or with calling i18n_ubidi_set_inverse(true), it
- * implies option #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC in calls to function
- * i18n_ubidi_write_reordered().
- *
- * 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 ubidi marks (option
- * #I18N_UBIDI_OPTION_REMOVE_CONTROLS set before calling i18n_ubidi_set_para() or option
- * #I18N_UBIDI_REMOVE_BIDI_CONTROLS in i18n_ubidi_write_reordered(), the result will be identical
- * to the source text in the first transformation.
- *
- * This option will be ignored if specified together with option
- * #I18N_UBIDI_OPTION_REMOVE_CONTROLS. It inhibits option #I18N_UBIDI_REMOVE_BIDI_CONTROLS in
- * calls to function i18n_ubidi_write_reordered() and it implies option
- * #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC in calls to function i18n_ubidi_write_reordered() if the
- * reordering mode is #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L.
- *
- * @see i18n_ubidi_set_reordering_mode()
- * @see i18n_ubidi_set_reordering_options()
- */
- I18N_UBIDI_OPTION_INSERT_MARKS = 1,
-
- /**
- * Option bit for i18n_ubidi_set_reordering_options(): remove ubidi control characters.
- *
- * This option must be set or reset before calling i18n_ubidi_set_para().
- *
- * This option nullifies option #I18N_UBIDI_OPTION_INSERT_MARKS. It inhibits option
- * #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC in calls to function i18n_write_reordered() and it implies
- * option #I18N_UBIDI_REMOVE_BIDI_CONTROLS in calls to that function.
- *
- * @see i18n_ubidi_set_reordering_mode()
- * @see i18n_ubidi_set_reordering_options()
- */
- I18N_UBIDI_OPTION_REMOVE_CONTROLS = 2,
-
- /**
- * Option bit for i18n_ubidi_set_reordering_options(): process the output as part of a stream
- * to be continued.
- *
- * This option must be set or reset before calling i18n_ubidi_set_para().
- *
- * 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.
- *
- * When this option bit is on, i18n_ubidi_set_para() may process less than the full source text
- * in order to truncate the text at a meaningful boundary. The caller should call
- * i18n_ubidi_get_processed_length() immediately after calling i18n_ubidi_set_para()
- * 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
- * i18n_ubidi_set_para().
- * 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. If the last character of the source text constitutes a
- * reasonable boundary, the whole text will be processed at once.
- * If nowhere in the source text there exists such a reasonable boundary, the processed length
- * will be zero.
- * The caller should check for such an occurrence and do one of the following:
- * - submit a larger amount of text with a better chance to include a reasonable boundary.
- * - resubmit the same text after turning off option #I18N_UBIDI_OPTION_STREAMING.
- *
- * In all cases, this option should be turned off before processing the last part of the text.
- *
- * When the #I18N_UBIDI_OPTION_STREAMING option is used, it is recommended to call
- * i18n_ubidi_order_paragraphs_ltr() with argument order_paragraphs_ltr set to true before
- * calling i18n_ubidi_set_para() so that later paragraphs may be concatenated to previous
- * paragraphs on the right.
- *
- * @see i18n_ubidi_set_reordering_mode()
- * @see i18n_ubidi_set_reordering_options()
- * @see i18n_ubidi_get_processed_length()
- * @see i18n_ubidi_order_paragraphs_ltr()
- */
- I18N_UBIDI_OPTION_STREAMING = 4
+ /**
+ * Option value for i18n_ubidi_set_reordering_options(): disable all the options which can be set
+ * with this function.
+ */
+ I18N_UBIDI_OPTION_DEFAULT = 0,
+
+ /**
+ * Option bit for i18n_ubidi_set_reordering_options(): insert ubidi marks (LRM or RLM) when
+ * needed to ensure correct result of a reordering to a Logical order. This option must be set
+ * or reset before calling i18n_ubidi_set_para().
+ *
+ * This option is significant only with reordering modes which generate a result with Logical
+ * order, specifically:
+ * - #I18N_UBIDI_REORDER_RUNS_ONLY
+ * - #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L
+ * - #I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT
+ * - #I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL
+ *
+ * If this option is set in conjunction with reordering mode
+ * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L or with calling i18n_ubidi_set_inverse(true), it
+ * implies option #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC in calls to function
+ * i18n_ubidi_write_reordered().
+ *
+ * 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 ubidi marks (option
+ * #I18N_UBIDI_OPTION_REMOVE_CONTROLS set before calling i18n_ubidi_set_para() or option
+ * #I18N_UBIDI_REMOVE_BIDI_CONTROLS in i18n_ubidi_write_reordered(), the result will be identical
+ * to the source text in the first transformation.
+ *
+ * This option will be ignored if specified together with option
+ * #I18N_UBIDI_OPTION_REMOVE_CONTROLS. It inhibits option #I18N_UBIDI_REMOVE_BIDI_CONTROLS in
+ * calls to function i18n_ubidi_write_reordered() and it implies option
+ * #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC in calls to function i18n_ubidi_write_reordered() if the
+ * reordering mode is #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L.
+ *
+ * @see i18n_ubidi_set_reordering_mode()
+ * @see i18n_ubidi_set_reordering_options()
+ */
+ I18N_UBIDI_OPTION_INSERT_MARKS = 1,
+
+ /**
+ * Option bit for i18n_ubidi_set_reordering_options(): remove ubidi control characters.
+ *
+ * This option must be set or reset before calling i18n_ubidi_set_para().
+ *
+ * This option nullifies option #I18N_UBIDI_OPTION_INSERT_MARKS. It inhibits option
+ * #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC in calls to function i18n_write_reordered() and it implies
+ * option #I18N_UBIDI_REMOVE_BIDI_CONTROLS in calls to that function.
+ *
+ * @see i18n_ubidi_set_reordering_mode()
+ * @see i18n_ubidi_set_reordering_options()
+ */
+ I18N_UBIDI_OPTION_REMOVE_CONTROLS = 2,
+
+ /**
+ * Option bit for i18n_ubidi_set_reordering_options(): process the output as part of a stream
+ * to be continued.
+ *
+ * This option must be set or reset before calling i18n_ubidi_set_para().
+ *
+ * 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.
+ *
+ * When this option bit is on, i18n_ubidi_set_para() may process less than the full source text
+ * in order to truncate the text at a meaningful boundary. The caller should call
+ * i18n_ubidi_get_processed_length() immediately after calling i18n_ubidi_set_para()
+ * 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
+ * i18n_ubidi_set_para().
+ * 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. If the last character of the source text constitutes a
+ * reasonable boundary, the whole text will be processed at once.
+ * If nowhere in the source text there exists such a reasonable boundary, the processed length
+ * will be zero.
+ * The caller should check for such an occurrence and do one of the following:
+ * - submit a larger amount of text with a better chance to include a reasonable boundary.
+ * - resubmit the same text after turning off option #I18N_UBIDI_OPTION_STREAMING.
+ *
+ * In all cases, this option should be turned off before processing the last part of the text.
+ *
+ * When the #I18N_UBIDI_OPTION_STREAMING option is used, it is recommended to call
+ * i18n_ubidi_order_paragraphs_ltr() with argument order_paragraphs_ltr set to true before
+ * calling i18n_ubidi_set_para() so that later paragraphs may be concatenated to previous
+ * paragraphs on the right.
+ *
+ * @see i18n_ubidi_set_reordering_mode()
+ * @see i18n_ubidi_set_reordering_options()
+ * @see i18n_ubidi_get_processed_length()
+ * @see i18n_ubidi_order_paragraphs_ltr()
+ */
+ I18N_UBIDI_OPTION_STREAMING = 4
} i18n_ubidi_reordering_option_e;
/**
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
*
-* http://www.apache.org/licenses/LICENSE-2.0
+* http://www.apache.org/licenses/LICENSE-2.0
*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
*
* Copyright (C) 1999-2013, International Business Machines Corporation
* and others. All Rights Reserved.
*
* @section CAPI_BASE_UTILS_I18N_UBIDI_MODULE_OVERVIEW Overview
* @details Ubidi module provides an implementation of the Unicode Bidirectional Algorithm. The
- * algorithm is defined in the Unicode Standard Annex #9.
- * Note: Libraries that perform a bidirectional algorithm and reorder strings accordingly
- * are sometimes called "Storage Layout Engines".
- * ubidi and shaping APIs can be used at the core of such "Storage Layout Engines".
+ * algorithm is defined in the Unicode Standard Annex #9.
+ * Note: Libraries that perform a bidirectional algorithm and reorder strings accordingly
+ * are sometimes called "Storage Layout Engines".
+ * ubidi and shaping APIs can be used at the core of such "Storage Layout Engines".
*/
/**
/**
* @brief This function must be called to free the memory associated with an #i18n_ubidi_h handle.
* @details Important: A parent #i18n_ubidi_h handle must not be destroyed or reused if it still has
- * children. If an #i18n_ubidi_h handle has become the child of
- * another one (its parent) by calling i18n_ubidi_set_line(), then the child object must be
- * destroyed or reused (by calling i18n_ubidi_set_para() or i18n_ubidi_set_line()) before
- * the parent object.
+ * children. If an #i18n_ubidi_h handle has become the child of
+ * another one (its parent) by calling i18n_ubidi_set_line(), then the child object must be
+ * destroyed or reused (by calling i18n_ubidi_set_para() or i18n_ubidi_set_line()) before
+ * the parent object.
* @since_tizen 3.0
*
- * @param[in] ubidi #i18n_ubidi_h handle to be destroyed
+ * @param[in] ubidi #i18n_ubidi_h handle to be destroyed
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the number of paragraphs.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[out] count The number of paragraphs
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[out] count The number of paragraphs
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the number of runs.
* @details This function may invoke the actual reordering on the #i18n_ubidi_h handle, after
- * i18n_ubidi_set_para() may have resolved only the levels of the text. Therefore,
- * i18n_ubidi_count_runs() may have to allocate memory, and may fail doing so.
+ * i18n_ubidi_set_para() may have resolved only the levels of the text. Therefore,
+ * i18n_ubidi_count_runs() may have to allocate memory, and may fail doing so.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[out] count The number of runs
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[out] count The number of runs
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the base direction of the text provided according to the Unicode Bidirectional
- * Algorithm.
+ * Algorithm.
* @details The base direction is derived from the first character in the string with bidirectional
- * character type L, R, or AL. If the first such character has type L, #I18N_UBIDI_LTR is
- * returned. If the first such character has type R or AL, #I18N_UBIDI_RTL is returned.
- * If the string does not contain any character of these types, then #I18N_UBIDI_NEUTRAL
- * is returned.
+ * character type L, R, or AL. If the first such character has type L, #I18N_UBIDI_LTR is
+ * returned. If the first such character has type R or AL, #I18N_UBIDI_RTL is returned.
+ * If the string does not contain any character of these types, then #I18N_UBIDI_NEUTRAL
+ * is returned.
*
- * This is a lightweight function for use when only the base direction is needed and no
- * further bidi processing of the text is needed.
+ * This is a lightweight function for use when only the base direction is needed and no
+ * further bidi processing of the text is needed.
* @since_tizen 3.0
*
- * @param[in] text A pointer to the @a text whose base direction is needed. Note: the @a text
- * must be (at least) @a length long.
- * @param[in] length The length of the @a text; if @a length == -1 then the text must be
- * zero-terminated
- * @param[out] direction Base direction of the @a text
+ * @param[in] text A pointer to the @a text whose base direction is needed. Note: the @a text
+ * must be (at least) @a length long.
+ * @param[in] length The length of the @a text; if @a length == -1 then the text must be
+ * zero-terminated
+ * @param[out] direction Base direction of the @a text
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_ubidi_get_base_direction(const i18n_uchar *text, int32_t length,
- i18n_ubidi_direction_e *direction);
+ i18n_ubidi_direction_e *direction);
/**
* @brief Gets the current callback function used for ubidi class determination.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph #i18n_ubidi_h object
- * @param[out] fn The callback function pointer. This can be @c NULL.
- * @param[out] context The callback's private context. This can be @c NULL.
+ * @param[in] ubidi The paragraph #i18n_ubidi_h object
+ * @param[out] fn The callback function pointer. This can be @c NULL.
+ * @param[out] context The callback's private context. This can be @c NULL.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_set_class_cb()
*/
int i18n_ubidi_get_class_cb(i18n_ubidi_h ubidi, i18n_ubidi_class_cb *fn,
- const void **context);
+ const void **context);
/**
* @brief Retrieves the ubidi class for a given code point.
* @details If an #i18n_ubidi_class_cb callback is defined and returns a value other than
- * #I18N_UBIDI_CLASS_DEFAULT, that value is used; otherwise the default class
- * determination mechanism is invoked.
+ * #I18N_UBIDI_CLASS_DEFAULT, that value is used; otherwise the default class
+ * determination mechanism is invoked.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph #i18n_ubidi_h object
- * @param[in] c The code point whose ubidi class must be retrieved
- * @param[out] direction The ubidi class for character @a c based on the given @a ubidi instance
+ * @param[in] ubidi The paragraph #i18n_ubidi_h object
+ * @param[in] c The code point whose ubidi class must be retrieved
+ * @param[out] direction The ubidi class for character @a c based on the given @a ubidi instance
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_class_cb()
*/
int i18n_ubidi_get_customized_class(i18n_ubidi_h ubidi, i18n_uchar32 c,
- i18n_uchar_direction_e *direction);
+ i18n_uchar_direction_e *direction);
/**
* @brief Gets the directionality of the text.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[out] direction A value of #I18N_UBIDI_LTR, #I18N_UBIDI_RTL or #I18N_UBIDI_MIXED
- * that indicates if the entire text represented by this object is
- * unidirectional, and which direction, or if it is mixed-directional.
- * Note - The value #I18N_UBIDI_NEUTRAL is never returned from this
- * method.
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[out] direction A value of #I18N_UBIDI_LTR, #I18N_UBIDI_RTL or #I18N_UBIDI_MIXED
+ * that indicates if the entire text represented by this object is
+ * unidirectional, and which direction, or if it is mixed-directional.
+ * Note - The value #I18N_UBIDI_NEUTRAL is never returned from this
+ * method.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the length of the text.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[out] length The length of the text that the #i18n_ubidi_h object was created for
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[out] length The length of the text that the #i18n_ubidi_h object was created for
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the level for one character.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[in] char_index The index of a character. It must be in the range
- * [0..i18n_ubidi_get_processed_length(@a ubidi)-1]
- * @param[out] level The level for the character at @a char_index (0 if @a char_index is not in
- * the valid range)
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[in] char_index The index of a character. It must be in the range
+ * [0..i18n_ubidi_get_processed_length(@a ubidi)-1]
+ * @param[out] level The level for the character at @a char_index (0 if @a char_index is not in
+ * the valid range)
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_get_processed_length()
*/
int i18n_ubidi_get_level_at(const i18n_ubidi_h ubidi, int32_t char_index,
- i18n_ubidi_level_t *level);
+ i18n_ubidi_level_t *level);
/**
* @brief Gets an array of levels for each character.
* @details Note that this function may allocate memory under some circumstances, unlike
- * i18n_ubidi_get_level_at().
+ * i18n_ubidi_get_level_at().
* @since_tizen 3.0
* @remarks @a levels should not be freed.
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object, whose text length must be
- * strictly positive
- * @param[out] levels The levels array for the text, or @c NULL if an error occurs
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object, whose text length must be
+ * strictly positive
+ * @param[out] levels The levels array for the text, or @c NULL if an error occurs
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the logical text position from a visual position.
* @details If such a mapping is used many times on the same #i18n_ubidi_h object, then calling
- * i18n_ubidi_get_visual_map() is more efficient.
+ * i18n_ubidi_get_visual_map() is more efficient.
*
- * The value returned may be #I18N_UBIDI_MAP_NOWHERE if there is no logical position
- * because the corresponding text character is a ubidi mark inserted in the output by
- * option #I18N_UBIDI_OPTION_INSERT_MARKS.
+ * The value returned may be #I18N_UBIDI_MAP_NOWHERE if there is no logical position
+ * because the corresponding text character is a ubidi mark inserted in the output by
+ * option #I18N_UBIDI_OPTION_INSERT_MARKS.
*
- * This is the inverse function to i18n_ubidi_get_visual_index().
+ * This is the inverse function to i18n_ubidi_get_visual_index().
*
- * When the visual output is altered by using options of i18n_ubidi_write_reordered() such
- * as #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC, #I18N_UBIDI_KEEP_BASE_COMBINING,
- * #I18N_UBIDI_OUTPUT_REVERSE, #I18N_UBIDI_REMOVE_BIDI_CONTROLS, the logical position
- * returned may not be correct.
- * It is advised to use, when possible, reordering options such as
- * #I18N_UBIDI_OPTION_INSERT_MARKS and #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
+ * When the visual output is altered by using options of i18n_ubidi_write_reordered() such
+ * as #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC, #I18N_UBIDI_KEEP_BASE_COMBINING,
+ * #I18N_UBIDI_OUTPUT_REVERSE, #I18N_UBIDI_REMOVE_BIDI_CONTROLS, the logical position
+ * returned may not be correct.
+ * It is advised to use, when possible, reordering options such as
+ * #I18N_UBIDI_OPTION_INSERT_MARKS and #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[in] visual_index The visual position of a character
- * @param[out] logical_index The index of this character in the text
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[in] visual_index The visual position of a character
+ * @param[out] logical_index The index of this character in the text
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets a logical-to-visual index map (array) for the characters in the #i18n_ubidi_h (paragraph or
- * line) object.
+ * line) object.
* @details Some values in the map may be #I18N_UBIDI_MAP_NOWHERE if the corresponding text
- * characters are ubidi controls removed from the visual output by the option
- * #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
- *
- * When the visual output is altered by using options of i18n_ubidi_write_reordered()
- * such as #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC, #I18N_UBIDI_KEEP_BASE_COMBINING,
- * #I18N_UBIDI_OUTPUT_REVERSE, #I18N_UBIDI_REMOVE_BIDI_CONTROLS, the visual positions
- * returned may not be correct. It is advised to use, when possible, reordering options
- * such as #I18N_UBIDI_OPTION_INSERT_MARKS and #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
- *
- * Note that in right-to-left runs, this mapping places second surrogates before first
- * ones (which is generally a bad idea) and combining characters before base characters.
- * Use of i18n_ubidi_write_reordered(), optionally with the #I18N_UBIDI_KEEP_BASE_COMBINING
- * option can be considered instead of using the mapping, in order to avoid these issues.
+ * characters are ubidi controls removed from the visual output by the option
+ * #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
+ *
+ * When the visual output is altered by using options of i18n_ubidi_write_reordered()
+ * such as #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC, #I18N_UBIDI_KEEP_BASE_COMBINING,
+ * #I18N_UBIDI_OUTPUT_REVERSE, #I18N_UBIDI_REMOVE_BIDI_CONTROLS, the visual positions
+ * returned may not be correct. It is advised to use, when possible, reordering options
+ * such as #I18N_UBIDI_OPTION_INSERT_MARKS and #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
+ *
+ * Note that in right-to-left runs, this mapping places second surrogates before first
+ * ones (which is generally a bad idea) and combining characters before base characters.
+ * Use of i18n_ubidi_write_reordered(), optionally with the #I18N_UBIDI_KEEP_BASE_COMBINING
+ * option can be considered instead of using the mapping, in order to avoid these issues.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[out] index_map A pointer to an array of i18n_ubidi_get_processed_length()
- * indexes which will reflect the reordering of the characters.
- * If option #I18N_UBIDI_OPTION_INSERT_MARKS is set, the number of
- * elements allocated in the @a index_map must be no less than
- * i18n_ubidi_get_result_length().
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[out] index_map A pointer to an array of i18n_ubidi_get_processed_length()
+ * indexes which will reflect the reordering of the characters.
+ * If option #I18N_UBIDI_OPTION_INSERT_MARKS is set, the number of
+ * elements allocated in the @a index_map must be no less than
+ * i18n_ubidi_get_result_length().
*
- * The array does not need to be initialized.
+ * The array does not need to be initialized.
*
- * The index map will result in
- * index_map[logical_index] == visual_index.
+ * The index map will result in
+ * index_map[logical_index] == visual_index.
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
/**
* @brief Gets a logical run.
* @details This function returns information about a run and is used to retrieve runs in logical
- * order.
+ * order.
*
- * This is especially useful for line-breaking on a paragraph.
+ * This is especially useful for line-breaking on a paragraph.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[in] logical_position A logical position within the source text
- * @param[out] logical_limit The limit of the corresponding run. The l-value that you
- * point to here may be the same expression (variable) as
- * the one for @a logical_position.
- * This pointer can be @c NULL if this value is not necessary.
- * @param[out] level The level of the corresponding run. This pointer can be
- * @c NULL if this value is not necessary.
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[in] logical_position A logical position within the source text
+ * @param[out] logical_limit The limit of the corresponding run. The l-value that you
+ * point to here may be the same expression (variable) as
+ * the one for @a logical_position.
+ * This pointer can be @c NULL if this value is not necessary.
+ * @param[out] level The level of the corresponding run. This pointer can be
+ * @c NULL if this value is not necessary.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_get_processed_length()
*/
int i18n_ubidi_get_logical_run(const i18n_ubidi_h ubidi,
- int32_t logical_position,
- int32_t *logical_limit,
- i18n_ubidi_level_t *level);
+ int32_t logical_position,
+ int32_t *logical_limit,
+ i18n_ubidi_level_t *level);
/**
* @brief Gets a paragraph, given a position within the text.
* @details This function returns information about a paragraph.
*
- * Note: if the paragraph index is known, it is more efficient to retrieve the paragraph
- * information using i18n_ubidi_get_paragraph_by_index().
+ * Note: if the paragraph index is known, it is more efficient to retrieve the paragraph
+ * information using i18n_ubidi_get_paragraph_by_index().
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[in] char_index The index of a character within the text, in the range
- * [0..i18n_ubidi_get_processed_length(@a ubidi)-1]
- * @param[out] para_start The index of the first character of the paragraph in the text.
- * This pointer can be @c NULL if this value is not necessary.
- * @param[out] para_limit The limit of the paragraph. The l-value that you point to here
- * may be the same expression (variable) as the one for
- * @a char_index. This pointer can be @c NULL if this value is not
- * necessary.
- * @param[out] para_level The level of the paragraph. This pointer can be @c NULL if this
- * value is not necessary.
- * @param[out] index The index of the paragraph containing the specified position
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[in] char_index The index of a character within the text, in the range
+ * [0..i18n_ubidi_get_processed_length(@a ubidi)-1]
+ * @param[out] para_start The index of the first character of the paragraph in the text.
+ * This pointer can be @c NULL if this value is not necessary.
+ * @param[out] para_limit The limit of the paragraph. The l-value that you point to here
+ * may be the same expression (variable) as the one for
+ * @a char_index. This pointer can be @c NULL if this value is not
+ * necessary.
+ * @param[out] para_level The level of the paragraph. This pointer can be @c NULL if this
+ * value is not necessary.
+ * @param[out] index The index of the paragraph containing the specified position
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_get_processed_length()
*/
int i18n_ubidi_get_paragraph(const i18n_ubidi_h ubidi,
- int32_t char_index,
- int32_t *para_start,
- int32_t *para_limit,
- i18n_ubidi_level_t *para_level,
- int32_t *index);
+ int32_t char_index,
+ int32_t *para_start,
+ int32_t *para_limit,
+ i18n_ubidi_level_t *para_level,
+ int32_t *index);
/**
* @brief Gets a paragraph, given the index of this paragraph.
* @details This function returns information about paragraphs.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph #i18n_ubidi_h object
- * @param[in] para_index The number of the paragraph, in the range
- * [0..i18n_ubidi_count_paragraphs(@a ubidi)-1]
- * @param[out] para_start The index of the first character of the paragraph in the text.
- * This pointer can be @c NULL if this value is not necessary.
- * @param[out] para_limit The limit of the paragraph. This pointer can be @c NULL if this
- * value is not necessary.
- * @param[out] para_level The level of the paragraph. This pointer can be @c NULL if this
- * value is not necessary.
+ * @param[in] ubidi The paragraph #i18n_ubidi_h object
+ * @param[in] para_index The number of the paragraph, in the range
+ * [0..i18n_ubidi_count_paragraphs(@a ubidi)-1]
+ * @param[out] para_start The index of the first character of the paragraph in the text.
+ * This pointer can be @c NULL if this value is not necessary.
+ * @param[out] para_limit The limit of the paragraph. This pointer can be @c NULL if this
+ * value is not necessary.
+ * @param[out] para_level The level of the paragraph. This pointer can be @c NULL if this
+ * value is not necessary.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_ubidi_get_paragraph_by_index(const i18n_ubidi_h ubidi,
- int32_t para_index,
- int32_t *para_start,
- int32_t *para_limit,
- i18n_ubidi_level_t *para_level);
+ int32_t para_index,
+ int32_t *para_start,
+ int32_t *para_limit,
+ i18n_ubidi_level_t *para_level);
/**
* @brief Gets the paragraph level of the text.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[out] level The paragraph level. If there are multiple paragraphs, their
- * level may vary if the required para_level is
- * #I18N_UBIDI_DEFAULT_LTR or #I18N_UBIDI_DEFAULT_RTL. In that case,
- * the level of the first paragraph is returned.
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[out] level The paragraph level. If there are multiple paragraphs, their
+ * level may vary if the required para_level is
+ * #I18N_UBIDI_DEFAULT_LTR or #I18N_UBIDI_DEFAULT_RTL. In that case,
+ * the level of the first paragraph is returned.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the length of the source text processed by the last call to i18n_ubidi_set_para().
* @details This length may be different from the length of the source text if option
- * #I18N_UBIDI_OPTION_STREAMING has been set.
- *
- * 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
- * i18n_ubidi_set_para() (which receives unprocessed source text) and i18n_ubidi_get_length()
- * (which returns the original length of the source text).
- *
- * In particular, the processed @a length is the one to consider in the following cases:
- * - maximum value of the limit argument of i18n_ubidi_set_line()
- * - maximum value of the char_index argument of i18n_ubidi_get_paragraph()
- * - maximum value of the char_index argument of i18n_ubidi_get_level_at()
- * - number of elements in the array returned by i18n_ubidi_get_levels()
- * - maximum value of the logical_start argument of i18n_ubidi_get_logical_run()
- * - maximum value of the logical_index argument of i18n_ubidi_get_visual_index()
- * - number of elements filled in the @a index_map argument of i18n_ubidi_get_logical_map()
- * - length of text processed by i18n_ubidi_write_reordered()
+ * #I18N_UBIDI_OPTION_STREAMING has been set.
+ *
+ * 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
+ * i18n_ubidi_set_para() (which receives unprocessed source text) and i18n_ubidi_get_length()
+ * (which returns the original length of the source text).
+ *
+ * In particular, the processed @a length is the one to consider in the following cases:
+ * - maximum value of the limit argument of i18n_ubidi_set_line()
+ * - maximum value of the char_index argument of i18n_ubidi_get_paragraph()
+ * - maximum value of the char_index argument of i18n_ubidi_get_level_at()
+ * - number of elements in the array returned by i18n_ubidi_get_levels()
+ * - maximum value of the logical_start argument of i18n_ubidi_get_logical_run()
+ * - maximum value of the logical_index argument of i18n_ubidi_get_visual_index()
+ * - number of elements filled in the @a index_map argument of i18n_ubidi_get_logical_map()
+ * - length of text processed by i18n_ubidi_write_reordered()
*
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph #i18n_ubidi_h object
- * @param[out] length The length of the part of the source text processed by the last
- * call to i18n_ubidi_set_para()
+ * @param[in] ubidi The paragraph #i18n_ubidi_h object
+ * @param[out] length The length of the part of the source text processed by the last
+ * call to i18n_ubidi_set_para()
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the requested reordering mode for a given #i18n_ubidi_h object.
* @since_tizen 3.0
*
- * @param[in] ubidi An #i18n_ubidi_h object
- * @param[out] mode The current reordering mode of the @a ubidi object
+ * @param[in] ubidi An #i18n_ubidi_h object
+ * @param[out] mode The current reordering mode of the @a ubidi object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @brief Gets the reordering options applied to a given #i18n_ubidi_h object.
* @since_tizen 3.0
*
- * @param[in] ubidi An #i18n_ubidi_h object
- * @param[out] options The current reordering options of the @a ubidi object;
- * #i18n_ubidi_reordering_option_e values combined with bitwise 'or'
+ * @param[in] ubidi An #i18n_ubidi_h object
+ * @param[out] options The current reordering options of the @a ubidi object;
+ * #i18n_ubidi_reordering_option_e values combined with bitwise 'or'
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the length of the reordered text resulting from the last call to
- * i18n_ubidi_set_para().
+ * i18n_ubidi_set_para().
* @details This length may be different from the length of the source text if option
- * #I18N_UBIDI_OPTION_INSERT_MARKS or option #I18N_UBIDI_OPTION_REMOVE_CONTROLS has been set.
+ * #I18N_UBIDI_OPTION_INSERT_MARKS or option #I18N_UBIDI_OPTION_REMOVE_CONTROLS has been set.
*
- * This resulting @a length is the one to consider in the following cases:
- * - maximum value of the visual_index argument of i18n_ubidi_get_logical_index()
- * - number of elements of the a index_map argument of i18n_ubidi_get_visual_map()
+ * This resulting @a length is the one to consider in the following cases:
+ * - maximum value of the visual_index argument of i18n_ubidi_get_logical_index()
+ * - number of elements of the a index_map argument of i18n_ubidi_get_visual_map()
*
- * Note that this @a length stays identical to the source text length if ubidi marks are
- * inserted or removed using option bits of i18n_ubidi_write_reordered(), or if option
- * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L has been set.
+ * Note that this @a length stays identical to the source text length if ubidi marks are
+ * inserted or removed using option bits of i18n_ubidi_write_reordered(), or if option
+ * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L has been set.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph #i18n_ubidi_h object
- * @param[out] length The length of the reordered text resulting from the last call to
- * i18n_ubidi_set_para()
+ * @param[in] ubidi The paragraph #i18n_ubidi_h object
+ * @param[out] length The length of the reordered text resulting from the last call to
+ * i18n_ubidi_set_para()
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @since_tizen 3.0
* @remarks @a text should be freed with free().
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[out] text The pointer to the text that the @a ubidi object was created for
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[out] text The pointer to the text that the @a ubidi object was created for
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets the visual position from a logical text position.
* @details If such a mapping is used many times on the same #i18n_ubidi_h object, then calling
- * i18n_ubidi_get_logical_map() is more efficient.
- *
- * The value returned may be #I18N_UBIDI_MAP_NOWHERE if there is no visual position because
- * the corresponding text character is an ubidi control removed from output by the option
- * #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
- *
- * When the visual output is altered by using options of i18n_ubidi_write_reordered()
- * such as #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC, #I18N_UBIDI_KEEP_BASE_COMBINING,
- * #I18N_UBIDI_OUTPUT_REVERSE, #I18N_UBIDI_REMOVE_BIDI_CONTROLS, the visual position
- * returned may not be correct.
- * It is advised to use, when possible, reordering options such as
- * #I18N_UBIDI_OPTION_INSERT_MARKS and #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
- *
- * Note that in right-to-left runs, this mapping places second surrogates before first ones
- * (which is generally a bad idea) and combining characters before base characters. Use of
- * i18n_ubidi_write_reordered(), optionally with the #I18N_UBIDI_KEEP_BASE_COMBINING
- * option can be considered instead of using the mapping, in order to avoid these issues.
+ * i18n_ubidi_get_logical_map() is more efficient.
+ *
+ * The value returned may be #I18N_UBIDI_MAP_NOWHERE if there is no visual position because
+ * the corresponding text character is an ubidi control removed from output by the option
+ * #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
+ *
+ * When the visual output is altered by using options of i18n_ubidi_write_reordered()
+ * such as #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC, #I18N_UBIDI_KEEP_BASE_COMBINING,
+ * #I18N_UBIDI_OUTPUT_REVERSE, #I18N_UBIDI_REMOVE_BIDI_CONTROLS, the visual position
+ * returned may not be correct.
+ * It is advised to use, when possible, reordering options such as
+ * #I18N_UBIDI_OPTION_INSERT_MARKS and #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
+ *
+ * Note that in right-to-left runs, this mapping places second surrogates before first ones
+ * (which is generally a bad idea) and combining characters before base characters. Use of
+ * i18n_ubidi_write_reordered(), optionally with the #I18N_UBIDI_KEEP_BASE_COMBINING
+ * option can be considered instead of using the mapping, in order to avoid these issues.
* @since_tizen 3.0
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[in] logical_index The index of a character in the text
- * @param[out] visual_index The visual position of this character
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[in] logical_index The index of a character in the text
+ * @param[out] visual_index The visual position of this character
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets a visual-to-logical index map (array) for the characters in the #i18n_ubidi_h
- * (paragraph or line) object.
+ * (paragraph or line) object.
* @details Some values in the map may be #I18N_UBIDI_MAP_NOWHERE if the corresponding text
- * characters are ubidi marks inserted in the visual output by the option
- * #I18N_UBIDI_OPTION_INSERT_MARKS.
- *
- * When the visual output is altered by using options of i18n_ubidi_write_reordered()
- * such as #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC, #I18N_UBIDI_KEEP_BASE_COMBINING,
- * #I18N_UBIDI_OUTPUT_REVERSE, #I18N_UBIDI_REMOVE_BIDI_CONTROLS, the logical positions
- * returned may not be correct. It is advised to use, when possible, reordering options
- * such as #I18N_UBIDI_OPTION_INSERT_MARKS and #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
+ * characters are ubidi marks inserted in the visual output by the option
+ * #I18N_UBIDI_OPTION_INSERT_MARKS.
+ *
+ * When the visual output is altered by using options of i18n_ubidi_write_reordered()
+ * such as #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC, #I18N_UBIDI_KEEP_BASE_COMBINING,
+ * #I18N_UBIDI_OUTPUT_REVERSE, #I18N_UBIDI_REMOVE_BIDI_CONTROLS, the logical positions
+ * returned may not be correct. It is advised to use, when possible, reordering options
+ * such as #I18N_UBIDI_OPTION_INSERT_MARKS and #I18N_UBIDI_OPTION_REMOVE_CONTROLS.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[out] index_map Pointer to an array of i18n_ubidi_get_result_length() indexes
- * which will reflect the reordering of the characters. If option
- * #I18N_UBIDI_OPTION_REMOVE_CONTROLS is set, the number of
- * elements allocated in @a index_map must be no less than
- * i18n_ubidi_get_processed_length(). The array does not need to
- * be initialized.
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[out] index_map Pointer to an array of i18n_ubidi_get_result_length() indexes
+ * which will reflect the reordering of the characters. If option
+ * #I18N_UBIDI_OPTION_REMOVE_CONTROLS is set, the number of
+ * elements allocated in @a index_map must be no less than
+ * i18n_ubidi_get_processed_length(). The array does not need to
+ * be initialized.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets one run's logical start, length, and directionality, which can be 0 for LTR or 1 for
- * RTL.
+ * RTL.
* @details In an RTL run, the character at the logical start is visually on the right of the
- * displayed run.
- * The @a length is the number of characters in the run.
- * i18n_ubidi_count_runs() should be called before the runs are retrieved.
+ * displayed run.
+ * The @a length is the number of characters in the run.
+ * i18n_ubidi_count_runs() should be called before the runs are retrieved.
*
- * Note that in right-to-left runs, code like this places second surrogates before first
- * ones (which is generally a bad idea) and combining characters before base characters.
+ * Note that in right-to-left runs, code like this places second surrogates before first
+ * ones (which is generally a bad idea) and combining characters before base characters.
*
- * Use of i18n_ubidi_write_reordered(), optionally with the #I18N_UBIDI_KEEP_BASE_COMBINING
- * option, can be considered in order to avoid these issues.
+ * Use of i18n_ubidi_write_reordered(), optionally with the #I18N_UBIDI_KEEP_BASE_COMBINING
+ * option, can be considered in order to avoid these issues.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
- * @param[in] run_index The number of the run in visual order, in the range
- * [0..i18n_ubidi_count_runs(@a ubidi)-1]
- * @param[out] logical_index The first logical character index in the text. The pointer
- * may be @c NULL if this index is not needed
- * @param[out] length The number of characters (at least one) in the run.
- * The pointer may be @c NULL if this is not needed.
- * @param[out] direction The directionality of the run, #I18N_UBIDI_LTR == 0 or
- * #I18N_UBIDI_RTL == 1, never #I18N_UBIDI_MIXED, never
- * #I18N_UBIDI_NEUTRAL.
+ * @param[in] ubidi The paragraph or line #i18n_ubidi_h object
+ * @param[in] run_index The number of the run in visual order, in the range
+ * [0..i18n_ubidi_count_runs(@a ubidi)-1]
+ * @param[out] logical_index The first logical character index in the text. The pointer
+ * may be @c NULL if this index is not needed
+ * @param[out] length The number of characters (at least one) in the run.
+ * The pointer may be @c NULL if this is not needed.
+ * @param[out] direction The directionality of the run, #I18N_UBIDI_LTR == 0 or
+ * #I18N_UBIDI_RTL == 1, never #I18N_UBIDI_MIXED, never
+ * #I18N_UBIDI_NEUTRAL.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_count_runs()
*/
int i18n_ubidi_get_visual_run(i18n_ubidi_h ubidi,
- int32_t run_index,
- int32_t *logical_index,
- int32_t *length,
- i18n_ubidi_direction_e *direction);
+ int32_t run_index,
+ int32_t *logical_index,
+ int32_t *length,
+ i18n_ubidi_direction_e *direction);
/**
* @brief Inverts an index map.
* @since_tizen 3.0
* @remarks The @a dest_map array should be provided by the user.
*
- * @param[in] src_map An array with @a length elements which defines the original mapping
- * from a source array containing @a length elements to a destination
- * array. Some elements of the source array may have no mapping in
- * the destination array. In that case, their value will be the
- * special value #I18N_UBIDI_MAP_NOWHERE.
- * All elements must be >=0 or equal to #I18N_UBIDI_MAP_NOWHERE.
- * Some elements may have a value >= length, if the destination array
- * has more elements than the source array. There must be no
- * duplicate indexes (two or more elements with the same value
- * except #I18N_UBIDI_MAP_NOWHERE).
- * @param[in] length The length of each array
- * @param[out] dest_map An array with a number of elements equal to 1 + the highest
- * value in @a src_map. @a dest_map will be filled with the inverse
- * mapping. If element with index i in @a src_map has a value k
- * different from #I18N_UBIDI_MAP_NOWHERE, this means that element i
- * of the source array maps to element k in the destination array.
- * The inverse map will have value i in its k-th element.
- * For all elements of the destination array which do not map to an
- * element in the source array, the corresponding element in the
- * inverse map will have a value equal to #I18N_UBIDI_MAP_NOWHERE.
+ * @param[in] src_map An array with @a length elements which defines the original mapping
+ * from a source array containing @a length elements to a destination
+ * array. Some elements of the source array may have no mapping in
+ * the destination array. In that case, their value will be the
+ * special value #I18N_UBIDI_MAP_NOWHERE.
+ * All elements must be >=0 or equal to #I18N_UBIDI_MAP_NOWHERE.
+ * Some elements may have a value >= length, if the destination array
+ * has more elements than the source array. There must be no
+ * duplicate indexes (two or more elements with the same value
+ * except #I18N_UBIDI_MAP_NOWHERE).
+ * @param[in] length The length of each array
+ * @param[out] dest_map An array with a number of elements equal to 1 + the highest
+ * value in @a src_map. @a dest_map will be filled with the inverse
+ * mapping. If element with index i in @a src_map has a value k
+ * different from #I18N_UBIDI_MAP_NOWHERE, this means that element i
+ * of the source array maps to element k in the destination array.
+ * The inverse map will have value i in its k-th element.
+ * For all elements of the destination array which do not map to an
+ * element in the source array, the corresponding element in the
+ * inverse map will have a value equal to #I18N_UBIDI_MAP_NOWHERE.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Gets whether the given #i18n_ubidi_h object is set to perform the inverse ubidi algorithm.
* @details Note: calling this function after setting the reordering mode with
- * i18n_ubidi_set_reordering_mode() will return @c true if the reordering mode was set
- * to #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L, @c false for all other values.
+ * i18n_ubidi_set_reordering_mode() will return @c true if the reordering mode was set
+ * to #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L, @c false for all other values.
* @since_tizen 3.0
*
- * @param[in] ubidi An #i18n_ubidi_h object
- * @param[out] is_inverse @c true if the @a ubidi object is set to perform the inverse ubidi
- * algorithm by handling numbers as L
+ * @param[in] ubidi An #i18n_ubidi_h object
+ * @param[out] is_inverse @c true if the @a ubidi object is set to perform the inverse ubidi
+ * algorithm by handling numbers as L
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* so that successive paragraphs progress from left to right.
* @since_tizen 3.0
*
- * @param[in] ubidi An #i18n_ubidi_h object
- * @param[out] is_order @c true if the @a ubidi object is set to allocate level 0 to block
- * separators
+ * @param[in] ubidi An #i18n_ubidi_h object
+ * @param[out] is_order @c true if the @a ubidi object is set to allocate level 0 to block
+ * separators
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Creates an ubidi object.
* @details Such an object is initially empty. It is assigned the ubidi properties of a piece of text
- * containing one or more paragraphs by i18n_ubidi_set_para() or the ubidi properties of
- * a line within a paragraph by i18n_ubidi_set_line().
+ * containing one or more paragraphs by i18n_ubidi_set_para() or the ubidi properties of
+ * a line within a paragraph by i18n_ubidi_set_line().
*
- * This object can be reused for as long as it is not deallocated by calling
- * i18n_ubidi_destroy().
+ * This object can be reused for as long as it is not deallocated by calling
+ * i18n_ubidi_destroy().
*
- * i18n_ubidi_set_para() and i18n_ubidi_set_line() will allocate additional memory for
- * internal structures as necessary.
+ * i18n_ubidi_set_para() and i18n_ubidi_set_line() will allocate additional memory for
+ * internal structures as necessary.
* @since_tizen 3.0
* @remarks @a ubidi should be destroyed with i18n_ubidi_destroy().
*
- * @param[out] ubidi An empty #i18n_ubidi_h object
+ * @param[out] ubidi An empty #i18n_ubidi_h object
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Creates an ubidi structure with preallocated memory for internal structures.
* @details This function provides an ubidi object like i18n_ubidi_create() with no arguments,
- * but it also preallocates memory for internal structures according to the sizings
- * supplied by the caller.
- *
- * Subsequent functions will not allocate any more memory, and are thus guaranteed not
- * to fail because of lack of memory.
- *
- * The preallocation can be limited to some of the
- * internal memory by setting some values to 0 here. That means that if, e.g.,
- * @a max_run_count cannot be reasonably predetermined and should not be set to @a max_length
- * (the only failproof value) to avoid wasting memory, then @a max_run_count could be set to
- * 0 here and the internal structures that are associated with it will be allocated on
- * demand, just like with i18n_ubidi_create().
+ * but it also preallocates memory for internal structures according to the sizings
+ * supplied by the caller.
+ *
+ * Subsequent functions will not allocate any more memory, and are thus guaranteed not
+ * to fail because of lack of memory.
+ *
+ * The preallocation can be limited to some of the
+ * internal memory by setting some values to 0 here. That means that if, e.g.,
+ * @a max_run_count cannot be reasonably predetermined and should not be set to @a max_length
+ * (the only failproof value) to avoid wasting memory, then @a max_run_count could be set to
+ * 0 here and the internal structures that are associated with it will be allocated on
+ * demand, just like with i18n_ubidi_create().
* @since_tizen 3.0
* @remarks @a ubidi should be destroyed with i18n_ubidi_destroy().
*
- * @param[in] max_length 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.
- * @param[in] max_run_count 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.
- * The number of runs depends on the actual text and maybe
- * anywhere between 1 and @a max_length. It is typically small
- * @param[out] ubidi An empty #i18n_ubidi_h handle with preallocated memory
+ * @param[in] max_length 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.
+ * @param[in] max_run_count 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.
+ * The number of runs depends on the actual text and maybe
+ * anywhere between 1 and @a max_length. It is typically small
+ * @param[out] ubidi An empty #i18n_ubidi_h handle with preallocated memory
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets whether block separators must be allocated level zero, so that successive
- * paragraphs will progress from left to right.
+ * paragraphs will progress from left to right.
* @details This function must be called before i18n_ubidi_set_para(). 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.
+ * 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.
* @since_tizen 3.0
- * @param[in] ubidi An #i18n_ubidi_h object
- * @param[in] order_paragraphs_ltr Specifies whether paragraph separators (B) must receive
- * level 0, so that successive paragraphs progress from left
- * to right
+ * @param[in] ubidi An #i18n_ubidi_h object
+ * @param[in] order_paragraphs_ltr Specifies whether paragraph separators (B) must receive
+ * level 0, so that successive paragraphs progress from left
+ * to right
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Performs logical reordering.
* @details This is a convenience function that does not use an #i18n_ubidi_h object.
- * 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 i18n_ubidi_get_logical_map() on an #i18n_ubidi_h object.
+ * 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 i18n_ubidi_get_logical_map() on an #i18n_ubidi_h object.
*
- * The index map will result in index_map[logical_index] == visual_index.
+ * The index map will result in index_map[logical_index] == visual_index.
* @since_tizen 3.0
*
- * @param[in] levels An array with @a length levels that have been determined by the
- * application
- * @param[in] length The number of levels in the array, or, semantically, the number
- * of objects to be reordered. @a length must be > 0.
- * @param[out] index_map Pointer to an array of @a length indexes which will reflect the
- * reordering of the characters. The array does not need to be
- * initialized.
+ * @param[in] levels An array with @a length levels that have been determined by the
+ * application
+ * @param[in] length The number of levels in the array, or, semantically, the number
+ * of objects to be reordered. @a length must be > 0.
+ * @param[out] index_map Pointer to an array of @a length indexes which will reflect the
+ * reordering of the characters. The array does not need to be
+ * initialized.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_ubidi_reorder_logical(const i18n_ubidi_level_t *levels, int32_t length,
- int32_t *index_map);
+ int32_t *index_map);
/**
* @brief Performs visual reordering.
* @details This is a convenience function that does not use an #i18n_ubidi_h object.
- * 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 i18n_ubidi_get_visual_map() on an #i18n_ubidi_h handle.
- * The index map will result in @a index_map[visual_index] == logical_index.
+ * 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 i18n_ubidi_get_visual_map() on an #i18n_ubidi_h handle.
+ * The index map will result in @a index_map[visual_index] == logical_index.
* @since_tizen 3.0
*
- * @param[in] levels An array with @a length levels that have been determined by the
- * application
- * @param[in] length The number of levels in the array, or, semantically, the number
- * of objects to be reordered. @a length must be > 0.
- * @param[out] index_map Pointer to an array of @a length indexes which will reflect the
- * reordering of the characters. The array does not need to be
- * initialized.
+ * @param[in] levels An array with @a length levels that have been determined by the
+ * application
+ * @param[in] length The number of levels in the array, or, semantically, the number
+ * of objects to be reordered. @a length must be > 0.
+ * @param[out] index_map Pointer to an array of @a length indexes which will reflect the
+ * reordering of the characters. The array does not need to be
+ * initialized.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets the callback function and callback data used by the UBA implementation for ubidi class
- * determination.
+ * determination.
* @details This may be useful for assigning ubidi 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.
+ * 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.
* @since_tizen 3.0
*
- * @param[in] ubidi The paragraph #i18n_ubidi_h object
- * @param[in] new_fn The new callback function pointer
- * @param[in] new_context The new callback context pointer. This can be @c NULL.
- * @param[out] old_fn The old callback function pointer. This can be @c NULL.
- * @param[out] old_context The old callback's context. This can be @c NULL.
+ * @param[in] ubidi The paragraph #i18n_ubidi_h object
+ * @param[in] new_fn The new callback function pointer
+ * @param[in] new_context The new callback context pointer. This can be @c NULL.
+ * @param[out] old_fn The old callback function pointer. This can be @c NULL.
+ * @param[out] old_context The old callback's context. This can be @c NULL.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_get_class_cb()
*/
int i18n_ubidi_set_class_cb(i18n_ubidi_h ubidi,
- i18n_ubidi_class_cb new_fn,
- const void *new_context,
- i18n_ubidi_class_cb *old_fn,
- const void **old_context);
+ i18n_ubidi_class_cb new_fn,
+ const void *new_context,
+ i18n_ubidi_class_cb *old_fn,
+ const void **old_context);
/**
* @brief Sets the context before a call to i18n_ubidi_set_para().
* @details i18n_ubidi_set_para() computes the left-right directionality for a given piece of text
- * which is supplied as one of its arguments. Sometimes this piece of text (the "main
- * text") should be considered in context, because text appearing before ("prologue")
- * and/or after ("epilogue") the main text may affect the result of this computation.
- *
- * This function specifies the prologue and/or the epilogue for the next call to
- * i18n_ubidi_set_para(). The characters specified as prologue and epilogue should not
- * be modified by the calling program until the call to i18n_ubidi_set_para() has returned.
- * If successive calls to i18n_ubidi_set_para() all need specification of a context,
- * i18n_ubidi_set_context() must be called before each call to i18n_ubidi_set_para().
- * In other words, a context is not "remembered" after the following successful call to
- * i18n_ubidi_set_para().
- *
- * If a call to i18n_ubidi_set_para() specifies #I18N_UBIDI_DEFAULT_LTR or
- * #I18N_UBIDI_DEFAULT_RTL as para_level and is preceded by a call to
- * i18n_ubidi_set_context() which specifies a prologue, the paragraph level will be
- * computed taking into consideration the text in the prologue.
- *
- * When i18n_ubidi_set_para() is called without a previous call to i18n_ubidi_set_context(),
- * the main text is handled as if preceded and followed by strong directional characters
- * at the current paragraph level. Calling i18n_ubidi_set_context() with specification of
- * a prologue will change this behavior by handling the main text as if preceded by the
- * last strong character appearing in the prologue, if any. Calling
- * i18n_ubidi_set_context() with specification of an epilogue will change the behavior of
- * i18n_ubidi_set_para() by handling the main text as if followed by the first strong
- * character or digit appearing in the epilogue, if any.
- *
- * Note 1: if i18n_ubidi_set_context() is called repeatedly without calling
- * i18n_ubidi_set_para(), the earlier calls have no effect, only the last call will be
- * remembered for the next call to i18n_ubidi_set_para().
- *
- * Note 2: calling i18n_ubidi_set_context(ubidi, NULL, 0, NULL, 0) cancels any previous
- * setting of non-empty prologue or epilogue. The next call to i18n_ubidi_set_para() will
- * process no prologue or epilogue.
- *
- * Note 3: users must be aware that even after setting the context before a call to
- * i18n_ubidi_set_para() to perform e.g. a logical to visual transformation, the resulting
- * string may not be identical to what it would have been if all the text, including
- * prologue and epilogue, had been processed together.
- * Example (upper case letters represent RTL characters):
- *
- * prologue = <code>"abc DE"</code>\n
- * epilogue = none\n
- * main text = <code>"FGH xyz"</code>\n
- * para_level = I18N_UBIDI_LTR\n
- * display without prologue = <code>"HGF xyz"</code> ("HGF" is adjacent to "xyz")\n
- * display with prologue = <code>"abc HGFED xyz"</code> ("HGF" is not adjacent to "xyz")\n
+ * which is supplied as one of its arguments. Sometimes this piece of text (the "main
+ * text") should be considered in context, because text appearing before ("prologue")
+ * and/or after ("epilogue") the main text may affect the result of this computation.
+ *
+ * This function specifies the prologue and/or the epilogue for the next call to
+ * i18n_ubidi_set_para(). The characters specified as prologue and epilogue should not
+ * be modified by the calling program until the call to i18n_ubidi_set_para() has returned.
+ * If successive calls to i18n_ubidi_set_para() all need specification of a context,
+ * i18n_ubidi_set_context() must be called before each call to i18n_ubidi_set_para().
+ * In other words, a context is not "remembered" after the following successful call to
+ * i18n_ubidi_set_para().
+ *
+ * If a call to i18n_ubidi_set_para() specifies #I18N_UBIDI_DEFAULT_LTR or
+ * #I18N_UBIDI_DEFAULT_RTL as para_level and is preceded by a call to
+ * i18n_ubidi_set_context() which specifies a prologue, the paragraph level will be
+ * computed taking into consideration the text in the prologue.
+ *
+ * When i18n_ubidi_set_para() is called without a previous call to i18n_ubidi_set_context(),
+ * the main text is handled as if preceded and followed by strong directional characters
+ * at the current paragraph level. Calling i18n_ubidi_set_context() with specification of
+ * a prologue will change this behavior by handling the main text as if preceded by the
+ * last strong character appearing in the prologue, if any. Calling
+ * i18n_ubidi_set_context() with specification of an epilogue will change the behavior of
+ * i18n_ubidi_set_para() by handling the main text as if followed by the first strong
+ * character or digit appearing in the epilogue, if any.
+ *
+ * Note 1: if i18n_ubidi_set_context() is called repeatedly without calling
+ * i18n_ubidi_set_para(), the earlier calls have no effect, only the last call will be
+ * remembered for the next call to i18n_ubidi_set_para().
+ *
+ * Note 2: calling i18n_ubidi_set_context(ubidi, NULL, 0, NULL, 0) cancels any previous
+ * setting of non-empty prologue or epilogue. The next call to i18n_ubidi_set_para() will
+ * process no prologue or epilogue.
+ *
+ * Note 3: users must be aware that even after setting the context before a call to
+ * i18n_ubidi_set_para() to perform e.g. a logical to visual transformation, the resulting
+ * string may not be identical to what it would have been if all the text, including
+ * prologue and epilogue, had been processed together.
+ * Example (upper case letters represent RTL characters):
+ *
+ * prologue = <code>"abc DE"</code>\n
+ * epilogue = none\n
+ * main text = <code>"FGH xyz"</code>\n
+ * para_level = I18N_UBIDI_LTR\n
+ * display without prologue = <code>"HGF xyz"</code> ("HGF" is adjacent to "xyz")\n
+ * display with prologue = <code>"abc HGFED xyz"</code> ("HGF" is not adjacent to "xyz")\n
* @since_tizen 3.0
*
- * @param[in] ubidi A paragraph #i18n_ubidi_h object
- * @param[in] prologue Pointer to the text which precedes the text that will be specified
- * in a coming call to i18n_ubidi_set_para(). If there is no prologue
- * to consider, then @a pro_length must be zero and this pointer can be
- * @c NULL.
- * @param[in] pro_length The length of the @a prologue; if @a pro_length == -1 then the prologue
- * must be zero-terminated. Otherwise @a pro_length must be >= 0.
- * If @a pro_length == 0, it means that there is no prologue to consider.
- * @param[in] epilogue A pointer to the text which follows the text that will be specified
- * in a coming call to i18n_ubidi_set_para(). If there is no epilogue
- * to consider, then @a epi_length must be zero and this pointer can be
- * @c NULL.
- * @param[in] epi_length The length of the @a epilogue; if @a epi_length == -1 then the epilogue
- * must be zero-terminated. Otherwise @a epi_length must be >= 0.
- * If @a epi_length == 0, it means that there is no epilogue to consider.
+ * @param[in] ubidi A paragraph #i18n_ubidi_h object
+ * @param[in] prologue Pointer to the text which precedes the text that will be specified
+ * in a coming call to i18n_ubidi_set_para(). If there is no prologue
+ * to consider, then @a pro_length must be zero and this pointer can be
+ * @c NULL.
+ * @param[in] pro_length The length of the @a prologue; if @a pro_length == -1 then the prologue
+ * must be zero-terminated. Otherwise @a pro_length must be >= 0.
+ * If @a pro_length == 0, it means that there is no prologue to consider.
+ * @param[in] epilogue A pointer to the text which follows the text that will be specified
+ * in a coming call to i18n_ubidi_set_para(). If there is no epilogue
+ * to consider, then @a epi_length must be zero and this pointer can be
+ * @c NULL.
+ * @param[in] epi_length The length of the @a epilogue; if @a epi_length == -1 then the epilogue
+ * must be zero-terminated. Otherwise @a epi_length must be >= 0.
+ * If @a epi_length == 0, it means that there is no epilogue to consider.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_set_para()
*/
int i18n_ubidi_set_context(i18n_ubidi_h ubidi,
- const i18n_uchar *prologue,
- int32_t pro_length,
- const i18n_uchar *epilogue,
- int32_t epi_length);
+ const i18n_uchar *prologue,
+ int32_t pro_length,
+ const i18n_uchar *epilogue,
+ int32_t epi_length);
/**
* @brief Modifies the operation of the ubidi algorithm such that it approximates an "inverse ubidi"
- * algorithm.
+ * algorithm.
* @details This function must be called before i18n_ubidi_set_para().
*
- * The normal operation of the ubidi 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 ubidi algorithm.
- * Note that there is no standard algorithm for this "inverse ubidi" and that the current
- * implementation provides only an approximation of "inverse ubidi".
- *
- * With @a is_inverse set to @c true, this function changes the behavior of some of the
- * subsequent functions in a way that they can be used for the inverse ubidi 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.
- *
- * Output runs should be retrieved using i18n_ubidi_get_visual_run(). Since the actual
- * input for "inverse ubidi" is visually ordered text and i18n_ubidi_get_visual_run() gets
- * the reordered runs, these are actually the runs of the logically ordered output.
- * Calling this function with argument @a is_inverse set to @c true is equivalent to calling
- * i18n_ubidi_set_reordering_mode() with argument reordering_mode set to
- * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L.
- *
- * Calling this function with argument @a is_inverse set to @c false is equivalent to calling
- * i18n_ubidi_set_reordering_mode() with argument reordering_mode set to
- * #I18N_UBIDI_REORDER_DEFAULT.
+ * The normal operation of the ubidi 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 ubidi algorithm.
+ * Note that there is no standard algorithm for this "inverse ubidi" and that the current
+ * implementation provides only an approximation of "inverse ubidi".
+ *
+ * With @a is_inverse set to @c true, this function changes the behavior of some of the
+ * subsequent functions in a way that they can be used for the inverse ubidi 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.
+ *
+ * Output runs should be retrieved using i18n_ubidi_get_visual_run(). Since the actual
+ * input for "inverse ubidi" is visually ordered text and i18n_ubidi_get_visual_run() gets
+ * the reordered runs, these are actually the runs of the logically ordered output.
+ * Calling this function with argument @a is_inverse set to @c true is equivalent to calling
+ * i18n_ubidi_set_reordering_mode() with argument reordering_mode set to
+ * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L.
+ *
+ * Calling this function with argument @a is_inverse set to @c false is equivalent to calling
+ * i18n_ubidi_set_reordering_mode() with argument reordering_mode set to
+ * #I18N_UBIDI_REORDER_DEFAULT.
* @since_tizen 3.0
*
- * @param[in] ubidi An #i18n_ubidi_h object
- * @param[in] is_inverse Specifies "forward" or "inverse" ubidi operation
+ * @param[in] ubidi An #i18n_ubidi_h object
+ * @param[in] is_inverse Specifies "forward" or "inverse" ubidi operation
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Sets an #i18n_ubidi_h object to contain the reordering information, especially the resolved levels,
- * for all the characters in a line of text.
+ * for all the characters in a line of text.
* @details This line of text is specified by referring to an #i18n_ubidi_h object representing this
- * information for a piece of text containing one or more paragraphs, and by specifying
- * a range of indexes in this text.
+ * information for a piece of text containing one or more paragraphs, and by specifying
+ * a range of indexes in this text.
*
- * In the new line object, the indexes will range from 0 to @a limit - @a start - 1.
+ * In the new line object, the indexes will range from 0 to @a limit - @a start - 1.
*
- * This is used after calling i18n_ubidi_set_para() 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.
+ * This is used after calling i18n_ubidi_set_para() 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.
*
- * After line-breaking, rules (L1) and (L2) for the treatment of trailing WS and for
- * reordering are performed on an #i18n_ubidi_h object that represents a line.
+ * After line-breaking, rules (L1) and (L2) for the treatment of trailing WS and for
+ * reordering are performed on an #i18n_ubidi_h object that represents a line.
*
- * Important: @a line_bidi shares data with @a para_bidi. You must destroy or reuse
- * @a line_bidi before @a para_bidi. In other words, you must destroy or reuse the
- * #i18n_ubidi_h object for a line before the object for its parent paragraph.
+ * Important: @a line_bidi shares data with @a para_bidi. You must destroy or reuse
+ * @a line_bidi before @a para_bidi. In other words, you must destroy or reuse the
+ * #i18n_ubidi_h object for a line before the object for its parent paragraph.
*
- * The text pointer that was stored in @a para_bidi is also copied, and @a start is added to
- * it so that it points to the beginning of the line for this object.
+ * The text pointer that was stored in @a para_bidi is also copied, and @a start is added to
+ * it so that it points to the beginning of the line for this object.
* @since_tizen 3.0
*
- * @param[in] para_bidi The parent paragraph object. It must have been set by a
- * successful call to i18n_ubidi_set_para()
- * @param[in] start The line's first index into the text
- * @param[in] limit The index after the last line's index (its last index + 1)
- * @param[in] line_bidi The object that will now represent a line of the text
+ * @param[in] para_bidi The parent paragraph object. It must have been set by a
+ * successful call to i18n_ubidi_set_para()
+ * @param[in] start The line's first index into the text
+ * @param[in] limit The index after the last line's index (its last index + 1)
+ * @param[in] line_bidi The object that will now represent a line of the text
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_get_processed_length()
*/
int i18n_ubidi_set_line(const i18n_ubidi_h para_bidi, int32_t start, int32_t limit,
- i18n_ubidi_h line_bidi);
+ i18n_ubidi_h line_bidi);
/**
* @brief Performs the Unicode bidi algorithm.
* @details It is defined in the Unicode Standard Anned #9, version 13, also described in The
- * Unicode Standard, Version 4.0 .
- *
- * This function takes a piece of plain text containing one or more paragraphs, with or
- * without externally specified embedding levels from styled text and computes the
- * left-right-directionality of each character.
- *
- * 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.
- * 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.
- *
- * 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.
+ * Unicode Standard, Version 4.0 .
+ *
+ * This function takes a piece of plain text containing one or more paragraphs, with or
+ * without externally specified embedding levels from styled text and computes the
+ * left-right-directionality of each character.
+ *
+ * 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.
+ * 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.
+ *
+ * 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.
* @since_tizen 3.0
*
- * @param[in] ubidi An #i18n_ubidi_h object allocated with i18n_ubidi_create() which
- * will be set to contain the reordering information, especially
- * the resolved levels for all the characters in the @a text
- * @param[in] text A pointer to the text that the ubidi algorithm will be performed
- * on. This pointer is stored in the #i18n_ubidi_h handle and can
- * be retrieved with i18n_ubidi_get_text().
- * Note: The @a text must be (at least) @a length long.
- * @param[in] length The length of the @a text; if @a length == -1 then the text must be
- * zero-terminated
- * @param[in] para_level Specifies the default level for the @a text; it is typically 0
- * (LTR) or 1 (RTL). If the function shall determine the paragraph
- * level from the text, then @a para_level can be set to either
- * #I18N_UBIDI_DEFAULT_LTR or #I18N_UBIDI_DEFAULT_RTL; 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 #I18N_UBIDI_MAX_EXPLICIT_LEVEL is also valid, with
- * odd levels indicating RTL.
- * @param[in] embedding_levels 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
- * #I18N_UBIDI_LEVEL_OVERRIDE bit set.
- * Caution: A copy of this pointer, not of the levels, will be stored in the
- * #i18n_ubidi_h object; the @a embedding_levels array must not be
- * deallocated before the #i18n_ubidi_h structure is destroyed or reused,
- * and the @a embedding_levels should not be modified to avoid unexpected
- * results on subsequent ubidi operations. However, the i18n_ubidi_set_para()
- * and i18n_ubidi_set_line() functions may modify some or all of the levels.
- *
- * After the #i18n_ubidi_h object is reused or destroyed, the caller must
- * take care of the deallocation of the @a embedding_levels array.
+ * @param[in] ubidi An #i18n_ubidi_h object allocated with i18n_ubidi_create() which
+ * will be set to contain the reordering information, especially
+ * the resolved levels for all the characters in the @a text
+ * @param[in] text A pointer to the text that the ubidi algorithm will be performed
+ * on. This pointer is stored in the #i18n_ubidi_h handle and can
+ * be retrieved with i18n_ubidi_get_text().
+ * Note: The @a text must be (at least) @a length long.
+ * @param[in] length The length of the @a text; if @a length == -1 then the text must be
+ * zero-terminated
+ * @param[in] para_level Specifies the default level for the @a text; it is typically 0
+ * (LTR) or 1 (RTL). If the function shall determine the paragraph
+ * level from the text, then @a para_level can be set to either
+ * #I18N_UBIDI_DEFAULT_LTR or #I18N_UBIDI_DEFAULT_RTL; 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 #I18N_UBIDI_MAX_EXPLICIT_LEVEL is also valid, with
+ * odd levels indicating RTL.
+ * @param[in] embedding_levels 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
+ * #I18N_UBIDI_LEVEL_OVERRIDE bit set.
+ * Caution: A copy of this pointer, not of the levels, will be stored in the
+ * #i18n_ubidi_h object; the @a embedding_levels array must not be
+ * deallocated before the #i18n_ubidi_h structure is destroyed or reused,
+ * and the @a embedding_levels should not be modified to avoid unexpected
+ * results on subsequent ubidi operations. However, the i18n_ubidi_set_para()
+ * and i18n_ubidi_set_line() functions may modify some or all of the levels.
+ *
+ * After the #i18n_ubidi_h object is reused or destroyed, the caller must
+ * take care of the deallocation of the @a embedding_levels array.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_ubidi_set_para(i18n_ubidi_h ubidi,
- const i18n_uchar *text,
- int32_t length,
- i18n_ubidi_level_t para_level,
- i18n_ubidi_level_t *embedding_levels);
+ const i18n_uchar *text,
+ int32_t length,
+ i18n_ubidi_level_t para_level,
+ i18n_ubidi_level_t *embedding_levels);
/**
* @brief Modifies the operation of the ubidi algorithm such that it implements some variant to the
- * basic ubidi algorithm or approximates an "inverse ubidi" algorithm, depending on different
- * values of the "reordering mode".
+ * basic ubidi algorithm or approximates an "inverse ubidi" algorithm, depending on different
+ * values of the "reordering mode".
* @details This function must be called before i18n_ubidi_set_para(), and stays in effect until
- * called again with a different argument.
- *
- * The normal operation of the ubidi 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.
- *
- * With the @a reordering_mode set to a value other than #I18N_UBIDI_REORDER_DEFAULT, this
- * function changes the behavior of some of the subsequent functions in a way such that
- * they implement an inverse ubidi algorithm or some other algorithm variants.
- *
- * 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 ubidi algorithm.
- * Note that there is no standard algorithm for this "inverse ubidi", so a number of
- * variants are implemented here.
- *
- * 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.
- * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_DEFAULT, the standard ubidi
- * Logical to Visual algorithm is applied.
- * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_NUMBERS_SPECIAL, the
- * algorithm used to perform ubidi transformations when calling i18n_ubidi_set_para()
- * should approximate the algorithm used in Microsoft Windows XP rather than strictly
- * conform to the Unicode bidi algorithm. The differences between the basic algorithm
- * and the algorithm addressed by this option are as follows:
- * - 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.
- * - Arabic-Indic numbers (AN) are handled by the Windows algorithm just like
- * regular numbers (EN).
- * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_GROUP_NUMBERS_WITH_R,
- * 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. The source text should not contain ubidi control
- * characters other than LRM or RLM.
- * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_RUNS_ONLY, a "Logical to
- * Logical" transformation must be performed:
- * - If the default text level of the source text (argument para_level in
- * i18n_ubidi_set_para() ) 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.
- * - 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.
- * 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).
- * 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. 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.
- *
- * The source text should not contain ubidi control characters other than
- * LRM or RLM.
- * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L, an
- * "inverse ubidi" 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 #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC
- * can be used with function i18n_ubidi_write_reordered() to this end. This mode is
- * equivalent to calling i18n_ubidi_set_inverse() with argument is_inverse set to @c true.
- * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT, the
- * "direct" Logical to Visual Ubidi algorithm is used as an approximation of an
- * "inverse ubidi" algorithm. This mode is similar to mode
- * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L but is closer to the regular ubidi algorithm.
- * 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 #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L.
- * When used in conjunction with option #I18N_UBIDI_OPTION_INSERT_MARKS, this mode
- * generally adds ubidi marks to the output significantly more sparingly than mode
- * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L with option
- * #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC in calls to i18n_ubidi_write_reordered().
- * - When the reordering mode is set to #I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
- * the Logical to Visual ubidi algorithm used in Windows XP is used as an approximation
- * of an "inverse ubidi" algorithm.
- * For example, an LTR paragraph with the content "abc FED123" (where upper case
- * represents RTL characters) will be transformed to "abc 123DEF."
- *
- * In all the reordering modes specifying an "inverse ubidi" algorithm (i.e. those with
- * a name starting with I18N_UBIDI_REORDER_INVERSE), output runs should be retrieved
- * using i18n_ubidi_get_visual_run(), and the output text with
- * i18n_ubidi_write_reordered(). The caller should keep in mind that in
- * "inverse ubidi" modes the input is actually visually ordered text and reordered
- * output returned by i18n_ubidi_get_visual_run() or i18n_ubidi_write_reordered() are
- * actually runs or character string of logically ordered output.
- * For all the "inverse ubidi" modes, the source text should not contain ubidi control
- * characters other than LRM or RLM.
- *
- * Note that option #I18N_UBIDI_OUTPUT_REVERSE of i18n_ubidi_write_reordered() has no useful
- * meaning and should not be used in conjunction with any value of the @a reordering_mode
- * specifying "inverse ubidi" or with value #I18N_UBIDI_REORDER_RUNS_ONLY.
+ * called again with a different argument.
+ *
+ * The normal operation of the ubidi 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.
+ *
+ * With the @a reordering_mode set to a value other than #I18N_UBIDI_REORDER_DEFAULT, this
+ * function changes the behavior of some of the subsequent functions in a way such that
+ * they implement an inverse ubidi algorithm or some other algorithm variants.
+ *
+ * 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 ubidi algorithm.
+ * Note that there is no standard algorithm for this "inverse ubidi", so a number of
+ * variants are implemented here.
+ *
+ * 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.
+ * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_DEFAULT, the standard ubidi
+ * Logical to Visual algorithm is applied.
+ * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_NUMBERS_SPECIAL, the
+ * algorithm used to perform ubidi transformations when calling i18n_ubidi_set_para()
+ * should approximate the algorithm used in Microsoft Windows XP rather than strictly
+ * conform to the Unicode bidi algorithm. The differences between the basic algorithm
+ * and the algorithm addressed by this option are as follows:
+ * - 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.
+ * - Arabic-Indic numbers (AN) are handled by the Windows algorithm just like
+ * regular numbers (EN).
+ * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_GROUP_NUMBERS_WITH_R,
+ * 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. The source text should not contain ubidi control
+ * characters other than LRM or RLM.
+ * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_RUNS_ONLY, a "Logical to
+ * Logical" transformation must be performed:
+ * - If the default text level of the source text (argument para_level in
+ * i18n_ubidi_set_para() ) 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.
+ * - 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.
+ * 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).
+ * 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. 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.
+ *
+ * The source text should not contain ubidi control characters other than
+ * LRM or RLM.
+ * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L, an
+ * "inverse ubidi" 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 #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC
+ * can be used with function i18n_ubidi_write_reordered() to this end. This mode is
+ * equivalent to calling i18n_ubidi_set_inverse() with argument is_inverse set to @c true.
+ * - When the @a reordering_mode is set to #I18N_UBIDI_REORDER_INVERSE_LIKE_DIRECT, the
+ * "direct" Logical to Visual Ubidi algorithm is used as an approximation of an
+ * "inverse ubidi" algorithm. This mode is similar to mode
+ * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L but is closer to the regular ubidi algorithm.
+ * 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 #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L.
+ * When used in conjunction with option #I18N_UBIDI_OPTION_INSERT_MARKS, this mode
+ * generally adds ubidi marks to the output significantly more sparingly than mode
+ * #I18N_UBIDI_REORDER_INVERSE_NUMBERS_AS_L with option
+ * #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC in calls to i18n_ubidi_write_reordered().
+ * - When the reordering mode is set to #I18N_UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL,
+ * the Logical to Visual ubidi algorithm used in Windows XP is used as an approximation
+ * of an "inverse ubidi" algorithm.
+ * For example, an LTR paragraph with the content "abc FED123" (where upper case
+ * represents RTL characters) will be transformed to "abc 123DEF."
+ *
+ * In all the reordering modes specifying an "inverse ubidi" algorithm (i.e. those with
+ * a name starting with I18N_UBIDI_REORDER_INVERSE), output runs should be retrieved
+ * using i18n_ubidi_get_visual_run(), and the output text with
+ * i18n_ubidi_write_reordered(). The caller should keep in mind that in
+ * "inverse ubidi" modes the input is actually visually ordered text and reordered
+ * output returned by i18n_ubidi_get_visual_run() or i18n_ubidi_write_reordered() are
+ * actually runs or character string of logically ordered output.
+ * For all the "inverse ubidi" modes, the source text should not contain ubidi control
+ * characters other than LRM or RLM.
+ *
+ * Note that option #I18N_UBIDI_OUTPUT_REVERSE of i18n_ubidi_write_reordered() has no useful
+ * meaning and should not be used in conjunction with any value of the @a reordering_mode
+ * specifying "inverse ubidi" or with value #I18N_UBIDI_REORDER_RUNS_ONLY.
* @since_tizen 3.0
*
- * @param[in] ubidi An #i18n_ubidi_h object
- * @param[in] reordering_mode Specifies the required variant of the ubidi algorithm
+ * @param[in] ubidi An #i18n_ubidi_h object
+ * @param[in] reordering_mode Specifies the required variant of the ubidi algorithm
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_write_reordered()
*/
int i18n_ubidi_set_reordering_mode(i18n_ubidi_h ubidi,
- i18n_ubidi_reordering_mode_e reordering_mode);
+ i18n_ubidi_reordering_mode_e reordering_mode);
/**
* @brief Specifies which of the reordering options should be applied during ubidi transformations.
* @since_tizen 3.0
*
- * @param[in] ubidi An #i18n_ubidi_h object
- * @param[in] reordering_options A bitwise 'or' combination of zero or more of:
- * #I18N_UBIDI_OPTION_DEFAULT, #I18N_UBIDI_OPTION_INSERT_MARKS,
- * #I18N_UBIDI_OPTION_REMOVE_CONTROLS,
- * #I18N_UBIDI_OPTION_STREAMING.
+ * @param[in] ubidi An #i18n_ubidi_h object
+ * @param[in] reordering_options A bitwise 'or' combination of zero or more of:
+ * #I18N_UBIDI_OPTION_DEFAULT, #I18N_UBIDI_OPTION_INSERT_MARKS,
+ * #I18N_UBIDI_OPTION_REMOVE_CONTROLS,
+ * #I18N_UBIDI_OPTION_STREAMING.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
/**
* @brief Takes an #i18n_ubidi_h object containing the reordering information for a piece of text (one
- * or more paragraphs) set by i18n_ubidi_set_para() or for a line of text set by
- * i18n_ubidi_set_line() and write a reordered string to the destination buffer.
+ * or more paragraphs) set by i18n_ubidi_set_para() or for a line of text set by
+ * i18n_ubidi_set_line() and write a reordered string to the destination buffer.
* @details This function preserves the integrity of characters with multiple code units and
- * (optionally) combining characters. Characters in RTL runs can be replaced by
- * mirror-image characters in the destination buffer. Note that "real" mirroring has to be
- * done in a rendering engine by glyph selection and that for many "mirrored" characters
- * there are no Unicode characters as mirror-image equivalents. There are also options to
- * insert or remove ubidi control characters; see the description of the @a dest_size and
- * @a options parameters and of the option bit flags.
+ * (optionally) combining characters. Characters in RTL runs can be replaced by
+ * mirror-image characters in the destination buffer. Note that "real" mirroring has to be
+ * done in a rendering engine by glyph selection and that for many "mirrored" characters
+ * there are no Unicode characters as mirror-image equivalents. There are also options to
+ * insert or remove ubidi control characters; see the description of the @a dest_size and
+ * @a options parameters and of the option bit flags.
* @since_tizen 3.0
* @remarks The @a dest array should be provided by the user.
*
- * @param[in] ubidi An #i18n_ubidi_h object that is set by
- * i18n_ubidi_set_para() or i18n_ubidi_set_line() and contains
- * the reordering information for the text that it was defined for,
- * as well as a pointer to that text.
- * @param[in] options 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 ubidi" algorithm because it uses the
- * "forward ubidi" algorithm at its core). The available options
- * are: #I18N_UBIDI_DO_MIRRORING, #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC,
- * #I18N_UBIDI_KEEP_BASE_COMBINING, #I18N_UBIDI_OUTPUT_REVERSE,
- * #I18N_UBIDI_REMOVE_BIDI_CONTROLS.
- * @param[in] dest_size The size of the @a dest buffer, in number of i18n_uchars. If the
- * #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC option is set, then the
- * destination length could be as large as
- * i18n_ubidi_get_length(@a ubidi)+2*i18n_ubidi_count_runs(@a ubidi).
- * If the #I18N_UBIDI_REMOVE_BIDI_CONTROLS option is set, then the
- * destination length may be less than i18n_ubidi_get_length(@a ubidi).
- * If none of these options is set, then the destination length
- * will be exactly i18n_ubidi_get_processed_length(@a ubidi).
- * @param[out] dest A pointer to where the reordered text is to be copied. The
- * source text and the destination buffer @a dest must not overlap.
- * @param[out] output_length The length of the output string
+ * @param[in] ubidi An #i18n_ubidi_h object that is set by
+ * i18n_ubidi_set_para() or i18n_ubidi_set_line() and contains
+ * the reordering information for the text that it was defined for,
+ * as well as a pointer to that text.
+ * @param[in] options 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 ubidi" algorithm because it uses the
+ * "forward ubidi" algorithm at its core). The available options
+ * are: #I18N_UBIDI_DO_MIRRORING, #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC,
+ * #I18N_UBIDI_KEEP_BASE_COMBINING, #I18N_UBIDI_OUTPUT_REVERSE,
+ * #I18N_UBIDI_REMOVE_BIDI_CONTROLS.
+ * @param[in] dest_size The size of the @a dest buffer, in number of i18n_uchars. If the
+ * #I18N_UBIDI_INSERT_LRM_FOR_NUMERIC option is set, then the
+ * destination length could be as large as
+ * i18n_ubidi_get_length(@a ubidi)+2*i18n_ubidi_count_runs(@a ubidi).
+ * If the #I18N_UBIDI_REMOVE_BIDI_CONTROLS option is set, then the
+ * destination length may be less than i18n_ubidi_get_length(@a ubidi).
+ * If none of these options is set, then the destination length
+ * will be exactly i18n_ubidi_get_processed_length(@a ubidi).
+ * @param[out] dest A pointer to where the reordered text is to be copied. The
+ * source text and the destination buffer @a dest must not overlap.
+ * @param[out] output_length The length of the output string
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @see i18n_ubidi_get_processed_length()
*/
int i18n_ubidi_write_reordered(i18n_ubidi_h ubidi,
- uint16_t options,
- int32_t dest_size,
- i18n_uchar *dest,
- int32_t *output_length);
+ uint16_t options,
+ int32_t dest_size,
+ i18n_uchar *dest,
+ int32_t *output_length);
/**
* @brief Reverses a Right-To-Left run of Unicode text.
* @details This function preserves the integrity of characters with multiple code units and
- * (optionally) combining characters. Characters can be replaced by mirror-image
- * characters in the destination buffer. Note that "real" mirroring has to be done in a
- * rendering engine by glyph selection and that for many "mirrored" characters there are
- * no Unicode characters as mirror-image equivalents. There are also options to insert
- * or remove ubidi control characters.
- *
- * This function is the implementation for reversing RTL runs as part of
- * i18n_ubidi_write_reordered(). For detailed descriptions of the parameters, see there.
- * Since no ubidi controls are inserted here, the output string length will never exceed
- * @a src_length.
+ * (optionally) combining characters. Characters can be replaced by mirror-image
+ * characters in the destination buffer. Note that "real" mirroring has to be done in a
+ * rendering engine by glyph selection and that for many "mirrored" characters there are
+ * no Unicode characters as mirror-image equivalents. There are also options to insert
+ * or remove ubidi control characters.
+ *
+ * This function is the implementation for reversing RTL runs as part of
+ * i18n_ubidi_write_reordered(). For detailed descriptions of the parameters, see there.
+ * Since no ubidi controls are inserted here, the output string length will never exceed
+ * @a src_length.
* @since_tizen 3.0
*
- * @param[in] src A pointer to the RTL run text
- * @param[in] src_length The length of the RTL run
- * @param[in] options A bit set of options for the reordering that control how the
- * reordered text is written. See the options parameter
- * in i18n_ubidi_write_reordered().
- * @param[in] dest_size The size of the @a dest buffer, in number of i18n_uchars. If the
- * #I18N_UBIDI_REMOVE_BIDI_CONTROLS option is set, then the
- * destination length may be less than @a src_length. If this
- * option is not set, then the destination length will be
- * exactly @a src_length.
- * @param[out] dest A pointer to where the reordered text is to be copied.
- * @a src and @a dest arrays (of length @a src_length and @a dest_size,
- * respectively) must not overlap.
- * @param[out] output_length The length of the output string
+ * @param[in] src A pointer to the RTL run text
+ * @param[in] src_length The length of the RTL run
+ * @param[in] options A bit set of options for the reordering that control how the
+ * reordered text is written. See the options parameter
+ * in i18n_ubidi_write_reordered().
+ * @param[in] dest_size The size of the @a dest buffer, in number of i18n_uchars. If the
+ * #I18N_UBIDI_REMOVE_BIDI_CONTROLS option is set, then the
+ * destination length may be less than @a src_length. If this
+ * option is not set, then the destination length will be
+ * exactly @a src_length.
+ * @param[out] dest A pointer to where the reordered text is to be copied.
+ * @a src and @a dest arrays (of length @a src_length and @a dest_size,
+ * respectively) must not overlap.
+ * @param[out] output_length The length of the output string
*
* @remarks do not free @a dest with free() function
*
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_ubidi_write_reverse(const i18n_uchar *src,
- int32_t src_length,
- uint16_t options,
- int32_t dest_size,
- i18n_uchar *dest,
- int32_t *output_length);
+ int32_t src_length,
+ uint16_t options,
+ int32_t dest_size,
+ i18n_uchar *dest,
+ int32_t *output_length);
#ifdef __cplusplus
}
/**
* @brief Returns the default time zone (i.e., the one returned by the
- * i18n_timezone_create_default() function).
+ * i18n_timezone_create_default() function).
* @details The default time zone is determined initially by querying the host operating
- * system and storing the obtained time zone as default until the application terminates.
- * Therefore, if the time zone is changed after the first call, subsequent calls will not
- * reflect the change, i.e. the returned time zone will be the same as for the first function
- * call.
+ * system and storing the obtained time zone as default until the application terminates.
+ * Therefore, if the time zone is changed after the first call, subsequent calls will not
+ * reflect the change, i.e. the returned time zone will be the same as for the first function
+ * call.
*
- * To query the system for the current timezone, use i18n_timezone_detect_host_timezone()
- * from the Timezone module.
+ * To query the system for the current timezone, use i18n_timezone_detect_host_timezone()
+ * from the Timezone module.
*
- * The default time zone may be changed with i18n_ucalendar_set_default_timezone()
- * or with the i18n Timezone API.
+ * The default time zone may be changed with i18n_ucalendar_set_default_timezone()
+ * or with the i18n Timezone API.
*
* @remarks The specific error code can be obtained using the get_last_result()
- * method. Error codes are described in #i18n_error_code_e description.
+ * method. Error codes are described in #i18n_error_code_e description.
* @since_tizen 2.3.1
*
* @param[out] result A buffer to receive the result, or @c NULL
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
* Copyright (C) 1999-2013, International Business Machines Corporation
* and others. All Rights Reserved.
* @brief Ushape module provides Arabic shaping functionality.
*
* @section CAPI_BASE_UTILS_I18N_USHAPE_MODULE_HEADER Required Header
- * \#include <utils_i18n.h>
+ * \#include <utils_i18n.h>
*
* @section CAPI_BASE_UTILS_I18N_USHAPE_MODULE_OVERVIEW Overview
* @details Ushape module provides Arabic shaping functionality.
/**
* @brief Shapes Arabic text on a character basis.
* @details This function performs basic operations for "shaping" Arabic text.
- * It is most useful for use with legacy data formats and legacy display technology
- * (simple terminals). All operations are performed on Unicode characters.
+ * It is most useful for use with legacy data formats and legacy display technology
+ * (simple terminals). All operations are performed on Unicode characters.
*
- * Text-based shaping means that some character code points in the text are replaced
- * by others depending on the context. It transforms one kind of text into another.
- * In comparison, modern displays for Arabic text select appropriate, context-dependent
- * font glyphs for each text element, which means that they transform text into a glyph
- * vector.
+ * Text-based shaping means that some character code points in the text are replaced
+ * by others depending on the context. It transforms one kind of text into another.
+ * In comparison, modern displays for Arabic text select appropriate, context-dependent
+ * font glyphs for each text element, which means that they transform text into a glyph
+ * vector.
*
- * Text transformations are necessary when modern display technology is not available
- * or when text needs to be transformed to or from legacy formats that use "shaped"
- * characters. Since the Arabic script is cursive, connecting adjacent letters to each
- * other, computers select images for each letter based on the surrounding letters.
- * This usually results in four images per Arabic letter: initial, middle, final, and
- * isolated forms. In Unicode, on the other hand, letters are normally stored abstract,
- * and a display system is expected to select the necessary glyphs.
- * (This makes searching and other text processing easier because the same letter has only
- * one code.) It is possible to mimic this with text transformations because there are
- * characters in Unicode that are rendered as letters with a specific shape (or cursive
- * connectivity). They were included for interoperability with legacy systems and
- * codepages, and for unsophisticated display systems.
+ * Text transformations are necessary when modern display technology is not available
+ * or when text needs to be transformed to or from legacy formats that use "shaped"
+ * characters. Since the Arabic script is cursive, connecting adjacent letters to each
+ * other, computers select images for each letter based on the surrounding letters.
+ * This usually results in four images per Arabic letter: initial, middle, final, and
+ * isolated forms. In Unicode, on the other hand, letters are normally stored abstract,
+ * and a display system is expected to select the necessary glyphs.
+ * (This makes searching and other text processing easier because the same letter has only
+ * one code.) It is possible to mimic this with text transformations because there are
+ * characters in Unicode that are rendered as letters with a specific shape (or cursive
+ * connectivity). They were included for interoperability with legacy systems and
+ * codepages, and for unsophisticated display systems.
*
- * A second kind of text transformations is supported for Arabic digits:
- * For compatibility with legacy codepages that only include European digits, it is
- * possible to replace one set of digits by another, changing the character code points.
- * These operations can be performed for either Arabic-Indic Digits (U+0660...U+0669) or
- * Eastern (Extended) Arabic-Indic digits (U+06f0...U+06f9).
+ * A second kind of text transformations is supported for Arabic digits:
+ * For compatibility with legacy codepages that only include European digits, it is
+ * possible to replace one set of digits by another, changing the character code points.
+ * These operations can be performed for either Arabic-Indic Digits (U+0660...U+0669) or
+ * Eastern (Extended) Arabic-Indic digits (U+06f0...U+06f9).
*
- * Some replacements may result in more or fewer characters (code points). By default,
- * this means that the destination buffer may receive text with a length different from
- * the source length. Some legacy systems rely on the length of the text to be constant.
- * They expect extra spaces to be added or consumed either next to the affected character
- * or at the end of the text.
+ * Some replacements may result in more or fewer characters (code points). By default,
+ * this means that the destination buffer may receive text with a length different from
+ * the source length. Some legacy systems rely on the length of the text to be constant.
+ * They expect extra spaces to be added or consumed either next to the affected character
+ * or at the end of the text.
*
- * For details about the available operations, see the description of the I18N_USHAPE_...
- * options.
+ * For details about the available operations, see the description of the I18N_USHAPE_...
+ * options.
*
* @since_tizen 3.0
* @remarks The @a dest buffer, if not @c NULL, should be allocated by the user before calling
- * this function.
+ * this function.
*
- * @param[in] source The input text
+ * @param[in] source The input text
* @param[in] source_len The number of Unicode characters in the given @a source buffer, or -1 if
- * the @a source buffer is NULL-terminated.
- * @param[in] options A 32-bit set of flags that specify the operations that are
- * performed on the input text. If no error occurs, then the result will
- * always be written to the @a dest buffer.
+ * the @a source buffer is NULL-terminated.
+ * @param[in] options A 32-bit set of flags that specify the operations that are
+ * performed on the input text. If no error occurs, then the result will
+ * always be written to the @a dest buffer.
* @param[in] dest_size The size (capacity) of the @a dest buffer in Unicode characters.
- * If @a dest_size is 0, then no output is produced, but the @a dest_len
- * is set to the necessary buffer size ("preflighting").
- * @param[out] dest The destination buffer that will receive the results of the requested
- * operations. It may be @c NULL only if @a dest_size is 0. The source and
- * destination must not overlap.
- * @param[out] dest_len The number of Unicode characters written to the @a dest buffer.
- * If an error occurred, then no output was written, or it may be incomplete.
- * If the #I18N_ERROR_BUFFER_OVERFLOW error code is returned, then the
- * @a dest_len value indicates the necessary @a dest buffer size.
- * @a dest_len may be @c NULL if not needed, however please note that if
- * both @a dest and @a dest_len are @c NULL, then
- * #I18N_ERROR_INVALID_PARAMETER error will be returned as such a call
- * would produce no useful result.
+ * If @a dest_size is 0, then no output is produced, but the @a dest_len
+ * is set to the necessary buffer size ("preflighting").
+ * @param[out] dest The destination buffer that will receive the results of the requested
+ * operations. It may be @c NULL only if @a dest_size is 0. The source and
+ * destination must not overlap.
+ * @param[out] dest_len The number of Unicode characters written to the @a dest buffer.
+ * If an error occurred, then no output was written, or it may be incomplete.
+ * If the #I18N_ERROR_BUFFER_OVERFLOW error code is returned, then the
+ * @a dest_len value indicates the necessary @a dest buffer size.
+ * @a dest_len may be @c NULL if not needed, however please note that if
+ * both @a dest and @a dest_len are @c NULL, then
+ * #I18N_ERROR_INVALID_PARAMETER error will be returned as such a call
+ * would produce no useful result.
*
* @return @c 0 on success, otherwise a negative error value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_NO_SPACE_AVAILABLE No space available for in-buffer expansion
*/
int i18n_ushape_shape_arabic(
- const i18n_uchar *source,
- int32_t source_len,
- uint32_t options,
- int32_t dest_size,
- i18n_uchar *dest,
- int32_t *dest_len);
+ const i18n_uchar *source,
+ int32_t source_len,
+ uint32_t options,
+ int32_t dest_size,
+ i18n_uchar *dest,
+ int32_t *dest_len);
/**
* @}
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#ifndef __UTILS_I18N_UTMSCALE_H__
* @defgroup CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE Utmscale
* @brief Universal Time Scale
* @section CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE_HEADER Required Header
- * \#include <utils_i18n.h>
+ * \#include <utils_i18n.h>
*
* @section CAPI_BASE_UTILS_I18N_UTMSCALE_MODULE_OVERVIEW Overview
* @details There are quite a few different conventions for binary datetime,
- * depending on different platforms and protocols. Some of these have severe drawbacks.
- * For example, people using Unix time (seconds since Jan 1, 1970) think that they are safe until near the year 2038.
- * But cases can and do arise where arithmetic manipulations causes serious problems.
- * Consider the computation of the average of two datetimes,
- * for example: if one calculates them with average_time = (time1 + time2)/2,
- * there will be overflow even with dates around the present.
- * Moreover, even if these problems don't occur, there is the issue of conversion back and forth between different systems.
+ * depending on different platforms and protocols. Some of these have severe drawbacks.
+ * For example, people using Unix time (seconds since Jan 1, 1970) think that they are safe until near the year 2038.
+ * But cases can and do arise where arithmetic manipulations causes serious problems.
+ * Consider the computation of the average of two datetimes,
+ * for example: if one calculates them with average_time = (time1 + time2)/2,
+ * there will be overflow even with dates around the present.
+ * Moreover, even if these problems don't occur, there is the issue of conversion back and forth between different systems.
*
- * <p>
- * Binary datetimes differ in a number of ways: the datatype, the unit,
- * and the epoch (origin). ICU refers to these as time scales. For example:
+ * <p>
+ * Binary datetimes differ in a number of ways: the datatype, the unit,
+ * and the epoch (origin). ICU refers to these as time scales. For example:
*
- * <table border="1" cellspacing="0" cellpadding="4">
- * <caption>Table 1: Binary Time Scales</caption>
- * <tr>
- * <th align="left">Source</th>
- * <th align="left">Datatype</th>
- * <th align="left">Unit</th>
- * <th align="left">Epoch</th>
- * </tr>
- * <tr>
- * <td>UDTS_JAVA_TIME</td>
- * <td>int64_t</td>
- * <td>milliseconds</td>
- * <td>Jan 1, 1970</td>
- * </tr>
- * <tr>
- * <td>UDTS_UNIX_TIME</td>
- * <td>int32_t or int64_t</td>
- * <td>seconds</td>
- * <td>Jan 1, 1970</td>
- * </tr>
- * <tr>
- * <td>UDTS_ICU4C_TIME</td>
- * <td>double</td>
- * <td>milliseconds</td>
- * <td>Jan 1, 1970</td>
- * </tr>
- * <tr>
- * <td>UDTS_WINDOWS_FILE_TIME</td>
- * <td>int64_t</td>
- * <td>ticks (100 nanoseconds)</td>
- * <td>Jan 1, 1601</td>
- * </tr>
- * <tr>
- * <td>UDTS_DOTNET_DATE_TIME</td>
- * <td>int64_t</td>
- * <td>ticks (100 nanoseconds)</td>
- * <td>Jan 1, 0001</td>
- * </tr>
- * <tr>
- * <td>UDTS_MAC_OLD_TIME</td>
- * <td>int32_t or int64_t</td>
- * <td>seconds</td>
- * <td>Jan 1, 1904</td>
- * </tr>
- * <tr>
- * <td>UDTS_MAC_TIME</td>
- * <td>double</td>
- * <td>seconds</td>
- * <td>Jan 1, 2001</td>
- * </tr>
- * <tr>
- * <td>UDTS_EXCEL_TIME</td>
- * <td>?</td>
- * <td>days</td>
- * <td>Dec 31, 1899</td>
- * </tr>
- * <tr>
- * <td>UDTS_DB2_TIME</td>
- * <td>?</td>
- * <td>days</td>
- * <td>Dec 31, 1899</td>
- * </tr>
- * <tr>
- * <td>UDTS_UNIX_MICROSECONDS_TIME</td>
- * <td>int64_t</td>
- * <td>microseconds</td>
- * <td>Jan 1, 1970</td>
- * </tr>
- * </table>
+ * <table border="1" cellspacing="0" cellpadding="4">
+ * <caption>Table 1: Binary Time Scales</caption>
+ * <tr>
+ * <th align="left">Source</th>
+ * <th align="left">Datatype</th>
+ * <th align="left">Unit</th>
+ * <th align="left">Epoch</th>
+ * </tr>
+ * <tr>
+ * <td>UDTS_JAVA_TIME</td>
+ * <td>int64_t</td>
+ * <td>milliseconds</td>
+ * <td>Jan 1, 1970</td>
+ * </tr>
+ * <tr>
+ * <td>UDTS_UNIX_TIME</td>
+ * <td>int32_t or int64_t</td>
+ * <td>seconds</td>
+ * <td>Jan 1, 1970</td>
+ * </tr>
+ * <tr>
+ * <td>UDTS_ICU4C_TIME</td>
+ * <td>double</td>
+ * <td>milliseconds</td>
+ * <td>Jan 1, 1970</td>
+ * </tr>
+ * <tr>
+ * <td>UDTS_WINDOWS_FILE_TIME</td>
+ * <td>int64_t</td>
+ * <td>ticks (100 nanoseconds)</td>
+ * <td>Jan 1, 1601</td>
+ * </tr>
+ * <tr>
+ * <td>UDTS_DOTNET_DATE_TIME</td>
+ * <td>int64_t</td>
+ * <td>ticks (100 nanoseconds)</td>
+ * <td>Jan 1, 0001</td>
+ * </tr>
+ * <tr>
+ * <td>UDTS_MAC_OLD_TIME</td>
+ * <td>int32_t or int64_t</td>
+ * <td>seconds</td>
+ * <td>Jan 1, 1904</td>
+ * </tr>
+ * <tr>
+ * <td>UDTS_MAC_TIME</td>
+ * <td>double</td>
+ * <td>seconds</td>
+ * <td>Jan 1, 2001</td>
+ * </tr>
+ * <tr>
+ * <td>UDTS_EXCEL_TIME</td>
+ * <td>?</td>
+ * <td>days</td>
+ * <td>Dec 31, 1899</td>
+ * </tr>
+ * <tr>
+ * <td>UDTS_DB2_TIME</td>
+ * <td>?</td>
+ * <td>days</td>
+ * <td>Dec 31, 1899</td>
+ * </tr>
+ * <tr>
+ * <td>UDTS_UNIX_MICROSECONDS_TIME</td>
+ * <td>int64_t</td>
+ * <td>microseconds</td>
+ * <td>Jan 1, 1970</td>
+ * </tr>
+ * </table>
*
- * <p>
- * All of the epochs start at 00:00 am (the earliest possible time on the day in question),
- * and are assumed to be UTC.
+ * <p>
+ * All of the epochs start at 00:00 am (the earliest possible time on the day in question),
+ * and are assumed to be UTC.
*
- * <p>
- * The ranges for different datatypes are given in the following table (all values in years).
- * The range of years includes the entire range expressible with positive and negative
- * values of the datatype. The range of years for double is the range that would be allowed
- * without losing precision to the corresponding unit.
+ * <p>
+ * The ranges for different datatypes are given in the following table (all values in years).
+ * The range of years includes the entire range expressible with positive and negative
+ * values of the datatype. The range of years for double is the range that would be allowed
+ * without losing precision to the corresponding unit.
*
- * <table border="1" cellspacing="0" cellpadding="4">
- * <tr>
- * <th align="left">Units</th>
- * <th align="left">int64_t</th>
- * <th align="left">double</th>
- * <th align="left">int32_t</th>
- * </tr>
- * <tr>
- * <td>1 sec</td>
- * <td align="right">5.84542x10<sup>11</sup></td>
- * <td align="right">285,420,920.94</td>
- * <td align="right">136.10</td>
- * </tr>
- * <tr>
- * <td>1 millisecond</td>
- * <td align="right">584,542,046.09</td>
- * <td align="right">285,420.92</td>
- * <td align="right">0.14</td>
- * </tr>
- * <tr>
- * <td>1 microsecond</td>
- * <td align="right">584,542.05</td>
- * <td align="right">285.42</td>
- * <td align="right">0.00</td>
- * </tr>
- * <tr>
- * <td>100 nanoseconds (tick)</td>
- * <td align="right">58,454.20</td>
- * <td align="right">28.54</td>
- * <td align="right">0.00</td>
- * </tr>
- * <tr>
- * <td>1 nanosecond</td>
- * <td align="right">584.5420461</td>
- * <td align="right">0.2854</td>
- * <td align="right">0.00</td>
- * </tr>
- * </table>
+ * <table border="1" cellspacing="0" cellpadding="4">
+ * <tr>
+ * <th align="left">Units</th>
+ * <th align="left">int64_t</th>
+ * <th align="left">double</th>
+ * <th align="left">int32_t</th>
+ * </tr>
+ * <tr>
+ * <td>1 sec</td>
+ * <td align="right">5.84542x10<sup>11</sup></td>
+ * <td align="right">285,420,920.94</td>
+ * <td align="right">136.10</td>
+ * </tr>
+ * <tr>
+ * <td>1 millisecond</td>
+ * <td align="right">584,542,046.09</td>
+ * <td align="right">285,420.92</td>
+ * <td align="right">0.14</td>
+ * </tr>
+ * <tr>
+ * <td>1 microsecond</td>
+ * <td align="right">584,542.05</td>
+ * <td align="right">285.42</td>
+ * <td align="right">0.00</td>
+ * </tr>
+ * <tr>
+ * <td>100 nanoseconds (tick)</td>
+ * <td align="right">58,454.20</td>
+ * <td align="right">28.54</td>
+ * <td align="right">0.00</td>
+ * </tr>
+ * <tr>
+ * <td>1 nanosecond</td>
+ * <td align="right">584.5420461</td>
+ * <td align="right">0.2854</td>
+ * <td align="right">0.00</td>
+ * </tr>
+ * </table>
*
- * <p>
- * These functions implement a universal time scale which can be used as a 'pivot',
- * and provide conversion functions to and from all other major time scales.
- * This datetimes to be converted to the pivot time, safely manipulated,
- * and converted back to any other datetime time scale.
+ * <p>
+ * These functions implement a universal time scale which can be used as a 'pivot',
+ * and provide conversion functions to and from all other major time scales.
+ * This datetimes to be converted to the pivot time, safely manipulated,
+ * and converted back to any other datetime time scale.
*
- * <p>
- * So what to use for this pivot? Java time has plenty of range, but cannot represent
- * .NET <code>System.DateTime</code> values without severe loss of precision. ICU4C time addresses this by using a
- * <code>double</code> that is otherwise equivalent to the Java time. However, there are disadvantages
- * with <code>doubles</code>. They provide for much more graceful degradation in arithmetic operations.
- * But they only have 53 bits of accuracy, which means that they will lose precision when
- * converting back and forth to ticks. What would really be nice would be a
- * <code>long double</code> (80 bits -- 64 bit mantissa), but that is not supported on most systems.
+ * <p>
+ * So what to use for this pivot? Java time has plenty of range, but cannot represent
+ * .NET <code>System.DateTime</code> values without severe loss of precision. ICU4C time addresses this by using a
+ * <code>double</code> that is otherwise equivalent to the Java time. However, there are disadvantages
+ * with <code>doubles</code>. They provide for much more graceful degradation in arithmetic operations.
+ * But they only have 53 bits of accuracy, which means that they will lose precision when
+ * converting back and forth to ticks. What would really be nice would be a
+ * <code>long double</code> (80 bits -- 64 bit mantissa), but that is not supported on most systems.
*
- * <p>
- * The Unix extended time uses a structure with two components: time in seconds and a
- * fractional field (microseconds). However, this is clumsy, slow, and
- * prone to error (you always have to keep track of overflow and underflow in the
- * fractional field). <code>BigDecimal</code> would allow for arbitrary precision and arbitrary range,
- * but the ICU team did not want to use this as the normal type, because it is slow and does not
- * have a fixed size.
+ * <p>
+ * The Unix extended time uses a structure with two components: time in seconds and a
+ * fractional field (microseconds). However, this is clumsy, slow, and
+ * prone to error (you always have to keep track of overflow and underflow in the
+ * fractional field). <code>BigDecimal</code> would allow for arbitrary precision and arbitrary range,
+ * but the ICU team did not want to use this as the normal type, because it is slow and does not
+ * have a fixed size.
*
- * <p>
- * Because of these issues, the ICU team ended up concluding that the .NET framework's
- * <code>System.DateTime</code> would be the best pivot. However, ICU uses the full range
- * allowed by the datatype, allowing for datetimes back to 29,000 BC and up to 29,000 AD.
- * This time scale is very fine grained, does not lose precision, and covers a range that
- * will meet almost all requirements. It will not handle the range that Java times do,
- * but frankly, being able to handle dates before 29,000 BC or after 29,000 AD is of very limited interest.
+ * <p>
+ * Because of these issues, the ICU team ended up concluding that the .NET framework's
+ * <code>System.DateTime</code> would be the best pivot. However, ICU uses the full range
+ * allowed by the datatype, allowing for datetimes back to 29,000 BC and up to 29,000 AD.
+ * This time scale is very fine grained, does not lose precision, and covers a range that
+ * will meet almost all requirements. It will not handle the range that Java times do,
+ * but frankly, being able to handle dates before 29,000 BC or after 29,000 AD is of very limited interest.
*/
/**
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
*
-* http://www.apache.org/licenses/LICENSE-2.0
+* http://www.apache.org/licenses/LICENSE-2.0
*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
*/
int i18n_ubidi_destroy(i18n_ubidi_h ubidi)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- ubidi_close(ubidi);
+ ubidi_close(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_count_paragraphs(i18n_ubidi_h ubidi, int32_t *count)
{
- retv_if(ubidi == NULL || count == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || count == NULL, I18N_ERROR_INVALID_PARAMETER);
- *count = ubidi_countParagraphs(ubidi);
+ *count = ubidi_countParagraphs(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_count_runs(i18n_ubidi_h ubidi, int32_t *count)
{
- retv_if(ubidi == NULL || count == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || count == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- *count = ubidi_countRuns(ubidi, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ *count = ubidi_countRuns(ubidi, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_get_base_direction(const i18n_uchar *text, int32_t length,
- i18n_ubidi_direction_e *direction)
+ i18n_ubidi_direction_e *direction)
{
- retv_if(text == NULL || direction == NULL || length < -1, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(text == NULL || direction == NULL || length < -1, I18N_ERROR_INVALID_PARAMETER);
- *direction = ubidi_getBaseDirection(text, length);
+ *direction = ubidi_getBaseDirection(text, length);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_class_cb(i18n_ubidi_h ubidi, i18n_ubidi_class_cb *fn, const void **context)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- enum UCharDirection (*_fn)(const void *, UChar32);
- ubidi_getClassCallback(ubidi, &_fn, context);
- if (fn)
- *fn = (i18n_uchar_direction_e (*)(const void *, i18n_uchar32)) _fn;
+ enum UCharDirection(*_fn)(const void *, UChar32);
+ ubidi_getClassCallback(ubidi, &_fn, context);
+ if (fn)
+ *fn = (i18n_uchar_direction_e(*)(const void *, i18n_uchar32)) _fn;
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_customized_class(i18n_ubidi_h ubidi, i18n_uchar32 c,
- i18n_uchar_direction_e *direction)
+ i18n_uchar_direction_e *direction)
{
- retv_if(ubidi == NULL || direction == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || direction == NULL, I18N_ERROR_INVALID_PARAMETER);
- *direction = ubidi_getCustomizedClass(ubidi, c);
+ *direction = ubidi_getCustomizedClass(ubidi, c);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_direction(const i18n_ubidi_h ubidi, i18n_ubidi_direction_e *direction)
{
- retv_if(ubidi == NULL || direction == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || direction == NULL, I18N_ERROR_INVALID_PARAMETER);
- *direction = ubidi_getDirection(ubidi);
+ *direction = ubidi_getDirection(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_length(const i18n_ubidi_h ubidi, int32_t *length)
{
- retv_if(ubidi == NULL || length == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || length == NULL, I18N_ERROR_INVALID_PARAMETER);
- *length = ubidi_getLength(ubidi);
+ *length = ubidi_getLength(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_level_at(const i18n_ubidi_h ubidi, int32_t char_index, i18n_ubidi_level_t *level)
{
- retv_if(ubidi == NULL || level == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || level == NULL, I18N_ERROR_INVALID_PARAMETER);
- *level = ubidi_getLevelAt(ubidi, char_index);
+ *level = ubidi_getLevelAt(ubidi, char_index);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_levels(i18n_ubidi_h ubidi, const i18n_ubidi_level_t **levels)
{
- retv_if(ubidi == NULL || levels == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || levels == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- *levels = ubidi_getLevels(ubidi, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ *levels = ubidi_getLevels(ubidi, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_get_logical_index(i18n_ubidi_h ubidi, int32_t visual_index, int32_t *logical_index)
{
- retv_if(ubidi == NULL || logical_index == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || logical_index == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- *logical_index = ubidi_getLogicalIndex(ubidi, visual_index, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ *logical_index = ubidi_getLogicalIndex(ubidi, visual_index, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_get_logical_map(i18n_ubidi_h ubidi, int32_t *index_map)
{
- retv_if(ubidi == NULL || index_map == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || index_map == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- ubidi_getLogicalMap(ubidi, index_map, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ ubidi_getLogicalMap(ubidi, index_map, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_get_logical_run(const i18n_ubidi_h ubidi,
- int32_t logical_position,
- int32_t *logical_limit,
- i18n_ubidi_level_t *level)
+ int32_t logical_position,
+ int32_t *logical_limit,
+ i18n_ubidi_level_t *level)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- ubidi_getLogicalRun(ubidi, logical_position, logical_limit, level);
+ ubidi_getLogicalRun(ubidi, logical_position, logical_limit, level);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_paragraph(const i18n_ubidi_h ubidi,
- int32_t char_index,
- int32_t *para_start,
- int32_t *para_limit,
- i18n_ubidi_level_t *para_level,
- int32_t *index)
+ int32_t char_index,
+ int32_t *para_start,
+ int32_t *para_limit,
+ i18n_ubidi_level_t *para_level,
+ int32_t *index)
{
- retv_if(ubidi == NULL || index == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || index == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- *index = ubidi_getParagraph(ubidi, char_index, para_start, para_limit, para_level,
- &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ *index = ubidi_getParagraph(ubidi, char_index, para_start, para_limit, para_level,
+ &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_get_paragraph_by_index(const i18n_ubidi_h ubidi,
- int32_t para_index,
- int32_t *para_start,
- int32_t *para_limit,
- i18n_ubidi_level_t *para_level)
+ int32_t para_index,
+ int32_t *para_start,
+ int32_t *para_limit,
+ i18n_ubidi_level_t *para_level)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- ubidi_getParagraphByIndex(ubidi, para_index, para_start, para_limit, para_level,
- &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ ubidi_getParagraphByIndex(ubidi, para_index, para_start, para_limit, para_level,
+ &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_get_para_level(const i18n_ubidi_h ubidi, i18n_ubidi_level_t *level)
{
- retv_if(ubidi == NULL || level == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || level == NULL, I18N_ERROR_INVALID_PARAMETER);
- *level = ubidi_getParaLevel(ubidi);
+ *level = ubidi_getParaLevel(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_processed_length(const i18n_ubidi_h ubidi, int32_t *length)
{
- retv_if(ubidi == NULL || length == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || length == NULL, I18N_ERROR_INVALID_PARAMETER);
- *length = ubidi_getProcessedLength(ubidi);
+ *length = ubidi_getProcessedLength(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_reordering_mode(i18n_ubidi_h ubidi, i18n_ubidi_reordering_mode_e *mode)
{
- retv_if(ubidi == NULL || mode == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || mode == NULL, I18N_ERROR_INVALID_PARAMETER);
- *mode = ubidi_getReorderingMode(ubidi);
+ *mode = ubidi_getReorderingMode(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_reordering_options(i18n_ubidi_h ubidi, uint32_t *options)
{
- retv_if(ubidi == NULL || options == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || options == NULL, I18N_ERROR_INVALID_PARAMETER);
- *options = ubidi_getReorderingOptions(ubidi);
+ *options = ubidi_getReorderingOptions(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_result_length(const i18n_ubidi_h ubidi, int32_t *length)
{
- retv_if(ubidi == NULL || length == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || length == NULL, I18N_ERROR_INVALID_PARAMETER);
- *length = ubidi_getResultLength(ubidi);
+ *length = ubidi_getResultLength(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_text(const i18n_ubidi_h ubidi, char **text)
{
- retv_if(ubidi == NULL || text == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || text == NULL, I18N_ERROR_INVALID_PARAMETER);
- *text = NULL;
+ *text = NULL;
- const UChar *_ubidi_text = ubidi_getText(ubidi);
- retv_if(_ubidi_text == NULL, I18N_ERROR_INVALID_PARAMETER);
+ const UChar *_ubidi_text = ubidi_getText(ubidi);
+ retv_if(_ubidi_text == NULL, I18N_ERROR_INVALID_PARAMETER);
- int32_t ulen = u_strlen(_ubidi_text);
- retv_if(ulen <= 0, I18N_ERROR_INVALID_PARAMETER);
+ int32_t ulen = u_strlen(_ubidi_text);
+ retv_if(ulen <= 0, I18N_ERROR_INVALID_PARAMETER);
- /*
- * UTF-16 uses at least two bytes, growing up to four bytes as necessary,
- * that is why we multiply UChar by 4.
- */
- char _text[4*ulen+1];
- u_austrcpy(_text, _ubidi_text);
+ /*
+ * UTF-16 uses at least two bytes, growing up to four bytes as necessary,
+ * that is why we multiply UChar by 4.
+ */
+ char _text[4*ulen+1];
+ u_austrcpy(_text, _ubidi_text);
- int32_t len = strlen(_text);
+ int32_t len = strlen(_text);
- *text = (char *)malloc(len + 1);
- retv_if(*text == NULL, I18N_ERROR_OUT_OF_MEMORY);
+ *text = (char *)malloc(len + 1);
+ retv_if(*text == NULL, I18N_ERROR_OUT_OF_MEMORY);
- strcpy(*text, _text);
+ strcpy(*text, _text);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_get_visual_index(i18n_ubidi_h ubidi, int32_t logical_index, int32_t *visual_index)
{
- retv_if(ubidi == NULL || visual_index == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || visual_index == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- *visual_index = ubidi_getVisualIndex(ubidi, logical_index, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ *visual_index = ubidi_getVisualIndex(ubidi, logical_index, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_get_visual_map(i18n_ubidi_h ubidi, int32_t *index_map)
{
- retv_if(ubidi == NULL || index_map == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || index_map == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- ubidi_getVisualMap(ubidi, index_map, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ ubidi_getVisualMap(ubidi, index_map, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_get_visual_run(i18n_ubidi_h ubidi,
- int32_t run_index,
- int32_t *logical_index,
- int32_t *length,
- i18n_ubidi_direction_e *direction)
+ int32_t run_index,
+ int32_t *logical_index,
+ int32_t *length,
+ i18n_ubidi_direction_e *direction)
{
- retv_if(ubidi == NULL || direction == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || direction == NULL, I18N_ERROR_INVALID_PARAMETER);
- int32_t count_runs;
- i18n_error_code_e i18n_error = i18n_ubidi_count_runs(ubidi, &count_runs);
- if(i18n_error != I18N_ERROR_NONE)
- return i18n_error;
+ int32_t count_runs;
+ i18n_error_code_e i18n_error = i18n_ubidi_count_runs(ubidi, &count_runs);
+ if (i18n_error != I18N_ERROR_NONE)
+ return i18n_error;
- retv_if(run_index < 0 || run_index > count_runs-1, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(run_index < 0 || run_index > count_runs-1, I18N_ERROR_INVALID_PARAMETER);
- *direction = ubidi_getVisualRun(ubidi, run_index, logical_index, length);
+ *direction = ubidi_getVisualRun(ubidi, run_index, logical_index, length);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_invert_map(const int32_t *scr_map, int32_t length, int32_t *dest_map)
{
- retv_if(scr_map == NULL || dest_map == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(scr_map == NULL || dest_map == NULL, I18N_ERROR_INVALID_PARAMETER);
- ubidi_invertMap(scr_map, dest_map, length);
+ ubidi_invertMap(scr_map, dest_map, length);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_is_inverse(i18n_ubidi_h ubidi, i18n_ubool *is_inverse)
{
- retv_if(ubidi == NULL || is_inverse == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || is_inverse == NULL, I18N_ERROR_INVALID_PARAMETER);
- *is_inverse = ubidi_isInverse(ubidi);
+ *is_inverse = ubidi_isInverse(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_is_order_paragraphs_ltr(i18n_ubidi_h ubidi, i18n_ubool *is_order)
{
- retv_if(ubidi == NULL || is_order == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || is_order == NULL, I18N_ERROR_INVALID_PARAMETER);
- *is_order = ubidi_isOrderParagraphsLTR(ubidi);
+ *is_order = ubidi_isOrderParagraphsLTR(ubidi);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_create(i18n_ubidi_h *ubidi)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- *ubidi = ubidi_open();
+ *ubidi = ubidi_open();
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_create_sized(int32_t max_length, int32_t max_run_count, i18n_ubidi_h *ubidi)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- *ubidi = ubidi_openSized(max_length, max_run_count, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ *ubidi = ubidi_openSized(max_length, max_run_count, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_order_paragraphs_ltr(i18n_ubidi_h ubidi, i18n_ubool order_paragraphs_ltr)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- ubidi_orderParagraphsLTR(ubidi, order_paragraphs_ltr);
+ ubidi_orderParagraphsLTR(ubidi, order_paragraphs_ltr);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_reorder_logical(const i18n_ubidi_level_t *levels, int32_t length, int32_t *index_map)
{
- retv_if(levels == NULL || index_map == NULL || length <= 0, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(levels == NULL || index_map == NULL || length <= 0, I18N_ERROR_INVALID_PARAMETER);
- ubidi_reorderLogical(levels, length, index_map);
+ ubidi_reorderLogical(levels, length, index_map);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_reorder_visual(const i18n_ubidi_level_t *levels, int32_t length, int32_t *index_map)
{
- retv_if(levels == NULL || index_map == NULL || length <= 0, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(levels == NULL || index_map == NULL || length <= 0, I18N_ERROR_INVALID_PARAMETER);
- ubidi_reorderVisual(levels, length, index_map);
+ ubidi_reorderVisual(levels, length, index_map);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_set_class_cb(i18n_ubidi_h ubidi,
- i18n_ubidi_class_cb new_fn,
- const void *new_context,
- i18n_ubidi_class_cb *old_fn,
- const void **old_context)
+ i18n_ubidi_class_cb new_fn,
+ const void *new_context,
+ i18n_ubidi_class_cb *old_fn,
+ const void **old_context)
{
- retv_if(ubidi == NULL || new_fn == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || new_fn == NULL, I18N_ERROR_INVALID_PARAMETER);
- enum UCharDirection (*_old_fn)(const void *, UChar32);
- const void *_old_context;
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- ubidi_setClassCallback(ubidi, (enum UCharDirection (*)(const void*, UChar32)) new_fn, new_context,
- &_old_fn, &_old_context, &icu_error);
- if (old_fn)
- *old_fn = (i18n_uchar_direction_e (*)(const void *, i18n_uchar32)) _old_fn;
- if (old_context)
- *old_context = _old_context;
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ enum UCharDirection(*_old_fn)(const void *, UChar32);
+ const void *_old_context;
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ ubidi_setClassCallback(ubidi, (enum UCharDirection(*)(const void *, UChar32)) new_fn, new_context,
+ &_old_fn, &_old_context, &icu_error);
+ if (old_fn)
+ *old_fn = (i18n_uchar_direction_e(*)(const void *, i18n_uchar32)) _old_fn;
+ if (old_context)
+ *old_context = _old_context;
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_set_context(i18n_ubidi_h ubidi,
- const i18n_uchar *prologue,
- int32_t pro_length,
- const i18n_uchar *epilogue,
- int32_t epi_length)
+ const i18n_uchar *prologue,
+ int32_t pro_length,
+ const i18n_uchar *epilogue,
+ int32_t epi_length)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- ubidi_setContext(ubidi, prologue, pro_length, epilogue, epi_length, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ ubidi_setContext(ubidi, prologue, pro_length, epilogue, epi_length, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_set_inverse(i18n_ubidi_h ubidi, i18n_ubool is_inverse)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- ubidi_setInverse(ubidi, is_inverse);
+ ubidi_setInverse(ubidi, is_inverse);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_set_line(const i18n_ubidi_h para_bidi,
- int32_t start,
- int32_t limit,
- i18n_ubidi_h line_bidi)
+ int32_t start,
+ int32_t limit,
+ i18n_ubidi_h line_bidi)
{
- retv_if(para_bidi == NULL || line_bidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(para_bidi == NULL || line_bidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- ubidi_setLine(para_bidi, start, limit, line_bidi, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ ubidi_setLine(para_bidi, start, limit, line_bidi, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_set_para(i18n_ubidi_h ubidi,
- const i18n_uchar *text,
- int32_t length,
- i18n_ubidi_level_t para_level,
- i18n_ubidi_level_t *embedding_levels)
+ const i18n_uchar *text,
+ int32_t length,
+ i18n_ubidi_level_t para_level,
+ i18n_ubidi_level_t *embedding_levels)
{
- retv_if(ubidi == NULL || text == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || text == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- ubidi_setPara(ubidi, text, length, para_level, embedding_levels, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ ubidi_setPara(ubidi, text, length, para_level, embedding_levels, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_set_reordering_mode(i18n_ubidi_h ubidi, i18n_ubidi_reordering_mode_e reordering_mode)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- ubidi_setReorderingMode(ubidi, reordering_mode);
+ ubidi_setReorderingMode(ubidi, reordering_mode);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_set_reordering_options(i18n_ubidi_h ubidi, uint32_t reordering_options)
{
- retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL, I18N_ERROR_INVALID_PARAMETER);
- ubidi_setReorderingOptions(ubidi, reordering_options);
+ ubidi_setReorderingOptions(ubidi, reordering_options);
- return I18N_ERROR_NONE;
+ return I18N_ERROR_NONE;
}
int i18n_ubidi_write_reordered(i18n_ubidi_h ubidi,
- uint16_t options,
- int32_t dest_size,
- i18n_uchar *dest,
- int32_t *output_length)
+ uint16_t options,
+ int32_t dest_size,
+ i18n_uchar *dest,
+ int32_t *output_length)
{
- retv_if(ubidi == NULL || dest == NULL || output_length == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(ubidi == NULL || dest == NULL || output_length == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- *output_length = ubidi_writeReordered(ubidi, dest, dest_size, options, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ *output_length = ubidi_writeReordered(ubidi, dest, dest_size, options, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
int i18n_ubidi_write_reverse(const i18n_uchar *src,
- int32_t src_length,
- uint16_t options,
- int32_t dest_size,
- i18n_uchar *dest,
- int32_t *output_length)
+ int32_t src_length,
+ uint16_t options,
+ int32_t dest_size,
+ i18n_uchar *dest,
+ int32_t *output_length)
{
- retv_if(src == NULL || dest == NULL || output_length == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(src == NULL || dest == NULL || output_length == NULL, I18N_ERROR_INVALID_PARAMETER);
- i18n_error_code_e i18n_error;
- UErrorCode icu_error = U_ZERO_ERROR;
- *output_length = ubidi_writeReverse(src, src_length, dest, dest_size, options, &icu_error);
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ *output_length = ubidi_writeReverse(src, src_length, dest, dest_size, options, &icu_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
if (attr == I18N_UNUMBER_ROUNDING_INCREMENT) return I18N_ERROR_NOT_SUPPORTED;
if (attr == I18N_UNUMBER_PADDING_POSITION &&
- (new_value < I18N_UNUMBER_PAD_BEFORE_PREFIX || new_value > I18N_UNUMBER_PAD_AFTER_SUFFIX))
- return I18N_ERROR_INVALID_PARAMETER;
+ (new_value < I18N_UNUMBER_PAD_BEFORE_PREFIX || new_value > I18N_UNUMBER_PAD_AFTER_SUFFIX))
+ return I18N_ERROR_INVALID_PARAMETER;
unum_setAttribute(fmt, attr, new_value);
return I18N_ERROR_NONE;
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#include <unicode/ushape.h>
#include <utils_i18n_private.h>
int i18n_ushape_shape_arabic(const i18n_uchar *source, int32_t source_len,
- uint32_t options, int32_t dest_size, i18n_uchar *dest, int32_t *dest_len)
+ uint32_t options, int32_t dest_size, i18n_uchar *dest, int32_t *dest_len)
{
- retv_if(dest == NULL && dest_len == NULL, I18N_ERROR_INVALID_PARAMETER);
+ retv_if(dest == NULL && dest_len == NULL, I18N_ERROR_INVALID_PARAMETER);
- UErrorCode icu_error = U_ZERO_ERROR;
- i18n_error_code_e i18n_error;
+ UErrorCode icu_error = U_ZERO_ERROR;
+ i18n_error_code_e i18n_error;
- int32_t ret_len = u_shapeArabic(source, source_len, dest, dest_size, options, &icu_error);
+ int32_t ret_len = u_shapeArabic(source, source_len, dest, dest_size, options, &icu_error);
- if (dest_len)
- *dest_len = ret_len;
+ if (dest_len)
+ *dest_len = ret_len;
- ERR_MAPPING(icu_error, i18n_error);
- I18N_ERR(i18n_error);
+ ERR_MAPPING(icu_error, i18n_error);
+ I18N_ERR(i18n_error);
- return i18n_error;
+ return i18n_error;
}
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#include <unicode/utmscale.h>