]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /******************************************************************** |
2 | * COPYRIGHT: | |
374ca955 | 3 | * Copyright (c) 1997-2004, 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 | ||
22 | #ifdef XP_CPLUSPLUS | |
23 | extern "C" { | |
24 | #endif | |
25 | ||
26 | #define MAX_STRING_LENGTH 200 | |
27 | ||
28 | /* length of an array */ | |
29 | #define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0])) | |
30 | ||
31 | /* Comparing the description of the BiDi algorithm with this implementation | |
32 | is easier with the same names for the BiDi types in the code as there. | |
33 | See UCharDirection in uchar.h . | |
34 | */ | |
35 | enum { | |
36 | L= U_LEFT_TO_RIGHT, | |
37 | R= U_RIGHT_TO_LEFT, | |
38 | EN= U_EUROPEAN_NUMBER, | |
39 | ES= U_EUROPEAN_NUMBER_SEPARATOR, | |
40 | ET= U_EUROPEAN_NUMBER_TERMINATOR, | |
41 | AN= U_ARABIC_NUMBER, | |
42 | CS= U_COMMON_NUMBER_SEPARATOR, | |
43 | B= U_BLOCK_SEPARATOR, | |
44 | S= U_SEGMENT_SEPARATOR, | |
45 | WS= U_WHITE_SPACE_NEUTRAL, | |
46 | ON= U_OTHER_NEUTRAL, | |
47 | LRE=U_LEFT_TO_RIGHT_EMBEDDING, | |
48 | LRO=U_LEFT_TO_RIGHT_OVERRIDE, | |
49 | AL= U_RIGHT_TO_LEFT_ARABIC, | |
50 | RLE=U_RIGHT_TO_LEFT_EMBEDDING, | |
51 | RLO=U_RIGHT_TO_LEFT_OVERRIDE, | |
52 | PDF=U_POP_DIRECTIONAL_FORMAT, | |
53 | NSM=U_DIR_NON_SPACING_MARK, | |
54 | BN= U_BOUNDARY_NEUTRAL, | |
55 | dirPropCount | |
56 | }; | |
57 | ||
58 | extern const char * | |
59 | dirPropNames[dirPropCount]; | |
60 | ||
374ca955 | 61 | extern UChar |
b75a7d8f A |
62 | charFromDirProp[dirPropCount]; |
63 | ||
64 | typedef struct { | |
65 | const uint8_t *text; | |
66 | int32_t length; | |
67 | UBiDiLevel paraLevel; | |
68 | int32_t lineStart, lineLimit; | |
69 | UBiDiDirection direction; | |
70 | UBiDiLevel resultLevel; | |
71 | const UBiDiLevel *levels; | |
72 | const uint8_t *visualMap; | |
73 | } BiDiTestData; | |
74 | ||
75 | extern BiDiTestData | |
76 | tests[]; | |
77 | ||
78 | extern int | |
79 | bidiTestCount; | |
80 | ||
81 | #ifdef XP_CPLUSPLUS | |
82 | } | |
83 | #endif | |
84 | ||
85 | #endif |