• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef XFA_FDE_CSS_FDE_CSSDATATABLE_H_
8 #define XFA_FDE_CSS_FDE_CSSDATATABLE_H_
9 
10 #include <memory>
11 #include <vector>
12 
13 #include "core/fxcrt/fx_system.h"
14 #include "xfa/fde/css/cfde_cssnumbervalue.h"
15 #include "xfa/fde/css/cfde_cssvalue.h"
16 #include "xfa/fde/css/fde_css.h"
17 
18 #define FDE_IsOnlyValue(type, enum) \
19   (((type) & ~(enum)) == FDE_CSSVALUETYPE_Primitive)
20 
21 struct FDE_CSSPropertyTable {
22   FDE_CSSProperty eName;
23   const FX_WCHAR* pszName;
24   uint32_t dwHash;
25   uint32_t dwType;
26 };
27 
28 struct FDE_CSSPropertyValueTable {
29   FDE_CSSPropertyValue eName;
30   const FX_WCHAR* pszName;
31   uint32_t dwHash;
32 };
33 
34 struct FDE_CSSLengthUnitTable {
35   uint16_t wHash;
36   FDE_CSSNumberType wValue;
37 };
38 
39 struct FDE_CSSCOLORTABLE {
40   uint32_t dwHash;
41   FX_ARGB dwValue;
42 };
43 
44 const FDE_CSSPropertyTable* FDE_GetCSSPropertyByName(
45     const CFX_WideStringC& wsName);
46 const FDE_CSSPropertyTable* FDE_GetCSSPropertyByEnum(FDE_CSSProperty eName);
47 
48 const FDE_CSSPropertyValueTable* FDE_GetCSSPropertyValueByName(
49     const CFX_WideStringC& wsName);
50 
51 const FDE_CSSLengthUnitTable* FDE_GetCSSLengthUnitByName(
52     const CFX_WideStringC& wsName);
53 
54 const FDE_CSSCOLORTABLE* FDE_GetCSSColorByName(const CFX_WideStringC& wsName);
55 
56 #endif  // XFA_FDE_CSS_FDE_CSSDATATABLE_H_
57