| 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_SRC_FXFA_SRC_COMMON_XFA_FM2JSAPI_H_ | 7 #ifndef XFA_SRC_FXFA_SRC_COMMON_XFA_FM2JSAPI_H_ |
| 8 #define XFA_SRC_FXFA_SRC_COMMON_XFA_FM2JSAPI_H_ | 8 #define XFA_SRC_FXFA_SRC_COMMON_XFA_FM2JSAPI_H_ |
| 9 | 9 |
| 10 #include "core/include/fxcrt/fx_basic.h" |
| 11 #include "xfa/include/fxjse/fxjse.h" |
| 12 |
| 10 #define FOXIT_XFA_FM2JS_FORMCALC_RUNTIME "foxit_xfa_formcalc_runtime" | 13 #define FOXIT_XFA_FM2JS_FORMCALC_RUNTIME "foxit_xfa_formcalc_runtime" |
| 11 | 14 |
| 12 #ifdef __cplusplus | 15 #ifdef __cplusplus |
| 13 extern "C" { | 16 extern "C" { |
| 14 #endif | 17 #endif |
| 15 | 18 |
| 16 typedef struct XFA_HFM2JSCONTEXT_ { void** pData; } * XFA_HFM2JSCONTEXT; | 19 typedef struct XFA_HFM2JSCONTEXT_ { void** pData; } * XFA_HFM2JSCONTEXT; |
| 17 int32_t XFA_FM2JS_Translate(const CFX_WideStringC& wsFormcalc, | 20 int32_t XFA_FM2JS_Translate(const CFX_WideStringC& wsFormcalc, |
| 18 CFX_WideTextBuf& wsJavascript, | 21 CFX_WideTextBuf& wsJavascript, |
| 19 CFX_WideString& wsError); | 22 CFX_WideString& wsError); |
| 20 XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate(); | 23 XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate(); |
| 21 void XFA_FM2JS_ContextInitialize(XFA_HFM2JSCONTEXT hFM2JSContext, | 24 void XFA_FM2JS_ContextInitialize(XFA_HFM2JSCONTEXT hFM2JSContext, |
| 22 FXJSE_HRUNTIME hScriptRuntime, | 25 FXJSE_HRUNTIME hScriptRuntime, |
| 23 FXJSE_HCONTEXT hScriptContext, | 26 FXJSE_HCONTEXT hScriptContext, |
| 24 CXFA_Document* pDocument); | 27 CXFA_Document* pDocument); |
| 25 void XFA_FM2JS_GlobalPropertyGetter(XFA_HFM2JSCONTEXT hFM2JSContext, | 28 void XFA_FM2JS_GlobalPropertyGetter(XFA_HFM2JSCONTEXT hFM2JSContext, |
| 26 FXJSE_HVALUE hValue); | 29 FXJSE_HVALUE hValue); |
| 27 void XFA_FM2JS_ContextRelease(XFA_HFM2JSCONTEXT hFM2JSContext); | 30 void XFA_FM2JS_ContextRelease(XFA_HFM2JSCONTEXT hFM2JSContext); |
| 28 | 31 |
| 29 #ifdef __cplusplus | 32 #ifdef __cplusplus |
| 30 } | 33 } |
| 31 #endif | 34 #endif |
| 32 | 35 |
| 33 #endif // XFA_SRC_FXFA_SRC_COMMON_XFA_FM2JSAPI_H_ | 36 #endif // XFA_SRC_FXFA_SRC_COMMON_XFA_FM2JSAPI_H_ |
| OLD | NEW |