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