Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ubidi.h

Go to the documentation of this file.
00001 /*
00002 ******************************************************************************
00003 *
00004 *   Copyright (C) 1999-2001, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 ******************************************************************************
00008 *   file name:  ubidi.h
00009 *   encoding:   US-ASCII
00010 *   tab size:   8 (not used)
00011 *   indentation:4
00012 *
00013 *   created on: 1999jul27
00014 *   created by: Markus W. Scherer
00015 */
00016 
00017 #ifndef UBIDI_H
00018 #define UBIDI_H
00019 
00020 #include "unicode/utypes.h"
00021 #include "unicode/uchar.h"
00022 
00023 /*
00024  * javadoc-style comments are intended to be transformed into HTML
00025  * using DOC++ - see
00026  * http://www.zib.de/Visual/software/doc++/index.html .
00027  *
00028  * The HTML documentation is created with
00029  *  doc++ -H ubidi.h
00030  *
00031  * The following #define trick allows us to do it all in one file
00032  * and still be able to compile it.
00033  */
00034 /*#define DOCXX_TAG*/
00035 /*#define BIDI_SAMPLE_CODE*/
00036 
00296 /*DOCXX_TAG*/
00339 typedef uint8_t UBiDiLevel;
00340 
00345 #define UBIDI_DEFAULT_LTR 0xfe
00346 
00351 #define UBIDI_DEFAULT_RTL 0xff
00352 
00358 #define UBIDI_MAX_EXPLICIT_LEVEL 61
00359 
00364 #define UBIDI_LEVEL_OVERRIDE 0x80
00365 
00370 enum UBiDiDirection {
00372     UBIDI_LTR,
00374     UBIDI_RTL,
00376     UBIDI_MIXED
00377 };
00378 
00380 typedef enum UBiDiDirection UBiDiDirection;
00381 
00392 struct UBiDi;
00393 
00395 typedef struct UBiDi UBiDi;
00396 
00411 U_CAPI UBiDi * U_EXPORT2
00412 ubidi_open(void);
00413 
00449 U_CAPI UBiDi * U_EXPORT2
00450 ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode);
00451 
00470 U_CAPI void U_EXPORT2
00471 ubidi_close(UBiDi *pBiDi);
00472 
00509 U_CAPI void U_EXPORT2
00510 ubidi_setInverse(UBiDi *pBiDi, UBool isInverse);
00511 
00521 U_CAPI UBool U_EXPORT2
00522 ubidi_isInverse(UBiDi *pBiDi);
00523 
00595 U_CAPI void U_EXPORT2
00596 ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
00597               UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels,
00598               UErrorCode *pErrorCode);
00599 
00643 U_CAPI void U_EXPORT2
00644 ubidi_setLine(const UBiDi *pParaBiDi,
00645               int32_t start, int32_t limit,
00646               UBiDi *pLineBiDi,
00647               UErrorCode *pErrorCode);
00648 
00661 U_CAPI UBiDiDirection U_EXPORT2
00662 ubidi_getDirection(const UBiDi *pBiDi);
00663 
00675 U_CAPI const UChar * U_EXPORT2
00676 ubidi_getText(const UBiDi *pBiDi);
00677 
00686 U_CAPI int32_t U_EXPORT2
00687 ubidi_getLength(const UBiDi *pBiDi);
00688 
00699 U_CAPI UBiDiLevel U_EXPORT2
00700 ubidi_getParaLevel(const UBiDi *pBiDi);
00701 
00714 U_CAPI UBiDiLevel U_EXPORT2
00715 ubidi_getLevelAt(const UBiDi *pBiDi, int32_t charIndex);
00716 
00734 U_CAPI const UBiDiLevel * U_EXPORT2
00735 ubidi_getLevels(UBiDi *pBiDi, UErrorCode *pErrorCode);
00736 
00759 U_CAPI void U_EXPORT2
00760 ubidi_getLogicalRun(const UBiDi *pBiDi, int32_t logicalStart,
00761                     int32_t *pLogicalLimit, UBiDiLevel *pLevel);
00762 
00779 U_CAPI int32_t U_EXPORT2
00780 ubidi_countRuns(UBiDi *pBiDi, UErrorCode *pErrorCode);
00781 
00833 U_CAPI UBiDiDirection U_EXPORT2
00834 ubidi_getVisualRun(UBiDi *pBiDi, int32_t runIndex,
00835                    int32_t *pLogicalStart, int32_t *pLength);
00836 
00860 U_CAPI int32_t U_EXPORT2
00861 ubidi_getVisualIndex(UBiDi *pBiDi, int32_t logicalIndex, UErrorCode *pErrorCode);
00862 
00884 U_CAPI int32_t U_EXPORT2
00885 ubidi_getLogicalIndex(UBiDi *pBiDi, int32_t visualIndex, UErrorCode *pErrorCode);
00886 
00905 U_CAPI void U_EXPORT2
00906 ubidi_getLogicalMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode);
00907 
00926 U_CAPI void U_EXPORT2
00927 ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode);
00928 
00949 U_CAPI void U_EXPORT2
00950 ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap);
00951 
00972 U_CAPI void U_EXPORT2
00973 ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap);
00974 
00989 U_CAPI void U_EXPORT2
00990 ubidi_invertMap(const int32_t *srcMap, int32_t *destMap, int32_t length);
00991 
01001 #define UBIDI_KEEP_BASE_COMBINING       1
01002 
01011 #define UBIDI_DO_MIRRORING              2
01012 
01022 #define UBIDI_INSERT_LRM_FOR_NUMERIC    4
01023 
01032 #define UBIDI_REMOVE_BIDI_CONTROLS      8
01033 
01048 #define UBIDI_OUTPUT_REVERSE            16
01049 
01107 U_CAPI int32_t U_EXPORT2
01108 ubidi_writeReordered(UBiDi *pBiDi,
01109                      UChar *dest, int32_t destSize,
01110                      uint16_t options,
01111                      UErrorCode *pErrorCode);
01112 
01160 U_CAPI int32_t U_EXPORT2
01161 ubidi_writeReverse(const UChar *src, int32_t srcLength,
01162                    UChar *dest, int32_t destSize,
01163                    uint16_t options,
01164                    UErrorCode *pErrorCode);
01165 
01166 /*#define BIDI_SAMPLE_CODE*/
01169 #endif

Generated on Thu Aug 15 14:13:29 2002 for ICU 2.2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001