| 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_INCLUDE_FX_ARB_H_ | 7 #ifndef CORE_FXCRT_INCLUDE_FX_ARB_H_ |
| 8 #define CORE_FXCRT_INCLUDE_FX_ARB_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_ARB_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_system.h" | 10 #include "core/fxcrt/include/fx_system.h" |
| 11 #include "core/fxcrt/include/fx_ucd.h" | 11 #include "core/fxcrt/include/fx_ucd.h" |
| 12 | 12 |
| 13 class IFX_ArabicChar; | |
| 14 | |
| 15 struct FX_ARBFORMTABLE { | 13 struct FX_ARBFORMTABLE { |
| 16 uint16_t wIsolated; | 14 uint16_t wIsolated; |
| 17 uint16_t wFinal; | 15 uint16_t wFinal; |
| 18 uint16_t wInitial; | 16 uint16_t wInitial; |
| 19 uint16_t wMedial; | 17 uint16_t wMedial; |
| 20 }; | 18 }; |
| 21 | 19 |
| 22 struct FX_ARAALEF { | 20 struct FX_ARAALEF { |
| 23 uint16_t wAlef; | 21 uint16_t wAlef; |
| 24 uint16_t wIsolated; | 22 uint16_t wIsolated; |
| 25 }; | 23 }; |
| 26 | 24 |
| 27 struct FX_ARASHADDA { | 25 struct FX_ARASHADDA { |
| 28 uint16_t wShadda; | 26 uint16_t wShadda; |
| 29 uint16_t wIsolated; | 27 uint16_t wIsolated; |
| 30 }; | 28 }; |
| 31 | 29 |
| 32 const FX_ARBFORMTABLE* FX_GetArabicFormTable(FX_WCHAR unicode); | 30 const FX_ARBFORMTABLE* FX_GetArabicFormTable(FX_WCHAR unicode); |
| 33 FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef); | 31 FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef); |
| 34 FX_WCHAR FX_GetArabicFromShaddaTable(FX_WCHAR shadda); | 32 FX_WCHAR FX_GetArabicFromShaddaTable(FX_WCHAR shadda); |
| 35 | 33 |
| 36 enum FX_ARBPOSITION { | 34 enum FX_ARBPOSITION { |
| 37 FX_ARBPOSITION_Isolated = 0, | 35 FX_ARBPOSITION_Isolated = 0, |
| 38 FX_ARBPOSITION_Final, | 36 FX_ARBPOSITION_Final, |
| 39 FX_ARBPOSITION_Initial, | 37 FX_ARBPOSITION_Initial, |
| 40 FX_ARBPOSITION_Medial, | 38 FX_ARBPOSITION_Medial, |
| 41 }; | 39 }; |
| 42 | 40 |
| 43 class IFX_ArabicChar { | |
| 44 public: | |
| 45 static IFX_ArabicChar* Create(); | |
| 46 virtual ~IFX_ArabicChar() {} | |
| 47 virtual void Release() = 0; | |
| 48 virtual FX_BOOL IsArabicChar(FX_WCHAR wch) const = 0; | |
| 49 virtual FX_BOOL IsArabicFormChar(FX_WCHAR wch) const = 0; | |
| 50 virtual FX_WCHAR GetFormChar(FX_WCHAR wch, | |
| 51 FX_WCHAR prev = 0, | |
| 52 FX_WCHAR next = 0) const = 0; | |
| 53 virtual FX_WCHAR GetFormChar(const CFX_Char* cur, | |
| 54 const CFX_Char* prev, | |
| 55 const CFX_Char* next) const = 0; | |
| 56 }; | |
| 57 | |
| 58 void FX_BidiLine(CFX_WideString& wsText, int32_t iBaseLevel = 0); | 41 void FX_BidiLine(CFX_WideString& wsText, int32_t iBaseLevel = 0); |
| 59 void FX_BidiLine(CFX_TxtCharArray& chars, | 42 void FX_BidiLine(CFX_TxtCharArray& chars, |
| 60 int32_t iCount, | 43 int32_t iCount, |
| 61 int32_t iBaseLevel = 0); | 44 int32_t iBaseLevel = 0); |
| 62 void FX_BidiLine(CFX_RTFCharArray& chars, | 45 void FX_BidiLine(CFX_RTFCharArray& chars, |
| 63 int32_t iCount, | 46 int32_t iCount, |
| 64 int32_t iBaseLevel = 0); | 47 int32_t iBaseLevel = 0); |
| 65 | 48 |
| 66 #endif // CORE_FXCRT_INCLUDE_FX_ARB_H_ | 49 #endif // CORE_FXCRT_INCLUDE_FX_ARB_H_ |
| OLD | NEW |