OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_FXCRT_FX_ARABIC_H_ | 7 #ifndef CORE_FXCRT_FX_ARABIC_H_ |
8 #define CORE_FXCRT_FX_ARABIC_H_ | 8 #define CORE_FXCRT_FX_ARABIC_H_ |
9 | 9 |
10 #include "core/fxcrt/fx_arb.h" | 10 #include "core/fxcrt/fx_arb.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 FX_WCHAR GetFormChar(const CFX_Char* cur, | 23 FX_WCHAR GetFormChar(const CFX_Char* cur, |
24 const CFX_Char* prev, | 24 const CFX_Char* prev, |
25 const CFX_Char* next); | 25 const CFX_Char* next); |
26 | 26 |
27 } // namespace arabic | 27 } // namespace arabic |
28 } // namespace pdfium | 28 } // namespace pdfium |
29 | 29 |
30 void FX_BidiReverseString(CFX_WideString& wsText, | 30 void FX_BidiReverseString(CFX_WideString& wsText, |
31 int32_t iStart, | 31 int32_t iStart, |
32 int32_t iCount); | 32 int32_t iCount); |
33 void FX_BidiSetDeferredRun(CFX_Int32Array& values, | 33 void FX_BidiSetDeferredRun(CFX_ArrayTemplate<int32_t>& values, |
34 int32_t iStart, | 34 int32_t iStart, |
35 int32_t iCount, | 35 int32_t iCount, |
36 int32_t iValue); | 36 int32_t iValue); |
37 void FX_BidiClassify(const CFX_WideString& wsText, | 37 void FX_BidiClassify(const CFX_WideString& wsText, |
38 CFX_Int32Array& classes, | 38 CFX_ArrayTemplate<int32_t>& classes, |
39 bool bWS = false); | 39 bool bWS = false); |
40 int32_t FX_BidiResolveExplicit(int32_t iBaseLevel, | 40 int32_t FX_BidiResolveExplicit(int32_t iBaseLevel, |
41 int32_t iDirection, | 41 int32_t iDirection, |
42 CFX_Int32Array& classes, | 42 CFX_ArrayTemplate<int32_t>& classes, |
43 CFX_Int32Array& levels, | 43 CFX_ArrayTemplate<int32_t>& levels, |
44 int32_t iStart, | 44 int32_t iStart, |
45 int32_t iCount, | 45 int32_t iCount, |
46 int32_t iNest = 0); | 46 int32_t iNest = 0); |
47 | 47 |
48 enum FX_BIDIWEAKSTATE { | 48 enum FX_BIDIWEAKSTATE { |
49 FX_BIDIWEAKSTATE_xa = 0, | 49 FX_BIDIWEAKSTATE_xa = 0, |
50 FX_BIDIWEAKSTATE_xr, | 50 FX_BIDIWEAKSTATE_xr, |
51 FX_BIDIWEAKSTATE_xl, | 51 FX_BIDIWEAKSTATE_xl, |
52 FX_BIDIWEAKSTATE_ao, | 52 FX_BIDIWEAKSTATE_ao, |
53 FX_BIDIWEAKSTATE_ro, | 53 FX_BIDIWEAKSTATE_ro, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 #define FX_BWANxR FX_BIDIWEAKACTION_NxR | 129 #define FX_BWANxR FX_BIDIWEAKACTION_NxR |
130 #define FX_BWANxE FX_BIDIWEAKACTION_NxE | 130 #define FX_BWANxE FX_BIDIWEAKACTION_NxE |
131 #define FX_BWAAxA FX_BIDIWEAKACTION_AxA | 131 #define FX_BWAAxA FX_BIDIWEAKACTION_AxA |
132 #define FX_BWANxL FX_BIDIWEAKACTION_NxL | 132 #define FX_BWANxL FX_BIDIWEAKACTION_NxL |
133 #define FX_BWALxL FX_BIDIWEAKACTION_LxL | 133 #define FX_BWALxL FX_BIDIWEAKACTION_LxL |
134 #define FX_BWAxIL FX_BIDIWEAKACTION_xIL | 134 #define FX_BWAxIL FX_BIDIWEAKACTION_xIL |
135 #define FX_BWAAxR FX_BIDIWEAKACTION_AxR | 135 #define FX_BWAAxR FX_BIDIWEAKACTION_AxR |
136 #define FX_BWALxx FX_BIDIWEAKACTION_Lxx | 136 #define FX_BWALxx FX_BIDIWEAKACTION_Lxx |
137 | 137 |
138 void FX_BidiResolveWeak(int32_t iBaseLevel, | 138 void FX_BidiResolveWeak(int32_t iBaseLevel, |
139 CFX_Int32Array& classes, | 139 CFX_ArrayTemplate<int32_t>& classes, |
140 CFX_Int32Array& levels); | 140 CFX_ArrayTemplate<int32_t>& levels); |
141 enum FX_BIDINEUTRALSTATE { | 141 enum FX_BIDINEUTRALSTATE { |
142 FX_BIDINEUTRALSTATE_r = 0, | 142 FX_BIDINEUTRALSTATE_r = 0, |
143 FX_BIDINEUTRALSTATE_l, | 143 FX_BIDINEUTRALSTATE_l, |
144 FX_BIDINEUTRALSTATE_rn, | 144 FX_BIDINEUTRALSTATE_rn, |
145 FX_BIDINEUTRALSTATE_ln, | 145 FX_BIDINEUTRALSTATE_ln, |
146 FX_BIDINEUTRALSTATE_a, | 146 FX_BIDINEUTRALSTATE_a, |
147 FX_BIDINEUTRALSTATE_na, | 147 FX_BIDINEUTRALSTATE_na, |
148 }; | 148 }; |
149 #define FX_BNSr FX_BIDINEUTRALSTATE_r | 149 #define FX_BNSr FX_BIDINEUTRALSTATE_r |
150 #define FX_BNSl FX_BIDINEUTRALSTATE_l | 150 #define FX_BNSl FX_BIDINEUTRALSTATE_l |
(...skipping 11 matching lines...) Expand all Loading... |
162 }; | 162 }; |
163 #define FX_BNAnL FX_BIDINEUTRALACTION_nL | 163 #define FX_BNAnL FX_BIDINEUTRALACTION_nL |
164 #define FX_BNAEn FX_BIDINEUTRALACTION_En | 164 #define FX_BNAEn FX_BIDINEUTRALACTION_En |
165 #define FX_BNARn FX_BIDINEUTRALACTION_Rn | 165 #define FX_BNARn FX_BIDINEUTRALACTION_Rn |
166 #define FX_BNALn FX_BIDINEUTRALACTION_Ln | 166 #define FX_BNALn FX_BIDINEUTRALACTION_Ln |
167 #define FX_BNAIn FX_BIDINEUTRALACTION_In | 167 #define FX_BNAIn FX_BIDINEUTRALACTION_In |
168 #define FX_BNALnL FX_BIDINEUTRALACTION_LnL | 168 #define FX_BNALnL FX_BIDINEUTRALACTION_LnL |
169 int32_t FX_BidiGetDeferredNeutrals(int32_t iAction, int32_t iLevel); | 169 int32_t FX_BidiGetDeferredNeutrals(int32_t iAction, int32_t iLevel); |
170 int32_t FX_BidiGetResolvedNeutrals(int32_t iAction); | 170 int32_t FX_BidiGetResolvedNeutrals(int32_t iAction); |
171 void FX_BidiResolveNeutrals(int32_t iBaseLevel, | 171 void FX_BidiResolveNeutrals(int32_t iBaseLevel, |
172 CFX_Int32Array& classes, | 172 CFX_ArrayTemplate<int32_t>& classes, |
173 const CFX_Int32Array& levels); | 173 const CFX_ArrayTemplate<int32_t>& levels); |
174 void FX_BidiResolveImplicit(const CFX_Int32Array& classes, | 174 void FX_BidiResolveImplicit(const CFX_ArrayTemplate<int32_t>& classes, |
175 CFX_Int32Array& levels); | 175 CFX_ArrayTemplate<int32_t>& levels); |
176 void FX_BidiResolveWhitespace(int32_t iBaseLevel, | 176 void FX_BidiResolveWhitespace(int32_t iBaseLevel, |
177 const CFX_Int32Array& classes, | 177 const CFX_ArrayTemplate<int32_t>& classes, |
178 CFX_Int32Array& levels); | 178 CFX_ArrayTemplate<int32_t>& levels); |
179 int32_t FX_BidiReorderLevel(int32_t iBaseLevel, | 179 int32_t FX_BidiReorderLevel(int32_t iBaseLevel, |
180 CFX_WideString& wsText, | 180 CFX_WideString& wsText, |
181 const CFX_Int32Array& levels, | 181 const CFX_ArrayTemplate<int32_t>& levels, |
182 int32_t iStart, | 182 int32_t iStart, |
183 bool bReverse = false); | 183 bool bReverse = false); |
184 void FX_BidiReorder(int32_t iBaseLevel, | 184 void FX_BidiReorder(int32_t iBaseLevel, |
185 CFX_WideString& wsText, | 185 CFX_WideString& wsText, |
186 const CFX_Int32Array& levels); | 186 const CFX_ArrayTemplate<int32_t>& levels); |
187 | 187 |
188 #endif // CORE_FXCRT_FX_ARABIC_H_ | 188 #endif // CORE_FXCRT_FX_ARABIC_H_ |
OLD | NEW |