Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: xfa/include/fxfa/fxfa_basic.h

Issue 1722873002: Remove many _CAPS structure names. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/include/fwl/theme/utils.h ('k') | xfa/src/fxfa/src/common/xfa_document.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_INCLUDE_FXFA_FXFA_BASIC_H_ 7 #ifndef XFA_INCLUDE_FXFA_FXFA_BASIC_H_
8 #define XFA_INCLUDE_FXFA_FXFA_BASIC_H_ 8 #define XFA_INCLUDE_FXFA_FXFA_BASIC_H_
9 9
10 #include "xfa/include/fxjse/fxjse.h" 10 #include "xfa/include/fxjse/fxjse.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 XFA_XDPPACKET_USER = 1 << XFA_PACKET_USER, 71 XFA_XDPPACKET_USER = 1 << XFA_PACKET_USER,
72 XFA_XDPPACKET_XDP = 1 << XFA_PACKET_XDP, 72 XFA_XDPPACKET_XDP = 1 << XFA_PACKET_XDP,
73 }; 73 };
74 enum XFA_XDPPACKET_FLAGS { 74 enum XFA_XDPPACKET_FLAGS {
75 XFA_XDPPACKET_FLAGS_COMPLETEMATCH = 1, 75 XFA_XDPPACKET_FLAGS_COMPLETEMATCH = 1,
76 XFA_XDPPACKET_FLAGS_PREFIXMATCH = 2, 76 XFA_XDPPACKET_FLAGS_PREFIXMATCH = 2,
77 XFA_XDPPACKET_FLAGS_NOMATCH = 4, 77 XFA_XDPPACKET_FLAGS_NOMATCH = 4,
78 XFA_XDPPACKET_FLAGS_SUPPORTONE = 8, 78 XFA_XDPPACKET_FLAGS_SUPPORTONE = 8,
79 XFA_XDPPACKET_FLAGS_SUPPORTMANY = 16, 79 XFA_XDPPACKET_FLAGS_SUPPORTMANY = 16,
80 }; 80 };
81 typedef struct _XFA_PACKETINFO { 81 struct XFA_PACKETINFO {
82 uint32_t uHash; 82 uint32_t uHash;
83 const FX_WCHAR* pName; 83 const FX_WCHAR* pName;
84 XFA_XDPPACKET eName; 84 XFA_XDPPACKET eName;
85 const FX_WCHAR* pURI; 85 const FX_WCHAR* pURI;
86 FX_DWORD eFlags; 86 FX_DWORD eFlags;
87 } XFA_PACKETINFO, *XFA_LPPACKETINFO; 87 };
88 typedef XFA_PACKETINFO const* XFA_LPCPACKETINFO; 88
89 XFA_LPCPACKETINFO XFA_GetPacketByName(const CFX_WideStringC& wsName); 89 const XFA_PACKETINFO* XFA_GetPacketByName(const CFX_WideStringC& wsName);
90 XFA_LPCPACKETINFO XFA_GetPacketByID(FX_DWORD dwPacket); 90 const XFA_PACKETINFO* XFA_GetPacketByID(FX_DWORD dwPacket);
91 extern const XFA_PACKETINFO g_XFAPacketData[]; 91 const XFA_PACKETINFO* XFA_GetPacketByIndex(XFA_PACKET ePacket);
92 inline XFA_LPCPACKETINFO XFA_GetPacketByIndex(XFA_PACKET ePacket) { 92
93 return g_XFAPacketData + ePacket;
94 }
95 enum XFA_ATTRIBUTEENUM { 93 enum XFA_ATTRIBUTEENUM {
96 XFA_ATTRIBUTEENUM_Asterisk, 94 XFA_ATTRIBUTEENUM_Asterisk,
97 XFA_ATTRIBUTEENUM_Slash, 95 XFA_ATTRIBUTEENUM_Slash,
98 XFA_ATTRIBUTEENUM_Backslash, 96 XFA_ATTRIBUTEENUM_Backslash,
99 XFA_ATTRIBUTEENUM_On, 97 XFA_ATTRIBUTEENUM_On,
100 XFA_ATTRIBUTEENUM_Tb, 98 XFA_ATTRIBUTEENUM_Tb,
101 XFA_ATTRIBUTEENUM_Up, 99 XFA_ATTRIBUTEENUM_Up,
102 XFA_ATTRIBUTEENUM_MetaData, 100 XFA_ATTRIBUTEENUM_MetaData,
103 XFA_ATTRIBUTEENUM_Delegate, 101 XFA_ATTRIBUTEENUM_Delegate,
104 XFA_ATTRIBUTEENUM_PostSubmit, 102 XFA_ATTRIBUTEENUM_PostSubmit,
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 XFA_ELEMENT_PickTrayByPDFSize, 911 XFA_ELEMENT_PickTrayByPDFSize,
914 XFA_ELEMENT_MonthNames, 912 XFA_ELEMENT_MonthNames,
915 XFA_ELEMENT_Severity, 913 XFA_ELEMENT_Severity,
916 XFA_ELEMENT_GroupParent, 914 XFA_ELEMENT_GroupParent,
917 XFA_ELEMENT_DocumentAssembly, 915 XFA_ELEMENT_DocumentAssembly,
918 XFA_ELEMENT_NumberSymbol, 916 XFA_ELEMENT_NumberSymbol,
919 XFA_ELEMENT_Tagged, 917 XFA_ELEMENT_Tagged,
920 XFA_ELEMENT_Items, 918 XFA_ELEMENT_Items,
921 }; 919 };
922 #define XFA_ELEMENT_UNKNOWN ((XFA_ELEMENT)-1) 920 #define XFA_ELEMENT_UNKNOWN ((XFA_ELEMENT)-1)
923 typedef struct _XFA_ELEMENTINFO { 921 struct XFA_ELEMENTINFO {
924 uint32_t uHash; 922 uint32_t uHash;
925 const FX_WCHAR* pName; 923 const FX_WCHAR* pName;
926 XFA_ELEMENT eName; 924 XFA_ELEMENT eName;
927 FX_DWORD dwPackets; 925 FX_DWORD dwPackets;
928 FX_DWORD eObjectType; 926 FX_DWORD eObjectType;
929 } XFA_ELEMENTINFO, *XFA_LPELEMENTINFO; 927 };
930 typedef XFA_ELEMENTINFO const* XFA_LPCELEMENTINFO;
931 int32_t XFA_GetElementCount(); 928 int32_t XFA_GetElementCount();
932 XFA_LPCELEMENTINFO XFA_GetElementByName(const CFX_WideStringC& wsName); 929 const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName);
933 XFA_LPCELEMENTINFO XFA_GetElementByID(XFA_ELEMENT eName); 930 const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_ELEMENT eName);
934 enum XFA_ATTRIBUTETYPE { 931 enum XFA_ATTRIBUTETYPE {
935 XFA_ATTRIBUTETYPE_NOTSURE, 932 XFA_ATTRIBUTETYPE_NOTSURE,
936 XFA_ATTRIBUTETYPE_Enum, 933 XFA_ATTRIBUTETYPE_Enum,
937 XFA_ATTRIBUTETYPE_Cdata, 934 XFA_ATTRIBUTETYPE_Cdata,
938 XFA_ATTRIBUTETYPE_Boolean, 935 XFA_ATTRIBUTETYPE_Boolean,
939 XFA_ATTRIBUTETYPE_Integer, 936 XFA_ATTRIBUTETYPE_Integer,
940 XFA_ATTRIBUTETYPE_Measure, 937 XFA_ATTRIBUTETYPE_Measure,
941 }; 938 };
942 typedef struct _XFA_ATTRIBUTEINFO { 939 struct XFA_ATTRIBUTEINFO {
943 uint32_t uHash; 940 uint32_t uHash;
944 const FX_WCHAR* pName; 941 const FX_WCHAR* pName;
945 XFA_ATTRIBUTE eName; 942 XFA_ATTRIBUTE eName;
946 XFA_ATTRIBUTETYPE eType; 943 XFA_ATTRIBUTETYPE eType;
947 FX_DWORD dwPackets; 944 FX_DWORD dwPackets;
948 void* pDefValue; 945 void* pDefValue;
949 } XFA_ATTRIBUTEINFO, *XFA_LPATTRIBUTEINFO; 946 };
950 typedef XFA_ATTRIBUTEINFO const* XFA_LPCATTRIBUTEINFO;
951 int32_t XFA_GetAttributeCount(); 947 int32_t XFA_GetAttributeCount();
952 XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(const CFX_WideStringC& wsName); 948 const XFA_ATTRIBUTEINFO* XFA_GetAttributeByName(const CFX_WideStringC& wsName);
953 XFA_LPCATTRIBUTEINFO XFA_GetAttributeByID(XFA_ATTRIBUTE eName); 949 const XFA_ATTRIBUTEINFO* XFA_GetAttributeByID(XFA_ATTRIBUTE eName);
954 FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue, 950 FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue,
955 XFA_ELEMENT eElement, 951 XFA_ELEMENT eElement,
956 XFA_ATTRIBUTE eAttribute, 952 XFA_ATTRIBUTE eAttribute,
957 XFA_ATTRIBUTETYPE eType, 953 XFA_ATTRIBUTETYPE eType,
958 FX_DWORD dwPacket); 954 FX_DWORD dwPacket);
959 XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, 955 XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement,
960 XFA_ATTRIBUTE eAttribute, 956 XFA_ATTRIBUTE eAttribute,
961 FX_DWORD dwPacket); 957 FX_DWORD dwPacket);
962 CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, 958 CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement,
963 XFA_ATTRIBUTE eAttribute, 959 XFA_ATTRIBUTE eAttribute,
964 FX_DWORD dwPacket); 960 FX_DWORD dwPacket);
965 FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, 961 FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement,
966 XFA_ATTRIBUTE eAttribute, 962 XFA_ATTRIBUTE eAttribute,
967 FX_DWORD dwPacket); 963 FX_DWORD dwPacket);
968 int32_t XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, 964 int32_t XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement,
969 XFA_ATTRIBUTE eAttribute, 965 XFA_ATTRIBUTE eAttribute,
970 FX_DWORD dwPacket); 966 FX_DWORD dwPacket);
971 CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, 967 CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement,
972 XFA_ATTRIBUTE eAttribute, 968 XFA_ATTRIBUTE eAttribute,
973 FX_DWORD dwPacket); 969 FX_DWORD dwPacket);
974 typedef struct _XFA_ELEMENTHIERARCHY { 970 struct XFA_ELEMENTHIERARCHY {
975 FX_WORD wStart; 971 FX_WORD wStart;
976 FX_WORD wCount; 972 FX_WORD wCount;
977 FX_WORD wParentIndex; 973 FX_WORD wParentIndex;
978 } XFA_ELEMENTHIERARCHY, *XFA_LPELEMENTHIERARCHY; 974 };
979 typedef XFA_ELEMENTHIERARCHY const* XFA_LPCELEMENTHIERARCHY; 975 struct XFA_SCRIPTHIERARCHY {
980 typedef struct _XFA_SCRIPTHIERARCHY {
981 FX_WORD wMethodStart; 976 FX_WORD wMethodStart;
982 FX_WORD wMethodCount; 977 FX_WORD wMethodCount;
983 FX_WORD wAttributeStart; 978 FX_WORD wAttributeStart;
984 FX_WORD wAttributeCount; 979 FX_WORD wAttributeCount;
985 int16_t wParentIndex; 980 int16_t wParentIndex;
986 } XFA_SCRIPTHIERARCHY, *XFA_LPSCRIPTHIERARCHY; 981 };
987 typedef XFA_SCRIPTHIERARCHY const* XFA_LPCSCRIPTHIERARCHY; 982 typedef XFA_SCRIPTHIERARCHY const* XFA_LPCSCRIPTHIERARCHY;
988 const FX_WORD* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount); 983 const FX_WORD* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount);
989 const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount); 984 const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount);
990 XFA_LPCELEMENTINFO XFA_GetChildOfElement(XFA_ELEMENT eElement, 985 const XFA_ELEMENTINFO* XFA_GetChildOfElement(XFA_ELEMENT eElement,
991 XFA_ELEMENT eChild, 986 XFA_ELEMENT eChild,
992 FX_DWORD dwPacket); 987 FX_DWORD dwPacket);
993 XFA_LPCATTRIBUTEINFO XFA_GetAttributeOfElement(XFA_ELEMENT eElement, 988 const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement,
994 XFA_ATTRIBUTE eAttribute, 989 XFA_ATTRIBUTE eAttribute,
995 FX_DWORD dwPacket); 990 FX_DWORD dwPacket);
996 #define XFA_PROPERTYFLAG_OneOf 0x01 991 #define XFA_PROPERTYFLAG_OneOf 0x01
997 #define XFA_PROPERTYFLAG_DefaultOneOf 0x02 992 #define XFA_PROPERTYFLAG_DefaultOneOf 0x02
998 typedef struct _XFA_PROPERTY { 993 struct XFA_PROPERTY {
999 FX_WORD eName; 994 FX_WORD eName;
1000 uint8_t uOccur; 995 uint8_t uOccur;
1001 uint8_t uFlags; 996 uint8_t uFlags;
1002 } XFA_PROPERTY, *XFA_LPPROPERTY; 997 };
1003 typedef XFA_PROPERTY const* XFA_LPCPROPERTY; 998 const XFA_PROPERTY* XFA_GetElementProperties(XFA_ELEMENT eElement,
1004 XFA_LPCPROPERTY XFA_GetElementProperties(XFA_ELEMENT eElement, int32_t& iCount); 999 int32_t& iCount);
1005 XFA_LPCPROPERTY XFA_GetPropertyOfElement(XFA_ELEMENT eElement, 1000 const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_ELEMENT eElement,
1006 XFA_ELEMENT eProperty, 1001 XFA_ELEMENT eProperty,
1007 FX_DWORD dwPacket); 1002 FX_DWORD dwPacket);
1008 typedef struct _XFA_ATTRIBUTEENUMINFO { 1003 struct XFA_ATTRIBUTEENUMINFO {
1009 uint32_t uHash; 1004 uint32_t uHash;
1010 const FX_WCHAR* pName; 1005 const FX_WCHAR* pName;
1011 XFA_ATTRIBUTEENUM eName; 1006 XFA_ATTRIBUTEENUM eName;
1012 } XFA_ATTRIBUTEENUMINFO, *XFA_LPATTRIBUTEENUMINFO; 1007 };
1013 typedef XFA_ATTRIBUTEENUMINFO const* XFA_LPCATTRIBUTEENUMINFO; 1008 const XFA_ATTRIBUTEENUMINFO* XFA_GetAttributeEnumByName(
1014 XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByName(
1015 const CFX_WideStringC& wsName); 1009 const CFX_WideStringC& wsName);
1016 XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByID(XFA_ATTRIBUTEENUM eName); 1010 const XFA_ATTRIBUTEENUMINFO* XFA_GetAttributeEnumByID(XFA_ATTRIBUTEENUM eName);
1017 enum XFA_UNIT { 1011 enum XFA_UNIT {
1018 XFA_UNIT_Unknown, 1012 XFA_UNIT_Unknown,
1019 XFA_UNIT_Percent, 1013 XFA_UNIT_Percent,
1020 XFA_UNIT_Angle, 1014 XFA_UNIT_Angle,
1021 XFA_UNIT_Em, 1015 XFA_UNIT_Em,
1022 XFA_UNIT_Pt, 1016 XFA_UNIT_Pt,
1023 XFA_UNIT_In, 1017 XFA_UNIT_In,
1024 XFA_UNIT_Pc, 1018 XFA_UNIT_Pc,
1025 XFA_UNIT_Cm, 1019 XFA_UNIT_Cm,
1026 XFA_UNIT_Mm, 1020 XFA_UNIT_Mm,
(...skipping 20 matching lines...) Expand all
1047 CXFA_Measurement(FX_FLOAT fValue, XFA_UNIT eUnit) { Set(fValue, eUnit); } 1041 CXFA_Measurement(FX_FLOAT fValue, XFA_UNIT eUnit) { Set(fValue, eUnit); }
1048 static XFA_UNIT GetUnit(const CFX_WideStringC& wsUnit); 1042 static XFA_UNIT GetUnit(const CFX_WideStringC& wsUnit);
1049 1043
1050 protected: 1044 protected:
1051 FX_FLOAT m_fValue; 1045 FX_FLOAT m_fValue;
1052 XFA_UNIT m_eUnit; 1046 XFA_UNIT m_eUnit;
1053 }; 1047 };
1054 class CFXJSE_Arguments; 1048 class CFXJSE_Arguments;
1055 class CXFA_Object; 1049 class CXFA_Object;
1056 typedef void (CXFA_Object::*XFA_METHOD_CALLBACK)(CFXJSE_Arguments* pArguments); 1050 typedef void (CXFA_Object::*XFA_METHOD_CALLBACK)(CFXJSE_Arguments* pArguments);
1057 typedef struct _XFA_METHODINFO { 1051 struct XFA_METHODINFO {
1058 uint32_t uHash; 1052 uint32_t uHash;
1059 const FX_WCHAR* pName; 1053 const FX_WCHAR* pName;
1060 XFA_METHOD_CALLBACK lpfnCallback; 1054 XFA_METHOD_CALLBACK lpfnCallback;
1061 } XFA_METHODINFO, *XFA_LPMETHODINFO; 1055 };
1062 typedef XFA_METHODINFO const* XFA_LPCMETHODINFO;
1063 int32_t XFA_GetMethodCount(); 1056 int32_t XFA_GetMethodCount();
1064 XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, 1057 const XFA_METHODINFO* XFA_GetMethodByName(XFA_ELEMENT eElement,
1065 const CFX_WideStringC& wsMethodName); 1058 const CFX_WideStringC& wsMethodName);
1066 typedef void (CXFA_Object::*XFA_ATTRIBUTE_CALLBACK)(FXJSE_HVALUE hValue, 1059 typedef void (CXFA_Object::*XFA_ATTRIBUTE_CALLBACK)(FXJSE_HVALUE hValue,
1067 FX_BOOL bSetting, 1060 FX_BOOL bSetting,
1068 XFA_ATTRIBUTE eAttribute); 1061 XFA_ATTRIBUTE eAttribute);
1069 enum XFA_SCRIPT_TYPE { 1062 enum XFA_SCRIPT_TYPE {
1070 XFA_SCRIPT_Basic, 1063 XFA_SCRIPT_Basic,
1071 XFA_SCRIPT_Object, 1064 XFA_SCRIPT_Object,
1072 }; 1065 };
1073 typedef struct _XFA_SCRIPTATTRIBUTEINFO { 1066 struct XFA_SCRIPTATTRIBUTEINFO {
1074 uint32_t uHash; 1067 uint32_t uHash;
1075 const FX_WCHAR* pName; 1068 const FX_WCHAR* pName;
1076 XFA_ATTRIBUTE_CALLBACK lpfnCallback; 1069 XFA_ATTRIBUTE_CALLBACK lpfnCallback;
1077 int32_t eAttribute; 1070 int32_t eAttribute;
1078 FX_WORD eValueType; 1071 FX_WORD eValueType;
1079 } XFA_SCRIPTATTRIBUTEINFO, *XFA_LPSCRIPTATTRIBUTEINFO; 1072 };
1080 typedef XFA_SCRIPTATTRIBUTEINFO const* XFA_LPCSCRIPTATTRIBUTEINFO; 1073 const XFA_SCRIPTATTRIBUTEINFO* XFA_GetScriptAttributeByName(
1081 XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName(
1082 XFA_ELEMENT eElement, 1074 XFA_ELEMENT eElement,
1083 const CFX_WideStringC& wsAttributeName); 1075 const CFX_WideStringC& wsAttributeName);
1084 1076
1085 #endif // XFA_INCLUDE_FXFA_FXFA_BASIC_H_ 1077 #endif // XFA_INCLUDE_FXFA_FXFA_BASIC_H_
OLDNEW
« no previous file with comments | « xfa/include/fwl/theme/utils.h ('k') | xfa/src/fxfa/src/common/xfa_document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698