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" |
(...skipping 18 matching lines...) Expand all Loading... |
29 FX_BOOL bQueryIn); | 29 FX_BOOL bQueryIn); |
30 typedef FX_BOOL (*FXJSE_PropDeleter)(CFXJSE_Value* pObject, | 30 typedef FX_BOOL (*FXJSE_PropDeleter)(CFXJSE_Value* pObject, |
31 const CFX_ByteStringC& szPropName); | 31 const CFX_ByteStringC& szPropName); |
32 | 32 |
33 enum FXJSE_ClassPropTypes { | 33 enum FXJSE_ClassPropTypes { |
34 FXJSE_ClassPropType_None, | 34 FXJSE_ClassPropType_None, |
35 FXJSE_ClassPropType_Property, | 35 FXJSE_ClassPropType_Property, |
36 FXJSE_ClassPropType_Method | 36 FXJSE_ClassPropType_Method |
37 }; | 37 }; |
38 | 38 |
39 enum FXJSE_CompatibleModeFlags { | |
40 FXJSE_COMPATIBLEMODEFLAG_CONSTRUCTOREXTRAMETHODS = (1 << 0), | |
41 FXJSE_COMPATIBLEMODEFLAGCOUNT = 1, | |
42 }; | |
43 | |
44 struct FXJSE_FUNCTION_DESCRIPTOR { | 39 struct FXJSE_FUNCTION_DESCRIPTOR { |
45 const FX_CHAR* name; | 40 const FX_CHAR* name; |
46 FXJSE_FuncCallback callbackProc; | 41 FXJSE_FuncCallback callbackProc; |
47 }; | 42 }; |
48 | 43 |
49 struct FXJSE_PROPERTY_DESCRIPTOR { | 44 struct FXJSE_PROPERTY_DESCRIPTOR { |
50 const FX_CHAR* name; | 45 const FX_CHAR* name; |
51 FXJSE_PropAccessor getProc; | 46 FXJSE_PropAccessor getProc; |
52 FXJSE_PropAccessor setProc; | 47 FXJSE_PropAccessor setProc; |
53 }; | 48 }; |
(...skipping 17 matching lines...) Expand all Loading... |
71 | 66 |
72 v8::Isolate* FXJSE_Runtime_Create_Own(); | 67 v8::Isolate* FXJSE_Runtime_Create_Own(); |
73 void FXJSE_Runtime_Release(v8::Isolate* pIsolate); | 68 void FXJSE_Runtime_Release(v8::Isolate* pIsolate); |
74 | 69 |
75 CFXJSE_Context* FXJSE_Context_Create( | 70 CFXJSE_Context* FXJSE_Context_Create( |
76 v8::Isolate* pIsolate, | 71 v8::Isolate* pIsolate, |
77 const FXJSE_CLASS_DESCRIPTOR* lpGlobalClass, | 72 const FXJSE_CLASS_DESCRIPTOR* lpGlobalClass, |
78 CFXJSE_HostObject* lpGlobalObject); | 73 CFXJSE_HostObject* lpGlobalObject); |
79 void FXJSE_Context_Release(CFXJSE_Context* pContext); | 74 void FXJSE_Context_Release(CFXJSE_Context* pContext); |
80 CFXJSE_Value* FXJSE_Context_GetGlobalObject(CFXJSE_Context* pContext); | 75 CFXJSE_Value* FXJSE_Context_GetGlobalObject(CFXJSE_Context* pContext); |
81 | 76 void FXJSE_Context_EnableCompatibleMode(CFXJSE_Context* pContext); |
82 void FXJSE_Context_EnableCompatibleMode(CFXJSE_Context* pContext, | |
83 uint32_t dwCompatibleFlags); | |
84 | 77 |
85 CFXJSE_Class* FXJSE_DefineClass(CFXJSE_Context* pContext, | 78 CFXJSE_Class* FXJSE_DefineClass(CFXJSE_Context* pContext, |
86 const FXJSE_CLASS_DESCRIPTOR* lpClass); | 79 const FXJSE_CLASS_DESCRIPTOR* lpClass); |
87 | 80 |
88 FX_BOOL FXJSE_Value_IsUndefined(CFXJSE_Value* pValue); | 81 FX_BOOL FXJSE_Value_IsUndefined(CFXJSE_Value* pValue); |
89 FX_BOOL FXJSE_Value_IsNull(CFXJSE_Value* pValue); | 82 FX_BOOL FXJSE_Value_IsNull(CFXJSE_Value* pValue); |
90 FX_BOOL FXJSE_Value_IsBoolean(CFXJSE_Value* pValue); | 83 FX_BOOL FXJSE_Value_IsBoolean(CFXJSE_Value* pValue); |
91 FX_BOOL FXJSE_Value_IsUTF8String(CFXJSE_Value* pValue); | 84 FX_BOOL FXJSE_Value_IsUTF8String(CFXJSE_Value* pValue); |
92 FX_BOOL FXJSE_Value_IsNumber(CFXJSE_Value* pValue); | 85 FX_BOOL FXJSE_Value_IsNumber(CFXJSE_Value* pValue); |
93 FX_BOOL FXJSE_Value_IsObject(CFXJSE_Value* pValue); | 86 FX_BOOL FXJSE_Value_IsObject(CFXJSE_Value* pValue); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 136 |
144 FX_BOOL FXJSE_ExecuteScript(CFXJSE_Context* pContext, | 137 FX_BOOL FXJSE_ExecuteScript(CFXJSE_Context* pContext, |
145 const FX_CHAR* szScript, | 138 const FX_CHAR* szScript, |
146 CFXJSE_Value* pRetValue, | 139 CFXJSE_Value* pRetValue, |
147 CFXJSE_Value* pNewThisObject = nullptr); | 140 CFXJSE_Value* pNewThisObject = nullptr); |
148 | 141 |
149 void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, | 142 void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, |
150 const CFX_ByteStringC& utf8Message); | 143 const CFX_ByteStringC& utf8Message); |
151 | 144 |
152 #endif // XFA_FXJSE_INCLUDE_FXJSE_H_ | 145 #endif // XFA_FXJSE_INCLUDE_FXJSE_H_ |
OLD | NEW |