| 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 XFA_FDE_CSS_FDE_CSSDATATABLE_H_ | 7 #ifndef XFA_FDE_CSS_FDE_CSSDATATABLE_H_ |
| 8 #define XFA_FDE_CSS_FDE_CSSDATATABLE_H_ | 8 #define XFA_FDE_CSS_FDE_CSSDATATABLE_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_system.h" | 10 #include "core/fxcrt/include/fx_system.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 #define FDE_CSSVALUETYPE_MaybeNumber 0x0100 | 124 #define FDE_CSSVALUETYPE_MaybeNumber 0x0100 |
| 125 #define FDE_CSSVALUETYPE_MaybeEnum 0x0200 | 125 #define FDE_CSSVALUETYPE_MaybeEnum 0x0200 |
| 126 #define FDE_CSSVALUETYPE_MaybeURI 0x0400 | 126 #define FDE_CSSVALUETYPE_MaybeURI 0x0400 |
| 127 #define FDE_CSSVALUETYPE_MaybeString 0x0800 | 127 #define FDE_CSSVALUETYPE_MaybeString 0x0800 |
| 128 #define FDE_CSSVALUETYPE_MaybeColor 0x1000 | 128 #define FDE_CSSVALUETYPE_MaybeColor 0x1000 |
| 129 #define FDE_CSSVALUETYPE_MaybeFunction 0x2000 | 129 #define FDE_CSSVALUETYPE_MaybeFunction 0x2000 |
| 130 #define FDE_IsOnlyValue(type, enum) \ | 130 #define FDE_IsOnlyValue(type, enum) \ |
| 131 (((type) & ~(enum)) == FDE_CSSVALUETYPE_Primitive) | 131 (((type) & ~(enum)) == FDE_CSSVALUETYPE_Primitive) |
| 132 |
| 132 struct FDE_CSSPROPERTYTABLE { | 133 struct FDE_CSSPROPERTYTABLE { |
| 133 FDE_CSSPROPERTY eName; | 134 FDE_CSSPROPERTY eName; |
| 134 const FX_WCHAR* pszName; | 135 const FX_WCHAR* pszName; |
| 135 uint32_t dwHash; | 136 uint32_t dwHash; |
| 136 uint32_t dwType; | 137 uint32_t dwType; |
| 137 }; | 138 }; |
| 138 typedef FDE_CSSPROPERTYTABLE const* FDE_LPCCSSPROPERTYTABLE; | |
| 139 | 139 |
| 140 FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const CFX_WideStringC& wsName); | 140 const FDE_CSSPROPERTYTABLE* FDE_GetCSSPropertyByName( |
| 141 FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName); | 141 const CFX_WideStringC& wsName); |
| 142 const FDE_CSSPROPERTYTABLE* FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName); |
| 143 |
| 142 struct FDE_CSSPROPERTYVALUETABLE { | 144 struct FDE_CSSPROPERTYVALUETABLE { |
| 143 FDE_CSSPROPERTYVALUE eName; | 145 FDE_CSSPROPERTYVALUE eName; |
| 144 const FX_WCHAR* pszName; | 146 const FX_WCHAR* pszName; |
| 145 uint32_t dwHash; | 147 uint32_t dwHash; |
| 146 }; | 148 }; |
| 147 typedef FDE_CSSPROPERTYVALUETABLE const* FDE_LPCCSSPROPERTYVALUETABLE; | |
| 148 | 149 |
| 149 FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName( | 150 const FDE_CSSPROPERTYVALUETABLE* FDE_GetCSSPropertyValueByName( |
| 150 const CFX_WideStringC& wsName); | 151 const CFX_WideStringC& wsName); |
| 151 FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum( | 152 const FDE_CSSPROPERTYVALUETABLE* FDE_GetCSSPropertyValueByEnum( |
| 152 FDE_CSSPROPERTYVALUE eName); | 153 FDE_CSSPROPERTYVALUE eName); |
| 154 |
| 153 struct FDE_CSSMEDIATYPETABLE { | 155 struct FDE_CSSMEDIATYPETABLE { |
| 154 uint16_t wHash; | 156 uint16_t wHash; |
| 155 uint16_t wValue; | 157 uint16_t wValue; |
| 156 }; | 158 }; |
| 157 typedef FDE_CSSMEDIATYPETABLE const* FDE_LPCCSSMEDIATYPETABLE; | 159 typedef FDE_CSSMEDIATYPETABLE const* FDE_LPCCSSMEDIATYPETABLE; |
| 158 FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName( | 160 FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName( |
| 159 const CFX_WideStringC& wsName); | 161 const CFX_WideStringC& wsName); |
| 160 struct FDE_CSSLENGTHUNITTABLE { | 162 struct FDE_CSSLENGTHUNITTABLE { |
| 161 uint16_t wHash; | 163 uint16_t wHash; |
| 162 uint16_t wValue; | 164 uint16_t wValue; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 189 int32_t& iLength); | 191 int32_t& iLength); |
| 190 FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue, | 192 FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue, |
| 191 int32_t iValueLen, | 193 int32_t iValueLen, |
| 192 FX_ARGB& dwColor); | 194 FX_ARGB& dwColor); |
| 193 FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue, | 195 FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue, |
| 194 int32_t iValueLen, | 196 int32_t iValueLen, |
| 195 int32_t& iOffset, | 197 int32_t& iOffset, |
| 196 int32_t& iLength); | 198 int32_t& iLength); |
| 197 | 199 |
| 198 #endif // XFA_FDE_CSS_FDE_CSSDATATABLE_H_ | 200 #endif // XFA_FDE_CSS_FDE_CSSDATATABLE_H_ |
| OLD | NEW |