| 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_FXJSE_INCLUDE_FXJSE_H_ | 7 #ifndef XFA_FXJSE_INCLUDE_FXJSE_H_ |
| 8 #define XFA_FXJSE_INCLUDE_FXJSE_H_ | 8 #define XFA_FXJSE_INCLUDE_FXJSE_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_string.h" | 10 #include "core/fxcrt/include/fx_string.h" |
| 11 #include "core/fxcrt/include/fx_system.h" | 11 #include "core/fxcrt/include/fx_system.h" |
| 12 | 12 |
| 13 struct FXJSE_CLASS; | 13 struct FXJSE_CLASS; |
| 14 class CFXJSE_Arguments; | 14 class CFXJSE_Arguments; |
| 15 | 15 |
| 16 typedef struct FXJSE_HRUNTIME_ { void* pData; } * FXJSE_HRUNTIME; | 16 typedef struct FXJSE_HRUNTIME_ { void* pData; } * FXJSE_HRUNTIME; |
| 17 typedef struct FXJSE_HCONTEXT_ { void* pData; } * FXJSE_HCONTEXT; | 17 typedef struct FXJSE_HCONTEXT_ { void* pData; } * FXJSE_HCONTEXT; |
| 18 typedef struct FXJSE_HCLASS_ { void* pData; } * FXJSE_HCLASS; | 18 typedef struct FXJSE_HCLASS_ { void* pData; } * FXJSE_HCLASS; |
| 19 typedef struct FXJSE_HVALUE_ { void* pData; } * FXJSE_HVALUE; | 19 typedef struct FXJSE_HVALUE_ { void* pData; } * FXJSE_HVALUE; |
| 20 // NOLINTNEXTLINE | 20 // NOLINTNEXTLINE |
| 21 typedef struct FXJSE_HOBJECT_ : public FXJSE_HVALUE_{} * FXJSE_HOBJECT; | 21 typedef struct FXJSE_HOBJECT_ : public FXJSE_HVALUE_{} * FXJSE_HOBJECT; |
| 22 typedef double FXJSE_DOUBLE; | |
| 23 | 22 |
| 24 typedef void (*FXJSE_FuncCallback)(FXJSE_HOBJECT hThis, | 23 typedef void (*FXJSE_FuncCallback)(FXJSE_HOBJECT hThis, |
| 25 const CFX_ByteStringC& szFuncName, | 24 const CFX_ByteStringC& szFuncName, |
| 26 CFXJSE_Arguments& args); | 25 CFXJSE_Arguments& args); |
| 27 typedef void (*FXJSE_PropAccessor)(FXJSE_HOBJECT hObject, | 26 typedef void (*FXJSE_PropAccessor)(FXJSE_HOBJECT hObject, |
| 28 const CFX_ByteStringC& szPropName, | 27 const CFX_ByteStringC& szPropName, |
| 29 FXJSE_HVALUE hValue); | 28 FXJSE_HVALUE hValue); |
| 30 typedef int32_t (*FXJSE_PropTypeGetter)(FXJSE_HOBJECT hObject, | 29 typedef int32_t (*FXJSE_PropTypeGetter)(FXJSE_HOBJECT hObject, |
| 31 const CFX_ByteStringC& szPropName, | 30 const CFX_ByteStringC& szPropName, |
| 32 FX_BOOL bQueryIn); | 31 FX_BOOL bQueryIn); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 FX_BOOL FXJSE_Value_IsUTF8String(FXJSE_HVALUE hValue); | 102 FX_BOOL FXJSE_Value_IsUTF8String(FXJSE_HVALUE hValue); |
| 104 FX_BOOL FXJSE_Value_IsNumber(FXJSE_HVALUE hValue); | 103 FX_BOOL FXJSE_Value_IsNumber(FXJSE_HVALUE hValue); |
| 105 FX_BOOL FXJSE_Value_IsInteger(FXJSE_HVALUE hValue); | 104 FX_BOOL FXJSE_Value_IsInteger(FXJSE_HVALUE hValue); |
| 106 FX_BOOL FXJSE_Value_IsObject(FXJSE_HVALUE hValue); | 105 FX_BOOL FXJSE_Value_IsObject(FXJSE_HVALUE hValue); |
| 107 FX_BOOL FXJSE_Value_IsArray(FXJSE_HVALUE hValue); | 106 FX_BOOL FXJSE_Value_IsArray(FXJSE_HVALUE hValue); |
| 108 FX_BOOL FXJSE_Value_IsFunction(FXJSE_HVALUE hValue); | 107 FX_BOOL FXJSE_Value_IsFunction(FXJSE_HVALUE hValue); |
| 109 FX_BOOL FXJSE_Value_IsDate(FXJSE_HVALUE hValue); | 108 FX_BOOL FXJSE_Value_IsDate(FXJSE_HVALUE hValue); |
| 110 | 109 |
| 111 FX_BOOL FXJSE_Value_ToBoolean(FXJSE_HVALUE hValue); | 110 FX_BOOL FXJSE_Value_ToBoolean(FXJSE_HVALUE hValue); |
| 112 FX_FLOAT FXJSE_Value_ToFloat(FXJSE_HVALUE hValue); | 111 FX_FLOAT FXJSE_Value_ToFloat(FXJSE_HVALUE hValue); |
| 113 FXJSE_DOUBLE FXJSE_Value_ToDouble(FXJSE_HVALUE hValue); | 112 double FXJSE_Value_ToDouble(FXJSE_HVALUE hValue); |
| 114 int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue); | 113 int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue); |
| 115 void FXJSE_Value_ToUTF8String(FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput); | 114 void FXJSE_Value_ToUTF8String(FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput); |
| 116 void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue, FXJSE_HCLASS hClass); | 115 void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue, FXJSE_HCLASS hClass); |
| 117 | 116 |
| 118 void FXJSE_Value_SetUndefined(FXJSE_HVALUE hValue); | 117 void FXJSE_Value_SetUndefined(FXJSE_HVALUE hValue); |
| 119 void FXJSE_Value_SetNull(FXJSE_HVALUE hValue); | 118 void FXJSE_Value_SetNull(FXJSE_HVALUE hValue); |
| 120 void FXJSE_Value_SetBoolean(FXJSE_HVALUE hValue, FX_BOOL bBoolean); | 119 void FXJSE_Value_SetBoolean(FXJSE_HVALUE hValue, FX_BOOL bBoolean); |
| 121 void FXJSE_Value_SetUTF8String(FXJSE_HVALUE hValue, | 120 void FXJSE_Value_SetUTF8String(FXJSE_HVALUE hValue, |
| 122 const CFX_ByteStringC& szString); | 121 const CFX_ByteStringC& szString); |
| 123 void FXJSE_Value_SetInteger(FXJSE_HVALUE hValue, int32_t nInteger); | 122 void FXJSE_Value_SetInteger(FXJSE_HVALUE hValue, int32_t nInteger); |
| 124 void FXJSE_Value_SetFloat(FXJSE_HVALUE hValue, FX_FLOAT fFloat); | 123 void FXJSE_Value_SetFloat(FXJSE_HVALUE hValue, FX_FLOAT fFloat); |
| 125 void FXJSE_Value_SetDouble(FXJSE_HVALUE hValue, FXJSE_DOUBLE dDouble); | 124 void FXJSE_Value_SetDouble(FXJSE_HVALUE hValue, double dDouble); |
| 126 void FXJSE_Value_SetObject(FXJSE_HVALUE hValue, | 125 void FXJSE_Value_SetObject(FXJSE_HVALUE hValue, |
| 127 void* lpObject, | 126 void* lpObject, |
| 128 FXJSE_HCLASS hClass); | 127 FXJSE_HCLASS hClass); |
| 129 void FXJSE_Value_SetArray(FXJSE_HVALUE hValue, | 128 void FXJSE_Value_SetArray(FXJSE_HVALUE hValue, |
| 130 uint32_t uValueCount, | 129 uint32_t uValueCount, |
| 131 FXJSE_HVALUE* rgValues); | 130 FXJSE_HVALUE* rgValues); |
| 132 void FXJSE_Value_SetDate(FXJSE_HVALUE hValue, FXJSE_DOUBLE dDouble); | 131 void FXJSE_Value_SetDate(FXJSE_HVALUE hValue, double dDouble); |
| 133 void FXJSE_Value_Set(FXJSE_HVALUE hValue, FXJSE_HVALUE hOriginalValue); | 132 void FXJSE_Value_Set(FXJSE_HVALUE hValue, FXJSE_HVALUE hOriginalValue); |
| 134 | 133 |
| 135 FX_BOOL FXJSE_Value_GetObjectProp(FXJSE_HVALUE hValue, | 134 FX_BOOL FXJSE_Value_GetObjectProp(FXJSE_HVALUE hValue, |
| 136 const CFX_ByteStringC& szPropName, | 135 const CFX_ByteStringC& szPropName, |
| 137 FXJSE_HVALUE hPropValue); | 136 FXJSE_HVALUE hPropValue); |
| 138 FX_BOOL FXJSE_Value_SetObjectProp(FXJSE_HVALUE hValue, | 137 FX_BOOL FXJSE_Value_SetObjectProp(FXJSE_HVALUE hValue, |
| 139 const CFX_ByteStringC& szPropName, | 138 const CFX_ByteStringC& szPropName, |
| 140 FXJSE_HVALUE hPropValue); | 139 FXJSE_HVALUE hPropValue); |
| 141 FX_BOOL FXJSE_Value_GetObjectPropByIdx(FXJSE_HVALUE hValue, | 140 FX_BOOL FXJSE_Value_GetObjectPropByIdx(FXJSE_HVALUE hValue, |
| 142 uint32_t uPropIdx, | 141 uint32_t uPropIdx, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 171 const CFX_ByteStringC& utf8Message); | 170 const CFX_ByteStringC& utf8Message); |
| 172 | 171 |
| 173 FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue, | 172 FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue, |
| 174 CFX_ByteString& utf8Name, | 173 CFX_ByteString& utf8Name, |
| 175 CFX_ByteString& utf8Message); | 174 CFX_ByteString& utf8Message); |
| 176 FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, | 175 FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, |
| 177 int32_t& nLine, | 176 int32_t& nLine, |
| 178 int32_t& nCol); | 177 int32_t& nCol); |
| 179 | 178 |
| 180 #endif // XFA_FXJSE_INCLUDE_FXJSE_H_ | 179 #endif // XFA_FXJSE_INCLUDE_FXJSE_H_ |
| OLD | NEW |