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