| 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 #include "v8/include/v8.h" | 12 #include "v8/include/v8.h" |
| 13 | 13 |
| 14 class CFXJSE_Arguments; | 14 class CFXJSE_Arguments; |
| 15 class CFXJSE_Class; | |
| 16 class CFXJSE_Context; | |
| 17 class CFXJSE_Value; | 15 class CFXJSE_Value; |
| 18 | 16 |
| 19 class CFXJSE_HostObject {}; // C++ object which can be wrapped by CFXJSE_value. | 17 class CFXJSE_HostObject {}; // C++ object which can be wrapped by CFXJSE_value. |
| 20 | 18 |
| 21 typedef void (*FXJSE_FuncCallback)(CFXJSE_Value* pThis, | 19 typedef void (*FXJSE_FuncCallback)(CFXJSE_Value* pThis, |
| 22 const CFX_ByteStringC& szFuncName, | 20 const CFX_ByteStringC& szFuncName, |
| 23 CFXJSE_Arguments& args); | 21 CFXJSE_Arguments& args); |
| 24 typedef void (*FXJSE_PropAccessor)(CFXJSE_Value* pObject, | 22 typedef void (*FXJSE_PropAccessor)(CFXJSE_Value* pObject, |
| 25 const CFX_ByteStringC& szPropName, | 23 const CFX_ByteStringC& szPropName, |
| 26 CFXJSE_Value* pValue); | 24 CFXJSE_Value* pValue); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 FXJSE_PropDeleter dynPropDeleter; | 58 FXJSE_PropDeleter dynPropDeleter; |
| 61 FXJSE_FuncCallback dynMethodCall; | 59 FXJSE_FuncCallback dynMethodCall; |
| 62 }; | 60 }; |
| 63 | 61 |
| 64 void FXJSE_Initialize(); | 62 void FXJSE_Initialize(); |
| 65 void FXJSE_Finalize(); | 63 void FXJSE_Finalize(); |
| 66 | 64 |
| 67 v8::Isolate* FXJSE_Runtime_Create_Own(); | 65 v8::Isolate* FXJSE_Runtime_Create_Own(); |
| 68 void FXJSE_Runtime_Release(v8::Isolate* pIsolate); | 66 void FXJSE_Runtime_Release(v8::Isolate* pIsolate); |
| 69 | 67 |
| 70 CFXJSE_Context* FXJSE_Context_Create( | 68 void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Message); |
| 71 v8::Isolate* pIsolate, | |
| 72 const FXJSE_CLASS_DESCRIPTOR* lpGlobalClass, | |
| 73 CFXJSE_HostObject* lpGlobalObject); | |
| 74 void FXJSE_Context_Release(CFXJSE_Context* pContext); | |
| 75 CFXJSE_Value* FXJSE_Context_GetGlobalObject(CFXJSE_Context* pContext); | |
| 76 void FXJSE_Context_EnableCompatibleMode(CFXJSE_Context* pContext); | |
| 77 | |
| 78 CFXJSE_Class* FXJSE_DefineClass(CFXJSE_Context* pContext, | |
| 79 const FXJSE_CLASS_DESCRIPTOR* lpClass); | |
| 80 | |
| 81 FX_BOOL FXJSE_Value_IsUndefined(CFXJSE_Value* pValue); | |
| 82 FX_BOOL FXJSE_Value_IsNull(CFXJSE_Value* pValue); | |
| 83 FX_BOOL FXJSE_Value_IsBoolean(CFXJSE_Value* pValue); | |
| 84 FX_BOOL FXJSE_Value_IsUTF8String(CFXJSE_Value* pValue); | |
| 85 FX_BOOL FXJSE_Value_IsNumber(CFXJSE_Value* pValue); | |
| 86 FX_BOOL FXJSE_Value_IsObject(CFXJSE_Value* pValue); | |
| 87 FX_BOOL FXJSE_Value_IsArray(CFXJSE_Value* pValue); | |
| 88 FX_BOOL FXJSE_Value_IsFunction(CFXJSE_Value* pValue); | |
| 89 | |
| 90 FX_BOOL FXJSE_ExecuteScript(CFXJSE_Context* pContext, | |
| 91 const FX_CHAR* szScript, | |
| 92 CFXJSE_Value* pRetValue, | |
| 93 CFXJSE_Value* pNewThisObject = nullptr); | |
| 94 | |
| 95 void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, | |
| 96 const CFX_ByteStringC& utf8Message); | |
| 97 | 69 |
| 98 #endif // XFA_FXJSE_INCLUDE_FXJSE_H_ | 70 #endif // XFA_FXJSE_INCLUDE_FXJSE_H_ |
| OLD | NEW |