]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | /******************************************************************** |
57a6839d | 2 | * COPYRIGHT: |
2ca993e8 | 3 | * Copyright (c) 1997-2016, International Business Machines Corporation and |
b75a7d8f A |
4 | * others. All Rights Reserved. |
5 | ********************************************************************/ | |
6 | /* file name: cbiditst.h | |
7 | * encoding: US-ASCII | |
8 | * tab size: 8 (not used) | |
9 | * indentation:4 | |
10 | * | |
11 | * created on: 1999sep22 | |
12 | * created by: Markus W. Scherer | |
13 | */ | |
14 | ||
15 | #ifndef CBIDITST_H | |
16 | #define CBIDITST_H | |
17 | ||
18 | #include "unicode/utypes.h" | |
19 | #include "unicode/uchar.h" | |
20 | #include "unicode/ubidi.h" | |
21 | ||
4388f060 | 22 | #ifdef __cplusplus |
b75a7d8f A |
23 | extern "C" { |
24 | #endif | |
25 | ||
26 | #define MAX_STRING_LENGTH 200 | |
27 | ||
b75a7d8f A |
28 | /* Comparing the description of the BiDi algorithm with this implementation |
29 | is easier with the same names for the BiDi types in the code as there. | |
30 | See UCharDirection in uchar.h . | |
31 | */ | |
46f4442e A |
32 | #define L U_LEFT_TO_RIGHT |
33 | #define R U_RIGHT_TO_LEFT | |
34 | #define EN U_EUROPEAN_NUMBER | |
35 | #define ES U_EUROPEAN_NUMBER_SEPARATOR | |
36 | #define ET U_EUROPEAN_NUMBER_TERMINATOR | |
37 | #define AN U_ARABIC_NUMBER | |
38 | #define CS U_COMMON_NUMBER_SEPARATOR | |
39 | #define B U_BLOCK_SEPARATOR | |
40 | #define S U_SEGMENT_SEPARATOR | |
41 | #define WS U_WHITE_SPACE_NEUTRAL | |
42 | #define ON U_OTHER_NEUTRAL | |
43 | #define LRE U_LEFT_TO_RIGHT_EMBEDDING | |
44 | #define LRO U_LEFT_TO_RIGHT_OVERRIDE | |
45 | #define AL U_RIGHT_TO_LEFT_ARABIC | |
46 | #define RLE U_RIGHT_TO_LEFT_EMBEDDING | |
47 | #define RLO U_RIGHT_TO_LEFT_OVERRIDE | |
48 | #define PDF U_POP_DIRECTIONAL_FORMAT | |
49 | #define NSM U_DIR_NON_SPACING_MARK | |
50 | #define BN U_BOUNDARY_NEUTRAL | |
57a6839d A |
51 | #define FSI U_FIRST_STRONG_ISOLATE |
52 | #define LRI U_LEFT_TO_RIGHT_ISOLATE | |
53 | #define RLI U_RIGHT_TO_LEFT_ISOLATE | |
54 | #define PDI U_POP_DIRECTIONAL_ISOLATE | |
b75a7d8f | 55 | |
46f4442e A |
56 | extern const char * const |
57 | dirPropNames[U_CHAR_DIRECTION_COUNT]; | |
b75a7d8f | 58 | |
374ca955 | 59 | extern UChar |
46f4442e | 60 | charFromDirProp[U_CHAR_DIRECTION_COUNT]; |
b75a7d8f A |
61 | |
62 | typedef struct { | |
63 | const uint8_t *text; | |
64 | int32_t length; | |
65 | UBiDiLevel paraLevel; | |
66 | int32_t lineStart, lineLimit; | |
67 | UBiDiDirection direction; | |
68 | UBiDiLevel resultLevel; | |
69 | const UBiDiLevel *levels; | |
70 | const uint8_t *visualMap; | |
71 | } BiDiTestData; | |
72 | ||
46f4442e | 73 | extern const BiDiTestData |
b75a7d8f A |
74 | tests[]; |
75 | ||
46f4442e | 76 | extern const int |
b75a7d8f A |
77 | bidiTestCount; |
78 | ||
4388f060 | 79 | #ifdef __cplusplus |
b75a7d8f A |
80 | } |
81 | #endif | |
82 | ||
83 | #endif |