| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 struct FDE_CSSPROPERTYTABLE { | 132 struct FDE_CSSPROPERTYTABLE { |
| 133 FDE_CSSPROPERTY eName; | 133 FDE_CSSPROPERTY eName; |
| 134 const FX_WCHAR* pszName; | 134 const FX_WCHAR* pszName; |
| 135 FX_DWORD dwHash; | 135 uint32_t dwHash; |
| 136 FX_DWORD dwType; | 136 uint32_t dwType; |
| 137 }; | 137 }; |
| 138 typedef FDE_CSSPROPERTYTABLE const* FDE_LPCCSSPROPERTYTABLE; | 138 typedef FDE_CSSPROPERTYTABLE const* FDE_LPCCSSPROPERTYTABLE; |
| 139 | 139 |
| 140 FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const FX_WCHAR* pszName, | 140 FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const FX_WCHAR* pszName, |
| 141 int32_t iLength); | 141 int32_t iLength); |
| 142 FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName); | 142 FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName); |
| 143 struct FDE_CSSPROPERTYVALUETABLE { | 143 struct FDE_CSSPROPERTYVALUETABLE { |
| 144 FDE_CSSPROPERTYVALUE eName; | 144 FDE_CSSPROPERTYVALUE eName; |
| 145 const FX_WCHAR* pszName; | 145 const FX_WCHAR* pszName; |
| 146 FX_DWORD dwHash; | 146 uint32_t dwHash; |
| 147 }; | 147 }; |
| 148 typedef FDE_CSSPROPERTYVALUETABLE const* FDE_LPCCSSPROPERTYVALUETABLE; | 148 typedef FDE_CSSPROPERTYVALUETABLE const* FDE_LPCCSSPROPERTYVALUETABLE; |
| 149 | 149 |
| 150 FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName( | 150 FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName( |
| 151 const FX_WCHAR* pszName, | 151 const FX_WCHAR* pszName, |
| 152 int32_t iLength); | 152 int32_t iLength); |
| 153 FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum( | 153 FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum( |
| 154 FDE_CSSPROPERTYVALUE eName); | 154 FDE_CSSPROPERTYVALUE eName); |
| 155 struct FDE_CSSMEDIATYPETABLE { | 155 struct FDE_CSSMEDIATYPETABLE { |
| 156 uint16_t wHash; | 156 uint16_t wHash; |
| 157 uint16_t wValue; | 157 uint16_t wValue; |
| 158 }; | 158 }; |
| 159 typedef FDE_CSSMEDIATYPETABLE const* FDE_LPCCSSMEDIATYPETABLE; | 159 typedef FDE_CSSMEDIATYPETABLE const* FDE_LPCCSSMEDIATYPETABLE; |
| 160 FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* pszName, | 160 FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* pszName, |
| 161 int32_t iLength); | 161 int32_t iLength); |
| 162 struct FDE_CSSLENGTHUNITTABLE { | 162 struct FDE_CSSLENGTHUNITTABLE { |
| 163 uint16_t wHash; | 163 uint16_t wHash; |
| 164 uint16_t wValue; | 164 uint16_t wValue; |
| 165 }; | 165 }; |
| 166 typedef FDE_CSSLENGTHUNITTABLE const* FDE_LPCCSSLENGTHUNITTABLE; | 166 typedef FDE_CSSLENGTHUNITTABLE const* FDE_LPCCSSLENGTHUNITTABLE; |
| 167 FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* pszName, | 167 FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* pszName, |
| 168 int32_t iLength); | 168 int32_t iLength); |
| 169 struct FDE_CSSCOLORTABLE { | 169 struct FDE_CSSCOLORTABLE { |
| 170 FX_DWORD dwHash; | 170 uint32_t dwHash; |
| 171 FX_ARGB dwValue; | 171 FX_ARGB dwValue; |
| 172 }; | 172 }; |
| 173 typedef FDE_CSSCOLORTABLE const* FDE_LPCCSSCOLORTABLE; | 173 typedef FDE_CSSCOLORTABLE const* FDE_LPCCSSCOLORTABLE; |
| 174 FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const FX_WCHAR* pszName, | 174 FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const FX_WCHAR* pszName, |
| 175 int32_t iLength); | 175 int32_t iLength); |
| 176 struct FDE_CSSPERSUDOTABLE { | 176 struct FDE_CSSPERSUDOTABLE { |
| 177 FDE_CSSPERSUDO eName; | 177 FDE_CSSPERSUDO eName; |
| 178 const FX_WCHAR* pszName; | 178 const FX_WCHAR* pszName; |
| 179 FX_DWORD dwHash; | 179 uint32_t dwHash; |
| 180 }; | 180 }; |
| 181 typedef FDE_CSSPERSUDOTABLE const* FDE_LPCCSSPERSUDOTABLE; | 181 typedef FDE_CSSPERSUDOTABLE const* FDE_LPCCSSPERSUDOTABLE; |
| 182 | 182 |
| 183 FDE_LPCCSSPERSUDOTABLE FDE_GetCSSPersudoByEnum(FDE_CSSPERSUDO ePersudo); | 183 FDE_LPCCSSPERSUDOTABLE FDE_GetCSSPersudoByEnum(FDE_CSSPERSUDO ePersudo); |
| 184 FX_BOOL FDE_ParseCSSNumber(const FX_WCHAR* pszValue, | 184 FX_BOOL FDE_ParseCSSNumber(const FX_WCHAR* pszValue, |
| 185 int32_t iValueLen, | 185 int32_t iValueLen, |
| 186 FX_FLOAT& fValue, | 186 FX_FLOAT& fValue, |
| 187 FDE_CSSPRIMITIVETYPE& eUnit); | 187 FDE_CSSPRIMITIVETYPE& eUnit); |
| 188 FX_BOOL FDE_ParseCSSString(const FX_WCHAR* pszValue, | 188 FX_BOOL FDE_ParseCSSString(const FX_WCHAR* pszValue, |
| 189 int32_t iValueLen, | 189 int32_t iValueLen, |
| 190 int32_t& iOffset, | 190 int32_t& iOffset, |
| 191 int32_t& iLength); | 191 int32_t& iLength); |
| 192 FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue, | 192 FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue, |
| 193 int32_t iValueLen, | 193 int32_t iValueLen, |
| 194 FX_ARGB& dwColor); | 194 FX_ARGB& dwColor); |
| 195 FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue, | 195 FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue, |
| 196 int32_t iValueLen, | 196 int32_t iValueLen, |
| 197 int32_t& iOffset, | 197 int32_t& iOffset, |
| 198 int32_t& iLength); | 198 int32_t& iLength); |
| 199 | 199 |
| 200 #endif // XFA_FDE_CSS_FDE_CSSDATATABLE_H_ | 200 #endif // XFA_FDE_CSS_FDE_CSSDATATABLE_H_ |
| OLD | NEW |