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_INCLUDE_FXCRT_FX_ARB_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_ARB_H_ |
8 #define CORE_INCLUDE_FXCRT_FX_ARB_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_ARB_H_ |
9 | 9 |
10 #include "fx_system.h" | 10 #include "fx_system.h" |
11 #include "fx_ucd.h" | 11 #include "fx_ucd.h" |
12 | 12 |
13 class IFX_ArabicChar; | 13 class IFX_ArabicChar; |
14 class IFX_BidiChar; | |
15 #ifdef __cplusplus | 14 #ifdef __cplusplus |
Tom Sepez
2015/10/27 16:41:05
nit: this file won't compile under C given the cla
Lei Zhang
2015/10/29 21:59:06
Done.
| |
16 extern "C" { | 15 extern "C" { |
17 #endif | 16 #endif |
18 typedef struct _FX_ARBFORMTABLE { | 17 typedef struct _FX_ARBFORMTABLE { |
19 FX_WCHAR wIsolated; | 18 FX_WCHAR wIsolated; |
20 FX_WCHAR wFinal; | 19 FX_WCHAR wFinal; |
21 FX_WCHAR wInitial; | 20 FX_WCHAR wInitial; |
22 FX_WCHAR wMedial; | 21 FX_WCHAR wMedial; |
23 } FX_ARBFORMTABLE, *FX_LPARBFORMTABLE; | 22 } FX_ARBFORMTABLE, *FX_LPARBFORMTABLE; |
24 typedef FX_ARBFORMTABLE const* FX_LPCARBFORMTABLE; | 23 typedef FX_ARBFORMTABLE const* FX_LPCARBFORMTABLE; |
25 typedef struct _FX_ARAALEF { | 24 typedef struct _FX_ARAALEF { |
26 FX_WCHAR wAlef; | 25 FX_WCHAR wAlef; |
27 FX_WCHAR wIsolated; | 26 FX_WCHAR wIsolated; |
28 } FX_ARAALEF, *FX_LPARAALEF; | 27 } FX_ARAALEF, *FX_LPARAALEF; |
29 typedef FX_ARAALEF const* FX_LPCARAALEF; | 28 typedef FX_ARAALEF const* FX_LPCARAALEF; |
30 typedef struct _FX_ARASHADDA { | 29 typedef struct _FX_ARASHADDA { |
31 FX_WCHAR wShadda; | 30 FX_WCHAR wShadda; |
32 FX_WCHAR wIsolated; | 31 FX_WCHAR wIsolated; |
33 } FX_ARASHADDA, *FX_LPARASHADDA; | 32 } FX_ARASHADDA, *FX_LPARASHADDA; |
34 typedef FX_ARASHADDA const* FX_LPCARASHADDA; | 33 typedef FX_ARASHADDA const* FX_LPCARASHADDA; |
35 FX_LPCARBFORMTABLE FX_GetArabicFormTable(FX_WCHAR unicode); | 34 FX_LPCARBFORMTABLE FX_GetArabicFormTable(FX_WCHAR unicode); |
36 FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef); | 35 FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef); |
37 FX_WCHAR FX_GetArabicFromShaddaTable(FX_WCHAR shadda); | 36 FX_WCHAR FX_GetArabicFromShaddaTable(FX_WCHAR shadda); |
38 #ifdef __cplusplus | 37 #ifdef __cplusplus |
39 }; | 38 }; |
Tom Sepez
2015/10/27 16:41:05
nit: no ; here.
Lei Zhang
2015/10/29 21:59:06
Done.
| |
40 #endif | 39 #endif |
41 enum FX_ARBPOSITION { | 40 enum FX_ARBPOSITION { |
42 FX_ARBPOSITION_Isolated = 0, | 41 FX_ARBPOSITION_Isolated = 0, |
43 FX_ARBPOSITION_Final, | 42 FX_ARBPOSITION_Final, |
44 FX_ARBPOSITION_Initial, | 43 FX_ARBPOSITION_Initial, |
45 FX_ARBPOSITION_Medial, | 44 FX_ARBPOSITION_Medial, |
46 }; | 45 }; |
47 class IFX_ArabicChar { | 46 class IFX_ArabicChar { |
48 public: | 47 public: |
49 static IFX_ArabicChar* Create(); | 48 static IFX_ArabicChar* Create(); |
50 virtual ~IFX_ArabicChar() {} | 49 virtual ~IFX_ArabicChar() {} |
51 virtual void Release() = 0; | 50 virtual void Release() = 0; |
52 virtual FX_BOOL IsArabicChar(FX_WCHAR wch) const = 0; | 51 virtual FX_BOOL IsArabicChar(FX_WCHAR wch) const = 0; |
53 virtual FX_BOOL IsArabicFormChar(FX_WCHAR wch) const = 0; | 52 virtual FX_BOOL IsArabicFormChar(FX_WCHAR wch) const = 0; |
54 virtual FX_WCHAR GetFormChar(FX_WCHAR wch, | 53 virtual FX_WCHAR GetFormChar(FX_WCHAR wch, |
55 FX_WCHAR prev = 0, | 54 FX_WCHAR prev = 0, |
56 FX_WCHAR next = 0) const = 0; | 55 FX_WCHAR next = 0) const = 0; |
57 virtual FX_WCHAR GetFormChar(const CFX_Char* cur, | 56 virtual FX_WCHAR GetFormChar(const CFX_Char* cur, |
58 const CFX_Char* prev, | 57 const CFX_Char* prev, |
59 const CFX_Char* next) const = 0; | 58 const CFX_Char* next) const = 0; |
60 }; | 59 }; |
61 void FX_BidiLine(CFX_WideString& wsText, int32_t iBaseLevel = 0); | 60 void FX_BidiLine(CFX_WideString& wsText, int32_t iBaseLevel = 0); |
62 void FX_BidiLine(CFX_TxtCharArray& chars, | 61 void FX_BidiLine(CFX_TxtCharArray& chars, |
63 int32_t iCount, | 62 int32_t iCount, |
64 int32_t iBaseLevel = 0); | 63 int32_t iBaseLevel = 0); |
65 void FX_BidiLine(CFX_RTFCharArray& chars, | 64 void FX_BidiLine(CFX_RTFCharArray& chars, |
66 int32_t iCount, | 65 int32_t iCount, |
67 int32_t iBaseLevel = 0); | 66 int32_t iBaseLevel = 0); |
68 class IFX_BidiChar { | |
69 public: | |
70 static IFX_BidiChar* Create(); | |
71 virtual ~IFX_BidiChar() {} | |
72 | |
73 virtual void SetPolicy(FX_BOOL bSeparateNeutral = TRUE) = 0; | |
74 virtual FX_BOOL AppendChar(FX_WCHAR wch) = 0; | |
75 virtual FX_BOOL EndChar() = 0; | |
76 virtual int32_t GetBidiInfo(int32_t& iStart, int32_t& iCount) = 0; | |
77 virtual void Reset() = 0; | |
78 }; | |
79 | 67 |
80 #endif // CORE_INCLUDE_FXCRT_FX_ARB_H_ | 68 #endif // CORE_INCLUDE_FXCRT_FX_ARB_H_ |
OLD | NEW |